From: Go MAEDA Date: Fri, 24 Mar 2023 23:17:35 +0000 (+0000) Subject: Fix RuboCop offense Rails/Presence in lib/redmine/scm/adapters/abstract_adapter.rb... X-Git-Tag: 5.1.0~208 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=18275bd02896a69efcc9980f08afd11523c93111;p=redmine.git Fix RuboCop offense Rails/Presence in lib/redmine/scm/adapters/abstract_adapter.rb (#36919). git-svn-id: https://svn.redmine.org/redmine/trunk@22150 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redmine/scm/adapters/abstract_adapter.rb b/lib/redmine/scm/adapters/abstract_adapter.rb index 087f62e4c..88a62fd6d 100644 --- a/lib/redmine/scm/adapters/abstract_adapter.rb +++ b/lib/redmine/scm/adapters/abstract_adapter.rb @@ -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