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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cf523c4372b35910caae685adc46a1dd3b1d5ca2
4
- data.tar.gz: e0f4eed537157fd9076bfb1348e6844d1b2f43a6
3
+ metadata.gz: 59dc2e031f840dbcee3119e14a5c0af7ce36a85c
4
+ data.tar.gz: 0b048c56ccd862ee5f6aa9e91aa0e7703b6cfa9a
5
5
  SHA512:
6
- metadata.gz: 554e570b3c5bc128e69b66f5ea0ca18865df88d9d72d1ca80c4dbf559d63584d72d125a503821c13c9ba39c5663583da34a52a1b676ec2dec8607ede586e6662
7
- data.tar.gz: f19160a1340d2b3c0681f9fbd597ed7aa9656addce661526f919ca7188c69c9a0620083033f89685967706572d19612cd6da0afe322332dfaeb2f1a6ed4d68b4
6
+ metadata.gz: f27352e6b309472bd9fd77affd9844eacb88cd930bfdbe0091955739f7f2999055d83624b8150920dbb396c750acc1adda57479412e7b149201b8c876d063ebd
7
+ data.tar.gz: 735d51b53f24cea0dbbf1cc04432ea326d8bf2071a45ec1ce81547d6687d3f44b98e08cfcc3bd749b9eea50a3593ab70c63e3e9b9dbbf27f363021bdf33ec011
data/Changelog.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.4.1 (2017-06-01)
2
+
3
+ * Support for api_version header parameter (thanks @kiddrew)
4
+ * Relax version constraint on stripe gem (thanks @gaffneyc)
5
+
1
6
  ## 0.4.0 (2017-05-24)
2
7
  * Support alternate versions of stripe js
3
8
 
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/thefrontside/stripe-rails.png?branch=master)](https://travis-ci.org/thefrontside/stripe-rails)
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://thefrontside.net">![The Frontside](http://github.com/cowboyd/therubyracer/raw/master/thefrontside.png)</a>
362
+ <a href="http://frontside.io">![Frontside](http://frontside.io/images/logo.svg)</a>
353
363
 
354
- `Stripe::Rails` was developed fondly by your friends at [The FrontSide][7]. They are available for your custom software development
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
@@ -1,5 +1,5 @@
1
1
  module Stripe
2
2
  module Rails
3
- VERSION = '0.4.0'
3
+ VERSION = '0.4.1'
4
4
  end
5
5
  end
data/stripe-rails.gemspec CHANGED
@@ -16,6 +16,6 @@ Gem::Specification.new do |gem|
16
16
  gem.require_paths = ["lib"]
17
17
  gem.version = Stripe::Rails::VERSION
18
18
  gem.add_dependency 'rails', '>= 3'
19
- gem.add_dependency 'stripe', '< 2'
19
+ gem.add_dependency 'stripe'
20
20
  gem.add_dependency 'responders', '~> 2.0'
21
21
  end
@@ -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
 
@@ -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.0
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-05-24 00:00:00.000000000 Z
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: '2'
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: '2'
41
+ version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: responders
44
44
  requirement: !ruby/object:Gem::Requirement