stripe_event 2.3.1 → 2.3.2
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 +37 -0
- data/Appraisals +4 -0
- data/CHANGELOG.md +6 -0
- data/README.md +6 -6
- data/gemfiles/rails6.1.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
- metadata +6 -4
- 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: 9e8bf3dc8abec723bb2c3278c725f754bbe7cd991f868a8854ff04bac7bc778f
|
4
|
+
data.tar.gz: 46b48dae96008e8e9f27c8d7e39aa5a022614d322f2a60845b249dd862cec82b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56defdead871efd3c089a19db8382ded54786d7c899a39b6245e4b6c69e3a0a8379e792794aeb7bdbc9615f82ce107a528ea8953ac6c9a8d86c8ccd27a0e80a4
|
7
|
+
data.tar.gz: a91a63ef969c4e7cebac2ce7c083923a6d74cd3cfc166ea914c0956a3108edfc7591be179b44aa8fd10ce43dd8a4ec57119545f745f6a910f492b7c9ffcc98eb
|
@@ -0,0 +1,37 @@
|
|
1
|
+
name: CI
|
2
|
+
on: [push, pull_request]
|
3
|
+
|
4
|
+
jobs:
|
5
|
+
test:
|
6
|
+
runs-on: ubuntu-latest
|
7
|
+
strategy:
|
8
|
+
matrix:
|
9
|
+
ruby: ["2.5", "2.6", "2.7"]
|
10
|
+
bundler: [default]
|
11
|
+
gemfile:
|
12
|
+
- rails5.1
|
13
|
+
- rails5.2
|
14
|
+
- rails6.0
|
15
|
+
- rails6.1
|
16
|
+
- stripe3
|
17
|
+
- stripe4
|
18
|
+
- stripe5
|
19
|
+
include:
|
20
|
+
- { ruby: "2.3", gemfile: "rails3.2", bundler: "1" }
|
21
|
+
- { ruby: "2.3", gemfile: "rails4.2", bundler: "1" }
|
22
|
+
- { ruby: "2.4", gemfile: "rails4.2", bundler: "1" }
|
23
|
+
|
24
|
+
env:
|
25
|
+
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
|
26
|
+
steps:
|
27
|
+
# https://github.com/marketplace/actions/checkout
|
28
|
+
- uses: actions/checkout@v2
|
29
|
+
# https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
30
|
+
- name: Set up Ruby
|
31
|
+
uses: ruby/setup-ruby@v1
|
32
|
+
with:
|
33
|
+
ruby-version: ${{ matrix.ruby }}
|
34
|
+
bundler: ${{ matrix.bundler }}
|
35
|
+
bundler-cache: true # runs `bundle install` and caches gems automatically
|
36
|
+
- name: Run tests
|
37
|
+
run: bundle exec rake
|
data/Appraisals
CHANGED
data/CHANGELOG.md
CHANGED
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
|
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.3.
|
4
|
+
version: 2.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Whalen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -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,6 +151,7 @@ files:
|
|
151
151
|
- gemfiles/rails5.1.gemfile
|
152
152
|
- gemfiles/rails5.2.gemfile
|
153
153
|
- gemfiles/rails6.0.gemfile
|
154
|
+
- gemfiles/rails6.1.gemfile
|
154
155
|
- gemfiles/rails_master.gemfile
|
155
156
|
- gemfiles/stripe3.gemfile
|
156
157
|
- gemfiles/stripe4.gemfile
|
@@ -215,7 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
215
216
|
- !ruby/object:Gem::Version
|
216
217
|
version: '0'
|
217
218
|
requirements: []
|
218
|
-
rubygems_version: 3.
|
219
|
+
rubygems_version: 3.3.7
|
219
220
|
signing_key:
|
220
221
|
specification_version: 4
|
221
222
|
summary: Stripe webhook integration for Rails applications.
|
@@ -226,6 +227,7 @@ test_files:
|
|
226
227
|
- gemfiles/rails5.1.gemfile
|
227
228
|
- gemfiles/rails5.2.gemfile
|
228
229
|
- gemfiles/rails6.0.gemfile
|
230
|
+
- gemfiles/rails6.1.gemfile
|
229
231
|
- gemfiles/rails_master.gemfile
|
230
232
|
- gemfiles/stripe3.gemfile
|
231
233
|
- gemfiles/stripe4.gemfile
|
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
|