paperless_to_xero 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -38,32 +38,4 @@ namespace :spec do
38
38
  t.spec_opts = ["--format", "specdoc", "--dry-run"]
39
39
  t.spec_files = FileList['spec/**/*_spec.rb']
40
40
  end
41
- end
42
-
43
- begin
44
- require 'jeweler'
45
- Jeweler::Tasks.new do |s|
46
- s.name = "paperless_to_xero"
47
- s.summary = "Convert Paperless CSV exports to Xero invoice import CSV"
48
- s.description = File.read('README.rdoc')
49
- s.authors = ["Matt Patterson"]
50
- s.email = "matt@reprocessed.org"
51
- s.homepage = "http://github.com/fidothe/paperless_to_xero/"
52
-
53
- s.extra_rdoc_files = %w(README.rdoc)
54
- s.rdoc_options = %w(--main README.rdoc)
55
-
56
- s.require_paths = ["lib"]
57
-
58
- # If you want to depend on other gems, add them here, along with any
59
- # relevant versions
60
-
61
- s.add_development_dependency("rspec") # add any other gems for testing/development
62
-
63
- # If you want to publish automatically to rubyforge, you'll may need
64
- # to tweak this, and the publishing task below too.
65
- s.rubyforge_project = "paperless_to_xero"
66
- end
67
- rescue LoadError
68
- puts "Jeweler not available. Install it with: sudo gem install jeweler"
69
41
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.0
1
+ 1.2.1
@@ -14,6 +14,7 @@ module PaperlessToXero
14
14
  '7% (Germany, VAT on expenses)' => 1.07.to_d,
15
15
  '19% (Germany, VAT on expenses)' => 1.19.to_d,
16
16
  '25% (Denmark, VAT on expenses)' => 1.25.to_d,
17
+ '25% (Sweden, VAT on expenses)' => 1.25.to_d,
17
18
  '21.5% (Ireland, VAT on expenses)' => 1.215.to_d,
18
19
  '15% (EU VAT ID)' => 1.15.to_d,
19
20
  '15% (VAT on expenses)' => 1.15.to_d,
@@ -0,0 +1,2 @@
1
+ "Date","Merchant","Currency","Amount","Tax","Category","Payment Method","Notes","Description","Reference #","Status"
2
+ 06/06/2010,"Pingdom","£","149.25","29.95","429 - General Expenses","Credit Card","$; VAT - 25% - Sweden","Pingdom site monitoring subscription","2010-06-06-01",
@@ -244,6 +244,24 @@ describe PaperlessToXero::Converter do
244
244
  end
245
245
  end
246
246
  end
247
+
248
+ describe "handling Pingdom's USD invoices with Swedish 25%" do
249
+ it "correctly applies both currency and VAT" do
250
+ @converter.stubs(:input_path).returns(fixture_path('dollars_with_swedish_vat'))
251
+ @converter.parse
252
+
253
+ verify_invoice_details(
254
+ :invoice => {:date => Date.parse('2010-06-06'), :merchant => 'Pingdom',
255
+ :reference_id => '2010-06-06-01', :inc_vat_total => '149.25', :vat_total => '29.95',
256
+ :ex_vat_total => '119.30', :currency => 'USD'},
257
+ :vat_inclusive => true,
258
+ :line_items => [
259
+ {:description => 'Pingdom site monitoring subscription', :category => '429', :vat_type => '25% (Sweden, VAT on expenses)',
260
+ :vat_inclusive_amount => '149.25', :vat_exclusive_amount => '119.30', :vat_amount => '29.95'}
261
+ ]
262
+ )
263
+ end
264
+ end
247
265
  end
248
266
 
249
267
  describe "multi-item inputs" do
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paperless_to_xero
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 29
4
5
  prerelease: false
5
6
  segments:
6
7
  - 1
7
8
  - 2
8
- - 0
9
- version: 1.2.0
9
+ - 1
10
+ version: 1.2.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Matt Patterson
@@ -21,14 +22,30 @@ dependencies:
21
22
  name: rspec
22
23
  prerelease: false
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
24
26
  requirements:
25
27
  - - ">="
26
28
  - !ruby/object:Gem::Version
29
+ hash: 3
27
30
  segments:
28
31
  - 0
29
32
  version: "0"
30
33
  type: :development
31
34
  version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: mocha
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
46
+ version: "0"
47
+ type: :development
48
+ version_requirements: *id002
32
49
  description: |-
33
50
  = Paperless-to-Xero
34
51
 
@@ -41,22 +58,29 @@ executables:
41
58
  extensions: []
