sy 2.0.27 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sy/quantity.rb +1 -1
- data/lib/sy/unit.rb +2 -2
- data/lib/sy/version.rb +1 -1
- data/test/noinclude_test.rb +6 -6
- data/test/sy_test.rb +2 -2
- 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: e8e3b882133b6a74dabbdbd0e3c76fe98e56ba6d
|
4
|
+
data.tar.gz: 52f7d7273a5ac8ff6180a308871c492b8d1aec7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d2b1dfd1999477ad6b9f4f30073380db2f8d20578b4ba2c51d29e09bdebb5f4ac92524beefc18897f3fcf25cd9c1f200f984cb4937d165a8fe362938f46f498
|
7
|
+
data.tar.gz: d83f76d2d67b66bd18938c2d53f968837915c3e64d64d2806a9b4c8367bdddb31b26b9da59842965aa6c23b4bc5bf6b58863f899693e7023b76c7ea7b13df8a1
|
data/lib/sy/quantity.rb
CHANGED
data/lib/sy/unit.rb
CHANGED
@@ -30,7 +30,7 @@ module SY::Unit
|
|
30
30
|
def included target
|
31
31
|
target.namespace = self
|
32
32
|
|
33
|
-
|
33
|
+
name_set_hook do |name, new_instance, old_name|
|
34
34
|
ɴ = name.to_s
|
35
35
|
up, down = ɴ.upcase, ɴ.downcase
|
36
36
|
msg = "Unit must be either all-upper or all-lower case (#{ɴ} given)!"
|
@@ -55,7 +55,7 @@ module SY::Unit
|
|
55
55
|
warn w % [abbrev, modul] if im.include? abbrev
|
56
56
|
end
|
57
57
|
end
|
58
|
-
up.to_sym.tap { |sym| puts "
|
58
|
+
up.to_sym.tap { |sym| puts "name_set_hook #{sym}" if SY::DEBUG }
|
59
59
|
end
|
60
60
|
|
61
61
|
# We'll now define all the prefix methods on the target (#mili, #mega...),
|
data/lib/sy/version.rb
CHANGED
data/test/noinclude_test.rb
CHANGED
@@ -17,8 +17,8 @@ require 'minitest/autorun'
|
|
17
17
|
describe "case of require 'sy/noinclude'" do
|
18
18
|
before do
|
19
19
|
# The following will load SY library
|
20
|
-
require 'sy/noinclude'
|
21
|
-
|
20
|
+
# require 'sy/noinclude'
|
21
|
+
require './../lib/sy/noinclude'
|
22
22
|
end
|
23
23
|
|
24
24
|
it "should show at least some signs of life" do
|
@@ -32,10 +32,10 @@ end
|
|
32
32
|
describe "require 'sy/noinclude'; require 'sy/imperial'" do
|
33
33
|
before do
|
34
34
|
# The following will load SY library
|
35
|
-
require 'sy/noinclude'
|
36
|
-
require 'sy/imperial'
|
37
|
-
|
38
|
-
|
35
|
+
# require 'sy/noinclude'
|
36
|
+
# require 'sy/imperial'
|
37
|
+
require './../lib/sy/noinclude'
|
38
|
+
require './../lib/sy/imperial'
|
39
39
|
end
|
40
40
|
|
41
41
|
it "should show signs of life" do
|
data/test/sy_test.rb
CHANGED
@@ -10,8 +10,8 @@ require 'mathn'
|
|
10
10
|
require 'minitest/autorun'
|
11
11
|
|
12
12
|
# The following will load SY library
|
13
|
-
require 'sy'
|
14
|
-
|
13
|
+
# require 'sy'
|
14
|
+
require './../lib/sy'
|
15
15
|
|
16
16
|
# **************************************************************************
|
17
17
|
# THE SPECIFICATIONS START HERE
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- boris
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|