stripe-rails 1.8.0 → 1.8.1
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/Changelog.md +5 -0
- data/lib/stripe/callbacks.rb +1 -0
- data/lib/stripe/engine.rb +12 -7
- data/lib/stripe/rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a52261e711a04a275013908f67594be46bda90e21c87110c561cb367cd7aefa
|
4
|
+
data.tar.gz: a5d5c9865a115026584198a877721bfb5fa906ab90e17846abf263923fb6b090
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e6389e135f2a56a572838a7cae66ea4524010e4428693d24a8cffdf5ff6e7d7c83586cd6b61a7e3b5e87f0ec15e69bab24c6922814ff3e31d55f0c141449fd3
|
7
|
+
data.tar.gz: 289efbff4424df92fb6f9a9b0fb0729241f706e941a306eb51e49f0af3e2e3d18e5d281cc5521ab82c6ee97cf159588143c388cd95fc9a68f2a36282ee517f8f
|
data/Changelog.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## 1.8.1 (2019-07-26)
|
2
|
+
|
3
|
+
* adds callback for invoice.payment_action_required. Thanks @alexagranov .
|
4
|
+
* fixes when clearing callbacks after unload doesn't play nice with eager_load. Thanks @alexagranov for reporting the problem and coming up with an initial fix for it.
|
5
|
+
|
1
6
|
## 1.8.0 (2019-07-25)
|
2
7
|
|
3
8
|
* Configure publishable key from ENV. Thanks @cyu .
|
data/lib/stripe/callbacks.rb
CHANGED
@@ -47,6 +47,7 @@ module Stripe
|
|
47
47
|
callback 'invoice.created'
|
48
48
|
callback 'invoice.finalized'
|
49
49
|
callback 'invoice.marked_uncollectible'
|
50
|
+
callback 'invoice.payment_action_required'
|
50
51
|
callback 'invoice.payment_failed'
|
51
52
|
callback 'invoice.payment_succeeded'
|
52
53
|
callback 'invoice.sent'
|
data/lib/stripe/engine.rb
CHANGED
@@ -42,6 +42,16 @@ environment file directly.
|
|
42
42
|
MSG
|
43
43
|
end
|
44
44
|
|
45
|
+
eager_load_classes = -> class_names {
|
46
|
+
class_names.each do |constant|
|
47
|
+
begin
|
48
|
+
constant.to_s.camelize.constantize
|
49
|
+
rescue NameError
|
50
|
+
require constant
|
51
|
+
end
|
52
|
+
end
|
53
|
+
}
|
54
|
+
|
45
55
|
initializer 'stripe.callbacks.clear_after_unload' do |app|
|
46
56
|
# Skip Rails 4 for now.
|
47
57
|
next unless app.respond_to?(:reloader)
|
@@ -50,18 +60,13 @@ environment file directly.
|
|
50
60
|
# This prevents duplicate callbacks being added during development.
|
51
61
|
app.reloader.after_class_unload do
|
52
62
|
::Stripe::Callbacks.clear_callbacks!
|
63
|
+
eager_load_classes.call(app.config.stripe.eager_load)
|
53
64
|
end
|
54
65
|
end
|
55
66
|
|
56
67
|
initializer 'stripe.callbacks.eager_load' do |app|
|
57
68
|
app.config.after_initialize do
|
58
|
-
app.config.stripe.eager_load
|
59
|
-
begin
|
60
|
-
constant.to_s.camelize.constantize
|
61
|
-
rescue NameError
|
62
|
-
require constant
|
63
|
-
end
|
64
|
-
end
|
69
|
+
eager_load_classes.call(app.config.stripe.eager_load)
|
65
70
|
end
|
66
71
|
end
|
67
72
|
|
data/lib/stripe/rails/version.rb
CHANGED
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.8.
|
4
|
+
version: 1.8.1
|
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-07-
|
13
|
+
date: 2019-07-26 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|