zk 0.8.5 → 0.8.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.dotfiles/rvmrc +1 -0
- data/.gitignore +1 -0
- data/Gemfile +4 -1
- data/README.markdown +3 -1
- data/lib/z_k/client/base.rb +11 -0
- data/lib/z_k/version.rb +1 -1
- data/spec/z_k/client_spec.rb +10 -0
- data/zk.gemspec +1 -1
- metadata +9 -10
data/.dotfiles/rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm jruby-1.6.5@zk --create
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/README.markdown
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# ZK
|
2
2
|
|
3
|
-
ZK is a high-level interface to the Apache [ZooKeeper][] server. It is based on the [zookeeper gem][] which is a multi-Ruby low-level driver. Currently MRI 1.8.7 and JRuby are supported
|
3
|
+
ZK is a high-level interface to the Apache [ZooKeeper][] server. It is based on the [zookeeper gem][] which is a multi-Ruby low-level driver. Currently MRI 1.8.7, 1.9.2, and JRuby are supported (rubinius 1.2 is experimental but _should_ work). It is licensed under the [MIT][] license.
|
4
|
+
|
5
|
+
Note: 1.9.3-p0 support is currently under development, there are a few bugs to work out still...
|
4
6
|
|
5
7
|
This library is heavily used in a production deployment and is actively developed and maintained.
|
6
8
|
|
data/lib/z_k/client/base.rb
CHANGED
@@ -430,6 +430,7 @@ module ZK
|
|
430
430
|
# this method will act *exactly* like stat
|
431
431
|
#
|
432
432
|
def exists?(path, opts={})
|
433
|
+
# XXX: this should use the underlying 'exists' call!
|
433
434
|
rv = stat(path, opts)
|
434
435
|
opts[:callback] ? rv : rv.exists?
|
435
436
|
end
|
@@ -650,6 +651,16 @@ module ZK
|
|
650
651
|
end
|
651
652
|
end
|
652
653
|
|
654
|
+
# returns the session_id of the underlying connection
|
655
|
+
def session_id
|
656
|
+
@cnx.session_id
|
657
|
+
end
|
658
|
+
|
659
|
+
# returns the session_passwd of the underlying connection
|
660
|
+
def session_passwd
|
661
|
+
@cnx.session_passwd
|
662
|
+
end
|
663
|
+
|
653
664
|
protected
|
654
665
|
def check_rc(hash, inputs=nil)
|
655
666
|
code = hash[:rc]
|
data/lib/z_k/version.rb
CHANGED
data/spec/z_k/client_spec.rb
CHANGED
@@ -96,6 +96,16 @@ describe ZK::Client do
|
|
96
96
|
end
|
97
97
|
end
|
98
98
|
end
|
99
|
+
|
100
|
+
describe 'session_id and session_passwd' do
|
101
|
+
it %[should expose the underlying session_id] do
|
102
|
+
@zk.session_id.should be_kind_of(Fixnum)
|
103
|
+
end
|
104
|
+
|
105
|
+
it %[should expose the underlying session_passwd] do
|
106
|
+
@zk.session_passwd.should be_kind_of(String)
|
107
|
+
end
|
108
|
+
end
|
99
109
|
end
|
100
110
|
|
101
111
|
|
data/zk.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.summary = %q{A high-level wrapper around the zookeeper driver}
|
13
13
|
s.description = s.summary
|
14
14
|
|
15
|
-
s.add_runtime_dependency 'slyphon-zookeeper', '~> 0.2.
|
15
|
+
s.add_runtime_dependency 'slyphon-zookeeper', '~> 0.2.8'
|
16
16
|
|
17
17
|
s.add_development_dependency 'rspec', '~> 2.4.0'
|
18
18
|
s.add_development_dependency 'wirble'
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 51
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 8
|
9
|
-
-
|
10
|
-
version: 0.8.
|
9
|
+
- 6
|
10
|
+
version: 0.8.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jonathan D. Simms
|
@@ -16,8 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date:
|
20
|
-
default_executable:
|
19
|
+
date: 2012-01-27 00:00:00 Z
|
21
20
|
dependencies:
|
22
21
|
- !ruby/object:Gem::Dependency
|
23
22
|
name: slyphon-zookeeper
|
@@ -27,12 +26,12 @@ dependencies:
|
|
27
26
|
requirements:
|
28
27
|
- - ~>
|
29
28
|
- !ruby/object:Gem::Version
|
30
|
-
hash:
|
29
|
+
hash: 7
|
31
30
|
segments:
|
32
31
|
- 0
|
33
32
|
- 2
|
34
|
-
-
|
35
|
-
version: 0.2.
|
33
|
+
- 8
|
34
|
+
version: 0.2.8
|
36
35
|
type: :runtime
|
37
36
|
version_requirements: *id001
|
38
37
|
- !ruby/object:Gem::Dependency
|
@@ -109,6 +108,7 @@ extra_rdoc_files: []
|
|
109
108
|
|
110
109
|
files:
|
111
110
|
- .dotfiles/rspec-logging
|
111
|
+
- .dotfiles/rvmrc
|
112
112
|
- .gitignore
|
113
113
|
- .yardopts
|
114
114
|
- Gemfile
|
@@ -153,7 +153,6 @@ files:
|
|
153
153
|
- spec/z_k/threadpool_spec.rb
|
154
154
|
- spec/zookeeper_spec.rb
|
155
155
|
- zk.gemspec
|
156
|
-
has_rdoc: true
|
157
156
|
homepage: ""
|
158
157
|
licenses: []
|
159
158
|
|
@@ -183,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
182
|
requirements: []
|
184
183
|
|
185
184
|
rubyforge_project:
|
186
|
-
rubygems_version: 1.
|
185
|
+
rubygems_version: 1.8.10
|
187
186
|
signing_key:
|
188
187
|
specification_version: 3
|
189
188
|
summary: A high-level wrapper around the zookeeper driver
|