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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cbcb817d91a6e7277d46550a8a872916501b1b8d3dfd748d42213e44dc1cfaf2
4
- data.tar.gz: 67d9819ebfdecd34284e9cf4d5bf0d2e242771c9fe895969c807d4e88a964795
3
+ metadata.gz: '088335f25b0944e56e0c7478a57565ef578720b7e930ab45b2df1e89fabf0503'
4
+ data.tar.gz: 1d75b842dd5d871e8dde803fb457cdfbe039de5e2f4a4bd17ef22b412a033d44
5
5
  SHA512:
6
- metadata.gz: 770b2ccb38d26d5925dc616d80f7868afef7b9dc4cb7b3e2a1458285b04a9821686c75b73fb3b6631449eab88645ad5f1b451158dfff9c7e357a037a1db20f66
7
- data.tar.gz: 5bc15c12cd1c62d18356e5f51e9feb9f6832326cf03c7fb01d42b97d74987efdd40cb8e0c84d7148ed43749f8e2489dbd360d7f27272d410314b3e0f8bcfb911
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.1.1)
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.1)
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.1.2
@@ -5,14 +5,15 @@ module Stealth
5
5
  class Logger
6
6
 
7
7
  COLORS = ::Hash[
8
- black: 30,
9
- red: 31,
10
- green: 32,
11
- yellow: 33,
12
- blue: 34,
13
- magenta: 35,
14
- cyan: 36,
15
- gray: 37,
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
@@ -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'] == 'application/json'
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.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-05 00:00:00.000000000 Z
12
+ date: 2018-12-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra