hato 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hato/httpd.rb +10 -6
- data/lib/hato/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8920effa5a9083cc2cd3479537803b0a20c63bea
|
4
|
+
data.tar.gz: 461e6f8b39fe291600e8e7a48c585e4d4b520f48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9048323e38f111d1e1a7263d8aeb7809823785debe80ea94589b6213b9fe66d297bfb2fb427b61c25df6090470b90384c8fe637b30832a3ec16f655ffd04831
|
7
|
+
data.tar.gz: 1f2149bf73d99bbe699aad35ab53952d5aa78b909d1c6e6ed02f1686016d7fbc2bb02f710a8c62babc813ce6194aa6c9da9fc5d9ed4d82d880b449b966bf0aea
|
data/lib/hato/httpd.rb
CHANGED
@@ -50,7 +50,9 @@ module Hato
|
|
50
50
|
end
|
51
51
|
|
52
52
|
post '/webhook/:owner/:repository' do
|
53
|
-
event
|
53
|
+
event = request.env['X-GitHub-Event']
|
54
|
+
owner = params[:owner]
|
55
|
+
repository = params[:repository]
|
54
56
|
|
55
57
|
if !event
|
56
58
|
halt 400, JSON.dump(
|
@@ -59,7 +61,7 @@ module Hato
|
|
59
61
|
)
|
60
62
|
end
|
61
63
|
|
62
|
-
tag = ['webhook',
|
64
|
+
tag = ['webhook', owner, repository].join('.')
|
63
65
|
payload = params[:payload]
|
64
66
|
|
65
67
|
if !payload
|
@@ -70,10 +72,12 @@ module Hato
|
|
70
72
|
end
|
71
73
|
|
72
74
|
settings.observer.update(
|
73
|
-
tag:
|
74
|
-
event:
|
75
|
-
|
76
|
-
|
75
|
+
tag: tag,
|
76
|
+
event: event,
|
77
|
+
owner: owner,
|
78
|
+
repository: repository,
|
79
|
+
payload: payload,
|
80
|
+
logger: logger,
|
77
81
|
)
|
78
82
|
|
79
83
|
JSON.dump(
|
data/lib/hato/version.rb
CHANGED