stripe_event 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +3 -1
- data/Appraisals +4 -0
- data/CHANGELOG.md +3 -0
- data/README.md +1 -1
- data/gemfiles/rails3.1.gemfile.lock +31 -26
- data/gemfiles/rails3.2.gemfile.lock +55 -50
- data/gemfiles/rails4.0.gemfile.lock +56 -56
- data/gemfiles/rails4.1.gemfile +7 -0
- data/gemfiles/rails4.1.gemfile.lock +141 -0
- data/lib/stripe_event.rb +5 -0
- data/lib/stripe_event/version.rb +1 -1
- data/spec/lib/stripe_event_spec.rb +22 -0
- metadata +44 -24
- checksums.yaml +0 -7
data/.travis.yml
CHANGED
@@ -5,15 +5,17 @@ rvm:
|
|
5
5
|
- 2.0.0
|
6
6
|
- 2.1.0
|
7
7
|
- jruby-19mode
|
8
|
-
- jruby-head
|
9
8
|
gemfile:
|
10
9
|
- gemfiles/rails3.1.gemfile
|
11
10
|
- gemfiles/rails3.2.gemfile
|
12
11
|
- gemfiles/rails4.0.gemfile
|
12
|
+
- gemfiles/rails4.1.gemfile
|
13
13
|
matrix:
|
14
14
|
exclude:
|
15
15
|
- rvm: 1.9.2
|
16
16
|
gemfile: gemfiles/rails4.0.gemfile
|
17
|
+
- rvm: 1.9.2
|
18
|
+
gemfile: gemfiles/rails4.1.gemfile
|
17
19
|
notifications:
|
18
20
|
email:
|
19
21
|
- daniel.r.whalen+travis-ci@gmail.com
|
data/Appraisals
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
### 1.4.0 (November 1, 2014)
|
2
|
+
* Add `StripeEvent.listening?` method to easily determine if an event type has any registered handlers. Thank you to [Vladimir Andrijevik](https://github.com/vandrijevik) for the [idea and implementation](https://github.com/integrallis/stripe_event/pull/42).
|
3
|
+
|
1
4
|
### 1.3.0 (July 22, 2014)
|
2
5
|
* Allow for ignoring particular events. Thank you to [anark](https://github.com/anark) for suggesting the change, and [Ryan McGeary](https://github.com/rmm5t) and [Pete Keen](https://github.com/peterkeen) for working on the implementation.
|
3
6
|
|
data/README.md
CHANGED
@@ -102,7 +102,7 @@ If you'd like to ignore particular webhook events (perhaps to ignore test webhoo
|
|
102
102
|
|
103
103
|
```ruby
|
104
104
|
StripeEvent.event_retriever = lambda do |params|
|
105
|
-
return nil if Rails.env.production && !params[:livemode]
|
105
|
+
return nil if Rails.env.production? && !params[:livemode]
|
106
106
|
Stripe::Event.retrieve(params[:id])
|
107
107
|
end
|
108
108
|
```
|
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
|
-
remote:
|
2
|
+
remote: ../
|
3
3
|
specs:
|
4
|
-
stripe_event (1.
|
4
|
+
stripe_event (1.4.0)
|
5
5
|
activesupport (>= 3.1)
|
6
6
|
stripe (~> 1.6)
|
7
7
|
|
@@ -37,13 +37,13 @@ GEM
|
|
37
37
|
activesupport (3.1.12)
|
38
38
|
multi_json (~> 1.0)
|
39
39
|
addressable (2.3.6)
|
40
|
-
appraisal (1.0.
|
40
|
+
appraisal (1.0.2)
|
41
41
|
bundler
|
42
42
|
rake
|
43
43
|
thor (>= 0.14.0)
|
44
44
|
arel (2.2.3)
|
45
45
|
builder (3.0.4)
|
46
|
-
coveralls (0.7.
|
46
|
+
coveralls (0.7.1)
|
47
47
|
multi_json (~> 1.3)
|
48
48
|
rest-client
|
49
49
|
simplecov (>= 0.7)
|
@@ -52,10 +52,10 @@ GEM
|
|
52
52
|
crack (0.4.2)
|
53
53
|
safe_yaml (~> 1.0.0)
|
54
54
|
diff-lcs (1.2.5)
|
55
|
-
docile (1.1.
|
55
|
+
docile (1.1.5)
|
56
56
|
erubis (2.7.0)
|
57
57
|
hike (1.2.3)
|
58
|
-
i18n (0.6.
|
58
|
+
i18n (0.6.11)
|
59
59
|
json (1.8.1)
|
60
60
|
mail (2.4.4)
|
61
61
|
i18n (>= 0.4.0)
|
@@ -63,7 +63,8 @@ GEM
|
|
63
63
|
treetop (~> 1.4.8)
|
64
64
|
mime-types (1.25.1)
|
65
65
|
multi_json (1.10.1)
|
66
|
-
|
66
|
+
netrc (0.8.0)
|
67
|
+
polyglot (0.3.5)
|
67
68
|
rack (1.3.10)
|
68
69
|
rack-cache (1.2)
|
69
70
|
rack (>= 0.4)
|
@@ -91,45 +92,49 @@ GEM
|
|
91
92
|
rake (10.3.2)
|
92
93
|
rdoc (3.12.2)
|
93
94
|
json (~> 1.4)
|
94
|
-
rest-client (1.
|
95
|
-
mime-types (>= 1.16)
|
96
|
-
|
97
|
-
rspec-
|
95
|
+
rest-client (1.7.2)
|
96
|
+
mime-types (>= 1.16, < 3.0)
|
97
|
+
netrc (~> 0.7)
|
98
|
+
rspec-collection_matchers (1.0.0)
|
99
|
+
rspec-expectations (>= 2.99.0.beta1)
|
100
|
+
rspec-core (2.99.2)
|
101
|
+
rspec-expectations (2.99.2)
|
98
102
|
diff-lcs (>= 1.1.3, < 2.0)
|
99
|
-
rspec-mocks (2.
|
100
|
-
rspec-rails (2.
|
103
|
+
rspec-mocks (2.99.2)
|
104
|
+
rspec-rails (2.99.0)
|
101
105
|
actionpack (>= 3.0)
|
102
106
|
activemodel (>= 3.0)
|
103
107
|
activesupport (>= 3.0)
|
104
108
|
railties (>= 3.0)
|
105
|
-
rspec-
|
106
|
-
rspec-
|
107
|
-
rspec-
|
108
|
-
|
109
|
-
|
109
|
+
rspec-collection_matchers
|
110
|
+
rspec-core (~> 2.99.0)
|
111
|
+
rspec-expectations (~> 2.99.0)
|
112
|
+
rspec-mocks (~> 2.99.0)
|
113
|
+
safe_yaml (1.0.4)
|
114
|
+
simplecov (0.9.1)
|
110
115
|
docile (~> 1.1.0)
|
111
|
-
multi_json
|
116
|
+
multi_json (~> 1.0)
|
112
117
|
simplecov-html (~> 0.8.0)
|
113
118
|
simplecov-html (0.8.0)
|
114
|
-
sprockets (2.0.
|
119
|
+
sprockets (2.0.5)
|
115
120
|
hike (~> 1.2)
|
116
121
|
rack (~> 1.0)
|
117
122
|
tilt (~> 1.1, != 1.3.0)
|
118
|
-
stripe (1.
|
123
|
+
stripe (1.16.0)
|
119
124
|
json (~> 1.8.1)
|
120
|
-
mime-types (
|
125
|
+
mime-types (>= 1.25, < 3.0)
|
121
126
|
rest-client (~> 1.4)
|
122
127
|
term-ansicolor (1.3.0)
|
123
128
|
tins (~> 1.0)
|
124
129
|
thor (0.14.6)
|
125
130
|
tilt (1.4.1)
|
126
|
-
tins (1.
|
131
|
+
tins (1.3.3)
|
127
132
|
treetop (1.4.15)
|
128
133
|
polyglot
|
129
134
|
polyglot (>= 0.3.1)
|
130
|
-
tzinfo (0.3.
|
131
|
-
webmock (1.
|
132
|
-
addressable (>= 2.
|
135
|
+
tzinfo (0.3.42)
|
136
|
+
webmock (1.20.0)
|
137
|
+
addressable (>= 2.3.6)
|
133
138
|
crack (>= 0.3.2)
|
134
139
|
|
135
140
|
PLATFORMS
|
@@ -1,19 +1,19 @@
|
|
1
1
|
PATH
|
2
|
-
remote:
|
2
|
+
remote: ../
|
3
3
|
specs:
|
4
|
-
stripe_event (1.
|
4
|
+
stripe_event (1.4.0)
|
5
5
|
activesupport (>= 3.1)
|
6
6
|
stripe (~> 1.6)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actionmailer (3.2.
|
12
|
-
actionpack (= 3.2.
|
11
|
+
actionmailer (3.2.20)
|
12
|
+
actionpack (= 3.2.20)
|
13
13
|
mail (~> 2.5.4)
|
14
|
-
actionpack (3.2.
|
15
|
-
activemodel (= 3.2.
|
16
|
-
activesupport (= 3.2.
|
14
|
+
actionpack (3.2.20)
|
15
|
+
activemodel (= 3.2.20)
|
16
|
+
activesupport (= 3.2.20)
|
17
17
|
builder (~> 3.0.0)
|
18
18
|
erubis (~> 2.7.0)
|
19
19
|
journey (~> 1.0.4)
|
@@ -21,28 +21,28 @@ GEM
|
|
21
21
|
rack-cache (~> 1.2)
|
22
22
|
rack-test (~> 0.6.1)
|
23
23
|
sprockets (~> 2.2.1)
|
24
|
-
activemodel (3.2.
|
25
|
-
activesupport (= 3.2.
|
24
|
+
activemodel (3.2.20)
|
25
|
+
activesupport (= 3.2.20)
|
26
26
|
builder (~> 3.0.0)
|
27
|
-
activerecord (3.2.
|
28
|
-
activemodel (= 3.2.
|
29
|
-
activesupport (= 3.2.
|
27
|
+
activerecord (3.2.20)
|
28
|
+
activemodel (= 3.2.20)
|
29
|
+
activesupport (= 3.2.20)
|
30
30
|
arel (~> 3.0.2)
|
31
31
|
tzinfo (~> 0.3.29)
|
32
|
-
activeresource (3.2.
|
33
|
-
activemodel (= 3.2.
|
34
|
-
activesupport (= 3.2.
|
35
|
-
activesupport (3.2.
|
32
|
+
activeresource (3.2.20)
|
33
|
+
activemodel (= 3.2.20)
|
34
|
+
activesupport (= 3.2.20)
|
35
|
+
activesupport (3.2.20)
|
36
36
|
i18n (~> 0.6, >= 0.6.4)
|
37
37
|
multi_json (~> 1.0)
|
38
38
|
addressable (2.3.6)
|
39
|
-
appraisal (1.0.
|
39
|
+
appraisal (1.0.2)
|
40
40
|
bundler
|
41
41
|
rake
|
42
42
|
thor (>= 0.14.0)
|
43
43
|
arel (3.0.3)
|
44
44
|
builder (3.0.4)
|
45
|
-
coveralls (0.7.
|
45
|
+
coveralls (0.7.1)
|
46
46
|
multi_json (~> 1.3)
|
47
47
|
rest-client
|
48
48
|
simplecov (>= 0.7)
|
@@ -51,10 +51,10 @@ GEM
|
|
51
51
|
crack (0.4.2)
|
52
52
|
safe_yaml (~> 1.0.0)
|
53
53
|
diff-lcs (1.2.5)
|
54
|
-
docile (1.1.
|
54
|
+
docile (1.1.5)
|
55
55
|
erubis (2.7.0)
|
56
56
|
hike (1.2.3)
|
57
|
-
i18n (0.6.
|
57
|
+
i18n (0.6.11)
|
58
58
|
journey (1.0.4)
|
59
59
|
json (1.8.1)
|
60
60
|
mail (2.5.4)
|
@@ -62,7 +62,8 @@ GEM
|
|
62
62
|
treetop (~> 1.4.8)
|
63
63
|
mime-types (1.25.1)
|
64
64
|
multi_json (1.10.1)
|
65
|
-
|
65
|
+
netrc (0.8.0)
|
66
|
+
polyglot (0.3.5)
|
66
67
|
rack (1.4.5)
|
67
68
|
rack-cache (1.2)
|
68
69
|
rack (>= 0.4)
|
@@ -70,17 +71,17 @@ GEM
|
|
70
71
|
rack
|
71
72
|
rack-test (0.6.2)
|
72
73
|
rack (>= 1.0)
|
73
|
-
rails (3.2.
|
74
|
-
actionmailer (= 3.2.
|
75
|
-
actionpack (= 3.2.
|
76
|
-
activerecord (= 3.2.
|
77
|
-
activeresource (= 3.2.
|
78
|
-
activesupport (= 3.2.
|
74
|
+
rails (3.2.20)
|
75
|
+
actionmailer (= 3.2.20)
|
76
|
+
actionpack (= 3.2.20)
|
77
|
+
activerecord (= 3.2.20)
|
78
|
+
activeresource (= 3.2.20)
|
79
|
+
activesupport (= 3.2.20)
|
79
80
|
bundler (~> 1.0)
|
80
|
-
railties (= 3.2.
|
81
|
-
railties (3.2.
|
82
|
-
actionpack (= 3.2.
|
83
|
-
activesupport (= 3.2.
|
81
|
+
railties (= 3.2.20)
|
82
|
+
railties (3.2.20)
|
83
|
+
actionpack (= 3.2.20)
|
84
|
+
activesupport (= 3.2.20)
|
84
85
|
rack-ssl (~> 1.3.2)
|
85
86
|
rake (>= 0.8.7)
|
86
87
|
rdoc (~> 3.4)
|
@@ -88,46 +89,50 @@ GEM
|
|
88
89
|
rake (10.3.2)
|
89
90
|
rdoc (3.12.2)
|
90
91
|
json (~> 1.4)
|
91
|
-
rest-client (1.
|
92
|
-
mime-types (>= 1.16)
|
93
|
-
|
94
|
-
rspec-
|
92
|
+
rest-client (1.7.2)
|
93
|
+
mime-types (>= 1.16, < 3.0)
|
94
|
+
netrc (~> 0.7)
|
95
|
+
rspec-collection_matchers (1.0.0)
|
96
|
+
rspec-expectations (>= 2.99.0.beta1)
|
97
|
+
rspec-core (2.99.2)
|
98
|
+
rspec-expectations (2.99.2)
|
95
99
|
diff-lcs (>= 1.1.3, < 2.0)
|
96
|
-
rspec-mocks (2.
|
97
|
-
rspec-rails (2.
|
100
|
+
rspec-mocks (2.99.2)
|
101
|
+
rspec-rails (2.99.0)
|
98
102
|
actionpack (>= 3.0)
|
99
103
|
activemodel (>= 3.0)
|
100
104
|
activesupport (>= 3.0)
|
101
105
|
railties (>= 3.0)
|
102
|
-
rspec-
|
103
|
-
rspec-
|
104
|
-
rspec-
|
105
|
-
|
106
|
-
|
106
|
+
rspec-collection_matchers
|
107
|
+
rspec-core (~> 2.99.0)
|
108
|
+
rspec-expectations (~> 2.99.0)
|
109
|
+
rspec-mocks (~> 2.99.0)
|
110
|
+
safe_yaml (1.0.4)
|
111
|
+
simplecov (0.9.1)
|
107
112
|
docile (~> 1.1.0)
|
108
|
-
multi_json
|
113
|
+
multi_json (~> 1.0)
|
109
114
|
simplecov-html (~> 0.8.0)
|
110
115
|
simplecov-html (0.8.0)
|
111
|
-
sprockets (2.2.
|
116
|
+
sprockets (2.2.3)
|
112
117
|
hike (~> 1.2)
|
113
118
|
multi_json (~> 1.0)
|
114
119
|
rack (~> 1.0)
|
115
120
|
tilt (~> 1.1, != 1.3.0)
|
116
|
-
stripe (1.
|
121
|
+
stripe (1.16.0)
|
117
122
|
json (~> 1.8.1)
|
118
|
-
mime-types (
|
123
|
+
mime-types (>= 1.25, < 3.0)
|
119
124
|
rest-client (~> 1.4)
|
120
125
|
term-ansicolor (1.3.0)
|
121
126
|
tins (~> 1.0)
|
122
127
|
thor (0.19.1)
|
123
128
|
tilt (1.4.1)
|
124
|
-
tins (1.
|
129
|
+
tins (1.3.3)
|
125
130
|
treetop (1.4.15)
|
126
131
|
polyglot
|
127
132
|
polyglot (>= 0.3.1)
|
128
|
-
tzinfo (0.3.
|
129
|
-
webmock (1.
|
130
|
-
addressable (>= 2.
|
133
|
+
tzinfo (0.3.42)
|
134
|
+
webmock (1.20.0)
|
135
|
+
addressable (>= 2.3.6)
|
131
136
|
crack (>= 0.3.2)
|
132
137
|
|
133
138
|
PLATFORMS
|
@@ -1,45 +1,45 @@
|
|
1
1
|
PATH
|
2
|
-
remote:
|
2
|
+
remote: ../
|
3
3
|
specs:
|
4
|
-
stripe_event (1.
|
4
|
+
stripe_event (1.4.0)
|
5
5
|
activesupport (>= 3.1)
|
6
6
|
stripe (~> 1.6)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actionmailer (4.0.
|
12
|
-
actionpack (= 4.0.
|
13
|
-
mail (~> 2.5.4)
|
14
|
-
actionpack (4.0.
|
15
|
-
activesupport (= 4.0.
|
11
|
+
actionmailer (4.0.11)
|
12
|
+
actionpack (= 4.0.11)
|
13
|
+
mail (~> 2.5, >= 2.5.4)
|
14
|
+
actionpack (4.0.11)
|
15
|
+
activesupport (= 4.0.11)
|
16
16
|
builder (~> 3.1.0)
|
17
17
|
erubis (~> 2.7.0)
|
18
18
|
rack (~> 1.5.2)
|
19
19
|
rack-test (~> 0.6.2)
|
20
|
-
activemodel (4.0.
|
21
|
-
activesupport (= 4.0.
|
20
|
+
activemodel (4.0.11)
|
21
|
+
activesupport (= 4.0.11)
|
22
22
|
builder (~> 3.1.0)
|
23
|
-
activerecord (4.0.
|
24
|
-
activemodel (= 4.0.
|
23
|
+
activerecord (4.0.11)
|
24
|
+
activemodel (= 4.0.11)
|
25
25
|
activerecord-deprecated_finders (~> 1.0.2)
|
26
|
-
activesupport (= 4.0.
|
26
|
+
activesupport (= 4.0.11)
|
27
27
|
arel (~> 4.0.0)
|
28
28
|
activerecord-deprecated_finders (1.0.3)
|
29
|
-
activesupport (4.0.
|
29
|
+
activesupport (4.0.11)
|
30
30
|
i18n (~> 0.6, >= 0.6.9)
|
31
31
|
minitest (~> 4.2)
|
32
32
|
multi_json (~> 1.3)
|
33
33
|
thread_safe (~> 0.1)
|
34
34
|
tzinfo (~> 0.3.37)
|
35
35
|
addressable (2.3.6)
|
36
|
-
appraisal (1.0.
|
36
|
+
appraisal (1.0.2)
|
37
37
|
bundler
|
38
38
|
rake
|
39
39
|
thor (>= 0.14.0)
|
40
40
|
arel (4.0.2)
|
41
41
|
builder (3.1.4)
|
42
|
-
coveralls (0.7.
|
42
|
+
coveralls (0.7.1)
|
43
43
|
multi_json (~> 1.3)
|
44
44
|
rest-client
|
45
45
|
simplecov (>= 0.7)
|
@@ -48,80 +48,80 @@ GEM
|
|
48
48
|
crack (0.4.2)
|
49
49
|
safe_yaml (~> 1.0.0)
|
50
50
|
diff-lcs (1.2.5)
|
51
|
-
docile (1.1.
|
51
|
+
docile (1.1.5)
|
52
52
|
erubis (2.7.0)
|
53
53
|
hike (1.2.3)
|
54
|
-
i18n (0.6.
|
54
|
+
i18n (0.6.11)
|
55
55
|
json (1.8.1)
|
56
|
-
mail (2.
|
57
|
-
mime-types (
|
58
|
-
|
59
|
-
mime-types (1.25.1)
|
56
|
+
mail (2.6.1)
|
57
|
+
mime-types (>= 1.16, < 3)
|
58
|
+
mime-types (2.4.3)
|
60
59
|
minitest (4.7.5)
|
61
60
|
multi_json (1.10.1)
|
62
|
-
|
61
|
+
netrc (0.8.0)
|
63
62
|
rack (1.5.2)
|
64
63
|
rack-test (0.6.2)
|
65
64
|
rack (>= 1.0)
|
66
|
-
rails (4.0.
|
67
|
-
actionmailer (= 4.0.
|
68
|
-
actionpack (= 4.0.
|
69
|
-
activerecord (= 4.0.
|
70
|
-
activesupport (= 4.0.
|
65
|
+
rails (4.0.11)
|
66
|
+
actionmailer (= 4.0.11)
|
67
|
+
actionpack (= 4.0.11)
|
68
|
+
activerecord (= 4.0.11)
|
69
|
+
activesupport (= 4.0.11)
|
71
70
|
bundler (>= 1.3.0, < 2.0)
|
72
|
-
railties (= 4.0.
|
73
|
-
sprockets-rails (~> 2.0
|
74
|
-
railties (4.0.
|
75
|
-
actionpack (= 4.0.
|
76
|
-
activesupport (= 4.0.
|
71
|
+
railties (= 4.0.11)
|
72
|
+
sprockets-rails (~> 2.0)
|
73
|
+
railties (4.0.11)
|
74
|
+
actionpack (= 4.0.11)
|
75
|
+
activesupport (= 4.0.11)
|
77
76
|
rake (>= 0.8.7)
|
78
77
|
thor (>= 0.18.1, < 2.0)
|
79
78
|
rake (10.3.2)
|
80
|
-
rest-client (1.
|
81
|
-
mime-types (>= 1.16)
|
82
|
-
|
83
|
-
rspec-
|
79
|
+
rest-client (1.7.2)
|
80
|
+
mime-types (>= 1.16, < 3.0)
|
81
|
+
netrc (~> 0.7)
|
82
|
+
rspec-collection_matchers (1.0.0)
|
83
|
+
rspec-expectations (>= 2.99.0.beta1)
|
84
|
+
rspec-core (2.99.2)
|
85
|
+
rspec-expectations (2.99.2)
|
84
86
|
diff-lcs (>= 1.1.3, < 2.0)
|
85
|
-
rspec-mocks (2.
|
86
|
-
rspec-rails (2.
|
87
|
+
rspec-mocks (2.99.2)
|
88
|
+
rspec-rails (2.99.0)
|
87
89
|
actionpack (>= 3.0)
|
88
90
|
activemodel (>= 3.0)
|
89
91
|
activesupport (>= 3.0)
|
90
92
|
railties (>= 3.0)
|
91
|
-
rspec-
|
92
|
-
rspec-
|
93
|
-
rspec-
|
94
|
-
|
95
|
-
|
93
|
+
rspec-collection_matchers
|
94
|
+
rspec-core (~> 2.99.0)
|
95
|
+
rspec-expectations (~> 2.99.0)
|
96
|
+
rspec-mocks (~> 2.99.0)
|
97
|
+
safe_yaml (1.0.4)
|
98
|
+
simplecov (0.9.1)
|
96
99
|
docile (~> 1.1.0)
|
97
|
-
multi_json
|
100
|
+
multi_json (~> 1.0)
|
98
101
|
simplecov-html (~> 0.8.0)
|
99
102
|
simplecov-html (0.8.0)
|
100
|
-
sprockets (2.12.
|
103
|
+
sprockets (2.12.3)
|
101
104
|
hike (~> 1.2)
|
102
105
|
multi_json (~> 1.0)
|
103
106
|
rack (~> 1.0)
|
104
107
|
tilt (~> 1.1, != 1.3.0)
|
105
|
-
sprockets-rails (2.0
|
108
|
+
sprockets-rails (2.2.0)
|
106
109
|
actionpack (>= 3.0)
|
107
110
|
activesupport (>= 3.0)
|
108
|
-
sprockets (
|
109
|
-
stripe (1.
|
111
|
+
sprockets (>= 2.8, < 4.0)
|
112
|
+
stripe (1.16.0)
|
110
113
|
json (~> 1.8.1)
|
111
|
-
mime-types (
|
114
|
+
mime-types (>= 1.25, < 3.0)
|
112
115
|
rest-client (~> 1.4)
|
113
116
|
term-ansicolor (1.3.0)
|
114
117
|
tins (~> 1.0)
|
115
118
|
thor (0.19.1)
|
116
119
|
thread_safe (0.3.4)
|
117
120
|
tilt (1.4.1)
|
118
|
-
tins (1.
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
tzinfo (0.3.39)
|
123
|
-
webmock (1.17.4)
|
124
|
-
addressable (>= 2.2.7)
|
121
|
+
tins (1.3.3)
|
122
|
+
tzinfo (0.3.42)
|
123
|
+
webmock (1.20.0)
|
124
|
+
addressable (>= 2.3.6)
|
125
125
|
crack (>= 0.3.2)
|
126
126
|
|
127
127
|
PLATFORMS
|
@@ -0,0 +1,141 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../
|
3
|
+
specs:
|
4
|
+
stripe_event (1.4.0)
|
5
|
+
activesupport (>= 3.1)
|
6
|
+
stripe (~> 1.6)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
actionmailer (4.1.7)
|
12
|
+
actionpack (= 4.1.7)
|
13
|
+
actionview (= 4.1.7)
|
14
|
+
mail (~> 2.5, >= 2.5.4)
|
15
|
+
actionpack (4.1.7)
|
16
|
+
actionview (= 4.1.7)
|
17
|
+
activesupport (= 4.1.7)
|
18
|
+
rack (~> 1.5.2)
|
19
|
+
rack-test (~> 0.6.2)
|
20
|
+
actionview (4.1.7)
|
21
|
+
activesupport (= 4.1.7)
|
22
|
+
builder (~> 3.1)
|
23
|
+
erubis (~> 2.7.0)
|
24
|
+
activemodel (4.1.7)
|
25
|
+
activesupport (= 4.1.7)
|
26
|
+
builder (~> 3.1)
|
27
|
+
activerecord (4.1.7)
|
28
|
+
activemodel (= 4.1.7)
|
29
|
+
activesupport (= 4.1.7)
|
30
|
+
arel (~> 5.0.0)
|
31
|
+
activesupport (4.1.7)
|
32
|
+
i18n (~> 0.6, >= 0.6.9)
|
33
|
+
json (~> 1.7, >= 1.7.7)
|
34
|
+
minitest (~> 5.1)
|
35
|
+
thread_safe (~> 0.1)
|
36
|
+
tzinfo (~> 1.1)
|
37
|
+
addressable (2.3.6)
|
38
|
+
appraisal (1.0.2)
|
39
|
+
bundler
|
40
|
+
rake
|
41
|
+
thor (>= 0.14.0)
|
42
|
+
arel (5.0.1.20140414130214)
|
43
|
+
builder (3.2.2)
|
44
|
+
coveralls (0.7.1)
|
45
|
+
multi_json (~> 1.3)
|
46
|
+
rest-client
|
47
|
+
simplecov (>= 0.7)
|
48
|
+
term-ansicolor
|
49
|
+
thor
|
50
|
+
crack (0.4.2)
|
51
|
+
safe_yaml (~> 1.0.0)
|
52
|
+
diff-lcs (1.2.5)
|
53
|
+
docile (1.1.5)
|
54
|
+
erubis (2.7.0)
|
55
|
+
hike (1.2.3)
|
56
|
+
i18n (0.6.11)
|
57
|
+
json (1.8.1)
|
58
|
+
mail (2.6.1)
|
59
|
+
mime-types (>= 1.16, < 3)
|
60
|
+
mime-types (2.4.3)
|
61
|
+
minitest (5.4.2)
|
62
|
+
multi_json (1.10.1)
|
63
|
+
netrc (0.8.0)
|
64
|
+
rack (1.5.2)
|
65
|
+
rack-test (0.6.2)
|
66
|
+
rack (>= 1.0)
|
67
|
+
rails (4.1.7)
|
68
|
+
actionmailer (= 4.1.7)
|
69
|
+
actionpack (= 4.1.7)
|
70
|
+
actionview (= 4.1.7)
|
71
|
+
activemodel (= 4.1.7)
|
72
|
+
activerecord (= 4.1.7)
|
73
|
+
activesupport (= 4.1.7)
|
74
|
+
bundler (>= 1.3.0, < 2.0)
|
75
|
+
railties (= 4.1.7)
|
76
|
+
sprockets-rails (~> 2.0)
|
77
|
+
railties (4.1.7)
|
78
|
+
actionpack (= 4.1.7)
|
79
|
+
activesupport (= 4.1.7)
|
80
|
+
rake (>= 0.8.7)
|
81
|
+
thor (>= 0.18.1, < 2.0)
|
82
|
+
rake (10.3.2)
|
83
|
+
rest-client (1.7.2)
|
84
|
+
mime-types (>= 1.16, < 3.0)
|
85
|
+
netrc (~> 0.7)
|
86
|
+
rspec-collection_matchers (1.0.0)
|
87
|
+
rspec-expectations (>= 2.99.0.beta1)
|
88
|
+
rspec-core (2.99.2)
|
89
|
+
rspec-expectations (2.99.2)
|
90
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
91
|
+
rspec-mocks (2.99.2)
|
92
|
+
rspec-rails (2.99.0)
|
93
|
+
actionpack (>= 3.0)
|
94
|
+
activemodel (>= 3.0)
|
95
|
+
activesupport (>= 3.0)
|
96
|
+
railties (>= 3.0)
|
97
|
+
rspec-collection_matchers
|
98
|
+
rspec-core (~> 2.99.0)
|
99
|
+
rspec-expectations (~> 2.99.0)
|
100
|
+
rspec-mocks (~> 2.99.0)
|
101
|
+
safe_yaml (1.0.4)
|
102
|
+
simplecov (0.9.1)
|
103
|
+
docile (~> 1.1.0)
|
104
|
+
multi_json (~> 1.0)
|
105
|
+
simplecov-html (~> 0.8.0)
|
106
|
+
simplecov-html (0.8.0)
|
107
|
+
sprockets (2.12.3)
|
108
|
+
hike (~> 1.2)
|
109
|
+
multi_json (~> 1.0)
|
110
|
+
rack (~> 1.0)
|
111
|
+
tilt (~> 1.1, != 1.3.0)
|
112
|
+
sprockets-rails (2.2.0)
|
113
|
+
actionpack (>= 3.0)
|
114
|
+
activesupport (>= 3.0)
|
115
|
+
sprockets (>= 2.8, < 4.0)
|
116
|
+
stripe (1.16.0)
|
117
|
+
json (~> 1.8.1)
|
118
|
+
mime-types (>= 1.25, < 3.0)
|
119
|
+
rest-client (~> 1.4)
|
120
|
+
term-ansicolor (1.3.0)
|
121
|
+
tins (~> 1.0)
|
122
|
+
thor (0.19.1)
|
123
|
+
thread_safe (0.3.4)
|
124
|
+
tilt (1.4.1)
|
125
|
+
tins (1.3.3)
|
126
|
+
tzinfo (1.2.2)
|
127
|
+
thread_safe (~> 0.1)
|
128
|
+
webmock (1.20.0)
|
129
|
+
addressable (>= 2.3.6)
|
130
|
+
crack (>= 0.3.2)
|
131
|
+
|
132
|
+
PLATFORMS
|
133
|
+
ruby
|
134
|
+
|
135
|
+
DEPENDENCIES
|
136
|
+
appraisal
|
137
|
+
coveralls
|
138
|
+
rails (~> 4.1.0)
|
139
|
+
rspec-rails (~> 2.12)
|
140
|
+
stripe_event!
|
141
|
+
webmock (~> 1.9)
|
data/lib/stripe_event.rb
CHANGED
@@ -35,6 +35,11 @@ module StripeEvent
|
|
35
35
|
def all(callable = Proc.new)
|
36
36
|
subscribe nil, callable
|
37
37
|
end
|
38
|
+
|
39
|
+
def listening?(name)
|
40
|
+
namespaced_name = namespace.call(name)
|
41
|
+
backend.notifier.listening?(namespaced_name)
|
42
|
+
end
|
38
43
|
end
|
39
44
|
|
40
45
|
class Namespace < Struct.new(:value, :delimiter)
|
data/lib/stripe_event/version.rb
CHANGED
@@ -152,6 +152,28 @@ describe StripeEvent do
|
|
152
152
|
end
|
153
153
|
end
|
154
154
|
|
155
|
+
describe ".listening?" do
|
156
|
+
it "returns true when there is a subscriber for a matching event type" do
|
157
|
+
StripeEvent.subscribe('customer.', &subscriber)
|
158
|
+
|
159
|
+
expect(StripeEvent.listening?('customer.card')).to be true
|
160
|
+
expect(StripeEvent.listening?('customer.')).to be true
|
161
|
+
end
|
162
|
+
|
163
|
+
it "returns false when there is not a subscriber for a matching event type" do
|
164
|
+
StripeEvent.subscribe('customer.', &subscriber)
|
165
|
+
|
166
|
+
expect(StripeEvent.listening?('account')).to be false
|
167
|
+
end
|
168
|
+
|
169
|
+
it "returns true when a subscriber is subscribed to all events" do
|
170
|
+
StripeEvent.all(&subscriber)
|
171
|
+
|
172
|
+
expect(StripeEvent.listening?('customer.')).to be true
|
173
|
+
expect(StripeEvent.listening?('account')).to be true
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
155
177
|
describe StripeEvent::NotificationAdapter do
|
156
178
|
let(:adapter) { StripeEvent.adapter }
|
157
179
|
|
metadata
CHANGED
@@ -1,111 +1,126 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stripe_event
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Danny Whalen
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2014-
|
12
|
+
date: 2014-11-02 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: activesupport
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
|
-
- -
|
19
|
+
- - ! '>='
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: '3.1'
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
|
-
- -
|
27
|
+
- - ! '>='
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '3.1'
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: stripe
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
|
-
- -
|
35
|
+
- - ~>
|
32
36
|
- !ruby/object:Gem::Version
|
33
37
|
version: '1.6'
|
34
38
|
type: :runtime
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
|
-
- -
|
43
|
+
- - ~>
|
39
44
|
- !ruby/object:Gem::Version
|
40
45
|
version: '1.6'
|
41
46
|
- !ruby/object:Gem::Dependency
|
42
47
|
name: rails
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
44
50
|
requirements:
|
45
|
-
- -
|
51
|
+
- - ! '>='
|
46
52
|
- !ruby/object:Gem::Version
|
47
53
|
version: '3.1'
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
51
58
|
requirements:
|
52
|
-
- -
|
59
|
+
- - ! '>='
|
53
60
|
- !ruby/object:Gem::Version
|
54
61
|
version: '3.1'
|
55
62
|
- !ruby/object:Gem::Dependency
|
56
63
|
name: rspec-rails
|
57
64
|
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
58
66
|
requirements:
|
59
|
-
- -
|
67
|
+
- - ~>
|
60
68
|
- !ruby/object:Gem::Version
|
61
69
|
version: '2.12'
|
62
70
|
type: :development
|
63
71
|
prerelease: false
|
64
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
65
74
|
requirements:
|
66
|
-
- -
|
75
|
+
- - ~>
|
67
76
|
- !ruby/object:Gem::Version
|
68
77
|
version: '2.12'
|
69
78
|
- !ruby/object:Gem::Dependency
|
70
79
|
name: webmock
|
71
80
|
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
72
82
|
requirements:
|
73
|
-
- -
|
83
|
+
- - ~>
|
74
84
|
- !ruby/object:Gem::Version
|
75
85
|
version: '1.9'
|
76
86
|
type: :development
|
77
87
|
prerelease: false
|
78
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
79
90
|
requirements:
|
80
|
-
- -
|
91
|
+
- - ~>
|
81
92
|
- !ruby/object:Gem::Version
|
82
93
|
version: '1.9'
|
83
94
|
- !ruby/object:Gem::Dependency
|
84
95
|
name: appraisal
|
85
96
|
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
86
98
|
requirements:
|
87
|
-
- -
|
99
|
+
- - ! '>='
|
88
100
|
- !ruby/object:Gem::Version
|
89
101
|
version: '0'
|
90
102
|
type: :development
|
91
103
|
prerelease: false
|
92
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
93
106
|
requirements:
|
94
|
-
- -
|
107
|
+
- - ! '>='
|
95
108
|
- !ruby/object:Gem::Version
|
96
109
|
version: '0'
|
97
110
|
- !ruby/object:Gem::Dependency
|
98
111
|
name: coveralls
|
99
112
|
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
100
114
|
requirements:
|
101
|
-
- -
|
115
|
+
- - ! '>='
|
102
116
|
- !ruby/object:Gem::Version
|
103
117
|
version: '0'
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
107
122
|
requirements:
|
108
|
-
- -
|
123
|
+
- - ! '>='
|
109
124
|
- !ruby/object:Gem::Version
|
110
125
|
version: '0'
|
111
126
|
description: Stripe webhook integration for Rails applications.
|
@@ -114,9 +129,9 @@ executables: []
|
|
114
129
|
extensions: []
|
115
130
|
extra_rdoc_files: []
|
116
131
|
files:
|
117
|
-
-
|
118
|
-
-
|
119
|
-
-
|
132
|
+
- .gitignore
|
133
|
+
- .rspec
|
134
|
+
- .travis.yml
|
120
135
|
- Appraisals
|
121
136
|
- CHANGELOG.md
|
122
137
|
- Gemfile
|
@@ -131,6 +146,8 @@ files:
|
|
131
146
|
- gemfiles/rails3.2.gemfile.lock
|
132
147
|
- gemfiles/rails4.0.gemfile
|
133
148
|
- gemfiles/rails4.0.gemfile.lock
|
149
|
+
- gemfiles/rails4.1.gemfile
|
150
|
+
- gemfiles/rails4.1.gemfile.lock
|
134
151
|
- lib/stripe_event.rb
|
135
152
|
- lib/stripe_event/engine.rb
|
136
153
|
- lib/stripe_event/version.rb
|
@@ -175,26 +192,27 @@ files:
|
|
175
192
|
homepage: https://github.com/integrallis/stripe_event
|
176
193
|
licenses:
|
177
194
|
- MIT
|
178
|
-
metadata: {}
|
179
195
|
post_install_message:
|
180
196
|
rdoc_options: []
|
181
197
|
require_paths:
|
182
198
|
- lib
|
183
199
|
required_ruby_version: !ruby/object:Gem::Requirement
|
200
|
+
none: false
|
184
201
|
requirements:
|
185
|
-
- -
|
202
|
+
- - ! '>='
|
186
203
|
- !ruby/object:Gem::Version
|
187
204
|
version: '0'
|
188
205
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
206
|
+
none: false
|
189
207
|
requirements:
|
190
|
-
- -
|
208
|
+
- - ! '>='
|
191
209
|
- !ruby/object:Gem::Version
|
192
210
|
version: '0'
|
193
211
|
requirements: []
|
194
212
|
rubyforge_project:
|
195
|
-
rubygems_version:
|
213
|
+
rubygems_version: 1.8.23.2
|
196
214
|
signing_key:
|
197
|
-
specification_version:
|
215
|
+
specification_version: 3
|
198
216
|
summary: Stripe webhook integration for Rails applications.
|
199
217
|
test_files:
|
200
218
|
- Appraisals
|
@@ -204,6 +222,8 @@ test_files:
|
|
204
222
|
- gemfiles/rails3.2.gemfile.lock
|
205
223
|
- gemfiles/rails4.0.gemfile
|
206
224
|
- gemfiles/rails4.0.gemfile.lock
|
225
|
+
- gemfiles/rails4.1.gemfile
|
226
|
+
- gemfiles/rails4.1.gemfile.lock
|
207
227
|
- spec/controllers/webhook_controller_spec.rb
|
208
228
|
- spec/dummy/README.rdoc
|
209
229
|
- spec/dummy/Rakefile
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: d2dcd509d7b185437e3955061006aa951aa03242
|
4
|
-
data.tar.gz: 67730b3dda4db7338ce20d07204c3ac2814ae799
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 88e1f14249d797216755f12cd584f90254b8f6a07497be1d890d0348578ffe908164f7c5bc416e0ca3f9526c6d7c4c4ae2af96fb9c0c8d6ed207310b8ab33a09
|
7
|
-
data.tar.gz: fc521a0db98550b61f045d00974af8da81dff81e311b6e173a9eee98ce55513944718693b0230794deaba2a05c950fa2829953dc0d2c03bd5fa17ab5ce095c84
|