stripe_invoice 1.0.0 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -4
- data/app/mailers/stripe_invoice/invoice_mailer.rb +1 -5
- data/config/initializers/stripe_event.rb +2 -2
- data/lib/stripe_invoice/version.rb +1 -1
- data/stripe_invoice.gemspec +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da990157c574276a7b2227200aa58429d99612b4
|
4
|
+
data.tar.gz: 337dc79ce73255c73ebdcb6bf09616bf5843be70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86cffdeb3f473395a9c0a36c338a62d672970304dfcc8b948f81704976252d770e89405f75df308ddaffe11929872d85ef72f23d6f38b335423eb099c88aa5d4
|
7
|
+
data.tar.gz: 27bca204901a23d12251aa5337da4496618ff118d7ebf7ea642c214ca86599e1c1160fa9446f336bc8baae64acc0ad14b061c9033bf640bdf81dcab5f54941b6
|
data/Gemfile
CHANGED
@@ -21,11 +21,7 @@ module StripeInvoice
|
|
21
21
|
|
22
22
|
|
23
23
|
def tax_report(rendered_pdf)
|
24
|
-
attachments['income-report.pdf'] = rendered_pdf
|
25
|
-
# {
|
26
|
-
# content: File.read(::Rails.root.join('tmp', 'tax_report.pdf')),
|
27
|
-
# mime_type: "application/pdf"
|
28
|
-
# }
|
24
|
+
attachments['income-report.pdf'] = rendered_pdf
|
29
25
|
|
30
26
|
# sends the email to the default from address
|
31
27
|
addr_to = ActionMailer::Base.default[:from]
|
@@ -2,12 +2,12 @@ StripeEvent.configure do |events|
|
|
2
2
|
events.subscribe 'charge.succeeded' do |event|
|
3
3
|
# we will create an invoice from this
|
4
4
|
charge = StripeInvoice::Charge.create_from_stripe(event.data.object)
|
5
|
-
StripeInvoice::InvoiceMailer.new_invoice(charge).deliver
|
5
|
+
StripeInvoice::InvoiceMailer.new_invoice(charge).deliver if charge
|
6
6
|
end
|
7
7
|
|
8
8
|
events.subscribe 'charge.refunded' do |event|
|
9
9
|
charge = StripeInvoice::Charge.create_from_stripe(event.data.object)
|
10
|
-
StripeInvoice::InvoiceMailer.refund_invoice(charge).deliver
|
10
|
+
StripeInvoice::InvoiceMailer.refund_invoice(charge).deliver if charge
|
11
11
|
|
12
12
|
end
|
13
13
|
end
|
data/stripe_invoice.gemspec
CHANGED
@@ -22,11 +22,11 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.add_dependency "rails", "~> 3.2.18"
|
23
23
|
s.add_dependency "stripe"
|
24
24
|
s.add_dependency "stripe_event"
|
25
|
+
s.add_dependency 'koudoku'
|
25
26
|
s.add_dependency "prawn-rails"
|
26
27
|
s.add_dependency "haml-rails"
|
27
28
|
s.add_dependency "delayed_job_active_record" # for tax reports
|
28
29
|
s.add_development_dependency 'rspec-rails'
|
29
|
-
s.add_development_dependency 'koudoku'
|
30
30
|
s.add_development_dependency 'devise'
|
31
31
|
s.add_development_dependency 'capybara'
|
32
32
|
s.add_development_dependency 'factory_girl_rails'
|
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.0.
|
4
|
+
version: 1.0.2
|
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-
|
11
|
+
date: 2015-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: koudoku
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: prawn-rails
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: haml-rails
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -95,13 +95,13 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: delayed_job_active_record
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
|
-
type: :
|
104
|
+
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: rspec-rails
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - ">="
|