stripe_invoice 1.1.3 → 1.1.4
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/Gemfile.lock +12 -13
- data/app/models/stripe_invoice/charge.rb +9 -3
- data/lib/stripe_invoice/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: efea574c7d1eb16dc2251d541d1256870fa03072
|
|
4
|
+
data.tar.gz: d98ff4811686d1844eba5bf5f0dcc4162c92df44
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f040d9380602841183791304a5f1ce90e9ca419a8415557d0e4da2a29cb85f8ec5a0b357f2a010ef0a12d230eb6714f1dfe1930bf4c4fe4099dac4e866bd7235
|
|
7
|
+
data.tar.gz: 075bd1ee493d6497e0560db449b31e1d35f39ac3af0f1d50308a572e674c876f630dbd7e7633e0fa197b5dc1b3327d91667f69c0a472a4b7cae52f8d281c300f
|
data/Gemfile.lock
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
stripe_invoice (
|
|
4
|
+
stripe_invoice (1.1.3)
|
|
5
5
|
delayed_job_active_record
|
|
6
6
|
haml-rails
|
|
7
|
+
koudoku
|
|
7
8
|
prawn-rails
|
|
8
9
|
rails (~> 3.2.18)
|
|
9
10
|
stripe
|
|
@@ -74,7 +75,7 @@ GEM
|
|
|
74
75
|
factory_girl_rails (4.5.0)
|
|
75
76
|
factory_girl (~> 4.5.0)
|
|
76
77
|
railties (>= 3.0.0)
|
|
77
|
-
haml (4.0.
|
|
78
|
+
haml (4.0.6)
|
|
78
79
|
tilt
|
|
79
80
|
haml-rails (0.4)
|
|
80
81
|
actionpack (>= 3.1, < 4.1)
|
|
@@ -100,6 +101,7 @@ GEM
|
|
|
100
101
|
mime-types (1.25.1)
|
|
101
102
|
mini_portile (0.6.1)
|
|
102
103
|
multi_json (1.10.1)
|
|
104
|
+
netrc (0.10.2)
|
|
103
105
|
nokogiri (1.6.4)
|
|
104
106
|
mini_portile (~> 0.6.0)
|
|
105
107
|
orm_adapter (0.5.0)
|
|
@@ -116,7 +118,7 @@ GEM
|
|
|
116
118
|
prawn (1.3.0)
|
|
117
119
|
pdf-core (~> 0.4.0)
|
|
118
120
|
ttfunk (~> 1.4.0)
|
|
119
|
-
prawn-rails (0.1.
|
|
121
|
+
prawn-rails (0.1.1)
|
|
120
122
|
prawn
|
|
121
123
|
prawn-table
|
|
122
124
|
rails (>= 3.1.0)
|
|
@@ -152,8 +154,9 @@ GEM
|
|
|
152
154
|
json (~> 1.4)
|
|
153
155
|
responders (1.1.1)
|
|
154
156
|
railties (>= 3.2, < 4.2)
|
|
155
|
-
rest-client (1.
|
|
156
|
-
mime-types (>= 1.16)
|
|
157
|
+
rest-client (1.7.3)
|
|
158
|
+
mime-types (>= 1.16, < 3.0)
|
|
159
|
+
netrc (~> 0.7)
|
|
157
160
|
rspec-core (2.12.2)
|
|
158
161
|
rspec-expectations (2.12.1)
|
|
159
162
|
diff-lcs (~> 1.1.3)
|
|
@@ -174,11 +177,11 @@ GEM
|
|
|
174
177
|
rack (~> 1.0)
|
|
175
178
|
tilt (~> 1.1, != 1.3.0)
|
|
176
179
|
sqlite3 (1.3.10)
|
|
177
|
-
stripe (1.
|
|
180
|
+
stripe (1.20.3)
|
|
178
181
|
json (~> 1.8.1)
|
|
179
|
-
mime-types (
|
|
182
|
+
mime-types (>= 1.25, < 3.0)
|
|
180
183
|
rest-client (~> 1.4)
|
|
181
|
-
stripe_event (1.
|
|
184
|
+
stripe_event (1.5.0)
|
|
182
185
|
activesupport (>= 3.1)
|
|
183
186
|
stripe (~> 1.6)
|
|
184
187
|
thor (0.19.1)
|
|
@@ -188,7 +191,7 @@ GEM
|
|
|
188
191
|
polyglot
|
|
189
192
|
polyglot (>= 0.3.1)
|
|
190
193
|
ttfunk (1.4.0)
|
|
191
|
-
tzinfo (0.3.
|
|
194
|
+
tzinfo (0.3.43)
|
|
192
195
|
vcr (2.9.3)
|
|
193
196
|
warden (1.2.3)
|
|
194
197
|
rack (>= 1.0)
|
|
@@ -205,15 +208,11 @@ DEPENDENCIES
|
|
|
205
208
|
capybara
|
|
206
209
|
devise
|
|
207
210
|
factory_girl_rails (~> 4.0)
|
|
208
|
-
haml-rails
|
|
209
211
|
jquery-rails
|
|
210
|
-
koudoku
|
|
211
212
|
pdf-inspector
|
|
212
|
-
prawn-rails
|
|
213
213
|
pry
|
|
214
214
|
rspec-rails (~> 2.12.2)
|
|
215
215
|
sqlite3
|
|
216
|
-
stripe
|
|
217
216
|
stripe_invoice!
|
|
218
217
|
vcr
|
|
219
218
|
webmock
|
|
@@ -59,8 +59,10 @@ module StripeInvoice
|
|
|
59
59
|
end
|
|
60
60
|
|
|
61
61
|
owner = get_subscription_owner stripe_charge
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
unless owner
|
|
63
|
+
puts "[#{self.class.name}##{__method__.to_s}] didn't find owner for #{stripe_charge.id}"
|
|
64
|
+
return nil
|
|
65
|
+
end
|
|
64
66
|
|
|
65
67
|
stripe_invoice = Stripe::Invoice.retrieve stripe_charge[:invoice]
|
|
66
68
|
last_charge = Charge.last
|
|
@@ -103,7 +105,11 @@ module StripeInvoice
|
|
|
103
105
|
# instead we also try to match the email address that was send to stripe
|
|
104
106
|
# when the account was created
|
|
105
107
|
stripe_customer = Stripe::Customer.retrieve stripe_charge.customer
|
|
106
|
-
|
|
108
|
+
if stripe_customer[:deleted]
|
|
109
|
+
puts "[#{self.class.name}##{__method__.to_s}] charge owner was deleted: #{stripe_charge.id}"
|
|
110
|
+
return nil # yes, that can happen :-(
|
|
111
|
+
end
|
|
112
|
+
|
|
107
113
|
puts "[#{self.class.name}##{__method__.to_s}] found owner via email for #{stripe_charge.id} - #{stripe_customer.email}"
|
|
108
114
|
Koudoku.owner_class.try(:find_by_email, stripe_customer.email)
|
|
109
115
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: stripe_invoice
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Christoph Engelhardt
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-03-
|
|
11
|
+
date: 2015-03-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|