stripe-rails 1.5.3 → 1.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -3
- data/Changelog.md +5 -0
- data/README.md +10 -2
- data/Rakefile +8 -4
- data/app/models/stripe/event_dispatch.rb +1 -4
- data/config/routes.rb +3 -3
- data/lib/stripe/rails/version.rb +1 -1
- data/stripe-rails.gemspec +1 -1
- data/test/callbacks_spec.rb +0 -6
- data/test/events_controller_spec.rb +5 -0
- metadata +3 -5
- data/test/all.rb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf79dbe2445d3605d945e23257dcc2fedbcb6e6fefeedba40e4f14515b9dadef
|
4
|
+
data.tar.gz: '09c1dfe4b60fa48d6d39ca6a1872b12917153f3d3b98b3da2db68761178bbf0d'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e455a1f349faf11d283b711c7b358f8db3998c632af6b1fe498003d48cfbe64b3bf5e91c64e15ce659d9db3cece8ddff600a0fab32b9f7de82b61b81cab6adb
|
7
|
+
data.tar.gz: 8f3946e974cb426cb814909fda58692703f43458ac9e890eae0a182da4c773e8a6fd2d756cb17a669608b5eb72bc2896424492ff147cae01ccb70020fd5d9ecf
|
data/.travis.yml
CHANGED
data/Changelog.md
CHANGED
data/README.md
CHANGED
@@ -19,7 +19,8 @@ This gem can help your rails application integrate with Stripe in the following
|
|
19
19
|
[Installation](#installation)
|
20
20
|
- [Setup your API keys](#setup-your-api-keys)
|
21
21
|
- [Manually set your API version (optional)](#manually-set-your-api-version-optional)
|
22
|
-
|
22
|
+
|
23
|
+
[Setup your payment configuration](#setup-your-payment-configuration)
|
23
24
|
- [Configuring your plans and coupons](#configuring-your-plans-and-coupons)
|
24
25
|
|
25
26
|
[Webhooks](#webhooks)
|
@@ -37,6 +38,8 @@ This gem can help your rails application integrate with Stripe in the following
|
|
37
38
|
|
38
39
|
[Code of Conduct](#code-of-conduct)
|
39
40
|
|
41
|
+
[Priority Support](#priority-support)
|
42
|
+
|
40
43
|
## Installation
|
41
44
|
|
42
45
|
Add this line to your application's Gemfile:
|
@@ -136,7 +139,7 @@ If you need to test a new API version in development, you can override the versi
|
|
136
139
|
config.stripe.api_version = '2015-10-16'
|
137
140
|
```
|
138
141
|
|
139
|
-
|
142
|
+
## Setup your payment configuration
|
140
143
|
|
141
144
|
If you're using subscriptions, then you'll need to set up your application's payment plans
|
142
145
|
and discounts. `Stripe::Rails` lets you automate the management of these definitions from
|
@@ -509,7 +512,12 @@ The default fixtures come from [the `stripe-ruby-mock` gem](https://github.com/r
|
|
509
512
|
|
510
513
|
|
511
514
|
## Code of Conduct
|
515
|
+
|
512
516
|
Please note that this project is released with a Contributor Code of
|
513
517
|
Conduct. By participating in this project you agree to abide by its
|
514
518
|
terms, which can be found in the `CODE_OF_CONDUCT.md` file in this
|
515
519
|
repository.
|
520
|
+
|
521
|
+
## Priority Support
|
522
|
+
|
523
|
+
Paid support is also available from the maintainer of this gem. If you need help setting up, designing your Stripe integration or have custom software development needs please feel free to email [sengming@sanemen.com](mailto:sengming@sanemen.com?subject=stripe-rails-support).
|
data/Rakefile
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
#!/usr/bin/env rake
|
2
2
|
require "bundler/gem_tasks"
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
require 'rake/testtask'
|
5
|
+
|
6
|
+
Rake::TestTask.new(:spec) do |t|
|
7
|
+
t.libs << 'test'
|
8
|
+
t.pattern = 'test/**/*_spec.rb'
|
9
|
+
t.warning = false
|
10
|
+
t.verbose = false
|
7
11
|
end
|
8
12
|
|
9
|
-
task :
|
13
|
+
task default: :spec
|
@@ -14,10 +14,7 @@ module Stripe
|
|
14
14
|
sig_header = request.headers['HTTP_STRIPE_SIGNATURE']
|
15
15
|
endpoint_secret = ::Rails.application.config.stripe.signing_secret
|
16
16
|
|
17
|
-
|
18
|
-
if id == 'evt_00000000000000'
|
19
|
-
event = Stripe::Event.construct_from(JSON.parse(body))
|
20
|
-
elsif Object.const_defined?('Stripe::Webhook') && sig_header && endpoint_secret
|
17
|
+
if Object.const_defined?('Stripe::Webhook') && sig_header && endpoint_secret
|
21
18
|
event = ::Stripe::Webhook.construct_event(body, sig_header, endpoint_secret)
|
22
19
|
else
|
23
20
|
event = Stripe::Event.retrieve(id)
|
data/config/routes.rb
CHANGED
data/lib/stripe/rails/version.rb
CHANGED
data/stripe-rails.gemspec
CHANGED
@@ -5,7 +5,7 @@ Gem::Specification.new do |gem|
|
|
5
5
|
gem.email = ["sengming@sanemen.com"]
|
6
6
|
gem.description = "A gem to integrate stripe into your rails app"
|
7
7
|
gem.summary = "A gem to integrate stripe into your rails app"
|
8
|
-
gem.homepage = "https://github.com/
|
8
|
+
gem.homepage = "https://github.com/tansengming/stripe-rails"
|
9
9
|
gem.license = 'MIT'
|
10
10
|
|
11
11
|
gem.files = `git ls-files`.split($\)
|
data/test/callbacks_spec.rb
CHANGED
@@ -53,12 +53,6 @@ describe Stripe::Callbacks do
|
|
53
53
|
->{ subject }.must_raise RuntimeError
|
54
54
|
end
|
55
55
|
end
|
56
|
-
|
57
|
-
describe 'when run from a Stripe webhook test' do
|
58
|
-
before { event['id'] = 'evt_00000000000000' }
|
59
|
-
|
60
|
-
it { subject } # must_not raise error
|
61
|
-
end
|
62
56
|
end
|
63
57
|
|
64
58
|
describe 'defined without a bang and raising an exception' do
|
@@ -17,6 +17,11 @@ describe Stripe::EventsController do
|
|
17
17
|
data: {object: 'customer'},
|
18
18
|
}
|
19
19
|
}
|
20
|
+
|
21
|
+
before do
|
22
|
+
stub_request(:get, "https://api.stripe.com/v1/events/evt_00000000000000").
|
23
|
+
to_return(status: 200, body: Stripe::Event.construct_from(params).to_json, headers: {})
|
24
|
+
end
|
20
25
|
subject { post '/stripe/events', params.to_json }
|
21
26
|
|
22
27
|
it { subject.must_be :ok? }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stripe-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charles Lowell
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-
|
13
|
+
date: 2018-11-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -101,7 +101,6 @@ files:
|
|
101
101
|
- lib/stripe/rails/testing.rb
|
102
102
|
- lib/stripe/rails/version.rb
|
103
103
|
- stripe-rails.gemspec
|
104
|
-
- test/all.rb
|
105
104
|
- test/callbacks_spec.rb
|
106
105
|
- test/coupon_builder_spec.rb
|
107
106
|
- test/dummy/README.rdoc
|
@@ -161,7 +160,7 @@ files:
|
|
161
160
|
- test/support/fixture_loader.rb
|
162
161
|
- test/support/null_system_test_case.rb
|
163
162
|
- test/testing_spec.rb
|
164
|
-
homepage: https://github.com/
|
163
|
+
homepage: https://github.com/tansengming/stripe-rails
|
165
164
|
licenses:
|
166
165
|
- MIT
|
167
166
|
metadata: {}
|
@@ -186,7 +185,6 @@ signing_key:
|
|
186
185
|
specification_version: 4
|
187
186
|
summary: A gem to integrate stripe into your rails app
|
188
187
|
test_files:
|
189
|
-
- test/all.rb
|
190
188
|
- test/callbacks_spec.rb
|
191
189
|
- test/coupon_builder_spec.rb
|
192
190
|
- test/dummy/README.rdoc
|
data/test/all.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Dir['**/*_spec.rb'].each {|f| load f}
|