Permalink
Browse files

update service

  • Loading branch information...
1 parent 0e5668d commit 8501f02d6fabdd5691af920379654dbb8186d048 @friism friism committed Jun 18, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 services/appharbor.rb
View
@@ -19,7 +19,7 @@ def receive_push
def post_appharbor_message(slug, token)
return unless commit = distinct_commits.last
- create_build_url = "https://appharbor.com/applications/#{slug}/builds?authorization=#{token}"
+ create_build_url = "https://appharbor.com/applications/#{slug}/builds"
appharbor_message = {
:branches => {
@@ -31,6 +31,9 @@ def post_appharbor_message(slug, token)
}
}
- http_post create_build_url, appharbor_message.to_json, 'Accept' => 'application/json'
+ http.headers['Accept'] = 'application/json'
+ http.headers['Authorization'] = "BEARER #{token}"
+
+ http_post create_build_url, appharbor_message.to_json
end
end

0 comments on commit 8501f02

Please sign in to comment.