stealth 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/VERSION +1 -1
- data/lib/stealth/logger.rb +11 -8
- data/lib/stealth/server.rb +1 -1
- 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: '088335f25b0944e56e0c7478a57565ef578720b7e930ab45b2df1e89fabf0503'
|
4
|
+
data.tar.gz: 1d75b842dd5d871e8dde803fb457cdfbe039de5e2f4a4bd17ef22b412a033d44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e795ccf378f8b82a69752e45ba88608155ab3fa958592e9337bb6e675bdf5ec22a30d822a4e383008bdc16fbc2839cb1b91701b399b83a848644bbe7e6a51d1
|
7
|
+
data.tar.gz: a8d5f36c0aa92d6c461e3ee707c35d0e841e61bda8383d9d31aacd8ebbdc170c36e8aafc08d5d3557d22b3b632bd4277bfcbe646ab73ad1e84176b98ef269a4e
|
data/Gemfile.lock
CHANGED
@@ -12,7 +12,7 @@ PATH
|
|
12
12
|
GEM
|
13
13
|
remote: https://rubygems.org/
|
14
14
|
specs:
|
15
|
-
activesupport (5.2.
|
15
|
+
activesupport (5.2.2)
|
16
16
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
17
|
i18n (>= 0.7, < 2)
|
18
18
|
minitest (~> 5.1)
|
@@ -26,7 +26,7 @@ GEM
|
|
26
26
|
mock_redis (0.19.0)
|
27
27
|
multi_json (1.13.1)
|
28
28
|
mustermann (1.0.3)
|
29
|
-
oj (3.7.
|
29
|
+
oj (3.7.4)
|
30
30
|
puma (3.12.0)
|
31
31
|
rack (2.0.6)
|
32
32
|
rack-protection (2.0.4)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.2
|
data/lib/stealth/logger.rb
CHANGED
@@ -5,14 +5,15 @@ module Stealth
|
|
5
5
|
class Logger
|
6
6
|
|
7
7
|
COLORS = ::Hash[
|
8
|
-
black:
|
9
|
-
red:
|
10
|
-
green:
|
11
|
-
yellow:
|
12
|
-
blue:
|
13
|
-
magenta:
|
14
|
-
cyan:
|
15
|
-
gray:
|
8
|
+
black: 30,
|
9
|
+
red: 31,
|
10
|
+
green: 32,
|
11
|
+
yellow: 33,
|
12
|
+
blue: 34,
|
13
|
+
magenta: 35,
|
14
|
+
cyan: 36,
|
15
|
+
gray: 37,
|
16
|
+
light_cyan: 96
|
16
17
|
].freeze
|
17
18
|
|
18
19
|
def self.color_code(code)
|
@@ -41,6 +42,8 @@ module Stealth
|
|
41
42
|
colorize(topic_string, color: :blue)
|
42
43
|
when :smooch
|
43
44
|
colorize(topic_string, color: :magenta)
|
45
|
+
when :alexa
|
46
|
+
colorize(topic_string, color: :light_cyan)
|
44
47
|
when :catch_all
|
45
48
|
colorize(topic_string, color: :red)
|
46
49
|
else
|
data/lib/stealth/server.rb
CHANGED
@@ -33,7 +33,7 @@ module Stealth
|
|
33
33
|
Stealth::Logger.l(topic: "incoming", message: "Received webhook from #{params[:service]}")
|
34
34
|
|
35
35
|
# JSON params need to be parsed and added to the params
|
36
|
-
if request.env['CONTENT_TYPE']
|
36
|
+
if request.env['CONTENT_TYPE'].match(/application\/json/i)
|
37
37
|
json_params = MultiJson.load(request.body.read)
|
38
38
|
params.merge!(json_params)
|
39
39
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stealth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mauricio Gomes
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-12-
|
12
|
+
date: 2018-12-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|