stripe_event 2.1.1 → 2.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a52368767b30c28e92ebf64e7ff30612ac619290ad20e68bbfe722df08d4692b
4
- data.tar.gz: c59ec530c237cee41067a6f66cdd10d5f3be759e4f661b48656aeb8d0cb508e3
3
+ metadata.gz: f4fb329827599b52133358a71ee4435193d5dfff0229cbec7180b27e3d620269
4
+ data.tar.gz: 25503c0e43321c55836e819e3b5e4cdec1b6e4b74c18112a2b8d918953494fbf
5
5
  SHA512:
6
- metadata.gz: 0cef390de99616809fc7da580e9447420a6b78048618339a0352e2df485a98239d7bac00b19d2a9fcb2ec68312b2dbc7c5a7fb724b7ecdef53008aed5f857c1d
7
- data.tar.gz: 6878b61c5766dd21346cb633e7ad85797bf6b0aae9fbf63f612cfe279f3aaf34b784e0e940dc5014cd8224c2925f4a7081a7bce1458a491a91567dad100c2490
6
+ metadata.gz: b16330b92df25e769b10bd9675b2db4a5800e6bf13b6f0e3c7ccb2f58e1b6c969012e736e93b20fb360de14823ce0bf2545ad33aa63e0c25fc449281785c8ffe
7
+ data.tar.gz: 347b819430ca753d999ac6446cc12994b50164dceadebd52c70268d19806b8694efb1c0d88986490f4af70a5df037d04f7022b95ae49f5056e0d41b5a2aae700
@@ -3,20 +3,24 @@ cache: bundler
3
3
  sudo: false
4
4
 
5
5
  rvm:
6
- - 2.3.6
7
- - 2.4.3
8
- - 2.5.0
6
+ - 2.3.8
7
+ - 2.4.5
8
+ - 2.5.3
9
9
 
10
10
  gemfile:
11
11
  - gemfiles/rails4.2.gemfile
12
12
  - gemfiles/rails5.1.gemfile
13
13
  - gemfiles/rails5.2.gemfile
14
- - gemfiles/rails_master.gemfile
14
+ - gemfiles/stripe3.gemfile
15
+ - gemfiles/stripe4.gemfile
15
16
 
16
17
  matrix:
17
18
  include:
18
- - rvm: 2.3.6
19
+ - rvm: 2.3.8
19
20
  gemfile: gemfiles/rails3.2.gemfile
21
+ include:
22
+ - rvm: 2.5.3
23
+ gemfile: gemfiles/rails_master.gemfile
20
24
  allow_failures:
21
25
  - gemfile: gemfiles/rails_master.gemfile
22
26
  fast_finish: true
data/Appraisals CHANGED
@@ -12,7 +12,15 @@ appraise "rails5.1" do
12
12
  end
13
13
 
14
14
  appraise "rails5.2" do
15
- gem "rails", ">= 5.2.0.rc1", "< 5.3"
15
+ gem "rails", "~> 5.2.0"
16
+ end
17
+
18
+ appraise "stripe3" do
19
+ gem "stripe", "~> 3.0"
20
+ end
21
+
22
+ appraise "stripe4" do
23
+ gem "stripe", "~> 4.0"
16
24
  end
17
25
 
18
26
  appraise "rails_master" do
