stripe_event 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 92e8ad6c1ab515d871b8aba7a4c6d15ecc0dd967
4
+ data.tar.gz: 027dd82b3834d95bb4255e43caebaf56d7b3082f
5
+ SHA512:
6
+ metadata.gz: 8c5848d09cc4d4d14ac5e4f244444c3a2d987712055d2be058adc6d36e413f2b099c84d275a191b20a6ee64173b8f2015770dc0efb33ecf2df376bcb1030e53a
7
+ data.tar.gz: c13e2087d74ec7fe77131d527d990ca0273cffa12c018b36279765e86c1ee941b7101ef4553e7af53304e49963cad4d22e38c1ba5feaeab9145a69b9cc855405
data/.travis.yml CHANGED
@@ -3,14 +3,16 @@ rvm:
3
3
  - 1.9.2
4
4
  - 1.9.3
5
5
  - rbx-19mode
6
+ - jruby-19mode
7
+ - 2.0.0
6
8
  gemfile:
7
9
  - gemfiles/rails3.1.gemfile
8
10
  - gemfiles/rails3.2.gemfile
9
- - gemfiles/rails_master.gemfile
11
+ - gemfiles/rails4.0.gemfile
10
12
  matrix:
11
13
  exclude:
12
14
  - rvm: 1.9.2
13
- gemfile: gemfiles/rails_master.gemfile
15
+ gemfile: gemfiles/rails4.0.gemfile
14
16
  notifications:
15
17
  email:
16
- - daniel.r.whalen@gmail.com
18
+ - daniel.r.whalen+travis-ci@gmail.com
data/Appraisals CHANGED
@@ -1,11 +1,11 @@
1
1
  appraise "rails3.1" do
2
- gem "rails", "~> 3.1"
2
+ gem "rails", "~> 3.1.0"
3
3
  end
4
4
 
5
5
  appraise "rails3.2" do
6
- gem "rails", "~> 3.2"
6
+ gem "rails", "~> 3.2.0"
7
7
  end
8
8
 
9
- appraise "rails-master" do
10
- gem "rails", :github => "rails/rails"
9
+ appraise "rails4.0" do
10
+ gem "rails", "~> 4.0.0"
11
11
  end
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 0.6.1 (August 19, 2013)
2
+ * Update event type list
3
+ * Update test gemfiles
4
+
1
5
  ### 0.6.0 (March 18, 2013)
