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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 68c64240c351df70aaa21ee7f6335e0524eb15b1
4
- data.tar.gz: e6eaf842e22415de6a8f2cf16d1a4164e855b980
3
+ metadata.gz: da990157c574276a7b2227200aa58429d99612b4
4
+ data.tar.gz: 337dc79ce73255c73ebdcb6bf09616bf5843be70
5
5
  SHA512:
6
- metadata.gz: a2af44d71108de9f1ed76c2758ae0fd563a2a5bf646556414141bd99431e548447a54780915379d50255fae577356223f429046de615a1623fa6a509085bf954
7
- data.tar.gz: e24649d5ac5491a159a970538d01b79e08052102722809e1da1ca6c31229f6044975a9a10d0bee0875fdb0894df933721e01f3ed6032592cc49f79bf401de879
6
+ metadata.gz: 86cffdeb3f473395a9c0a36c338a62d672970304dfcc8b948f81704976252d770e89405f75df308ddaffe11929872d85ef72f23d6f38b335423eb099c88aa5d4
7
+ data.tar.gz: 27bca204901a23d12251aa5337da4496618ff118d7ebf7ea642c214ca86599e1c1160fa9446f336bc8baae64acc0ad14b061c9033bf640bdf81dcab5f54941b6
data/Gemfile CHANGED
@@ -8,10 +8,6 @@ gemspec
8
8
  # jquery-rails is used by the dummy application
9
9
  gem "jquery-rails"
10
10
 
11
- gem 'stripe'
12
- gem 'haml-rails'
13
-
14
- gem 'prawn-rails'
15
11
 
16
12
  group :development, :test do
17
13
  gem "rspec-rails", "~> 2.12.2"
@@ -21,11 +21,7 @@ module StripeInvoice
21
21
 
22
22
 
23
23
  def tax_report(rendered_pdf)
24
- attachments['income-report.pdf'] = rendered_pdf # File.read(::Rails.root.join('tmp', 'tax_report.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
@@ -1,3 +1,3 @@
1
1
  module StripeInvoice
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -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.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-02-23 00:00:00.000000000 Z
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: prawn-rails
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: haml-rails
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: delayed_job_active_record
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: rspec-rails
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: :development
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: koudoku
112
+ name: rspec-rails
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="