stripe-rails 1.7.2 → 1.8.0

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
  SHA256:
3
- metadata.gz: ae0a2ba60a2c494f429b9030cc2b58a85a1cb4d6c7a7b5b5c32e6a64122624e0
4
- data.tar.gz: f7c94730c44fd5d9bc06016a3ae3f86d85040de11a187eca47a2cd8a6d6b9ec4
3
+ metadata.gz: 90005dd739c7208e522610313852d415857c8c6d56af912f1fff9d44ac431fd8
4
+ data.tar.gz: dd7d8a122762f2aac4a8f2d8a4b1d1491378ea04bcc1bc3cc2241be2fb1b73c9
5
5
  SHA512:
6
- metadata.gz: d92f545d9e894d1113b55b12a9dd86703cd2927956e2cdca067b8dbb715879b3858996ee261a873d0d92398a119bc65bdeafd99cee1838cbc43a6a7f61b15411
7
- data.tar.gz: 8629c3de324218dee922cf88743880c2151411a05d73dc72f55ce8742bf8b09c932c5f3d764ced09f9c15269056f55eb96f40e574a84697799375863953a7283
6
+ metadata.gz: fcbbca03f84a930d7786706937e8be09c8a000ecd7c2827b32172673836b39083ba2a6c23f98c1b2229fed25ae5ad1ac5202639c62d19832f99a4fc071c18e44
7
+ data.tar.gz: 38dd6b0c4ca375f483985f3cf42c3caae7dc63d7531e1e684cfc973edd4342a374c6767e1dd21197f51e64b9cd540b5051501457514ae958e9f435f6f38accf3
data/.rubocop.yml CHANGED
@@ -620,7 +620,7 @@ Layout/FirstParameterIndentation:
620
620
  Description: 'Checks the indentation of the first parameter in a method call.'
621
621
  Enabled: false
622
622
 
623
- Style/FlipFlop:
623
+ Lint/FlipFlop:
624
624
  Description: 'Checks for flip flops'
625
625
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
626
626
  Enabled: false
data/Changelog.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.8.0 (2019-07-25)
2
+
3
+ * Configure publishable key from ENV. Thanks @cyu .
4
+
1
5
  ## 1.7.2 (2019-06-29)
2
6
 
3
7
  * fixes `require` error after update from Stripe gem. Thanks @dark-panda !
data/README.md CHANGED
@@ -130,7 +130,12 @@ And then override it to use your live key in production only
130
130
  config.stripe.publishable_key = 'pk_live_XXXYYYZZZ'
131
131
  ```
132
132
 
133
- This key will be publicly visible on the internet, so it is ok to put in your source.
133
+ This key will be publicly visible on the internet, so it is ok to put in your source. If
134
+ you prefer to environment variables, you can also set `STRIPE_PUBLISHABLE_KEY`:
135
+
136
+ ```sh
137
+ export STRIPE_PUBLISHABLE_KEY=pk_test_XXXYYYZZZ
138
+ ```
134
139
 
135
140
  ### Manually set your API version (optional)
136
141
 
data/lib/stripe/engine.rb CHANGED
@@ -18,6 +18,7 @@ module Stripe
18
18
  initializer 'stripe.configure.defaults', :before => 'stripe.configure' do |app|
19
19
  stripe = app.config.stripe
20
20
  stripe.secret_key ||= ENV['STRIPE_SECRET_KEY']
21
+ stripe.publishable_key ||= ENV['STRIPE_PUBLISHABLE_KEY']
21
22
  stripe.endpoint ||= '/stripe'
22
23
  stripe.auto_mount = true if stripe.auto_mount.nil?
23
24
  stripe.eager_load ||= []
@@ -1,5 +1,5 @@
1
1
  module Stripe
2
2
  module Rails
3
- VERSION = '1.7.2'
3
+ VERSION = '1.8.0'.freeze
4
4
  end
5
5
  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: 1.7.2
4
+ version: 1.8.0
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: 2019-06-29 00:00:00.000000000 Z
13
+ date: 2019-07-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails