griddler-ses 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/griddler/ses/middleware.rb +9 -1
- data/lib/griddler/ses/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8326ba89c3b93299f3a1aad824a8ce9392902ee8
|
4
|
+
data.tar.gz: a1ec605dbff34fe7289db2326e585c9a0d247150
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 668e3a3605a23dff1b6c04837a481ebc31262f414bc11e5022118fe58055c70817f3a7da799e6b21422e0733f0aed286becb258e5b9befb697bb404e4c977c99
|
7
|
+
data.tar.gz: 341f6c3814b24f22fb5b230442474448a32a2bedeeaf36ce3ca1cd78a74963f7c2e42c08b3f9554562a99c66db5ea12172d3ec69b62296aa500f969384077530
|
@@ -9,7 +9,7 @@ module Griddler
|
|
9
9
|
# a bug on the AWS side doesn't set the content type to application/json type properly,
|
10
10
|
# so we have to intercept and do this in order for Griddler's controller to correctly
|
11
11
|
# parse the parameters (see https://forums.aws.amazon.com/thread.jspa?messageID=418160)
|
12
|
-
if env
|
12
|
+
if is_griddler_request?(env) && is_aws_sns_request?(env)
|
13
13
|
env['CONTENT_TYPE'] = 'application/json; charset=UTF-8'
|
14
14
|
end
|
15
15
|
|
@@ -20,6 +20,14 @@ module Griddler
|
|
20
20
|
def griddler_path
|
21
21
|
@griddler_path ||= Rails.application.routes.url_helpers.url_for(controller: 'griddler/emails', action: 'create', only_path: true)
|
22
22
|
end
|
23
|
+
|
24
|
+
def is_griddler_request?(request)
|
25
|
+
request['REQUEST_PATH'] == griddler_path
|
26
|
+
end
|
27
|
+
|
28
|
+
def is_aws_sns_request?(request)
|
29
|
+
request['HTTP_X_AMZ_SNS_MESSAGE_TYPE'].present?
|
30
|
+
end
|
23
31
|
end
|
24
32
|
end
|
25
33
|
end
|
data/lib/griddler/ses/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: griddler-ses
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kent Mewhort @ Coupa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: griddler
|