stripe_event 2.3.1 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +51 -0
- data/Appraisals +16 -0
- data/CHANGELOG.md +19 -0
- data/README.md +6 -6
- data/gemfiles/rails6.1.gemfile +7 -0
- data/gemfiles/rails7.0.gemfile +7 -0
- data/gemfiles/stripe6.gemfile +7 -0
- data/gemfiles/stripe7.gemfile +7 -0
- data/lib/stripe_event/version.rb +1 -1
- data/lib/stripe_event.rb +1 -1
- data/spec/controllers/webhook_controller_spec.rb +14 -0
- data/stripe_event.gemspec +1 -1
- metadata +17 -9
- data/.travis.yml +0 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae20c29ad3c38d0945388b8c226af15b9cb28bcbec7414d8fedca5423e057d9e
|
4
|
+
data.tar.gz: e3a6349f95012362bdadfe41293fc54985dec55e56ce41f85dbf5835ee81e53c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b33395b3e590834f7f6967abaa45ddb9d05eb866353b849a09f57d7fc17c2529511ffafceba9e5adbadde8c1b3777193d73e2419356e28bdd7e05ffa8c4395e2
|
7
|
+
data.tar.gz: 71bde2aa10035e1e339685ec8af7129330faead28680a10d0b16f7b423a5be7046d90343e0b44ea08a5420c9e8a89d9a407b5e67f29af00cf00cf255e67467f1
|
@@ -0,0 +1,51 @@
|
|
1
|
+
name: CI
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches: [master]
|
5
|
+
pull_request:
|
6
|
+
branches: [master]
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
test:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
strategy:
|
12
|
+
matrix:
|
13
|
+
ruby: ["2.7", "3.0", "3.1"]
|
14
|
+
bundler: [default]
|
15
|
+
gemfile:
|
16
|
+
- rails6.0
|
17
|
+
- rails6.1
|
18
|
+
- rails7.0
|
19
|
+
- stripe5
|
20
|
+
- stripe6
|
21
|
+
- stripe7
|
22
|
+
include:
|
23
|
+
- { ruby: "2.3", gemfile: "rails3.2", bundler: "1" }
|
24
|
+
- { ruby: "2.3", gemfile: "rails4.2", bundler: "1" }
|
25
|
+
- { ruby: "2.4", gemfile: "rails4.2", bundler: "1" }
|
26
|
+
- { ruby: "2.5", gemfile: "rails5.1", bundler: "default" }
|
27
|
+
- { ruby: "2.5", gemfile: "rails5.2", bundler: "default" }
|
28
|
+
- { ruby: "2.6", gemfile: "rails5.2", bundler: "default" }
|
29
|
+
- { ruby: "2.6", gemfile: "rails6.0", bundler: "default" }
|
30
|
+
- { ruby: "2.6", gemfile: "rails6.1", bundler: "default" }
|
31
|
+
- { ruby: "2.5", gemfile: "stripe3", bundler: "default" }
|
32
|
+
- { ruby: "2.6", gemfile: "stripe3", bundler: "default" }
|
33
|
+
- { ruby: "2.7", gemfile: "stripe3", bundler: "default" }
|
34
|
+
- { ruby: "2.5", gemfile: "stripe4", bundler: "default" }
|
35
|
+
- { ruby: "2.6", gemfile: "stripe4", bundler: "default" }
|
36
|
+
- { ruby: "2.7", gemfile: "stripe4", bundler: "default" }
|
37
|
+
|
38
|
+
env:
|
39
|
+
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
|
40
|
+
steps:
|
41
|
+
# https://github.com/marketplace/actions/checkout
|
42
|
+
- uses: actions/checkout@v2
|
43
|
+
# https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
44
|
+
- name: Set up Ruby
|
45
|
+
uses: ruby/setup-ruby@v1
|
46
|
+
with:
|
47
|
+
ruby-version: ${{ matrix.ruby }}
|
48
|
+
bundler: ${{ matrix.bundler }}
|
49
|
+
bundler-cache: true # runs `bundle install` and caches gems automatically
|
50
|
+
- name: Run tests
|
51
|
+
run: bundle exec rake
|
data/Appraisals
CHANGED
@@ -19,6 +19,14 @@ appraise "rails6.0" do
|
|
19
19
|
gem "rails", "~> 6.0.0"
|
20
20
|
end
|
21
21
|
|
22
|
+
appraise "rails6.1" do
|
23
|
+
gem "rails", "~> 6.1.0"
|
24
|
+
end
|
25
|
+
|
26
|
+
appraise "rails7.0" do
|
27
|
+
gem "rails", "~> 7.0.0"
|
28
|
+
end
|
29
|
+
|
22
30
|
appraise "stripe3" do
|
23
31
|
gem "stripe", "~> 3.0"
|
24
32
|
end
|
@@ -31,6 +39,14 @@ appraise "stripe5" do
|
|
31
39
|
gem "stripe", "~> 5.0"
|
32
40
|
end
|
33
41
|
|
42
|
+
appraise "stripe6" do
|
43
|
+
gem "stripe", "~> 6.0"
|
44
|
+
end
|
45
|
+
|
46
|
+
appraise "stripe7" do
|
47
|
+
gem "stripe", "~> 7.0"
|
48
|
+
end
|
49
|
+
|
34
50
|
appraise "rails_master" do
|
35
51
|
gem "rails", github: "rails"
|
36
52
|
end
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,22 @@
|
|
1
|
+
### [Unreleased] - TBD
|
2
|
+
|
3
|
+
### 2.5.0 (Aug 5, 2022)
|
4
|
+
|
5
|
+
- Add Stripe 7 support (#154)
|
6
|
+
|
7
|
+
### 2.4.0 (May 12, 2022)
|
8
|
+
|
9
|
+
- Add Stripe 6 support (#151)
|
10
|
+
- Add Rails 7 support (#151)
|
11
|
+
- Add Ruby 3.1 support (#152)
|
12
|
+
- Improved build matrix
|
13
|
+
|
14
|
+
### 2.3.2 (February 21, 2022)
|
15
|
+
|
16
|
+
- Fix signature validation error if the first signing secret is nil (#146)
|
17
|
+
- Update README (#143)
|
18
|
+
- Setup github actions for CI (#147)
|
19
|
+
|
1
20
|
### 2.3.1 (May 12, 2020)
|
2
21
|
|
3
22
|
- Fix deprecation warning in Ruby 2.7 (#130)
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# StripeEvent
|
2
2
|
|
3
|
-
[![Build Status](https://
|
3
|
+
[![Build Status](https://github.com/integrallis/stripe_event/workflows/CI/badge.svg)](https://github.com/integrallis/stripe_event/actions?query=workflow%3ACI)
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/stripe_event.svg)](http://badge.fury.io/rb/stripe_event)
|
5
5
|
[![Code Climate](https://codeclimate.com/github/integrallis/stripe_event.svg)](https://codeclimate.com/github/integrallis/stripe_event)
|
6
6
|
[![Coverage Status](https://coveralls.io/repos/integrallis/stripe_event/badge.svg)](https://coveralls.io/r/integrallis/stripe_event)
|
@@ -169,7 +169,7 @@ Handling webhooks is a critical piece of modern billing systems. Verifying the b
|
|
169
169
|
|
170
170
|
```ruby
|
171
171
|
# spec/requests/billing_events_spec.rb
|
172
|
-
require '
|
172
|
+
require 'rails_helper'
|
173
173
|
|
174
174
|
describe "Billing Events" do
|
175
175
|
def bypass_event_signature(payload)
|
@@ -178,12 +178,12 @@ describe "Billing Events" do
|
|
178
178
|
end
|
179
179
|
|
180
180
|
describe "customer.created" do
|
181
|
-
let(:payload) {
|
182
|
-
before(:each) { bypass_event_signature
|
181
|
+
let(:payload) { file_fixture('evt_customer_created.json').read }
|
182
|
+
before(:each) { bypass_event_signature(payload) }
|
183
183
|
|
184
184
|
it "is successful" do
|
185
|
-
post '/_billing_events',
|
186
|
-
expect(response
|
185
|
+
post '/_billing_events', params: payload
|
186
|
+
expect(response).to have_http_status(:success)
|
187
187
|
# Additional expectations...
|
188
188
|
end
|
189
189
|
end
|
data/lib/stripe_event/version.rb
CHANGED
data/lib/stripe_event.rb
CHANGED
@@ -132,4 +132,18 @@ describe StripeEvent::WebhookController, type: :controller do
|
|
132
132
|
expect(response.code).to eq '200'
|
133
133
|
end
|
134
134
|
end
|
135
|
+
|
136
|
+
context "with multiple signing secrets first of which is nil" do
|
137
|
+
before(:each) { StripeEvent.signing_secrets = [nil, secret1, secret2] }
|
138
|
+
|
139
|
+
it "succeeds with valid signature from first secret" do
|
140
|
+
webhook_with_signature charge_succeeded, secret1
|
141
|
+
expect(response.code).to eq '200'
|
142
|
+
end
|
143
|
+
|
144
|
+
it "succeeds with valid signature from second secret" do
|
145
|
+
webhook_with_signature charge_succeeded, secret2
|
146
|
+
expect(response.code).to eq '200'
|
147
|
+
end
|
148
|
+
end
|
135
149
|
end
|
data/stripe_event.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.test_files = `git ls-files -- Appraisals {spec,gemfiles}/*`.split("\n")
|
19
19
|
|
20
20
|
s.add_dependency "activesupport", ">= 3.1"
|
21
|
-
s.add_dependency "stripe", [">= 2.8", "<
|
21
|
+
s.add_dependency "stripe", [">= 2.8", "< 8"]
|
22
22
|
|
23
23
|
s.add_development_dependency "appraisal"
|
24
24
|
s.add_development_dependency "coveralls"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stripe_event
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Whalen
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: '2.8'
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: '
|
36
|
+
version: '8'
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '2.8'
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
46
|
+
version: '8'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: appraisal
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,9 +134,9 @@ executables: []
|
|
134
134
|
extensions: []
|
135
135
|
extra_rdoc_files: []
|
136
136
|
files:
|
137
|
+
- ".github/workflows/ci.yml"
|
137
138
|
- ".gitignore"
|
138
139
|
- ".rspec"
|
139
|
-
- ".travis.yml"
|
140
140
|
- Appraisals
|
141
141
|
- CHANGELOG.md
|
142
142
|
- CONTRIBUTING.md
|
@@ -151,10 +151,14 @@ files:
|
|
151
151
|
- gemfiles/rails5.1.gemfile
|
152
152
|
- gemfiles/rails5.2.gemfile
|
153
153
|
- gemfiles/rails6.0.gemfile
|
154
|
+
- gemfiles/rails6.1.gemfile
|
155
|
+
- gemfiles/rails7.0.gemfile
|
154
156
|
- gemfiles/rails_master.gemfile
|
155
157
|
- gemfiles/stripe3.gemfile
|
156
158
|
- gemfiles/stripe4.gemfile
|
157
159
|
- gemfiles/stripe5.gemfile
|
160
|
+
- gemfiles/stripe6.gemfile
|
161
|
+
- gemfiles/stripe7.gemfile
|
158
162
|
- lib/stripe_event.rb
|
159
163
|
- lib/stripe_event/engine.rb
|
160
164
|
- lib/stripe_event/version.rb
|
@@ -200,7 +204,7 @@ homepage: https://github.com/integrallis/stripe_event
|
|
200
204
|
licenses:
|
201
205
|
- MIT
|
202
206
|
metadata: {}
|
203
|
-
post_install_message:
|
207
|
+
post_install_message:
|
204
208
|
rdoc_options: []
|
205
209
|
require_paths:
|
206
210
|
- lib
|
@@ -215,8 +219,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
215
219
|
- !ruby/object:Gem::Version
|
216
220
|
version: '0'
|
217
221
|
requirements: []
|
218
|
-
rubygems_version: 3.
|
219
|
-
signing_key:
|
222
|
+
rubygems_version: 3.3.17
|
223
|
+
signing_key:
|
220
224
|
specification_version: 4
|
221
225
|
summary: Stripe webhook integration for Rails applications.
|
222
226
|
test_files:
|
@@ -226,10 +230,14 @@ test_files:
|
|
226
230
|
- gemfiles/rails5.1.gemfile
|
227
231
|
- gemfiles/rails5.2.gemfile
|
228
232
|
- gemfiles/rails6.0.gemfile
|
233
|
+
- gemfiles/rails6.1.gemfile
|
234
|
+
- gemfiles/rails7.0.gemfile
|
229
235
|
- gemfiles/rails_master.gemfile
|
230
236
|
- gemfiles/stripe3.gemfile
|
231
237
|
- gemfiles/stripe4.gemfile
|
232
238
|
- gemfiles/stripe5.gemfile
|
239
|
+
- gemfiles/stripe6.gemfile
|
240
|
+
- gemfiles/stripe7.gemfile
|
233
241
|
- spec/controllers/webhook_controller_spec.rb
|
234
242
|
- spec/dummy/README.rdoc
|
235
243
|
- spec/dummy/Rakefile
|
data/.travis.yml
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
cache: bundler
|
3
|
-
|
4
|
-
rvm:
|
5
|
-
- 2.5
|
6
|
-
- 2.6
|
7
|
-
- 2.7
|
8
|
-
|
9
|
-
gemfile:
|
10
|
-
- gemfiles/rails5.1.gemfile
|
11
|
-
- gemfiles/rails5.2.gemfile
|
12
|
-
- gemfiles/rails6.0.gemfile
|
13
|
-
- gemfiles/stripe3.gemfile
|
14
|
-
- gemfiles/stripe4.gemfile
|
15
|
-
- gemfiles/stripe5.gemfile
|
16
|
-
|
17
|
-
matrix:
|
18
|
-
include:
|
19
|
-
- rvm: 2.3
|
20
|
-
gemfile: gemfiles/rails3.2.gemfile
|
21
|
-
- rvm: 2.3
|
22
|
-
gemfile: gemfiles/rails4.2.gemfile
|
23
|
-
- rvm: 2.4
|
24
|
-
gemfile: gemfiles/rails4.2.gemfile
|
25
|
-
- rvm: ruby
|
26
|
-
gemfile: gemfiles/rails_master.gemfile
|
27
|
-
allow_failures:
|
28
|
-
- gemfile: gemfiles/rails_master.gemfile
|
29
|
-
fast_finish: true
|
30
|
-
|
31
|
-
notifications:
|
32
|
-
email:
|
33
|
-
- daniel.r.whalen+travis-ci@gmail.com
|