cargowise 0.8.3 → 0.8.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.
- data/CHANGELOG +3 -0
- data/lib/cargowise/abstract_result.rb +6 -4
- metadata +4 -4
data/CHANGELOG
CHANGED
|
@@ -78,8 +78,9 @@ module Cargowise
|
|
|
78
78
|
|
|
79
79
|
if type.to_s.downcase == "kg"
|
|
80
80
|
BigDecimal.new(val)
|
|
81
|
-
elsif type.to_s.downcase == "
|
|
82
|
-
BigDecimal.new(val) * BigDecimal.new("0.45359237")
|
|
81
|
+
elsif type.to_s.downcase == "lb"
|
|
82
|
+
val = BigDecimal.new(val) * BigDecimal.new("0.45359237")
|
|
83
|
+
val.round(4)
|
|
83
84
|
else
|
|
84
85
|
nil
|
|
85
86
|
end
|
|
@@ -94,8 +95,9 @@ module Cargowise
|
|
|
94
95
|
|
|
95
96
|
if type.to_s.downcase == "m3" # cubic metres
|
|
96
97
|
BigDecimal.new(val)
|
|
97
|
-
elsif type.to_s.downcase == "
|
|
98
|
-
BigDecimal.new(val) * BigDecimal.new("0.0283168466")
|
|
98
|
+
elsif type.to_s.downcase == "cf" # cubic feet
|
|
99
|
+
val = BigDecimal.new(val) * BigDecimal.new("0.0283168466")
|
|
100
|
+
val.round(4)
|
|
99
101
|
else
|
|
100
102
|
nil
|
|
101
103
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cargowise
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 55
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 8
|
|
9
|
-
-
|
|
10
|
-
version: 0.8.
|
|
9
|
+
- 4
|
|
10
|
+
version: 0.8.4
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- James Healy
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2011-01-
|
|
18
|
+
date: 2011-01-18 00:00:00 +11:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|