Permalink
Browse files

Rename the new webhook "payload" key to "rubygem."

  • Loading branch information...
1 parent a7d06bd commit f97d6cfccc50ab920f57d0bbe369130dc9107133 @laserlemon laserlemon committed Nov 21, 2011
Showing with 4 additions and 4 deletions.
  1. +2 −2 app/jobs/notifier.rb
  2. +2 −2 features/step_definitions/webhook_steps.rb
@@ -1,8 +1,8 @@
class Notifier < Struct.new(:event, :url, :host_with_port, :rubygem, :version, :api_key)
def payload
- payload = rubygem.payload(version, host_with_port)
- payload.merge("event" => event, "payload" => payload).to_json
+ rubygem_payload = rubygem.payload(version, host_with_port)
+ rubygem_payload.merge("event" => event, "rubygem" => rubygem_payload).to_json
end
def authorization
@@ -22,8 +22,8 @@
json = MultiJson.decode(request.body)
assert_equal event, json["event"]
- assert_equal gem_name, json["payload"]["name"]
- assert_equal version_number, json["payload"]["version"]
+ assert_equal gem_name, json["rubygem"]["name"]
+ assert_equal version_number, json["rubygem"]["version"]
end
Then /I should see "(.*)" under "(.*)" in (json|yaml)/ do |web_hook_url, gem_name, format|

0 comments on commit f97d6cf

Please sign in to comment.