compactor 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- compactor (0.3.3)
4
+ compactor (0.3.4)
5
5
  jruby-openssl (= 0.7.3)
6
6
  mechanize (= 2.4)
7
7
  nokogiri (>= 1.5.0, < 1.5.3)
Binary file
@@ -88,7 +88,7 @@ module Compactor
88
88
  parser = Compactor::Amazon::XmlParser.new(r_data)
89
89
  unless parser.valid?
90
90
  error_message = \
91
- "Amazon summary amount different from calculated total amount. {" +
91
+ "Amazon generated report has a TotalAmount discrepancy. {" +
92
92
  "type: XML, " +
93
93
  "expected total: $#{"%.2f" % parser.expected_total}, " +
94
94
  "calculated total: $#{"%.2f" % parser.calculated_total}, " +
@@ -1,3 +1,3 @@
1
1
  module Compactor
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
@@ -7,7 +7,7 @@ module Compactor
7
7
  end
8
8
 
9
9
  def valid?
10
- expected_total == calculated_total
10
+ (expected_total.abs - calculated_total.abs).abs < 0.009
11
11
  end
12
12
 
13
13
  private
@@ -61,9 +61,9 @@ class ScrapedRowTest < Test::Unit::TestCase
61
61
  report_data = <<-XML
62
62
  <xml>
63
63
  <report>
64
- <TotalAmount>10</TotalAmount>
65
- <Amount>5</Amount>
66
- <Amount>5</Amount>
64
+ <TotalAmount>10</TotalAmount>
65
+ <Amount>5</Amount>
66
+ <Amount>5</Amount>
67
67
  </report>
68
68
  </xml>
69
69
  XML
@@ -75,9 +75,9 @@ class ScrapedRowTest < Test::Unit::TestCase
75
75
  report_data = <<-XML
76
76
  <xml>
77
77
  <report>
78
- <TotalAmount>10</TotalAmount>
79
- <Amount>5</Amount>
80
- <Amount>4</Amount>
78
+ <TotalAmount>10</TotalAmount>
79
+ <Amount>5</Amount>
80
+ <Amount>4</Amount>
81
81
  </report>
82
82
  </xml>
83
83
  XML
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 3
9
- version: 0.3.3
8
+ - 4
9
+ version: 0.3.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Julio Santos
@@ -149,6 +149,7 @@ files:
149
149
  - README.md
150
150
  - Rakefile
151
151
  - compactor-0.2.3.gem
152
+ - compactor-0.3.3.gem
152
153
  - compactor.gemspec
153
154
  - lib/compactor.rb
154
155
  - lib/compactor/extensions.rb