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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 32d8775cf6b24bbee63e12dc1e7ffeeb59ab05f5
4
- data.tar.gz: e09be3054dd1e6e95702508f3ab23a70801d2d94
3
+ metadata.gz: 5706d3441831ade95044c1a351c5fc8c28552726
4
+ data.tar.gz: 1e2a679c18daf0d622167892fb48a404587ed4c2
5
5
  SHA512:
6
- metadata.gz: 031828a303e2c1d19093768f1aac6504e82935a49d4fae99c0c24eb36b691f447b85070648a0a3775508319adc60cca81c4c116e4853f910c69a4ab3ab4a1ccd
7
- data.tar.gz: 797a5ff7283622afc51a8e5458ebf4cc269609ecb8d59e271f2a478281c73ffd1b78423270ae45527f1051a0f4c4231fac049ca2327054a6a6dc652f25436f9a
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.13)
11
- bson (1.9.1)
12
- bson_ext (1.9.1)
13
- bson (~> 1.9.1)
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.7.9)
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.2)
39
+ thread_safe (0.1.3)
40
40
  atomic
41
41
  tzinfo (0.3.37)
42
- zookeeper (1.4.4)
42
+ zookeeper (1.4.6)
43
43
 
44
44
  PLATFORMS
45
45
  ruby
@@ -1,3 +1,3 @@
1
1
  module RubySkynet #:nodoc
2
- VERSION = "1.2.4"
2
+ VERSION = "1.2.5"
3
3
  end
@@ -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|ZooKeeper]
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
- @registry = RubySkynet::Zookeeper::Registry.new(:root => "/registrytest")
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
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-09 00:00:00.000000000 Z
11
+ date: 2013-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: semantic_logger