mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
code cleanup: rubocop: fix Style/WhileUntilModifier in app/models/attachment.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18783 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
f2b274476a
commit
c95bead933
@ -1437,11 +1437,6 @@ Style/VariableInterpolation:
|
|||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/redmine/configuration.rb'
|
- 'lib/redmine/configuration.rb'
|
||||||
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
Style/WhileUntilModifier:
|
|
||||||
Exclude:
|
|
||||||
- 'app/models/attachment.rb'
|
|
||||||
|
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: EnforcedStyle, MinSize, WordRegex.
|
# Configuration parameters: EnforcedStyle, MinSize, WordRegex.
|
||||||
# SupportedStyles: percent, brackets
|
# SupportedStyles: percent, brackets
|
||||||
|
|||||||
@ -506,7 +506,8 @@ class Attachment < ActiveRecord::Base
|
|||||||
# keep the extension if any
|
# keep the extension if any
|
||||||
ascii << $1 if filename =~ %r{(\.[a-zA-Z0-9]+)$}
|
ascii << $1 if filename =~ %r{(\.[a-zA-Z0-9]+)$}
|
||||||
end
|
end
|
||||||
while File.exist?(File.join(storage_path, directory.to_s, "#{timestamp}_#{ascii}"))
|
while File.exist?(File.join(storage_path, directory.to_s,
|
||||||
|
"#{timestamp}_#{ascii}"))
|
||||||
timestamp.succ!
|
timestamp.succ!
|
||||||
end
|
end
|
||||||
"#{timestamp}_#{ascii}"
|
"#{timestamp}_#{ascii}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user