42
59
 
43
60
  extra_rdoc_files:
61
+ - MIT-LICENSE
44
62
  - README.rdoc
45
63
  files:
46
- - MIT-LICENSE
64
+ - VERSION
47
65
  - README.rdoc
66
+ - MIT-LICENSE
48
67
  - Rakefile
49
- - VERSION
50
- - bin/paperless_to_xero
51
- - lib/paperless_to_xero.rb
52
68
  - lib/paperless_to_xero/converter.rb
53
69
  - lib/paperless_to_xero/decimal_helpers.rb
54
70
  - lib/paperless_to_xero/errors.rb
55
71
  - lib/paperless_to_xero/invoice.rb
56
72
  - lib/paperless_to_xero/invoice_item.rb
57
73
  - lib/paperless_to_xero/version.rb
58
- - paperless_to_xero.gemspec
74
+ - lib/paperless_to_xero.rb
75
+ - bin/paperless_to_xero
76
+ - spec/spec.opts
77
+ - spec/paperless_to_xero/converter_spec.rb
78
+ - spec/paperless_to_xero/errors_spec.rb
79
+ - spec/paperless_to_xero/invoice_item_spec.rb
80
+ - spec/paperless_to_xero/invoice_spec.rb
81
+ - spec/spec_helper.rb
59
82
  - spec/fixtures/dodgy-header.csv
83
+ - spec/fixtures/dollars_with_swedish_vat.csv
60
84
  - spec/fixtures/end_to_end-input.csv
61
85
  - spec/fixtures/end_to_end-output.csv
62
86
  - spec/fixtures/multi-ex-vat.csv
@@ -75,12 +99,6 @@ files:
75
99
  - spec/fixtures/single-vat-2010-01-01.csv
76
100
  - spec/fixtures/single-vat-pre-2008-12.csv
77
101
  - spec/fixtures/single-zero_rated.csv
78
- - spec/paperless_to_xero/converter_spec.rb
79
- - spec/paperless_to_xero/errors_spec.rb
80
- - spec/paperless_to_xero/invoice_item_spec.rb
81
- - spec/paperless_to_xero/invoice_spec.rb
82
- - spec/spec.opts
83
- - spec/spec_helper.rb
84
102
  has_rdoc: true
85
103
  homepage: http://github.com/fidothe/paperless_to_xero/
86
104
  licenses: []
@@ -92,29 +110,54 @@ rdoc_options:
92
110
  require_paths:
93
111
  - lib
94
112
  required_ruby_version: !ruby/object:Gem::Requirement
113
+ none: false
95
114
  requirements:
96
115
  - - ">="
97
116
  - !ruby/object:Gem::Version
117
+ hash: 3
98
118
  segments:
99
119
  - 0
100
120
  version: "0"
101
121
  required_rubygems_version: !ruby/object:Gem::Requirement
122
+ none: false
102
123
  requirements:
103
124
  - - ">="
104
125
  - !ruby/object:Gem::Version
126
+ hash: 3
105
127
  segments:
106
128
  - 0
107
129
  version: "0"
108
130
  requirements: []
109
131
 
110
132
  rubyforge_project: paperless_to_xero
111
- rubygems_version: 1.3.6
133
+ rubygems_version: 1.3.7
112
134
  signing_key:
113
135
  specification_version: 3
114
136
  summary: Convert Paperless CSV exports to Xero invoice import CSV
115
137
  test_files:
138
+ - spec/spec.opts
116
139
  - spec/paperless_to_xero/converter_spec.rb
117
140
  - spec/paperless_to_xero/errors_spec.rb
118
141
  - spec/paperless_to_xero/invoice_item_spec.rb
119
142
  - spec/paperless_to_xero/invoice_spec.rb
120
143
  - spec/spec_helper.rb