@@ -1,3 +1,10 @@
1
+ ### 2.1.1 (January 31, 2017)
2
+
3
+ - Adds better support for Rails 5.2 (#105, #106, #107)
4
+ - `StripeEvent::WebhookController` now calls `skip_before_action :verify_authenticity_token` if `Rails.application.config.action_controller.default_protect_from_forgery` is set (as it is by default in Rails 5.2)
5
+
6
+ ### 2.1.0 (yanked)
7
+
1
8
  ### 2.0.0 (December 14, 2017)
2
9
 
3
10
  **Backwards incompatible release. [Signed webhooks are now required.](https://stripe.com/docs/webhooks#signatures).**
data/README.md CHANGED
@@ -1,13 +1,12 @@
1
1
  # StripeEvent
2
2
 
3
3
  [![Build Status](https://secure.travis-ci.org/integrallis/stripe_event.svg)](http://travis-ci.org/integrallis/stripe_event)
4
- [![Dependency Status](https://gemnasium.com/integrallis/stripe_event.svg)](https://gemnasium.com/integrallis/stripe_event)
5
4
  [![Gem Version](https://badge.fury.io/rb/stripe_event.svg)](http://badge.fury.io/rb/stripe_event)
6
5
  [![Code Climate](https://codeclimate.com/github/integrallis/stripe_event.svg)](https://codeclimate.com/github/integrallis/stripe_event)
7
6
  [![Coverage Status](https://coveralls.io/repos/integrallis/stripe_event/badge.svg)](https://coveralls.io/r/integrallis/stripe_event)
8
7
  [![Gem Downloads](https://img.shields.io/gem/dt/stripe_event.svg)](https://rubygems.org/gems/stripe_event)
9
8
 
10
- 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#retrieve_event) from Stripe. Define subscribers to handle specific event types. Subscribers can be a block or an object that responds to `#call`.
9
+ StripeEvent is built on the [ActiveSupport::Notifications API](http://api.rubyonrails.org/classes/ActiveSupport/Notifications.html). Incoming webhook requests are [authenticated with the webhook signature](#authenticating-webhooks-with-signatures]. Define subscribers to handle specific event types. Subscribers can be a block or an object that responds to `#call`.
11
10
 
12
11
  ## Install
13
12
 
@@ -81,7 +80,7 @@ end
81
80
 
82
81
  ### Authenticating webhooks with signatures
83
82
 
84
- Stripe will cryptographically sign webhook payloads with a signature that is included in a special header sent with the request. Verifying this signature lets your application properly authenticate the request originated from Stripe. To leverage this feature, please set the `signing_secret` configuration value:
83
+ Stripe will cryptographically sign webhook payloads with a signature that is included in a special header sent with the request. Verifying this signature lets your application properly authenticate the request originated from Stripe. **As of [v2.0.0](https://github.com/integrallis/stripe_event/releases/tag/v2.0.0), StripeEvent now mandates that this feature be used**. Please set the `signing_secret` configuration value:
85
84
 
86
85
  ```ruby
87
86
  StripeEvent.signing_secret = Rails.application.secrets.stripe_signing_secret
@@ -186,7 +185,7 @@ describe "Billing Events" do
186
185
  end
187
186
 
188
187
  describe "customer.created" do
189
- let(:payload) { File.read("spec/support/fixtures/evt_customer_created.json")
188
+ let(:payload) { File.read("spec/support/fixtures/evt_customer_created.json") }
190
189
  before(:each) { bypass_event_signature payload }
191
190
 
192
191
  it "is successful" do
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", ">= 5.2.0.rc1", "< 5.3"
5
+ gem "rails", "~> 5.2.0"
6
6
 
7
7
  gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "stripe", "~> 3.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "stripe", "~> 4.0"
6
+
7
+ gemspec path: "../"
@@ -1,3 +1,3 @@
1
1
  module StripeEvent
2
- VERSION = "2.1.1"
2
+ VERSION = "2.2.0"
3
3
  end
@@ -21,7 +21,7 @@ describe StripeEvent::WebhookController, type: :controller do
21
21
  def webhook(signature, params)
22
22
  request.env['HTTP_STRIPE_SIGNATURE'] = signature
23
23
  request.env['RAW_POST_DATA'] = params.to_json # works with Rails 3, 4, or 5
24
- post :event
24
+ post :event, body: params.to_json
25
25
  end
26
26
 
27
27
  def webhook_with_signature(params, secret = secret1)
@@ -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", "< 4.0"]
21
+ s.add_dependency "stripe", [">= 2.8", "< 5.0"]
22
22
 
23
23
  s.add_development_dependency "rails", [">= 3.1"]
24
24
  s.add_development_dependency "rake", "< 11.0"
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.1.1
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Whalen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-31 00:00:00.000000000 Z
11
+ date: 2018-12-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: '4.0'
36
+ version: '5.0'
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: '4.0'
46
+ version: '5.0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rails
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -151,6 +151,8 @@ files:
151
151
  - gemfiles/rails5.1.gemfile
152
152
  - gemfiles/rails5.2.gemfile
153
153
  - gemfiles/rails_master.gemfile
154
+ - gemfiles/stripe3.gemfile
155
+ - gemfiles/stripe4.gemfile
154
156
  - lib/stripe_event.rb
155
157
  - lib/stripe_event/engine.rb
156
158
  - lib/stripe_event/version.rb
@@ -212,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
214
  version: '0'
213
215
  requirements: []
214
216
  rubyforge_project:
215
- rubygems_version: 2.7.0
217
+ rubygems_version: 2.7.6
216
218
  signing_key:
217
219
  specification_version: 4
218
220
  summary: Stripe webhook integration for Rails applications.
@@ -223,6 +225,8 @@ test_files:
223
225
  - gemfiles/rails5.1.gemfile
224
226
  - gemfiles/rails5.2.gemfile
225
227
  - gemfiles/rails_master.gemfile
228
+ - gemfiles/stripe3.gemfile
229
+ - gemfiles/stripe4.gemfile
226
230
  - spec/controllers/webhook_controller_spec.rb
227
231
  - spec/dummy/README.rdoc
228
232
  - spec/dummy/Rakefile