]> source.dussan.org Git - redmine.git/commitdiff
Fix RuboCop offense Rails/Presence in lib/redmine/scm/adapters/abstract_adapter.rb...
authorGo MAEDA <maeda@farend.jp>
Fri, 24 Mar 2023 23:17:35 +0000 (23:17 +0000)
committerGo MAEDA <maeda@farend.jp>
Fri, 24 Mar 2023 23:17:35 +0000 (23:17 +0000)
git-svn-id: https://svn.redmine.org/redmine/trunk@22150 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/abstract_adapter.rb

index 087f62e4c1d30227cc6ecb36c8b255434120405e..88a62fd6d2dfc3c08c8926a7fcb4f05ed8e08e83 100644 (file)
@@ -72,9 +72,9 @@ module Redmine
         def initialize(url, root_url=nil, login=nil, password=nil,
                        path_encoding=nil)
           @url = url
-          @login = login if login && !login.empty?
+          @login = login if login.present?
           @password = (password || "") if @login
-          @root_url = root_url.blank? ? retrieve_root_url : root_url
+          @root_url = root_url.presence || retrieve_root_url
           @path_encoding = path_encoding.presence || 'UTF-8'
         end