144
+ - spec/fixtures/dodgy-header.csv
145
+ - spec/fixtures/dollars_with_swedish_vat.csv
146
+ - spec/fixtures/end_to_end-input.csv
147
+ - spec/fixtures/end_to_end-output.csv
148
+ - spec/fixtures/multi-ex-vat.csv
149
+ - spec/fixtures/multi-foreign.csv
150
+ - spec/fixtures/multi-item-mixed_vat_and_exempt.csv
151
+ - spec/fixtures/multi-item.csv
152
+ - spec/fixtures/single-1000.csv
153
+ - spec/fixtures/single-basic.csv
154
+ - spec/fixtures/single-dkk.csv
155
+ - spec/fixtures/single-foreign.csv
156
+ - spec/fixtures/single-no-vat.csv
157
+ - spec/fixtures/single-vat-2008-11-30.csv
158
+ - spec/fixtures/single-vat-2008-12-01.csv
159
+ - spec/fixtures/single-vat-2009-12-31.csv
160
+ - spec/fixtures/single-vat-2009.csv
161
+ - spec/fixtures/single-vat-2010-01-01.csv
162
+ - spec/fixtures/single-vat-pre-2008-12.csv
163
+ - spec/fixtures/single-zero_rated.csv
@@ -1,91 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{paperless_to_xero}
8
- s.version = "1.2.0"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Matt Patterson"]
12
- s.date = %q{2010-02-27}
13
- s.default_executable = %q{paperless_to_xero}
14
- s.description = %q{= Paperless-to-Xero
15
-
16
- A simple translator which takes a CSV file from Mariner's Paperless receipt/document management software and makes a Xero accounts payable invoice CSV, for import into Xero.
17
-
18
- Formatting in Paperless is very important, so you probably want to wait until I've written the docs}
19
- s.email = %q{matt@reprocessed.org}
20
- s.executables = ["paperless_to_xero"]
21
- s.extra_rdoc_files = [
22
- "README.rdoc"
23
- ]
24
- s.files = [
25
- "MIT-LICENSE",
26
- "README.rdoc",
27
- "Rakefile",
28
- "VERSION",
29
- "bin/paperless_to_xero",
30
- "lib/paperless_to_xero.rb",
31
- "lib/paperless_to_xero/converter.rb",
32
- "lib/paperless_to_xero/decimal_helpers.rb",
33
- "lib/paperless_to_xero/errors.rb",
34
- "lib/paperless_to_xero/invoice.rb",
35
- "lib/paperless_to_xero/invoice_item.rb",
36
- "lib/paperless_to_xero/version.rb",
37
- "paperless_to_xero.gemspec",
38
- "spec/fixtures/dodgy-header.csv",
39
- "spec/fixtures/end_to_end-input.csv",
40
- "spec/fixtures/end_to_end-output.csv",
41
- "spec/fixtures/multi-ex-vat.csv",
42
- "spec/fixtures/multi-foreign.csv",
43
- "spec/fixtures/multi-item-mixed_vat_and_exempt.csv",
44
- "spec/fixtures/multi-item.csv",
45
- "spec/fixtures/single-1000.csv",
46
- "spec/fixtures/single-basic.csv",
47
- "spec/fixtures/single-dkk.csv",
48
- "spec/fixtures/single-foreign.csv",
49
- "spec/fixtures/single-no-vat.csv",
50
- "spec/fixtures/single-vat-2008-11-30.csv",
51
- "spec/fixtures/single-vat-2008-12-01.csv",
52
- "spec/fixtures/single-vat-2009-12-31.csv",
53
- "spec/fixtures/single-vat-2009.csv",
54
- "spec/fixtures/single-vat-2010-01-01.csv",
55
- "spec/fixtures/single-vat-pre-2008-12.csv",
56
- "spec/fixtures/single-zero_rated.csv",
57
- "spec/paperless_to_xero/converter_spec.rb",
58
- "spec/paperless_to_xero/errors_spec.rb",
59
- "spec/paperless_to_xero/invoice_item_spec.rb",
60
- "spec/paperless_to_xero/invoice_spec.rb",
61
- "spec/spec.opts",
62
- "spec/spec_helper.rb"
63
- ]
64
- s.homepage = %q{http://github.com/fidothe/paperless_to_xero/}
65
- s.rdoc_options = ["--main", "README.rdoc"]
66
- s.require_paths = ["lib"]
67
- s.rubyforge_project = %q{paperless_to_xero}
68
- s.rubygems_version = %q{1.3.6}
69
- s.summary = %q{Convert Paperless CSV exports to Xero invoice import CSV}
70
- s.test_files = [
71
- "spec/paperless_to_xero/converter_spec.rb",
72
- "spec/paperless_to_xero/errors_spec.rb",
73
- "spec/paperless_to_xero/invoice_item_spec.rb",
74
- "spec/paperless_to_xero/invoice_spec.rb",
75
- "spec/spec_helper.rb"
76
- ]
77
-
78
- if s.respond_to? :specification_version then
79
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
80
- s.specification_version = 3
81
-
82
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
83
- s.add_development_dependency(%q<rspec>, [">= 0"])
84
- else
85
- s.add_dependency(%q<rspec>, [">= 0"])
86
- end
87
- else
88
- s.add_dependency(%q<rspec>, [">= 0"])
89
- end
90
- end
91
-