hashery 1.0.0 → 1.1.0
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/HISTORY +21 -0
- data/lib/hashery/association.rb +160 -0
- data/lib/hashery/ini.rb +267 -0
- data/lib/hashery/linkedlist.rb +195 -0
- data/lib/hashery/opencascade.rb +3 -2
- data/lib/hashery/openhash.rb +1 -1
- data/lib/hashery/openobject.rb +5 -5
- data/lib/hashery/orderedhash.rb +120 -370
- data/lib/hashery/sparsearray.rb +586 -0
- data/meta/version +1 -1
- data/test/case_association.rb +28 -0
- metadata +8 -3
data/meta/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.1.0
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'hashery/association'
|
2
|
+
|
3
|
+
Case Association do
|
4
|
+
|
5
|
+
Unit :new do
|
6
|
+
Association.new(:A, :B)
|
7
|
+
end
|
8
|
+
|
9
|
+
Unit :to_ary do
|
10
|
+
k,v = [],[]
|
11
|
+
ohash = [ 'A' >> '3', 'B' >> '2', 'C' >> '1' ]
|
12
|
+
ohash.each { |e1,e2| k << e1 ; v << e2 }
|
13
|
+
k.assert == ['A','B','C']
|
14
|
+
v.assert == ['3','2','1']
|
15
|
+
end
|
16
|
+
|
17
|
+
Unit :index do
|
18
|
+
complex = [ 'Drop Menu' >> [ 'Button 1', 'Button 2', 'Button 3' ], 'Help' ]
|
19
|
+
complex[0].index.assert == 'Drop Menu'
|
20
|
+
end
|
21
|
+
|
22
|
+
Unit :associations do
|
23
|
+
complex = [ :a >> :b, :a >> :c ]
|
24
|
+
:a.associations.assert == [ :b, :c ]
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 1
|
7
|
+
- 1
|
7
8
|
- 0
|
8
|
-
|
9
|
-
version: 1.0.0
|
9
|
+
version: 1.1.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Thomas Sawyer
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-04-
|
19
|
+
date: 2010-04-28 00:00:00 -04:00
|
20
20
|
default_executable:
|
21
21
|
dependencies: []
|
22
22
|
|
@@ -34,8 +34,11 @@ extensions: []
|
|
34
34
|
extra_rdoc_files: []
|
35
35
|
|
36
36
|
files:
|
37
|
+
- lib/hashery/association.rb
|
37
38
|
- lib/hashery/castinghash.rb
|
38
39
|
- lib/hashery/dictionary.rb
|
40
|
+
- lib/hashery/ini.rb
|
41
|
+
- lib/hashery/linkedlist.rb
|
39
42
|
- lib/hashery/lruhash.rb
|
40
43
|
- lib/hashery/memoizer.rb
|
41
44
|
- lib/hashery/opencascade.rb
|
@@ -44,6 +47,7 @@ files:
|
|
44
47
|
- lib/hashery/orderedhash.rb
|
45
48
|
- lib/hashery/ostructable.rb
|
46
49
|
- lib/hashery/queryhash.rb
|
50
|
+
- lib/hashery/sparsearray.rb
|
47
51
|
- lib/hashery/stash.rb
|
48
52
|
- lib/hashery/statichash.rb
|
49
53
|
- lib/hashery.rb
|
@@ -58,6 +62,7 @@ files:
|
|
58
62
|
- meta/suite
|
59
63
|
- meta/summary
|
60
64
|
- meta/version
|
65
|
+
- test/case_association.rb
|
61
66
|
- test/case_dictionary.rb
|
62
67
|
- test/case_opencascade.rb
|
63
68
|
- test/case_openhash.rb
|