summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorCarlos Paramio <hola@carlosparamio.com>2014-01-24 08:42:24 +0100
committerCarlos Paramio <hola@carlosparamio.com>2014-01-24 08:42:24 +0100
commitb373158077d7033019172e5105717542d46e326a (patch)
treeddcd19708ddffc3fd12f54bae73797030facb9ab /app
parent6d3a92f22536ef01e8d770b11ba04ffe448b5679 (diff)
downloadgitlab-ce-b373158077d7033019172e5105717542d46e326a.tar.gz
Project name was hardcoded (oops)
Diffstat (limited to 'app')
-rw-r--r--app/models/project_services/assembla_service.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/models/project_services/assembla_service.rb b/app/models/project_services/assembla_service.rb
index 66ecf394784..ad7eade5c7b 100644
--- a/app/models/project_services/assembla_service.rb
+++ b/app/models/project_services/assembla_service.rb
@@ -16,6 +16,8 @@
#
class AssemblaService < Service
+ attr_accessible :subdomain
+
include HTTParty
validates :token, presence: true, if: :activated?
@@ -34,12 +36,13 @@ class AssemblaService < Service
def fields
[
- { type: 'text', name: 'token', placeholder: '' }
+ { type: 'text', name: 'token', placeholder: '' },
+ { type: 'text', name: 'subdomain', placeholder: '' }
]
end
def execute(push)
- url = "https://atlas.assembla.com/spaces/ouposp/github_tool?secret_key=#{token}"
+ url = "https://atlas.assembla.com/spaces/#{subdomain}/github_tool?secret_key=#{token}"
AssemblaService.post(url, body: { payload: push }.to_json, headers: { 'Content-Type' => 'application/json' })
end
end