ruby_skynet 1.2.4 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -7
- data/lib/ruby_skynet/version.rb +1 -1
- data/lib/ruby_skynet/zookeeper/registry.rb +2 -5
- data/test/zookeeper_registry_test.rb +10 -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: 5706d3441831ade95044c1a351c5fc8c28552726
|
4
|
+
data.tar.gz: 1e2a679c18daf0d622167892fb48a404587ed4c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47c2cdc781bdf467a83c41711fad0be34f41446033f1cba5db5add0cd6dd275aabcefd8df7355d4bbe1628dd8ba19737d7f66bdc4edbe5db4ecd5c209e3a297b
|
7
|
+
data.tar.gz: 0829e96a88b69f95a9e7cd42f67a7da5f78a2b53dbfcdbba4a297fcb677c011b4d0dc39adc8b27de436da2ddeff397c955fff528bd4e229454e8ed429159a077
|
data/Gemfile.lock
CHANGED
@@ -7,14 +7,14 @@ GEM
|
|
7
7
|
multi_json (~> 1.3)
|
8
8
|
thread_safe (~> 0.1)
|
9
9
|
tzinfo (~> 0.3.37)
|
10
|
-
atomic (1.1.
|
11
|
-
bson (1.9.
|
12
|
-
bson_ext (1.9.
|
13
|
-
bson (~> 1.9.
|
10
|
+
atomic (1.1.14)
|
11
|
+
bson (1.9.2)
|
12
|
+
bson_ext (1.9.2)
|
13
|
+
bson (~> 1.9.2)
|
14
14
|
gene_pool (1.3.0)
|
15
15
|
i18n (0.6.5)
|
16
16
|
minitest (4.7.5)
|
17
|
-
multi_json (1.
|
17
|
+
multi_json (1.8.0)
|
18
18
|
rake (10.1.0)
|
19
19
|
resilient_socket (0.5.0)
|
20
20
|
semantic_logger (>= 2.1)
|
@@ -36,10 +36,10 @@ GEM
|
|
36
36
|
shoulda-matchers (2.3.0)
|
37
37
|
activesupport (>= 3.0.0)
|
38
38
|
sync_attr (1.0.0)
|
39
|
-
thread_safe (0.1.
|
39
|
+
thread_safe (0.1.3)
|
40
40
|
atomic
|
41
41
|
tzinfo (0.3.37)
|
42
|
-
zookeeper (1.4.
|
42
|
+
zookeeper (1.4.6)
|
43
43
|
|
44
44
|
PLATFORMS
|
45
45
|
ruby
|
data/lib/ruby_skynet/version.rb
CHANGED
@@ -41,10 +41,7 @@ module RubySkynet
|
|
41
41
|
# Block to call after the connection to Zookeeper has been established
|
42
42
|
# and every time the connection is re-established
|
43
43
|
#
|
44
|
-
# :registry [Hash
|
45
|
-
# ZooKeeper configuration information, or an existing
|
46
|
-
# ZooKeeper ( ZooKeeper client) instance
|
47
|
-
#
|
44
|
+
# :registry [Hash]
|
48
45
|
# :servers [Array of String]
|
49
46
|
# Array of URL's of ZooKeeper servers to connect to with port numbers
|
50
47
|
# ['server1:2181', 'server2:2181']
|
@@ -75,7 +72,7 @@ module RubySkynet
|
|
75
72
|
@root_with_trail = "#{@root}/"
|
76
73
|
@root = '/' if @root == ''
|
77
74
|
|
78
|
-
registry_config = params.delete(:registry) || {}
|
75
|
+
registry_config = (params.delete(:registry) || {}).dup
|
79
76
|
|
80
77
|
# server1:2181,server2:2181,server3:2181
|
81
78
|
@servers = (registry_config.delete(:servers) || ['127.0.0.1:2181']).join(',')
|
@@ -69,11 +69,20 @@ class ZookeeperRegistryTest < Test::Unit::TestCase
|
|
69
69
|
|
70
70
|
context "with registry" do
|
71
71
|
setup do
|
72
|
-
|
72
|
+
params = {
|
73
|
+
:root => "/registrytest",
|
74
|
+
:registry => {
|
75
|
+
:connect_timeout => 5,
|
76
|
+
}
|
77
|
+
}
|
78
|
+
@registry = RubySkynet::Zookeeper::Registry.new(params)
|
73
79
|
@registry.each_pair {|k,v, ver, num_children| @registry.delete(k) if num_children == 0}
|
74
80
|
@test_data.each_pair {|k,v| @registry[k] = v}
|
75
81
|
@path = 'a/b/c/d/e/f/g/h'
|
76
82
|
@registry[@path] = 'hello'
|
83
|
+
# Ensure hash is not modified
|
84
|
+
assert_equal "/registrytest", params[:root]
|
85
|
+
assert_equal 5, params[:registry][:connect_timeout]
|
77
86
|
end
|
78
87
|
|
79
88
|
def teardown
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_skynet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Reid Morrison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: semantic_logger
|