stripe-rails 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog.md +5 -0
- data/README.md +13 -4
- data/lib/stripe/engine.rb +2 -2
- data/lib/stripe/rails/version.rb +1 -1
- data/stripe-rails.gemspec +1 -1
- data/test/dummy/config/environments/test.rb +1 -0
- data/test/stripe_rails_spec.rb +1 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59dc2e031f840dbcee3119e14a5c0af7ce36a85c
|
4
|
+
data.tar.gz: 0b048c56ccd862ee5f6aa9e91aa0e7703b6cfa9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f27352e6b309472bd9fd77affd9844eacb88cd930bfdbe0091955739f7f2999055d83624b8150920dbb396c750acc1adda57479412e7b149201b8c876d063ebd
|
7
|
+
data.tar.gz: 735d51b53f24cea0dbbf1cc04432ea326d8bf2071a45ec1ce81547d6687d3f44b98e08cfcc3bd749b9eea50a3593ab70c63e3e9b9dbbf27f363021bdf33ec011
|
data/Changelog.md
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Stripe::Rails: A Rails Engine for use with [stripe.com](https://stripe.com)
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/stripe-rails.png)](http://badge.fury.io/rb/stripe-rails)
|
3
|
-
[![Build Status](https://travis-ci.org/
|
3
|
+
[![Build Status](https://travis-ci.org/Everapps/stripe-rails.png?branch=master)](https://travis-ci.org/Everapps/stripe-rails)
|
4
4
|
[![Dependency Status](https://gemnasium.com/thefrontside/stripe-rails.png)](https://gemnasium.com/thefrontside/stripe-rails)
|
5
5
|
|
6
6
|
|
@@ -100,6 +100,16 @@ config.stripe.publishable_key = 'pk_live_XXXYYYZZZ'
|
|
100
100
|
|
101
101
|
This key will be publicly visible on the internet, so it is ok to put in your source.
|
102
102
|
|
103
|
+
### Manually set your API version (optional)
|
104
|
+
|
105
|
+
If you need to test a new API version in development, you can override the version number manually.
|
106
|
+
|
107
|
+
```ruby
|
108
|
+
# config/environments/development.rb
|
109
|
+
# ...
|
110
|
+
config.stripe.api_version = '2015-10-16'
|
111
|
+
```
|
112
|
+
|
103
113
|
### Setup your payment configuration
|
104
114
|
|
105
115
|
If you're using subscriptions, then you'll need to set up your application's payment plans
|
@@ -349,10 +359,9 @@ See the [complete listing of all stripe events][5], and the [webhook tutorial][6
|
|
349
359
|
|
350
360
|
## Thanks
|
351
361
|
|
352
|
-
<a href="http://
|
362
|
+
<a href="http://frontside.io">![Frontside](http://frontside.io/images/logo.svg)</a>
|
353
363
|
|
354
|
-
`Stripe::Rails` was developed
|
355
|
-
needs, including integration with stripe.com.
|
364
|
+
`Stripe::Rails` was originally developed with love and fondess by your friends at [Frontside][7]. They are available for your custom software development needs, including integration with stripe.com.
|
356
365
|
|
357
366
|
[1]: https://stripe.com/docs/stripe.js
|
358
367
|
[2]: https://manage.stripe.com/#account/apikeys
|
data/lib/stripe/engine.rb
CHANGED
@@ -8,7 +8,7 @@ module Stripe
|
|
8
8
|
attr_accessor :testing
|
9
9
|
end
|
10
10
|
|
11
|
-
stripe_config = config.stripe = Struct.new(:api_base, :secret_key, :verify_ssl_certs, :publishable_key, :endpoint, :debug_js, :auto_mount, :eager_load).new
|
11
|
+
stripe_config = config.stripe = Struct.new(:api_base, :api_version, :secret_key, :verify_ssl_certs, :publishable_key, :endpoint, :debug_js, :auto_mount, :eager_load).new
|
12
12
|
|
13
13
|
def stripe_config.api_key=(key)
|
14
14
|
warn "[DEPRECATION] to align with stripe nomenclature, stripe.api_key has been renamed to config.stripe.secret_key"
|
@@ -27,7 +27,7 @@ module Stripe
|
|
27
27
|
end
|
28
28
|
|
29
29
|
initializer 'stripe.configure' do |app|
|
30
|
-
[:api_base, :verify_ssl_certs].each do |key|
|
30
|
+
[:api_base, :verify_ssl_certs, :api_version].each do |key|
|
31
31
|
value = app.config.stripe.send(key)
|
32
32
|
Stripe.send("#{key}=", value) unless value.nil?
|
33
33
|
end
|
data/lib/stripe/rails/version.rb
CHANGED
data/stripe-rails.gemspec
CHANGED
@@ -3,6 +3,7 @@ Dummy::Application.configure do
|
|
3
3
|
config.stripe.api_base = 'http://localhost:5000'
|
4
4
|
config.stripe.verify_ssl_certs = false
|
5
5
|
config.stripe.eager_load = 'dummy/model_with_callbacks', 'dummy/module_with_callbacks'
|
6
|
+
config.stripe.api_version = '2015-10-16'
|
6
7
|
|
7
8
|
# Settings specified here will take precedence over those in config/application.rb
|
8
9
|
|
data/test/stripe_rails_spec.rb
CHANGED
@@ -5,6 +5,7 @@ describe "Configuring the stripe engine" do
|
|
5
5
|
it "reads the api key that is set in the environment" do
|
6
6
|
Stripe.api_base.must_equal 'http://localhost:5000'
|
7
7
|
Stripe.api_key.must_equal 'XYZ'
|
8
|
+
Stripe.api_version.must_equal '2015-10-16'
|
8
9
|
Stripe.verify_ssl_certs.must_equal false
|
9
10
|
end
|
10
11
|
end
|
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: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charles Lowell
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-06-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -29,16 +29,16 @@ dependencies:
|
|
29
29
|
name: stripe
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - "
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '
|
34
|
+
version: '0'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - "
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: '
|
41
|
+
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: responders
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|