From e77792966c40a0d051f3a1b2b706d5fee97b6581 Mon Sep 17 00:00:00 2001 From: risk Date: Wed, 29 Jun 2011 09:22:36 -0600 Subject: [PATCH] tweak service schemas to match github.com --- Rakefile | 4 +++- services/amqp.rb | 2 +- services/geocommit.rb | 1 + services/rdocinfo.rb | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index ab7d34e74..2f0cee202 100644 --- a/Rakefile +++ b/Rakefile @@ -16,7 +16,9 @@ namespace :services do file = ENV["FILE"] || File.expand_path("../config/services.json", __FILE__) require File.expand_path("../config/load", __FILE__) services = Service.services.inject({}) do |memo, svc| - memo.update svc.hook_name => svc.schema + memo.update svc.title => { + :short_name => svc.hook_name, + :schema => svc.schema} end File.open file, 'w' do |io| io << services.to_json diff --git a/services/amqp.rb b/services/amqp.rb index ab6f2dcf6..db734bef7 100644 --- a/services/amqp.rb +++ b/services/amqp.rb @@ -1,5 +1,5 @@ class Service::AMQP < Service - string :host, :port, :vhost, :exchange, :username + string :server, :port, :vhost, :exchange, :username password :password def receive_push diff --git a/services/geocommit.rb b/services/geocommit.rb index 6b6ccb156..9837e2e81 100644 --- a/services/geocommit.rb +++ b/services/geocommit.rb @@ -1,4 +1,5 @@ class Service::GeoCommit < Service + self.title = 'geocommit' def receive_push http.headers['Content-Type'] = 'application/githubpostreceive+json' http_post 'http://hook.geocommit.com/api/github', diff --git a/services/rdocinfo.rb b/services/rdocinfo.rb index 078deb174..c490465d3 100644 --- a/services/rdocinfo.rb +++ b/services/rdocinfo.rb @@ -1,4 +1,6 @@ class Service::RDocInfo < Service + self.title = 'Rdocinfo' + def receive_push http_post 'http://rubydoc.info/checkout', :payload => payload.to_json end