ses_blacklist_rails 0.1.2 → 0.1.3

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
  SHA1:
3
- metadata.gz: cba9d2b22ab2f7af0dd888b73884bd8a3f8b4096
4
- data.tar.gz: d9716df91dfe9259a3174720076c327e25ba263f
3
+ metadata.gz: '09601f9eab1ead0944d98bc02ee11dea6da748bf'
4
+ data.tar.gz: 517f916e0fb9db37869962bb4fcd884fcac8661a
5
5
  SHA512:
6
- metadata.gz: 573d0534796dcaf12dacd220284241a6a90380bc8a4e3be0560c8e474c90434d3d1c9c13f7f3cd179d9915632464545ed046bcaf67e7148b352e1cd4b8c25bd9
7
- data.tar.gz: dabb5897b51d6e582a949544d973903d326c8eaec6e047195b337fa782460ff836ba9a6202de2b75338905e3a432e097f340ae4c0b435fa54fc71244b75a6e27
6
+ metadata.gz: 64cf46c009bf30d8c5b74ee0ebea4dd76c0d6a0d92eb869c81c0a83e98b85408d2c77768b1fc63aa095d21360a7c7d4b99fefa5032f4bcb6b8bfd263e341d60d
7
+ data.tar.gz: 29a2f7391433c47d482020c67404d8258adab93f305cdc89ce9129e451ad79f4db009ace69fd6ef3dcfe6a7c90817a513ffb9950f0eda0f450ca54d8c82b9d83
@@ -18,7 +18,7 @@ module SesBlacklistRails
18
18
  end
19
19
 
20
20
  elsif @params[:Type] == 'Notification'
21
- message = @params[:Message]
21
+ message = parse_json @params[:Message]
22
22
  case message[:notificationType]
23
23
  when 'Bounce'
24
24
  message[:bounce][:bouncedRecipients].each do |r|
@@ -42,7 +42,11 @@ module SesBlacklistRails
42
42
  private
43
43
 
44
44
  def parse_request
45
- @params ||= JSON.parse(request.body.read, symbolize_names: true)
45
+ @params ||= parse_json request.body.read
46
+ end
47
+
48
+ def parse_json(raw)
49
+ JSON.parse(raw, symbolize_names: true)
46
50
  end
47
51
 
48
52
  def create_notification(recipient, type)
@@ -1,3 +1,3 @@
1
1
  module SesBlacklistRails
2
- VERSION = '0.1.2'.freeze
2
+ VERSION = '0.1.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ses_blacklist_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - mrdShinse