code cleanup: rubocop: fix Rails/Presence in lib/redmine/scm/adapters/cvs_adapter.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@18518 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA
2019-09-24 15:41:39 +00:00
parent 2829ddcc33
commit 947fdf100d
2 changed files with 1 additions and 2 deletions

View File

@@ -965,7 +965,6 @@ Rails/Presence:
- 'lib/redmine/codeset_util.rb'
- 'lib/redmine/i18n.rb'
- 'lib/redmine/scm/adapters/abstract_adapter.rb'
- 'lib/redmine/scm/adapters/cvs_adapter.rb'
- 'lib/redmine/scm/adapters/filesystem_adapter.rb'
- 'lib/redmine/scm/adapters/git_adapter.rb'
- 'lib/redmine/scm/adapters/mercurial_adapter.rb'

View File

@@ -63,7 +63,7 @@ module Redmine
# password -> unnecessary too
def initialize(url, root_url=nil, login=nil, password=nil,
path_encoding=nil)
@path_encoding = path_encoding.blank? ? 'UTF-8' : path_encoding
@path_encoding = path_encoding.presence || 'UTF-8'
@url = url
# TODO: better Exception here (IllegalArgumentException)
raise CommandFailed if root_url.blank?