2
6
  * Rails 4 compatibility. Thank you to Ben Ubois for reporting the [issue](https://github.com/integrallis/stripe_event/issues/13) and to Matt Goldman for the [pull request](https://github.com/integrallis/stripe_event/pull/14).
3
7
  * Run specs against different Rails versions
data/Gemfile CHANGED
@@ -1,2 +1,2 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
2
  gemspec
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # stripe_event [![Build Status](https://secure.travis-ci.org/integrallis/stripe_event.png?branch=master)](http://travis-ci.org/integrallis/stripe_event) [![Dependency Status](https://gemnasium.com/integrallis/stripe_event.png)](https://gemnasium.com/integrallis/stripe_event)
1
+ # StripeEvent [![Build Status](https://secure.travis-ci.org/integrallis/stripe_event.png?branch=master)](http://travis-ci.org/integrallis/stripe_event) [![Dependency Status](https://gemnasium.com/integrallis/stripe_event.png)](https://gemnasium.com/integrallis/stripe_event) [![Gem Version](https://badge.fury.io/rb/stripe_event.png)](http://badge.fury.io/rb/stripe_event)
2
2
 
3
- stripe_event is built on the [ActiveSupport::Notifications API](http://api.rubyonrails.org/classes/ActiveSupport/Notifications.html). Incoming webhook requests are authenticated by retrieving the [event object](https://stripe.com/docs/api?lang=ruby#event_object) from Stripe[[1]](https://answers.stripe.com/questions/what-is-the-recommended-way-to-authenticate-a-webhook-callback). Define subscriber blocks to handle one, many, or all event types.
3
+ StripeEvent is built on the [ActiveSupport::Notifications API](http://api.rubyonrails.org/classes/ActiveSupport/Notifications.html). Incoming webhook requests are authenticated by retrieving the [event object](https://stripe.com/docs/api?lang=ruby#event_object) from Stripe[[1]](https://answers.stripe.com/questions/what-is-the-recommended-way-to-authenticate-a-webhook-callback). Define subscriber blocks to handle one, many, or all event types.
4
4
 
5
5
  ## Install
6
6
 
@@ -61,11 +61,11 @@ StripeEvent.event_retriever = lambda { |params| params }
61
61
 
62
62
  ### Examples
63
63
 
64
- The [RailsApps](https://github.com/RailsApps) project by Daniel Kehoe has released an [example Rails 3.2 app](https://github.com/RailsApps/rails-stripe-membership-saas) with recurring billing using Stripe. The application uses stripe_event to handle `customer.subscription.deleted` events.
64
+ The [RailsApps](https://github.com/RailsApps) project by Daniel Kehoe has released an [example Rails 3.2 app](https://github.com/RailsApps/rails-stripe-membership-saas) with recurring billing using Stripe. The application uses StripeEvent to handle `customer.subscription.deleted` events.
65
65
 
66
66
  ### Note: 'Test Webhooks' Button on Stripe Dashboard
67
67
 
68
- This button sends an example event to your webhook urls, including an `id` of `evt_00000000000000`. To confirm that Stripe sent the webhook, stripe_event attempts to retrieve the event details from Stripe using the given `id`. In this case the event does not exist and stripe_event responds with `401 Unauthorized`. Instead of using the 'Test Webhooks' button, trigger webhooks by using the Stripe Dashboard to create test payments, customers, etc.
68
+ This button sends an example event to your webhook urls, including an `id` of `evt_00000000000000`. To confirm that Stripe sent the webhook, StripeEvent attempts to retrieve the event details from Stripe using the given `id`. In this case the event does not exist and StripeEvent responds with `401 Unauthorized`. Instead of using the 'Test Webhooks' button, trigger webhooks by using the Stripe Dashboard to create test payments, customers, etc.
69
69
 
70
70
  ### License
71
71
 
@@ -1,7 +1,7 @@
1
1
  # This file was generated by Appraisal
2
2
 
3
- source "http://rubygems.org"
3
+ source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 3.1"
5
+ gem "rails", "~> 3.1.0"
6
6
 
7
7
  gemspec :path=>"../"
@@ -1,113 +1,116 @@
1
1
  PATH
2
- remote: /Users/dwhalen/Dropbox/stripe_event
2
+ remote: ..
3
3
  specs:
4
- stripe_event (0.6.0)
4
+ stripe_event (0.6.1)
5
5
  rails (>= 3.1)
6
6
  stripe (~> 1.6)
7
7
 
8
8
  GEM
9
- remote: http://rubygems.org/
9
+ remote: https://rubygems.org/
10
10
  specs:
11
- actionmailer (3.2.12)
12
- actionpack (= 3.2.12)
11
+ actionmailer (3.1.12)
12
+ actionpack (= 3.1.12)
13
13
  mail (~> 2.4.4)
14
- actionpack (3.2.12)
15
- activemodel (= 3.2.12)
16
- activesupport (= 3.2.12)
14
+ actionpack (3.1.12)
15
+ activemodel (= 3.1.12)
16
+ activesupport (= 3.1.12)
17
17
  builder (~> 3.0.0)
18
18
  erubis (~> 2.7.0)
19
- journey (~> 1.0.4)
20
- rack (~> 1.4.5)
19
+ i18n (~> 0.6)
20
+ rack (~> 1.3.6)
21
21
  rack-cache (~> 1.2)
22
+ rack-mount (~> 0.8.2)
22
23
  rack-test (~> 0.6.1)
23
- sprockets (~> 2.2.1)
24
- activemodel (3.2.12)
25
- activesupport (= 3.2.12)
24
+ sprockets (~> 2.0.4)
25
+ activemodel (3.1.12)
26
+ activesupport (= 3.1.12)
26
27
  builder (~> 3.0.0)
27
- activerecord (3.2.12)
28
- activemodel (= 3.2.12)
29
- activesupport (= 3.2.12)
30
- arel (~> 3.0.2)
31
- tzinfo (~> 0.3.29)
32
- activeresource (3.2.12)
33
- activemodel (= 3.2.12)
34
- activesupport (= 3.2.12)
35
- activesupport (3.2.12)
36
28
  i18n (~> 0.6)
29
+ activerecord (3.1.12)
30
+ activemodel (= 3.1.12)
31
+ activesupport (= 3.1.12)
32
+ arel (~> 2.2.3)
33
+ tzinfo (~> 0.3.29)
34
+ activeresource (3.1.12)
35
+ activemodel (= 3.1.12)
36
+ activesupport (= 3.1.12)
37
+ activesupport (3.1.12)
37
38
  multi_json (~> 1.0)
38
- addressable (2.3.3)
39
- appraisal (0.5.1)
39
+ addressable (2.3.5)
40
+ appraisal (0.5.2)
40
41
  bundler
41
42
  rake
42
- arel (3.0.2)
43
+ arel (2.2.3)
43
44
  builder (3.0.4)
44
- crack (0.3.2)
45
- diff-lcs (1.2.1)
45
+ crack (0.4.1)
46
+ safe_yaml (~> 0.9.0)
47
+ diff-lcs (1.2.4)
46
48
  erubis (2.7.0)
47
- hike (1.2.1)
48
- i18n (0.6.4)
49
- journey (1.0.4)
50
- json (1.7.7)
49
+ hike (1.2.3)
50
+ i18n (0.6.5)
51
+ json (1.8.0)
51
52
  mail (2.4.4)
52
53
  i18n (>= 0.4.0)
53
54
  mime-types (~> 1.16)
54
55
  treetop (~> 1.4.8)
55
- mime-types (1.21)
56
- multi_json (1.7.1)
56
+ mime-types (1.24)
57
+ multi_json (1.7.9)
57
58
  polyglot (0.3.3)
58
- rack (1.4.5)
59
+ rack (1.3.10)
59
60
  rack-cache (1.2)
60
61
  rack (>= 0.4)
62
+ rack-mount (0.8.3)
63
+ rack (>= 1.0.0)
61
64
  rack-ssl (1.3.3)
62
65
  rack
63
66
  rack-test (0.6.2)
64
67
  rack (>= 1.0)
65
- rails (3.2.12)
66
- actionmailer (= 3.2.12)
67
- actionpack (= 3.2.12)
68
- activerecord (= 3.2.12)
69
- activeresource (= 3.2.12)
70
- activesupport (= 3.2.12)
68
+ rails (3.1.12)
69
+ actionmailer (= 3.1.12)
70
+ actionpack (= 3.1.12)
71
+ activerecord (= 3.1.12)
72
+ activeresource (= 3.1.12)
73
+ activesupport (= 3.1.12)
71
74
  bundler (~> 1.0)
72
- railties (= 3.2.12)
73
- railties (3.2.12)
74
- actionpack (= 3.2.12)
75
- activesupport (= 3.2.12)
75
+ railties (= 3.1.12)
76
+ railties (3.1.12)
77
+ actionpack (= 3.1.12)
78
+ activesupport (= 3.1.12)
76
79
  rack-ssl (~> 1.3.2)
77
80
  rake (>= 0.8.7)
78
81
  rdoc (~> 3.4)
79
- thor (>= 0.14.6, < 2.0)
80
- rake (10.0.3)
82
+ thor (~> 0.14.6)
83
+ rake (10.1.0)
81
84
  rdoc (3.12.2)
82
85
  json (~> 1.4)
83
86
  rest-client (1.6.7)
84
87
  mime-types (>= 1.16)
85
- rspec-core (2.13.1)
86
- rspec-expectations (2.13.0)
88
+ rspec-core (2.14.5)
89
+ rspec-expectations (2.14.2)
87
90
  diff-lcs (>= 1.1.3, < 2.0)
88
- rspec-mocks (2.13.0)
89
- rspec-rails (2.13.0)
91
+ rspec-mocks (2.14.3)
92
+ rspec-rails (2.14.0)
90
93
  actionpack (>= 3.0)
91
94
  activesupport (>= 3.0)
92
95
  railties (>= 3.0)
93
- rspec-core (~> 2.13.0)
94
- rspec-expectations (~> 2.13.0)
95
- rspec-mocks (~> 2.13.0)
96
- sprockets (2.2.2)
96
+ rspec-core (~> 2.14.0)
97
+ rspec-expectations (~> 2.14.0)
98
+ rspec-mocks (~> 2.14.0)
99
+ safe_yaml (0.9.5)
100
+ sprockets (2.0.4)
97
101
  hike (~> 1.2)
98
- multi_json (~> 1.0)
99
102
  rack (~> 1.0)
100
103
  tilt (~> 1.1, != 1.3.0)
101
- stripe (1.7.11)
104
+ stripe (1.8.5)
102
105
  multi_json (>= 1.0.4, < 2)
103
106
  rest-client (~> 1.4)
104
- thor (0.17.0)
105
- tilt (1.3.6)
106
- treetop (1.4.12)
107
+ thor (0.14.6)
108
+ tilt (1.4.1)
109
+ treetop (1.4.15)
107
110
  polyglot
108
111
  polyglot (>= 0.3.1)
109
112
  tzinfo (0.3.37)
110
- webmock (1.11.0)
113
+ webmock (1.13.0)
111
114
  addressable (>= 2.2.7)
112
115
  crack (>= 0.3.2)
113
116
 
@@ -116,7 +119,7 @@ PLATFORMS
116
119
 
117
120
  DEPENDENCIES
118
121
  appraisal
119
- rails (~> 3.1)
122
+ rails (~> 3.1.0)
120
123
  rspec-rails (~> 2.12)
121
124
  stripe_event!
122
125
  webmock (~> 1.9)
@@ -1,7 +1,7 @@
1
1
  # This file was generated by Appraisal
2
2
 
3
- source "http://rubygems.org"
3
+ source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 3.2"
5
+ gem "rails", "~> 3.2.0"
6
6
 
7
7
  gemspec :path=>"../"
@@ -1,19 +1,19 @@
1
1
  PATH
2
- remote: /Users/dwhalen/Dropbox/stripe_event
2
+ remote: ..
3
3
  specs:
4
- stripe_event (0.6.0)
4
+ stripe_event (0.6.1)
5
5
  rails (>= 3.1)
6
6
  stripe (~> 1.6)
7
7
 
8
8
  GEM
9
- remote: http://rubygems.org/
9
+ remote: https://rubygems.org/
10
10
  specs:
11
- actionmailer (3.2.12)
12
- actionpack (= 3.2.12)
13
- mail (~> 2.4.4)
14
- actionpack (3.2.12)
15
- activemodel (= 3.2.12)
16
- activesupport (= 3.2.12)
11
+ actionmailer (3.2.14)
12
+ actionpack (= 3.2.14)
13
+ mail (~> 2.5.4)
14
+ actionpack (3.2.14)
15
+ activemodel (= 3.2.14)
16
+ activesupport (= 3.2.14)
17
17
  builder (~> 3.0.0)
18
18
  erubis (~> 2.7.0)
19
19
  journey (~> 1.0.4)
@@ -21,39 +21,39 @@ GEM
21
21
  rack-cache (~> 1.2)
22
22
  rack-test (~> 0.6.1)
23
23
  sprockets (~> 2.2.1)
24
- activemodel (3.2.12)
25
- activesupport (= 3.2.12)
24
+ activemodel (3.2.14)
25
+ activesupport (= 3.2.14)
26
26
  builder (~> 3.0.0)
27
- activerecord (3.2.12)
28
- activemodel (= 3.2.12)
29
- activesupport (= 3.2.12)
27
+ activerecord (3.2.14)
28
+ activemodel (= 3.2.14)
29
+ activesupport (= 3.2.14)
30
30
  arel (~> 3.0.2)
31
31
  tzinfo (~> 0.3.29)
32
- activeresource (3.2.12)
33
- activemodel (= 3.2.12)
34
- activesupport (= 3.2.12)
35
- activesupport (3.2.12)
36
- i18n (~> 0.6)
32
+ activeresource (3.2.14)
33
+ activemodel (= 3.2.14)
34
+ activesupport (= 3.2.14)
35
+ activesupport (3.2.14)
36
+ i18n (~> 0.6, >= 0.6.4)
37
37
  multi_json (~> 1.0)
38
- addressable (2.3.3)
39
- appraisal (0.5.1)
38
+ addressable (2.3.5)
39
+ appraisal (0.5.2)
40
40
  bundler
41
41
  rake
42
42
  arel (3.0.2)
43
43
  builder (3.0.4)
44
- crack (0.3.2)
45
- diff-lcs (1.2.1)
44
+ crack (0.4.1)
45
+ safe_yaml (~> 0.9.0)
46
+ diff-lcs (1.2.4)
46
47
  erubis (2.7.0)
47
- hike (1.2.1)
48
- i18n (0.6.4)
48
+ hike (1.2.3)
49
+ i18n (0.6.5)
49
50
  journey (1.0.4)
50
- json (1.7.7)
51
- mail (2.4.4)
52
- i18n (>= 0.4.0)
51
+ json (1.8.0)
52
+ mail (2.5.4)
53
53
  mime-types (~> 1.16)
54
54
  treetop (~> 1.4.8)
55
- mime-types (1.21)
56
- multi_json (1.7.1)
55
+ mime-types (1.24)
56
+ multi_json (1.7.9)
57
57
  polyglot (0.3.3)
58
58
  rack (1.4.5)
59
59
  rack-cache (1.2)
@@ -62,52 +62,53 @@ GEM
62
62
  rack
63
63
  rack-test (0.6.2)
64
64
  rack (>= 1.0)
65
- rails (3.2.12)
66
- actionmailer (= 3.2.12)
67
- actionpack (= 3.2.12)
68
- activerecord (= 3.2.12)
69
- activeresource (= 3.2.12)
70
- activesupport (= 3.2.12)
65
+ rails (3.2.14)
66
+ actionmailer (= 3.2.14)
67
+ actionpack (= 3.2.14)
68
+ activerecord (= 3.2.14)
69
+ activeresource (= 3.2.14)
70
+ activesupport (= 3.2.14)
71
71
  bundler (~> 1.0)
72
- railties (= 3.2.12)
73
- railties (3.2.12)
74
- actionpack (= 3.2.12)
75
- activesupport (= 3.2.12)
72
+ railties (= 3.2.14)
73
+ railties (3.2.14)
74
+ actionpack (= 3.2.14)
75
+ activesupport (= 3.2.14)
76
76
  rack-ssl (~> 1.3.2)
77
77
  rake (>= 0.8.7)
78
78
  rdoc (~> 3.4)
79
79
  thor (>= 0.14.6, < 2.0)
80
- rake (10.0.3)
80
+ rake (10.1.0)
81
81
  rdoc (3.12.2)
82
82
  json (~> 1.4)
83
83
  rest-client (1.6.7)
84
84
  mime-types (>= 1.16)
85
- rspec-core (2.13.1)
86
- rspec-expectations (2.13.0)
85
+ rspec-core (2.14.5)
86
+ rspec-expectations (2.14.2)
87
87
  diff-lcs (>= 1.1.3, < 2.0)
88
- rspec-mocks (2.13.0)
89
- rspec-rails (2.13.0)
88
+ rspec-mocks (2.14.3)
89
+ rspec-rails (2.14.0)
90
90
  actionpack (>= 3.0)
91
91
  activesupport (>= 3.0)
92
92
  railties (>= 3.0)
93
- rspec-core (~> 2.13.0)
94
- rspec-expectations (~> 2.13.0)
95
- rspec-mocks (~> 2.13.0)
93
+ rspec-core (~> 2.14.0)
94
+ rspec-expectations (~> 2.14.0)
95
+ rspec-mocks (~> 2.14.0)
96
+ safe_yaml (0.9.5)
96
97
  sprockets (2.2.2)
97
98
  hike (~> 1.2)
98
99
  multi_json (~> 1.0)
99
100
  rack (~> 1.0)
100
101
  tilt (~> 1.1, != 1.3.0)
101
- stripe (1.7.11)
102
+ stripe (1.8.5)
102
103
  multi_json (>= 1.0.4, < 2)
103
104
  rest-client (~> 1.4)
104
- thor (0.17.0)
105
- tilt (1.3.6)
106
- treetop (1.4.12)
105
+ thor (0.18.1)
106
+ tilt (1.4.1)
107
+ treetop (1.4.15)
107
108
  polyglot
108
109
  polyglot (>= 0.3.1)
109
110
  tzinfo (0.3.37)
110
- webmock (1.11.0)
111
+ webmock (1.13.0)
111
112
  addressable (>= 2.2.7)
112
113
  crack (>= 0.3.2)
113
114
 
@@ -116,7 +117,7 @@ PLATFORMS
116
117
 
117
118
  DEPENDENCIES
118
119
  appraisal
119
- rails (~> 3.2)
120
+ rails (~> 3.2.0)
120
121
  rspec-rails (~> 2.12)
121
122
  stripe_event!
122
123
  webmock (~> 1.9)
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 4.0.0"
6
+
7
+ gemspec :path=>"../"
@@ -0,0 +1,118 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ stripe_event (0.6.1)
5
+ rails (>= 3.1)
6
+ stripe (~> 1.6)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionmailer (4.0.0)
12
+ actionpack (= 4.0.0)
13
+ mail (~> 2.5.3)
14
+ actionpack (4.0.0)
15
+ activesupport (= 4.0.0)
16
+ builder (~> 3.1.0)
17
+ erubis (~> 2.7.0)
18
+ rack (~> 1.5.2)
19
+ rack-test (~> 0.6.2)
20
+ activemodel (4.0.0)
21
+ activesupport (= 4.0.0)
22
+ builder (~> 3.1.0)
23
+ activerecord (4.0.0)
24
+ activemodel (= 4.0.0)
25
+ activerecord-deprecated_finders (~> 1.0.2)
26
+ activesupport (= 4.0.0)
27
+ arel (~> 4.0.0)
28
+ activerecord-deprecated_finders (1.0.3)
29
+ activesupport (4.0.0)
30
+ i18n (~> 0.6, >= 0.6.4)
31
+ minitest (~> 4.2)
32
+ multi_json (~> 1.3)
33
+ thread_safe (~> 0.1)
34
+ tzinfo (~> 0.3.37)
35
+ addressable (2.3.5)
36
+ appraisal (0.5.2)
37
+ bundler
38
+ rake
39
+ arel (4.0.0)
40
+ atomic (1.1.13)
41
+ builder (3.1.4)
42
+ crack (0.4.1)
43
+ safe_yaml (~> 0.9.0)
44
+ diff-lcs (1.2.4)
45
+ erubis (2.7.0)
46
+ hike (1.2.3)
47
+ i18n (0.6.5)
48
+ mail (2.5.4)
49
+ mime-types (~> 1.16)
50
+ treetop (~> 1.4.8)
51
+ mime-types (1.24)
52
+ minitest (4.7.5)
53
+ multi_json (1.7.9)
54
+ polyglot (0.3.3)
55
+ rack (1.5.2)
56
+ rack-test (0.6.2)
57
+ rack (>= 1.0)
58
+ rails (4.0.0)
59
+ actionmailer (= 4.0.0)
60
+ actionpack (= 4.0.0)
61
+ activerecord (= 4.0.0)
62
+ activesupport (= 4.0.0)
63
+ bundler (>= 1.3.0, < 2.0)
64
+ railties (= 4.0.0)
65
+ sprockets-rails (~> 2.0.0)
66
+ railties (4.0.0)
67
+ actionpack (= 4.0.0)
68
+ activesupport (= 4.0.0)
69
+ rake (>= 0.8.7)
70
+ thor (>= 0.18.1, < 2.0)
71
+ rake (10.1.0)
72
+ rest-client (1.6.7)
73
+ mime-types (>= 1.16)
74
+ rspec-core (2.14.5)
75
+ rspec-expectations (2.14.2)
76
+ diff-lcs (>= 1.1.3, < 2.0)
77
+ rspec-mocks (2.14.3)
78
+ rspec-rails (2.14.0)
79
+ actionpack (>= 3.0)
80
+ activesupport (>= 3.0)
81
+ railties (>= 3.0)
82
+ rspec-core (~> 2.14.0)
83
+ rspec-expectations (~> 2.14.0)
84
+ rspec-mocks (~> 2.14.0)
85
+ safe_yaml (0.9.5)
86
+ sprockets (2.10.0)
87
+ hike (~> 1.2)
88
+ multi_json (~> 1.0)
89
+ rack (~> 1.0)
90
+ tilt (~> 1.1, != 1.3.0)
91
+ sprockets-rails (2.0.0)
92
+ actionpack (>= 3.0)
93
+ activesupport (>= 3.0)
94
+ sprockets (~> 2.8)
95
+ stripe (1.8.5)
96
+ multi_json (>= 1.0.4, < 2)
97
+ rest-client (~> 1.4)
98
+ thor (0.18.1)
99
+ thread_safe (0.1.2)
100
+ atomic
101
+ tilt (1.4.1)
102
+ treetop (1.4.15)
103
+ polyglot
104
+ polyglot (>= 0.3.1)
105
+ tzinfo (0.3.37)
106
+ webmock (1.13.0)
107
+ addressable (>= 2.2.7)
108
+ crack (>= 0.3.2)
109
+
110
+ PLATFORMS
111
+ ruby
112
+
113
+ DEPENDENCIES
114
+ appraisal
115
+ rails (~> 4.0.0)
116
+ rspec-rails (~> 2.12)
117
+ stripe_event!
118
+ webmock (~> 1.9)
data/lib/stripe_event.rb CHANGED
@@ -4,19 +4,19 @@ require "stripe_event/engine"
4
4
 
5
5
  module StripeEvent
6
6
  class << self
7
- attr_accessor :backend
8
- attr_accessor :event_retriever
7
+ attr_accessor :backend, :event_retriever
9
8
 
10
9
  def setup(&block)
11
10
  instance_eval(&block)
12
11
  end
13
12
 
14
13
  def instrument(params)
15
- publish event_retriever.call(params)
14
+ event = event_retriever.call(params)
15
+ publish(event)
16
16
  end
17
17
 
18
18
  def publish(event)
19
- backend.publish event[:type], event
19
+ backend.publish(event[:type], event)
20
20
  end
21
21
 
22
22
  def subscribe(*names, &block)
@@ -24,7 +24,7 @@ module StripeEvent
24
24
 
25
25
  backend.subscribe(pattern) do |*args|
26
26
  payload = args.last
27
- block.call payload
27
+ block.call(payload)
28
28
  end
29
29
  end
30
30
  end
@@ -35,15 +35,20 @@ module StripeEvent
35
35
  TYPE_LIST = Set[
36
36
  'account.updated',
37
37
  'account.application.deauthorized',
38
+ 'balance.available',
38
39
  'charge.succeeded',
39
40
  'charge.failed',
40
41
  'charge.refunded',
42
+ 'charge.captured',
41
43
  'charge.dispute.created',
42
44
  'charge.dispute.updated',
43
45
  'charge.dispute.closed',
44
46
  'customer.created',
45
47
  'customer.updated',
46
48
  'customer.deleted',
49
+ 'customer.card.created',
50
+ 'customer.card.updated',
51
+ 'customer.card.deleted',
47
52
  'customer.subscription.created',
48
53
  'customer.subscription.updated',
49
54
  'customer.subscription.deleted',
@@ -65,6 +70,7 @@ module StripeEvent
65
70
  'coupon.deleted',
66
71
  'transfer.created',
67
72
  'transfer.updated',
73
+ 'transfer.paid',
68
74
  'transfer.failed',
69
75
  'ping'
70
76
  ].freeze
@@ -1,3 +1,3 @@
1
1
  module StripeEvent
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -1,19 +1,14 @@
1
- # This file is copied to spec/ when you run 'rails generate rspec:install'
2
1
  ENV["RAILS_ENV"] ||= 'test'
3
2
  require File.expand_path("../dummy/config/environment", __FILE__)
4
3
  require 'rspec/rails'
5
- require 'rspec/autorun'
6
4
  require 'webmock/rspec'
7
5
 
8
- ENGINE_RAILS_ROOT = File.join(File.dirname(__FILE__), '../')
9
-
10
- # Requires supporting ruby files with custom matchers and macros, etc,
11
- # in spec/support/ and its subdirectories.
12
- Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each {|f| require f }
6
+ support_dir = File.join(File.dirname(__FILE__), '../spec/support/**/*.rb')
7
+ Dir[support_dir].each { |f| require f }
13
8
 
14
9
  RSpec.configure do |config|
15
- config.include(FixtureHelper)
16
- config.include(ActiveSupportHelper)
10
+ config.include FixtureHelper
11
+ config.include ActiveSupportHelper
17
12
 
18
13
  config.order = 'random'
19
14
 
@@ -22,11 +17,13 @@ RSpec.configure do |config|
22
17
  end
23
18
 
24
19
  config.before do
25
- @_event_retriever = StripeEvent.event_retriever
26
- clear_subscribers_for_list(StripeEvent::TYPE_LIST)
20
+ @event_retriever = StripeEvent.event_retriever
21
+ @notifier = StripeEvent.backend.notifier
22
+ StripeEvent.backend.notifier = @notifier.class.new
27
23
  end
28
24
 
29
25
  config.after do
30
- StripeEvent.event_retriever = @_event_retriever
26
+ StripeEvent.event_retriever = @event_retriever
27
+ StripeEvent.backend.notifier = @notifier
31
28
  end
32
29
  end
@@ -1,15 +1,5 @@
1
1
  module ActiveSupportHelper
2
- def clear_subscribers_for_list(type_list)
3
- type_list.each do |type|
4
- subscribers_for_type(type).each { |s| unsubscribe(s) }
5
- end
6
- end
7
-
8
2
  def subscribers_for_type(name)
9
3
  ActiveSupport::Notifications.notifier.listeners_for(name)
10
4
  end
11
-
12
- def unsubscribe(subscriber)
13
- ActiveSupport::Notifications.notifier.unsubscribe(subscriber)
14
- end
15
5
  end
metadata CHANGED
@@ -1,36 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe_event
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
5
- prerelease:
4
+ version: 0.6.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Danny Whalen
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-03-19 00:00:00.000000000 Z
11
+ date: 2013-08-19 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rails
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '3.1'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '3.1'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: stripe
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rspec-rails
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: webmock
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ~>
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ~>
76
67
  - !ruby/object:Gem::Version
@@ -78,17 +69,15 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: appraisal
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - '>='
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  description: Stripe webhook integration for Rails applications.
@@ -114,8 +103,8 @@ files:
114
103
  - gemfiles/rails3.1.gemfile.lock
115
104
  - gemfiles/rails3.2.gemfile
116
105
  - gemfiles/rails3.2.gemfile.lock
117
- - gemfiles/rails_master.gemfile
118
- - gemfiles/rails_master.gemfile.lock
106
+ - gemfiles/rails4.0.gemfile
107
+ - gemfiles/rails4.0.gemfile.lock
119
108
  - lib/stripe_event.rb
120
109
  - lib/stripe_event/engine.rb
121
110
  - lib/stripe_event/version.rb
@@ -162,27 +151,26 @@ files:
162
151
  homepage: https://github.com/integrallis/stripe_event
163
152
  licenses:
164
153
  - MIT
154
+ metadata: {}
165
155
  post_install_message:
166
156
  rdoc_options: []
167
157
  require_paths:
168
158
  - lib
169
159
  required_ruby_version: !ruby/object:Gem::Requirement
170
- none: false
171
160
  requirements:
172
- - - ! '>='
161
+ - - '>='
173
162
  - !ruby/object:Gem::Version
174
163
  version: '0'
175
164
  required_rubygems_version: !ruby/object:Gem::Requirement
176
- none: false
177
165
  requirements:
178
- - - ! '>='
166
+ - - '>='
179
167
  - !ruby/object:Gem::Version
180
168
  version: '0'
181
169
  requirements: []
182
170
  rubyforge_project:
183
- rubygems_version: 1.8.25
171
+ rubygems_version: 2.0.3
184
172
  signing_key:
185
- specification_version: 3
173
+ specification_version: 4
186
174
  summary: Stripe webhook integration for Rails applications.
187
175
  test_files:
188
176
  - Appraisals
@@ -190,8 +178,8 @@ test_files:
190
178
  - gemfiles/rails3.1.gemfile.lock
191
179
  - gemfiles/rails3.2.gemfile
192
180
  - gemfiles/rails3.2.gemfile.lock
193
- - gemfiles/rails_master.gemfile
194
- - gemfiles/rails_master.gemfile.lock
181
+ - gemfiles/rails4.0.gemfile
182
+ - gemfiles/rails4.0.gemfile.lock
195
183
  - spec/controllers/webhook_controller_spec.rb
196
184
  - spec/dummy/README.rdoc
197
185
  - spec/dummy/Rakefile
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "http://rubygems.org"
4
-
5
- gem "rails", :github=>"rails/rails"
6
-
7
- gemspec :path=>"../"
@@ -1,126 +0,0 @@
1
- GIT
2
- remote: git://github.com/rails/rails.git
3
- revision: 111611b511c27ec29be6a8837de6d8f25cded5a7
4
- specs:
5
- actionmailer (4.0.0.beta1)
6
- actionpack (= 4.0.0.beta1)
7
- mail (~> 2.5.3)
8
- actionpack (4.0.0.beta1)
9
- activesupport (= 4.0.0.beta1)
10
- builder (~> 3.1.0)
11
- erubis (~> 2.7.0)
12
- rack (~> 1.5.2)
13
- rack-test (~> 0.6.2)
14
- activemodel (4.0.0.beta1)
15
- activesupport (= 4.0.0.beta1)
16
- builder (~> 3.1.0)
17
- activerecord (4.0.0.beta1)
18
- activemodel (= 4.0.0.beta1)
19
- activerecord-deprecated_finders (~> 0.0.3)
20
- activesupport (= 4.0.0.beta1)
21
- arel (~> 4.0.0.beta2)
22
- activesupport (4.0.0.beta1)
23
- i18n (~> 0.6, >= 0.6.4)
24
- minitest (~> 4.2)
25
- multi_json (~> 1.3)
26
- thread_safe (~> 0.1)
27
- tzinfo (~> 0.3.33)
28
- rails (4.0.0.beta1)
29
- actionmailer (= 4.0.0.beta1)
30
- actionpack (= 4.0.0.beta1)
31
- activerecord (= 4.0.0.beta1)
32
- activesupport (= 4.0.0.beta1)
33
- bundler (>= 1.3.0, < 2.0)
34
- railties (= 4.0.0.beta1)
35
- sprockets-rails (~> 2.0.0.rc3)
36
- railties (4.0.0.beta1)
37
- actionpack (= 4.0.0.beta1)
38
- activesupport (= 4.0.0.beta1)
39
- rake (>= 0.8.7)
40
- rdoc (~> 3.4)
41
- thor (>= 0.17.0, < 2.0)
42
-
43
- PATH
44
- remote: /Users/dwhalen/Dropbox/stripe_event
45
- specs:
46
- stripe_event (0.6.0)
47
- rails (>= 3.1)
48
- stripe (~> 1.6)
49
-
50
- GEM
51
- remote: http://rubygems.org/
52
- specs:
53
- activerecord-deprecated_finders (0.0.3)
54
- addressable (2.3.3)
55
- appraisal (0.5.1)
56
- bundler
57
- rake
58
- arel (4.0.0.beta2)
59
- atomic (1.0.1)
60
- builder (3.1.4)
61
- crack (0.3.2)
62
- diff-lcs (1.2.1)
63
- erubis (2.7.0)
64
- hike (1.2.1)
65
- i18n (0.6.4)
66
- json (1.7.7)
67
- mail (2.5.3)
68
- i18n (>= 0.4.0)
69
- mime-types (~> 1.16)
70
- treetop (~> 1.4.8)
71
- mime-types (1.21)
72
- minitest (4.7.0)
73
- multi_json (1.7.1)
74
- polyglot (0.3.3)
75
- rack (1.5.2)
76
- rack-test (0.6.2)
77
- rack (>= 1.0)
78
- rake (10.0.3)
79
- rdoc (3.12.2)
80
- json (~> 1.4)
81
- rest-client (1.6.7)
82
- mime-types (>= 1.16)
83
- rspec-core (2.13.1)
84
- rspec-expectations (2.13.0)
85
- diff-lcs (>= 1.1.3, < 2.0)
86
- rspec-mocks (2.13.0)
87
- rspec-rails (2.13.0)
88
- actionpack (>= 3.0)
89
- activesupport (>= 3.0)
90
- railties (>= 3.0)
91
- rspec-core (~> 2.13.0)
92
- rspec-expectations (~> 2.13.0)
93
- rspec-mocks (~> 2.13.0)
94
- sprockets (2.9.0)
95
- hike (~> 1.2)
96
- multi_json (~> 1.0)
97
- rack (~> 1.0)
98
- tilt (~> 1.1, != 1.3.0)
99
- sprockets-rails (2.0.0.rc3)
100
- actionpack (>= 3.0)
101
- activesupport (>= 3.0)
102
- sprockets (~> 2.8)
103
- stripe (1.7.11)
104
- multi_json (>= 1.0.4, < 2)
105
- rest-client (~> 1.4)
106
- thor (0.17.0)
107
- thread_safe (0.1.0)
108
- atomic
109
- tilt (1.3.6)
110
- treetop (1.4.12)
111
- polyglot
112
- polyglot (>= 0.3.1)
113
- tzinfo (0.3.37)
114
- webmock (1.11.0)
115
- addressable (>= 2.2.7)
116
- crack (>= 0.3.2)
117
-
118
- PLATFORMS
119
- ruby
120
-
121
- DEPENDENCIES
122
- appraisal
123
- rails!
124
- rspec-rails (~> 2.12)
125
- stripe_event!
126
- webmock (~> 1.9)