stealth-webhook 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/stealth-webhook/overriding/server.rb +1 -1
- data/lib/stealth-webhook/webhook.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4b0f89e9d4b1666033f1bd7d21575f8a58ac8426f187d877000aa16cac7c88a
|
4
|
+
data.tar.gz: 807f7df6b4b3a724ebd33cf30b10cdd73745c4df73b616765c3b3a21416eea5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9eaaddac66c502ab69865d2e367e4f6dc405285f3c19fdec5d1a74de6478cb59ca28bfe7521ef01d0f36fe4733788aff4309990523afc91f6870fc5990f5e549
|
7
|
+
data.tar.gz: 6c97e74450fa3c20b7cd5185acd8a803ed21f617e6d19c7d01a5ad8b33835a39f1d1a0be451150cfd28568b23d93913e8956a0075f6a01291cd027b5ffafb3b8
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
@@ -16,7 +16,7 @@ module Stealth
|
|
16
16
|
|
17
17
|
|
18
18
|
def send_message(params, auth_token = nil)
|
19
|
-
return [401, 'Unauthorized: Invalid Token'] if ENV['
|
19
|
+
return [401, 'Unauthorized: Invalid Token'] if ENV['WEBHOOK_AUTH_TOKEN'] && auth_token != "Token #{ENV['WEBHOOK_AUTH_TOKEN']}"
|
20
20
|
|
21
21
|
begin
|
22
22
|
webhook = StealthWebhook::Webhook.new
|
@@ -9,12 +9,12 @@ module StealthWebhook
|
|
9
9
|
|
10
10
|
def send_message(params)
|
11
11
|
if validate_and_send_message(params)
|
12
|
-
[200, 'Message sent with success']
|
12
|
+
[200, { message: 'Message sent with success' }]
|
13
13
|
else
|
14
14
|
[@errors[:status], @errors.to_json]
|
15
15
|
end
|
16
16
|
rescue => e
|
17
|
-
[500, e.message]
|
17
|
+
[500, { message: e.message }]
|
18
18
|
end
|
19
19
|
|
20
20
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stealth-webhook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luiz Carvalho
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|