eventmachine 1.0.0-x86-mswin32-60 → 1.0.1-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,12 @@
1
+ script: rake compile test
2
+ language: ruby
3
+ rvm:
4
+ - 1.8.7
5
+ - 1.9.3
6
+ - rbx-18mode
7
+ - rbx-19mode
8
+ - jruby
9
+ matrix:
10
+ allow_failures:
11
+ - rvm: rbx-18mode
12
+ - rvm: rbx-19mode
@@ -0,0 +1,7 @@
1
+ # Changelog
2
+
3
+ ## 1.0.1 (February 27, 2013)
4
+ * use rb_wait_for_single_fd() on ruby 2.0 to fix rb_thread_select() deprecation
5
+ * fix epoll/kqueue mode in ruby 2.0 by removing calls to rb_enable_interrupt() [#248, #389]
6
+ * fix memory leak when verifying ssl cerificates [#403]
7
+ * fix initial connection delay [#393, #374]
data/Gemfile CHANGED
@@ -1,3 +1,2 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
  gemspec
3
-
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
13
13
  s.files = `git ls-files`.split("\n")
14
14
  s.extensions = ["ext/extconf.rb", "ext/fastfilereader/extconf.rb"]
15
15
 
16
- s.add_development_dependency 'rake-compiler', '~> 0.8.1'
17
- s.add_development_dependency 'yard', ">= 0.7.2"
16
+ s.add_development_dependency 'rake-compiler', '~> 0.8.3'
17
+ s.add_development_dependency 'yard', ">= 0.8.5.2"
18
18
  s.add_development_dependency 'bluecloth'
19
19
 
20
20
  s.summary = 'Ruby/EventMachine library'
data/ext/ed.cpp CHANGED
@@ -460,6 +460,8 @@ ConnectionDescriptor::SetConnectPending
460
460
  void ConnectionDescriptor::SetConnectPending(bool f)
461
461
  {
462
462
  bConnectPending = f;
463
+ if (f == false && NextHeartbeat)
464
+ MyEventMachine->ClearHeartbeat(NextHeartbeat, this);
463
465
  _UpdateEvents();
464
466
  }
465
467
 
data/ext/em.cpp CHANGED
@@ -524,12 +524,17 @@ bool EventMachine_t::_RunEpollOnce()
524
524
 
525
525
  #ifdef BUILD_FOR_RUBY
526
526
  int ret = 0;
527
+
528
+ #ifdef HAVE_RB_WAIT_FOR_SINGLE_FD
529
+ if ((ret = rb_wait_for_single_fd(epfd, RB_WAITFD_IN|RB_WAITFD_PRI, &tv)) < 1) {
530
+ #else
527
531
  fd_set fdreads;
528
532
 
529
533
  FD_ZERO(&fdreads);
530
534
  FD_SET(epfd, &fdreads);
531
535
 
532
536
  if ((ret = rb_thread_select(epfd + 1, &fdreads, NULL, NULL, &tv)) < 1) {
537
+ #endif
533
538
  if (ret == -1) {
534
539
  assert(errno != EINVAL);
535
540
  assert(errno != EBADF);
@@ -598,12 +603,17 @@ bool EventMachine_t::_RunKqueueOnce()
598
603
 
599
604
  #ifdef BUILD_FOR_RUBY
600
605
  int ret = 0;
606
+
607
+ #ifdef HAVE_RB_WAIT_FOR_SINGLE_FD
608
+ if ((ret = rb_wait_for_single_fd(kqfd, RB_WAITFD_IN|RB_WAITFD_PRI, &tv)) < 1) {
609
+ #else
601
610
  fd_set fdreads;
602
611
 
603
612
  FD_ZERO(&fdreads);
604
613
  FD_SET(kqfd, &fdreads);
605
614
 
606
615
  if ((ret = rb_thread_select(kqfd + 1, &fdreads, NULL, NULL, &tv)) < 1) {
616
+ #endif
607
617
  if (ret == -1) {
608
618
  assert(errno != EINVAL);
609
619
  assert(errno != EBADF);
data/ext/em.h CHANGED
@@ -24,9 +24,13 @@ See the file COPYING for complete licensing information.
24
24
  #include <ruby.h>
25
25
  #define EmSelect rb_thread_select
26
26
 
27
+ #ifdef HAVE_RB_WAIT_FOR_SINGLE_FD
28
+ #include <ruby/io.h>
29
+ #endif
30
+
27
31
  #if defined(HAVE_RBTRAP)
28
32
  #include <rubysig.h>
29
- #elif defined(HAVE_RB_THREAD_CHECK_INTS)
33
+ #elif defined(HAVE_RB_ENABLE_INTERRUPT)
30
34
  extern "C" {
31
35
  void rb_enable_interrupt(void);
32
36
  void rb_disable_interrupt(void);
@@ -71,13 +71,14 @@ add_define "HAVE_INOTIFY" if inotify = have_func('inotify_init', 'sys/inotify.h'
71
71
  add_define "HAVE_OLD_INOTIFY" if !inotify && have_macro('__NR_inotify_init', 'sys/syscall.h')
72
72
  add_define 'HAVE_WRITEV' if have_func('writev', 'sys/uio.h')
73
73
 
74
- have_func('rb_thread_check_ints')
74
+ have_func('rb_wait_for_single_fd')
75
+ have_func('rb_enable_interrupt')
75
76
  have_func('rb_time_new')
76
77
 
77
78
  # Minor platform details between *nix and Windows:
78
79
 
79
80
  if RUBY_PLATFORM =~ /(mswin|mingw|bccwin)/
80
- GNU_CHAIN = ENV['CROSS_COMPILING'] or $1 == 'mingw'
81
+ GNU_CHAIN = ENV['CROSS_COMPILING'] || $1 == 'mingw'
81
82
  OS_WIN32 = true
82
83
  add_define "OS_WIN32"
83
84
  else
@@ -17,7 +17,7 @@ add_define 'BUILD_FOR_RUBY'
17
17
  # Minor platform details between *nix and Windows:
18
18
 
19
19
  if RUBY_PLATFORM =~ /(mswin|mingw|bccwin)/
20
- GNU_CHAIN = ENV['CROSS_COMPILING'] or $1 == 'mingw'
20
+ GNU_CHAIN = ENV['CROSS_COMPILING'] || $1 == 'mingw'
21
21
  OS_WIN32 = true
22
22
  add_define "OS_WIN32"
23
23
  else
@@ -332,7 +332,7 @@ static VALUE t_get_peer_cert (VALUE self, VALUE signature)
332
332
  BIO_get_mem_ptr(out, &buf);
333
333
  ret = rb_str_new(buf->data, buf->length);
334
334
  X509_free(cert);
335
- BUF_MEM_free(buf);
335
+ BIO_free(out);
336
336
  }
337
337
  #endif
338
338
 
@@ -459,7 +459,7 @@ extern "C" int ssl_verify_wrapper(int preverify_ok, X509_STORE_CTX *ctx)
459
459
 
460
460
  ConnectionDescriptor *cd = dynamic_cast <ConnectionDescriptor*> (Bindable_t::GetObject(binding));
461
461
  result = (cd->VerifySslPeer(buf->data) == true ? 1 : 0);
462
- BUF_MEM_free(buf);
462
+ BIO_free(out);
463
463
 
464
464
  return result;
465
465
  }
@@ -271,7 +271,7 @@ module EventMachine
271
271
  psw = psw.call
272
272
  end
273
273
  #str = Base64::encode64("\0#{@args[:auth][:username]}\0#{psw}").chomp
274
- str = ["\0#{@args[:auth][:username]}\0#{psw}"].pack("m").chomp
274
+ str = ["\0#{@args[:auth][:username]}\0#{psw}"].pack("m").gsub(/\n/, '')
275
275
  send_data "AUTH PLAIN #{str}\r\n"
276
276
  @responder = :receive_auth_response
277
277
  else
@@ -1,3 +1,3 @@
1
1
  module EventMachine
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -1,8 +1,8 @@
1
- if RUBY_PLATFORM =~ /java/
1
+ if defined?(EventMachine.library_type) and EventMachine.library_type == :pure_ruby
2
+ # assume 'em/pure_ruby' was loaded already
3
+ elsif RUBY_PLATFORM =~ /java/
2
4
  require 'java'
3
5
  require 'jeventmachine'
4
- elsif defined?(EventMachine.library_type) and EventMachine.library_type == :pure_ruby
5
- # assume 'em/pure_ruby' was loaded already
6
6
  else
7
7
  begin
8
8
  require 'rubyeventmachine'
@@ -1,4 +1,6 @@
1
- require 'rake/gempackagetask'
1
+ require 'rubygems'
2
+ require 'rubygems/package_task'
3
+
2
4
  begin
3
5
  require 'rake/extensiontask'
4
6
  require 'rake/javaextensiontask'
@@ -12,7 +14,7 @@ rake-compiler gem seems to be missing. Please install it with
12
14
  MSG
13
15
  end
14
16
 
15
- Rake::GemPackageTask.new(GEMSPEC) do |pkg|
17
+ Gem::PackageTask.new(GEMSPEC) do |pkg|
16
18
  end
17
19
 
18
20
  if RUBY_PLATFORM =~ /java/
@@ -84,15 +86,3 @@ def gem_cmd(action, name, *args)
84
86
  end
85
87
 
86
88
  Rake::Task[:clean].enhance [:clobber_package]
87
-
88
- namespace :gem do
89
- desc 'Install gem (and sudo if required)'
90
- task :install => :package do
91
- gem_cmd(:install, "pkg/#{GEMSPEC.name}-#{GEMSPEC.version}.gem")
92
- end
93
-
94
- desc 'Uninstall gem (and sudo if required)'
95
- task :uninstall do
96
- gem_cmd(:uninstall, "#{GEMSPEC.name}", "-v=#{GEMSPEC.version}")
97
- end
98
- end
@@ -19,7 +19,7 @@ class TestSetSockOpt < Test::Unit::TestCase
19
19
  EM.run do
20
20
  EM.connect 'google.com', 80, Module.new {
21
21
  define_method :post_init do
22
- val = set_sock_opt Socket::SOL_SOCKET, Socket::SO_DEBUG, true
22
+ val = set_sock_opt Socket::SOL_SOCKET, Socket::SO_BROADCAST, true
23
23
  test.assert_equal 0, val
24
24
  EM.stop
25
25
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eventmachine
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: x86-mswin32-60
12
12
  authors:
13
13
  - Francis Cianfrocca
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-09-08 00:00:00 Z
19
+ date: 2013-02-28 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: rake-compiler
@@ -26,12 +26,12 @@ dependencies:
26
26
  requirements:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
- hash: 61
29
+ hash: 57
30
30
  segments:
31
31
  - 0
32
32
  - 8
33
- - 1
34
- version: 0.8.1
33
+ - 3
34
+ version: 0.8.3
35
35
  type: :development
36
36
  version_requirements: *id001
37
37
  - !ruby/object:Gem::Dependency
@@ -42,12 +42,13 @@ dependencies:
42
42
  requirements:
43
43
  - - ">="
44
44
  - !ruby/object:Gem::Version
45
- hash: 7
45
+ hash: 31
46
46
  segments:
47
47
  - 0
48
- - 7
48
+ - 8
49
+ - 5
49
50
  - 2
50
- version: 0.7.2
51
+ version: 0.8.5.2
51
52
  type: :development
52
53
  version_requirements: *id002
53
54
  - !ruby/object:Gem::Dependency
@@ -100,7 +101,9 @@ extra_rdoc_files:
100
101
  - docs/old/TODO
101
102
  files:
102
103
  - .gitignore
104
+ - .travis.yml
103
105
  - .yardopts
106
+ - CHANGELOG.md
104
107
  - GNU
105
108
  - Gemfile
106
109
  - LICENSE