zookeeper 1.4.9 → 1.4.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NTM5ZGVmMzE2NGE3NWI1OWI2MWIwMTI1M2QwYmJhNjUzODEzM2MyZg==
4
+ Y2ExZTdhNmM5YTg4NDNhM2M4ZmYyNTljMzYxMTk1MWZhODBkNzc2Nw==
5
5
  data.tar.gz: !binary |-
6
- YjA1NTJjN2IxOTQxNDExNTdkMmI0NjY0YjFiMDAzNjI5YzIwNmUyZA==
6
+ NTg0ZjdhODRhMzkxMGFlOWYwNDZmYTcwMmVhYzdjZTg2OTNmYjQ2Mw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Yjg0ZThjYTk1YzcxYWEyMGNmMjQwZDMwODY5MjVlMTU5MWNmMGEyOGE2MDk4
10
- ZWM5ODljZDY3ODgyNzUyNGNmYjU0NmE2ZWVkNmY5NzA3M2QwMGI0YmVkZTJl
11
- ZWVkNzc3MWY4YjM4YWRjMGZmY2Q3YTIyZTg2ZGM4MmQwNjgxYTY=
9
+ OTQ2OGJjNmU5MTQ1MTgwMWM5ODIyMTRjZGYwOWQxYzIxMTIzZDJjYTM5ZWI4
10
+ MzU2YTkzY2YzNWE0NTA3NDU2MWE5Nzg0OTY4NDVlYzY1NjIxODJmMzNhMjE2
11
+ MDMzNmY5MzEwYmJkMDM5NTQzMzQyZGVjOTVjOWYzZGFiYTdkMTY=
12
12
  data.tar.gz: !binary |-
13
- N2M1MjVkZmMwYzAxYjljOTJiMGU5ODNiZTJjZmVmZjJjNmJmMGE5OGIxYTM5
14
- MTllZjEzNTRiZGJkMjdiZTFkNTI2MzIwMzg1YmMwZjY4NDBhYzUxYWMyOTU2
15
- MDJmZTM0MTVhZTM1NTYxNTIwNWQwNWQ5NDYxNTg4MGUzYzBmOTk=
13
+ MzIwMGViM2Y4ZWYyNzYzOWFmNjNjNTIyZGM1ODJhOWI2Mzk4MGFjYWE0OTg1
14
+ ZjhjYWVkZWIxMjFlYmIyOWIzMzYwZDFlZTljNzAwM2FhOTkwNWU0MGExYTYw
15
+ ZmE2OTA3MzRlNjgzYzA2Y2I0MDViZDRjMDMyYzU2ZjIxNDYyMWE=
@@ -23,6 +23,8 @@ rvm:
23
23
  - rbx-18mode
24
24
  - rbx-19mode
25
25
  - 2.0.0
26
+ - 2.1.0
27
+ - 2.2.0
26
28
  matrix:
27
29
  allow_failures:
28
30
  - rvm: rbx-18mode
data/Gemfile CHANGED
@@ -6,7 +6,7 @@ gem 'rake', '~> 0.9.0'
6
6
 
7
7
  group :test do
8
8
  gem "rspec" , "~> 2.11"
9
- gem 'eventmachine', '1.0.0'
9
+ gem 'eventmachine', '1.0.4'
10
10
  gem 'evented-spec', '~> 0.9.0'
11
11
  gem 'zk-server', '~> 1.0', :git => 'https://github.com/zk-ruby/zk-server.git'
12
12
  end
@@ -68,7 +68,7 @@ Dir.chdir(HERE) do
68
68
  # clean up stupid apple rsrc fork bullshit
69
69
  FileUtils.rm_f(Dir['**/._*'].select{|p| test(?f, p)})
70
70
 
71
- Dir.chdir(BUNDLE_PATH) do
71
+ Dir.chdir(BUNDLE_PATH) do
72
72
  configure = "./configure --prefix=#{HERE} --with-pic --without-cppunit --disable-dependency-tracking #{$EXTRA_CONF} 2>&1"
73
73
  configure = "env CFLAGS='#{DEBUG_CFLAGS}' #{configure}" if ZK_DEBUG
74
74
 
@@ -85,13 +85,14 @@ end
85
85
  Dir.chdir("#{HERE}/lib") do
86
86
  %w[st mt].each do |stmt|
87
87
  %w[a la].each do |ext|
88
- system("cp -f libzookeeper_#{stmt}.#{ext} libzookeeper_#{stmt}_gem.#{ext}")
88
+ system("cp -f libzookeeper_#{stmt}.#{ext} libzookeeper_#{stmt}_gem.#{ext}")
89
89
  end
90
90
  end
91
91
  end
92
92
  $LIBS << " -lzookeeper_st_gem"
93
93
 
94
94
  have_func('rb_thread_blocking_region')
95
+ have_func('rb_thread_fd_select')
95
96
 
96
97
  $CFLAGS << ' -Wall' if ZK_DEV
97
98
  create_makefile 'zookeeper_c'
data/ext/zkrb.c CHANGED
@@ -73,6 +73,17 @@
73
73
  #include "ruby/io.h"
74
74
  #endif
75
75
 
