mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
code cleanup: rubocop: fix Style/ClassCheck in lib/redmine/scm/adapters/cvs_adapter.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18490 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
c50e1facb4
commit
9f26eac4f0
@ -1157,13 +1157,6 @@ Style/CharacterLiteral:
|
|||||||
Style/ClassAndModuleChildren:
|
Style/ClassAndModuleChildren:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
# Configuration parameters: EnforcedStyle.
|
|
||||||
# SupportedStyles: is_a?, kind_of?
|
|
||||||
Style/ClassCheck:
|
|
||||||
Exclude:
|
|
||||||
- 'lib/redmine/scm/adapters/cvs_adapter.rb'
|
|
||||||
|
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
Style/ClassMethods:
|
Style/ClassMethods:
|
||||||
Exclude:
|
Exclude:
|
||||||
|
|||||||
@ -340,9 +340,8 @@ module Redmine
|
|||||||
# convert a date/time into the CVS-format
|
# convert a date/time into the CVS-format
|
||||||
def time_to_cvstime(time)
|
def time_to_cvstime(time)
|
||||||
return nil if time.nil?
|
return nil if time.nil?
|
||||||
time = Time.now if (time.kind_of?(String) && time == 'HEAD')
|
time = Time.now if (time.is_a?(String) && time == 'HEAD')
|
||||||
|
unless time.is_a?(Time)
|
||||||
unless time.kind_of? Time
|
|
||||||
time = Time.parse(time)
|
time = Time.parse(time)
|
||||||
end
|
end
|
||||||
return time_to_cvstime_rlog(time)
|
return time_to_cvstime_rlog(time)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user