linda 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +5 -0
- data/lib/linda/test/tuple.rb +14 -0
- data/lib/linda/test/tuplespace.rb +14 -0
- data/lib/linda/tuple.rb +7 -0
- data/lib/linda/tuplespace.rb +1 -1
- data/lib/linda/version.rb +1 -1
- data/linda.gemspec +2 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0d21f85711ad7ff91ac04e9e2a19511f50aa523
|
4
|
+
data.tar.gz: 24c7df040039b124cc46b7ad3366d119138c01e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 246eace4880e3e1f1ab4a56dba6669bc94ea681fd868b6276b4e33a96e1ac4d7cc43ed99eeffd2841ab0bc372ee5f6d5181dc217d125988f1f7606c36e071ccf
|
7
|
+
data.tar.gz: 5f18ac034f70d406bfa4814cafac4766962a84aed30aa55ad10ea0eccbc9364152ea0caf8f73e7fcc82b6ffc9f303564cb615ff9cb904b8f0b2e0cb5db16cc6c
|
data/History.txt
CHANGED
data/lib/linda/test/tuple.rb
CHANGED
@@ -2,6 +2,20 @@ module Linda
|
|
2
2
|
module Test
|
3
3
|
module Tuple
|
4
4
|
|
5
|
+
def test_array_tuple
|
6
|
+
tuple = target_tuple.new([1,2,:a])
|
7
|
+
assert_equal tuple.data, [1,2,:a]
|
8
|
+
assert_equal tuple.type, Array
|
9
|
+
assert_equal JSON.parse(tuple.to_json), [1,2,"a"]
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_hash_tuple
|
13
|
+
tuple = target_tuple.new(:a => 1, :b => 2)
|
14
|
+
assert_equal tuple.data, {:a => 1, :b => 2}
|
15
|
+
assert_equal tuple.type, Hash
|
16
|
+
assert_equal JSON.parse(tuple.to_json), {"a" => 1, "b" => 2}
|
17
|
+
end
|
18
|
+
|
5
19
|
def test_match_array_tuple
|
6
20
|
tuple = target_tuple.new [1,2,3]
|
7
21
|
assert tuple.match? target_tuple.new [1,2,3]
|
@@ -6,6 +6,20 @@ module Linda
|
|
6
6
|
@space = target_tuplespace.new
|
7
7
|
end
|
8
8
|
|
9
|
+
def test_name
|
10
|
+
assert_equal @space.name, "__default__"
|
11
|
+
assert_equal target_tuplespace.new("foo").name, "foo"
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_tuples
|
15
|
+
@space.write [1]
|
16
|
+
@space.write [1,2]
|
17
|
+
@space.write :a => 10, :b => 20
|
18
|
+
@space.write [1,2,"a"]
|
19
|
+
assert_equal @space.size, 4
|
20
|
+
assert_equal @space.tuples.size, 4
|
21
|
+
end
|
22
|
+
|
9
23
|
def test_write_read
|
10
24
|
assert_equal @space.size, 0
|
11
25
|
@space.write target_tuple.new [1,2,3]
|
data/lib/linda/tuple.rb
CHANGED
data/lib/linda/tuplespace.rb
CHANGED
data/lib/linda/version.rb
CHANGED
data/linda.gemspec
CHANGED
@@ -18,6 +18,8 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
+
spec.add_dependency "json"
|
22
|
+
|
21
23
|
spec.add_development_dependency "bundler", "~> 1.3"
|
22
24
|
spec.add_development_dependency "rake"
|
23
25
|
spec.add_development_dependency "minitest"
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: linda
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sho Hashimoto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: json
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|