hato 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8920effa5a9083cc2cd3479537803b0a20c63bea
4
- data.tar.gz: 461e6f8b39fe291600e8e7a48c585e4d4b520f48
3
+ metadata.gz: bf96ac2f3fa1d6c8de28dd9e5f4a3e6f97d24def
4
+ data.tar.gz: 60a15c63f3728bcc9099ecb086d108015901fb53
5
5
  SHA512:
6
- metadata.gz: d9048323e38f111d1e1a7263d8aeb7809823785debe80ea94589b6213b9fe66d297bfb2fb427b61c25df6090470b90384c8fe637b30832a3ec16f655ffd04831
7
- data.tar.gz: 1f2149bf73d99bbe699aad35ab53952d5aa78b909d1c6e6ed02f1686016d7fbc2bb02f710a8c62babc813ce6194aa6c9da9fc5d9ed4d82d880b449b966bf0aea
6
+ metadata.gz: bce2877832adb1b63563b28a2069a208afda82872d42921d40cae2e4147c9bc4e90af0b90bc7799b0b19135b2713fc139ca324d8415d1798bf1b8b5f7ca0abea
7
+ data.tar.gz: 4d687794704552bbeb694a48dfa00d1b5fb6330b0630461965fb512c336b3bc557fd3423ddc3be840d9097598f05a3e36bc45f6550f4391a6da97e89d53d6264
data/lib/hato/httpd.rb CHANGED
@@ -50,14 +50,14 @@ module Hato
50
50
  end
51
51
 
52
52
  post '/webhook/:owner/:repository' do
53
- event = request.env['X-GitHub-Event']
53
+ event = request.env['X-Github-Event']
54
54
  owner = params[:owner]
55
55
  repository = params[:repository]
56
56
 
57
57
  if !event
58
58
  halt 400, JSON.dump(
59
59
  status: :error,
60
- message: 'Missing mandatory header: `X-GitHub-Event`',
60
+ message: 'Missing mandatory header: `X-Github-Event`',
61
61
  )
62
62
  end
63
63
 
data/lib/hato/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Hato
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
@@ -67,7 +67,7 @@ describe Hato::Httpd do
67
67
  payload: {foo: 'bar'},
68
68
  api_key: 'test',
69
69
  }, {
70
- 'X-GitHub-Event' => 'test',
70
+ 'X-Github-Event' => 'test',
71
71
  }
72
72
  expect(last_response).to be_ok
73
73
  expect(last_response.body).to eq('{"status":"success","message":"Successfully sent the message you notified to me."}')
@@ -80,14 +80,14 @@ describe Hato::Httpd do
80
80
  api_key: 'test',
81
81
  }
82
82
  expect(last_response).to be_bad_request
83
- expect(last_response.body).to eq('{"status":"error","message":"Missing mandatory header: `X-GitHub-Event`"}')
83
+ expect(last_response.body).to eq('{"status":"error","message":"Missing mandatory header: `X-Github-Event`"}')
84
84
  end
85
85
 
86
86
  it 'should be error when payload is not passed' do
87
87
  post '/webhook/kentaro/hato', {
88
88
  api_key: 'test',
89
89
  }, {
90
- 'X-GitHub-Event' => 'test',
90
+ 'X-Github-Event' => 'test',
91
91
  }
92
92
  expect(last_response).to be_bad_request
93
93
  expect(last_response.body).to eq('{"status":"error","message":"Missing mandatory parameter: `payload`"}')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hato
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kentaro Kuribayashi