aws_sns_subscription 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/aws_sns_subscription/railtie.rb +0 -1
- data/lib/aws_sns_subscription/version.rb +1 -1
- data/spec/confirmer_spec.rb +6 -6
- data/spec/spec_helper.rb +0 -1
- metadata +17 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 009e91da3799223ba5fffa5182869492337d2110
|
4
|
+
data.tar.gz: 2bc8ad1f0bdfe46816d8c2d5f9159b75cb2909e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46f26932e684b4244b819a089a8d63fd55fbe6b97c9400fb9f710683ec3ecab47789444527603d6ed9f69e65191025983ff06876c801d56733bece2b5391c1e0
|
7
|
+
data.tar.gz: cf6db91db2aaf41e213525716861feb0f7e3cd7ff7fe3d0677d2f7dbe219aa52827c956069e75e68af5ebf4bc87e354eae177990659b4c4eba262233a8f5be95
|
@@ -2,7 +2,6 @@ module AWSSNSSubscription
|
|
2
2
|
class Railtie < Rails::Railtie
|
3
3
|
initializer "aws_sns_subscription.action_controller" do
|
4
4
|
ActiveSupport.on_load(:action_controller) do
|
5
|
-
puts "Extending #{self} with AWSSNSSubscription::Confirmer"
|
6
5
|
include AWSSNSSubscription::Confirmer
|
7
6
|
end
|
8
7
|
end
|
data/spec/confirmer_spec.rb
CHANGED
@@ -20,15 +20,15 @@ module AWSSNSSubscription
|
|
20
20
|
File.read(File.expand_path("../fixtures/raw_bologna_post.txt", __FILE__))
|
21
21
|
end
|
22
22
|
before(:each) do
|
23
|
-
subject.
|
23
|
+
allow(subject).to receive(:request).and_return(double("request", headers: { "x-amz-sns-message-type" => "SubscriptionConfirmation" }, raw_post: raw_post))
|
24
24
|
end
|
25
25
|
it "should send a get request to the appropriate url" do
|
26
|
-
HTTParty.
|
26
|
+
expect(HTTParty).to receive(:get).with("https://sns.us-east-1.amazonaws.com/?Action=ConfirmSubscription&TopicArn=arn:aws:sns:us-east-1:123456789012:MyTopic&Token=2336412f37fb687f5d51e6e241d09c805a5a57b30d712f794cc5f6a988666d92768dd60a747ba6f3beb71854e285d6ad02428b09ceece29417f1f02d609c582afbacc99c583a916b9981dd2728f4ae6fdb82efd087cc3b7849e05798d2d2785c03b0879594eeac82c01f235d0e717736")
|
27
27
|
subject.respond_to_aws_sns_subscription_confirmations
|
28
28
|
end
|
29
29
|
describe "with a bologna endpoint" do
|
30
30
|
before(:each) do
|
31
|
-
subject.
|
31
|
+
allow(subject).to receive(:request).and_return(double("request", headers: { "x-amz-sns-message-type" => "SubscriptionConfirmation" }, raw_post: raw_bologna_post))
|
32
32
|
end
|
33
33
|
it "should raise the right exception" do
|
34
34
|
expect { subject.respond_to_aws_sns_subscription_confirmations }.to raise_error AWSSNSSubscription::Confirmer::MessageWasNotAuthentic
|
@@ -37,11 +37,11 @@ module AWSSNSSubscription
|
|
37
37
|
end
|
38
38
|
describe "not receiving a subscription confirmation request" do
|
39
39
|
before(:each) do
|
40
|
-
subject.
|
40
|
+
allow(subject).to receive(:request).and_return(double("request", headers: { "x-amz-sns-message-type" => nil }))
|
41
41
|
end
|
42
42
|
it "should not send a get request" do
|
43
|
-
HTTParty.
|
43
|
+
expect(HTTParty).to receive(:get).exactly(0).times
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
47
|
-
end
|
47
|
+
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,83 +1,83 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws_sns_subscription
|
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
|
- Sean Devine
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: require_all
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: activesupport
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: httparty
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: aws-sdk
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
description: Easy confirmation of Amazon SNS subscription requests in Rails apps
|
@@ -87,8 +87,8 @@ executables: []
|
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
|
-
- .gitignore
|
91
|
-
- .rspec
|
90
|
+
- ".gitignore"
|
91
|
+
- ".rspec"
|
92
92
|
- Gemfile
|
93
93
|
- LICENSE.txt
|
94
94
|
- README.md
|
@@ -112,17 +112,17 @@ require_paths:
|
|
112
112
|
- lib
|
113
113
|
required_ruby_version: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
119
|
requirements:
|
120
|
-
- -
|
120
|
+
- - ">="
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
124
|
rubyforge_project:
|
125
|
-
rubygems_version: 2.
|
125
|
+
rubygems_version: 2.4.5.1
|
126
126
|
signing_key:
|
127
127
|
specification_version: 4
|
128
128
|
summary: Auto responds to AWS SNS subscription confirmations
|