diff options
author | Gabriel Mazetto <gabriel@gitlab.com> | 2015-12-15 00:53:52 -0200 |
---|---|---|
committer | Gabriel Mazetto <gabriel@gitlab.com> | 2015-12-15 00:53:52 -0200 |
commit | b5291f95996743067bbec5a32f9c6cf0d34b36c7 (patch) | |
tree | 9933fe5c9c224a175fb49fceff829b8b4441c970 /app/models/project_services/teamcity_service.rb | |
parent | d1f1c5c60bfd58f966671d7895c1ef612e8f8897 (diff) | |
download | gitlab-ce-b5291f95996743067bbec5a32f9c6cf0d34b36c7.tar.gz |
Fixed Rubocop offenses
Diffstat (limited to 'app/models/project_services/teamcity_service.rb')
-rw-r--r-- | app/models/project_services/teamcity_service.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/models/project_services/teamcity_service.rb b/app/models/project_services/teamcity_service.rb index 29d4236745a..a2d55190de7 100644 --- a/app/models/project_services/teamcity_service.rb +++ b/app/models/project_services/teamcity_service.rb @@ -27,12 +27,10 @@ class TeamcityService < CiService validates :build_type, presence: true, if: :activated? validates :username, presence: true, - if: ->(service) { service.password? }, - if: :activated? + if: ->(service) { service.activated? && service.password? } validates :password, presence: true, - if: ->(service) { service.username? }, - if: :activated? + if: ->(service) { service.activated? && service.username? } attr_accessor :response @@ -147,6 +145,6 @@ class TeamcityService < CiService '</build>', headers: { 'Content-type' => 'application/xml' }, basic_auth: auth - ) + ) end end |