effective_orders 4.0.5 → 4.0.6

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
  SHA1:
3
- metadata.gz: 700cbdcbf2d4c8e3c09f7ea06e4ceef0ec2fe6df
4
- data.tar.gz: da91d7bfd8bb1871910ff25bf314e089851b0933
3
+ metadata.gz: 3dc3ed0ca01bf36b49326b92714290faff406bb8
4
+ data.tar.gz: eb4eec1d4d0d58c97e3554a96357147b5b65ab90
5
5
  SHA512:
6
- metadata.gz: b97149459463c09176d85d5b4b1e889152ff80e16cbde79d0246bd76abb01cec7c54752d4d0f097eba5c30b75338ac76bd20495a562ee76443c96f8f2825443c
7
- data.tar.gz: d87291e2f9884e43a0976345079b2d0e6c014ce299e7641bcc1ca3d7fdcbb549c4f6b27f8885965b219c7e9a10c729df9fb88bc6d1f9507f0216f14b40da89a3
6
+ metadata.gz: c29cc4865ee5d538a801640dfca5986c8cff2924cc06767fece44a959cfbe2d17cdb82a55df6535e2af386317bd909b154646cee9cc1e8809a22937a24216775
7
+ data.tar.gz: 2eb4b69106c3080f17e46badefc133749ddd1e33359b926ff7798d8b83af219db256faf7586682da4aeb9e0066a1c6a8e1ca890eda82c026614b73bc1c9714b3
@@ -171,7 +171,16 @@ module EffectiveOrders
171
171
  @stripe_plans ||= (
172
172
  Rails.logger.info '[STRIPE] index plans'
173
173
 
174
- plans = Stripe::Plan.all.inject({}) do |h, plan|
174
+ plans = begin
175
+ Stripe::Plan.all
176
+ rescue => e
177
+ raise e if Rails.env.production?
178
+ Rails.logger.info "[STRIPE ERROR]: #{e.message}"
179
+ Rails.logger.info "[STRIPE ERROR]: effective_orders continuing with empty stripe plans. This would fail loudly in Rails.env.production."
180
+ {}
181
+ end
182
+
183
+ plans.inject({}) do |h, plan|
175
184
  h[plan.id] = {
176
185
  id: plan.id,
177
186
  product_id: plan.product,
@@ -183,8 +192,6 @@ module EffectiveOrders
183
192
  interval_count: plan.interval_count
184
193
  }; h
185
194
  end
186
-
187
- plans
188
195
  )
189
196
  end
190
197
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrders
2
- VERSION = '4.0.5'.freeze
2
+ VERSION = '4.0.6'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_orders
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.5
4
+ version: 4.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-19 00:00:00.000000000 Z
11
+ date: 2018-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails