diff options
author | Rémy Coutable <remy@rymai.me> | 2016-06-13 14:43:54 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-06-13 14:43:54 +0200 |
commit | 1814d12320b32b1d4077b1d598d842006c1a93e8 (patch) | |
tree | 42d60865d43d83c64b6d8f342a077a0ecda80eda | |
parent | e13a843b7925743aa0dd1b89f7eb2784c20ee55e (diff) | |
download | gitlab-ce-bentolor/gitlab-ce-fix/bamboo-service-trigger-auth.tar.gz |
Don't include HTTParty and remove useless commentsbentolor/gitlab-ce-fix/bamboo-service-trigger-auth
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r-- | app/models/project_services/bamboo_service.rb | 6 | ||||
-rw-r--r-- | app/models/project_services/teamcity_service.rb | 8 |
2 files changed, 1 insertions, 13 deletions
diff --git a/app/models/project_services/bamboo_service.rb b/app/models/project_services/bamboo_service.rb index 7442f797ca9..b5c76e4d4fe 100644 --- a/app/models/project_services/bamboo_service.rb +++ b/app/models/project_services/bamboo_service.rb @@ -1,6 +1,4 @@ class BambooService < CiService - include HTTParty - prop_accessor :bamboo_url, :build_key, :username, :password validates :bamboo_url, presence: true, url: true, if: :activated? @@ -107,10 +105,6 @@ class BambooService < CiService private def build_url(path) - # URI.join only works correctly, if the bamboo_url has - # - at least one or more trailing '/' - # - the appended parts are not prefixed with '/' - # otherwise a bamboo_url 'http://foo.bar/bamboo' will break URI.join("#{bamboo_url}/", path).to_s end diff --git a/app/models/project_services/teamcity_service.rb b/app/models/project_services/teamcity_service.rb index 42fe8e63cc7..a4a967c9bc9 100644 --- a/app/models/project_services/teamcity_service.rb +++ b/app/models/project_services/teamcity_service.rb @@ -1,6 +1,4 @@ class TeamcityService < CiService - include HTTParty - prop_accessor :teamcity_url, :build_type, :username, :password validates :teamcity_url, presence: true, url: true, if: :activated? @@ -112,7 +110,7 @@ class TeamcityService < CiService branch = Gitlab::Git.ref_name(data[:ref]) - self.class.post( + HTTParty.post( build_url('httpAuth/app/rest/buildQueue'), body: "<build branchName=\"#{branch}\">"\ "<buildType id=\"#{build_type}\"/>"\ @@ -125,10 +123,6 @@ class TeamcityService < CiService private def build_url(path) - # URI.join only works correctly, if the teamcity_url has - # - at least one or more trailing '/' - # - the appended parts are not prefixed with '/' - # otherwise a teamcity_url 'http://foo.bar/teamcity' will break URI.join("#{teamcity_url}/", path).to_s end |