Module: Sinatra::GithubWebhooks

Defined in:
lib/sinatra/github_webhooks.rb,
lib/sinatra/github_webhooks/version.rb

Constant Summary collapse

HMAC_DIGEST =
OpenSSL::Digest.new('sha1')
VERSION =
'0.1.0'

Instance Method Summary collapse

Instance Method Details

#github_eventObject



11
12
13
# File 'lib/sinatra/github_webhooks.rb', line 11

def github_event
  request.env['HTTP_X_GITHUB_EVENT']
end

#payloadObject



15
16
17
# File 'lib/sinatra/github_webhooks.rb', line 15

def payload
  JSON.parse(payload_body)
end