From 1814d12320b32b1d4077b1d598d842006c1a93e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Mon, 13 Jun 2016 14:43:54 +0200 Subject: Don't include HTTParty and remove useless comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- app/models/project_services/bamboo_service.rb | 6 ------ app/models/project_services/teamcity_service.rb | 8 +------- 2 files changed, 1 insertion(+), 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: ""\ ""\ @@ -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 -- cgit v1.2.1