mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
code cleanup: rubocop: fix Lint/IneffectiveAccessModifier in lib/redmine/scm/adapters/abstract_adapter.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18777 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
cb2d4068e8
commit
7738078717
@ -395,7 +395,6 @@ Lint/IneffectiveAccessModifier:
|
|||||||
- 'app/models/mail_handler.rb'
|
- 'app/models/mail_handler.rb'
|
||||||
- 'app/models/mailer.rb'
|
- 'app/models/mailer.rb'
|
||||||
- 'app/models/user.rb'
|
- 'app/models/user.rb'
|
||||||
- 'lib/redmine/scm/adapters/abstract_adapter.rb'
|
|
||||||
|
|
||||||
Lint/InterpolationCheck:
|
Lint/InterpolationCheck:
|
||||||
Exclude:
|
Exclude:
|
||||||
|
|||||||
@ -203,10 +203,6 @@ module Redmine
|
|||||||
self.class.shellout(cmd, options, &block)
|
self.class.shellout(cmd, options, &block)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.logger
|
|
||||||
Rails.logger
|
|
||||||
end
|
|
||||||
|
|
||||||
# Path to the file where scm stderr output is logged
|
# Path to the file where scm stderr output is logged
|
||||||
# Returns nil if the log file is not writable
|
# Returns nil if the log file is not writable
|
||||||
def self.stderr_log_file
|
def self.stderr_log_file
|
||||||
@ -234,7 +230,13 @@ module Redmine
|
|||||||
end
|
end
|
||||||
private_class_method :stderr_log_file
|
private_class_method :stderr_log_file
|
||||||
|
|
||||||
def self.shellout(cmd, options = {}, &block)
|
# Singleton class method is public
|
||||||
|
class << self
|
||||||
|
def logger
|
||||||
|
Rails.logger
|
||||||
|
end
|
||||||
|
|
||||||
|
def shellout(cmd, options = {}, &block)
|
||||||
if logger && logger.debug?
|
if logger && logger.debug?
|
||||||
logger.debug "Shelling out: #{strip_credential(cmd)}"
|
logger.debug "Shelling out: #{strip_credential(cmd)}"
|
||||||
# Capture stderr in a log file
|
# Capture stderr in a log file
|
||||||
@ -262,6 +264,7 @@ module Redmine
|
|||||||
raise CommandFailed.new(msg)
|
raise CommandFailed.new(msg)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# Hides username/password in a given command
|
# Hides username/password in a given command
|
||||||
def self.strip_credential(cmd)
|
def self.strip_credential(cmd)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user