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 | |
parent | d1f1c5c60bfd58f966671d7895c1ef612e8f8897 (diff) | |
download | gitlab-ce-b5291f95996743067bbec5a32f9c6cf0d34b36c7.tar.gz |
Fixed Rubocop offenses
Diffstat (limited to 'app/models/project_services')
-rw-r--r-- | app/models/project_services/bamboo_service.rb | 6 | ||||
-rw-r--r-- | app/models/project_services/flowdock_service.rb | 2 | ||||
-rw-r--r-- | app/models/project_services/gemnasium_service.rb | 2 | ||||
-rw-r--r-- | app/models/project_services/teamcity_service.rb | 8 |
4 files changed, 7 insertions, 11 deletions
diff --git a/app/models/project_services/bamboo_service.rb b/app/models/project_services/bamboo_service.rb index 0a61ad96a0e..73f99b229f2 100644 --- a/app/models/project_services/bamboo_service.rb +++ b/app/models/project_services/bamboo_service.rb @@ -27,12 +27,10 @@ class BambooService < CiService validates :build_key, 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 diff --git a/app/models/project_services/flowdock_service.rb b/app/models/project_services/flowdock_service.rb index 27fc19379f1..15c7c907f7e 100644 --- a/app/models/project_services/flowdock_service.rb +++ b/app/models/project_services/flowdock_service.rb @@ -58,6 +58,6 @@ class FlowdockService < Service repo_url: "#{Gitlab.config.gitlab.url}/#{project.path_with_namespace}", commit_url: "#{Gitlab.config.gitlab.url}/#{project.path_with_namespace}/commit/%s", diff_url: "#{Gitlab.config.gitlab.url}/#{project.path_with_namespace}/compare/%s...%s", - ) + ) end end diff --git a/app/models/project_services/gemnasium_service.rb b/app/models/project_services/gemnasium_service.rb index 91ef267ad79..202fee042e3 100644 --- a/app/models/project_services/gemnasium_service.rb +++ b/app/models/project_services/gemnasium_service.rb @@ -57,6 +57,6 @@ class GemnasiumService < Service token: token, api_key: api_key, repo: project.repository.path_to_repo - ) + ) end end 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 |