unitwise 0.8.0 → 0.8.1
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.
- checksums.yaml +4 -4
- data/lib/unitwise/scale.rb +4 -0
- data/lib/unitwise/version.rb +1 -1
- data/test/unitwise/measurement_test.rb +4 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efe1918460c38d338cba7dda0e8f267d344df801
|
4
|
+
data.tar.gz: 545fe050c3ed7f2f09ed5b58d013d4a2176ce280
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba9651ddcf3dad823abdfaf1a24e7860a3917b13c026f993523bc939da4abbe76e0da4669be68deb56eccc7743cac44fcbc6db4bc86a413594298cff746c08ed
|
7
|
+
data.tar.gz: 06b6747e60076e5b9629aefe2632cd6095122d14337cd583869171be32ca8157f4d416e56392857e10ebe84bc0a445c02f4efd4bd4cce22ca188ecb1288dcdb1
|
data/lib/unitwise/scale.rb
CHANGED
data/lib/unitwise/version.rb
CHANGED
@@ -13,7 +13,7 @@ describe Unitwise::Measurement do
|
|
13
13
|
|
14
14
|
describe "#convert_to" do
|
15
15
|
it "must convert to a similar unit code" do
|
16
|
-
mph.convert_to('km/h').value.must_almost_equal
|
16
|
+
mph.convert_to('km/h').value.must_almost_equal(96.56063)
|
17
17
|
end
|
18
18
|
it "must raise an error if the units aren't similar" do
|
19
19
|
lambda { mph.convert_to('N') }.must_raise Unitwise::ConversionError
|
@@ -33,6 +33,9 @@ describe Unitwise::Measurement do
|
|
33
33
|
it "must convert derived units to special units" do
|
34
34
|
r.convert_to("Cel").value.must_almost_equal(0)
|
35
35
|
end
|
36
|
+
it "must convert to a unit of another measurement" do
|
37
|
+
mph.convert_to(kmh).value.must_almost_equal(96.56064)
|
38
|
+
end
|
36
39
|
end
|
37
40
|
|
38
41
|
describe "#*" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unitwise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Lewis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: liner
|