76
+ #ifndef HAVE_RB_THREAD_FD_SELECT
77
+ #define rb_fdset_t fd_set
78
+ #define rb_fd_isset(n, f) FD_ISSET(n, f)
79
+ #define rb_fd_init(f) FD_ZERO(f)
80
+ #define rb_fd_zero(f) FD_ZERO(f)
81
+ #define rb_fd_set(n, f) FD_SET(n, f)
82
+ #define rb_fd_clr(n, f) FD_CLR(n, f)
83
+ #define rb_fd_term(f)
84
+ #define rb_thread_fd_select rb_thread_select
85
+ #endif
86
+
76
87
  #include "zookeeper/zookeeper.h"
77
88
  #include <errno.h>
78
89
  #include <stdio.h>
@@ -787,8 +798,8 @@ inline static int get_self_pipe_read_fd(VALUE self) {
787
798
  static VALUE method_zkrb_iterate_event_loop(VALUE self) {
788
799
  FETCH_DATA_PTR(self, zk);
789
800
 
790
- fd_set rfds, wfds, efds;
791
- FD_ZERO(&rfds); FD_ZERO(&wfds); FD_ZERO(&efds);
801
+ rb_fdset_t rfds, wfds, efds;
802
+ rb_fd_init(&rfds); rb_fd_init(&wfds); rb_fd_init(&efds);
792
803
 
793
804
  int fd = 0, interest = 0, events = 0, rc = 0, maxfd = 0, irc = 0, prc = 0;
794
805
  struct timeval tv;
@@ -797,14 +808,14 @@ static VALUE method_zkrb_iterate_event_loop(VALUE self) {
797
808
 
798
809
  if (fd != -1) {
799
810
  if (interest & ZOOKEEPER_READ) {
800
- FD_SET(fd, &rfds);
811
+ rb_fd_set(fd, &rfds);
801
812
  } else {
802
- FD_CLR(fd, &rfds);
813
+ rb_fd_clr(fd, &rfds);
803
814
  }
804
815
  if (interest & ZOOKEEPER_WRITE) {
805
- FD_SET(fd, &wfds);
816
+ rb_fd_set(fd, &wfds);
806
817
  } else {
807
- FD_CLR(fd, &wfds);
818
+ rb_fd_clr(fd, &wfds);
808
819
  }
809
820
  } else {
810
821
  fd = 0;
@@ -813,22 +824,22 @@ static VALUE method_zkrb_iterate_event_loop(VALUE self) {
813
824
  // add our self-pipe to the read set, allow us to wake up in case our attention is needed
814
825
  int pipe_r_fd = get_self_pipe_read_fd(self);
815
826
 
816
- FD_SET(pipe_r_fd, &rfds);
827
+ rb_fd_set(pipe_r_fd, &rfds);
817
828
 
818
829
  maxfd = (pipe_r_fd > fd) ? pipe_r_fd : fd;
819
830
 
820
- rc = rb_thread_select(maxfd+1, &rfds, &wfds, &efds, &tv);
831
+ rc = rb_thread_fd_select(maxfd+1, &rfds, &wfds, &efds, &tv);
821
832
 
822
833
  if (rc > 0) {
823
- if (FD_ISSET(fd, &rfds)) {
834
+ if (rb_fd_isset(fd, &rfds)) {
824
835
  events |= ZOOKEEPER_READ;
825
836
  }
826
- if (FD_ISSET(fd, &wfds)) {
837
+ if (rb_fd_isset(fd, &wfds)) {
827
838
  events |= ZOOKEEPER_WRITE;
828
839
  }
829
840
 
830
841
  // we got woken up by the self-pipe
831
- if (FD_ISSET(pipe_r_fd, &rfds)) {
842
+ if (rb_fd_isset(pipe_r_fd, &rfds)) {
832
843
  // one event has awoken us, so we clear one event from the pipe
833
844
  char b[1];
834
845
 
@@ -853,6 +864,9 @@ static VALUE method_zkrb_iterate_event_loop(VALUE self) {
853
864
  prc, interest, fd, pipe_r_fd, maxfd, irc, tv.tv_sec + (tv.tv_usec/ 1000.0 / 1000.0));
854
865
  }
855
866
 
867
+ rb_fd_term(&rfds);
868
+ rb_fd_term(&wfds);
869
+ rb_fd_term(&efds);
856
870
  return INT2FIX(prc);
857
871
  }
858
872
 
@@ -1,4 +1,4 @@
1
1
  module Zookeeper
2
- VERSION = '1.4.9'
2
+ VERSION = '1.4.10'
3
3
  DRIVER_VERSION = '3.4.5'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zookeeper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.9
4
+ version: 1.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phillip Pearson
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2014-08-25 00:00:00.000000000 Z
16
+ date: 2015-01-12 00:00:00.000000000 Z
17
17
  dependencies: []
18
18
  description: ! 'A low-level multi-Ruby wrapper around the ZooKeeper API bindings.
19
19
  For a
@@ -134,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
134
  version: '0'
135
135
  requirements: []
136
136
  rubyforge_project:
137
- rubygems_version: 2.2.2
137
+ rubygems_version: 2.4.5
138
138
  signing_key:
139
139
  specification_version: 4
140
140
  summary: Apache ZooKeeper driver for Rubies