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 +4 -4
- data/lib/effective_orders.rb +10 -3
- data/lib/effective_orders/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3dc3ed0ca01bf36b49326b92714290faff406bb8
|
4
|
+
data.tar.gz: eb4eec1d4d0d58c97e3554a96357147b5b65ab90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c29cc4865ee5d538a801640dfca5986c8cff2924cc06767fece44a959cfbe2d17cdb82a55df6535e2af386317bd909b154646cee9cc1e8809a22937a24216775
|
7
|
+
data.tar.gz: 2eb4b69106c3080f17e46badefc133749ddd1e33359b926ff7798d8b83af219db256faf7586682da4aeb9e0066a1c6a8e1ca890eda82c026614b73bc1c9714b3
|
data/lib/effective_orders.rb
CHANGED
@@ -171,7 +171,16 @@ module EffectiveOrders
|
|
171
171
|
@stripe_plans ||= (
|
172
172
|
Rails.logger.info '[STRIPE] index plans'
|
173
173
|
|
174
|
-
plans =
|
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
|
|
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.
|
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-
|
11
|
+
date: 2018-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|