Skip to content

Commit

Permalink
Merge pull request github#10 from github/adding-hooks
Browse files Browse the repository at this point in the history
Set up Adding Hooks information
  • Loading branch information
gjtorikian committed Feb 12, 2014
2 parents 79accde + f7a35bc commit 11eda73
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion api/ruby/rendering-data-as-graphs/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ source "http://rubygems.org"
gem "json", "1.7.7"
gem 'sinatra', '~> 1.3.5'
gem 'sinatra_auth_github', '~> 0.13.3'
gem 'octokit', '~> 1.23.0'
gem 'octokit', '~> 1.23.0'
4 changes: 4 additions & 0 deletions hooks/ruby/configuring-your-server/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source "http://rubygems.org"

gem "json", "1.7.7"
gem 'sinatra', '~> 1.3.5'
19 changes: 19 additions & 0 deletions hooks/ruby/configuring-your-server/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
GEM
remote: http://rubygems.org/
specs:
json (1.7.7)
rack (1.5.2)
rack-protection (1.5.2)
rack
sinatra (1.3.6)
rack (~> 1.4)
rack-protection (~> 1.3)
tilt (~> 1.3, >= 1.3.3)
tilt (1.4.1)

PLATFORMS
ruby

DEPENDENCIES
json (= 1.7.7)
sinatra (~> 1.3.5)
7 changes: 7 additions & 0 deletions hooks/ruby/configuring-your-server/server.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require 'sinatra'
require 'json'

post '/payload' do
push = JSON.parse(params[:payload])
puts "I got some JSON: #{push.inspect}"
end

0 comments on commit 11eda73

Please sign in to comment.