Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

No need to do prefixes. We know the full URL.

Also add support for having a debug address for local dev servers.
  • Loading branch information...
commit 14beefee19b0bd2bd117abd1c4b321ceb6119bb6 1 parent ed4c3b5
@justinabrahms justinabrahms authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 services/sprintly.rb
View
6 services/sprintly.rb
@@ -10,12 +10,12 @@ def receive_event
raise_config_error "Must provide an api key" if data['api_key'].to_s.empty?
raise_config_error "Must provide an email address." if data['email'].to_s.empty?
raise_config_error "Must provide a product id." if data['product_id'].to_s.empty?
+ host_name = ENV['SPRINTLY_DEBUG_HOST'] || "https://sprint.ly"
http.headers['Content-Type'] = 'application/json'
http.basic_auth(data['email'], data['api_key'])
- http.url_prefix = "https://sprint.ly/integration/github/#{data['product_id']}/#{event}/"
-
- http_post data['api_key'], payload.to_json
+
+ http_post "#{host_name}/integration/github/#{data['product_id']}/#{event}/", payload.to_json
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.