openssl-nonblock 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,11 +10,19 @@
10
10
  * See LICENSE for details
11
11
  */
12
12
 
13
+ /*
14
+ Ruby 1.9.2 theoretically includes all this natively, so kill the entire C
15
+ extension if we're running 1.9.2+
16
+ */
17
+ #if RUBY_VERSION_CODE < 192
18
+
13
19
  #include "ruby.h"
14
20
  #include "rubyio.h"
15
21
 
16
22
  #include <openssl/ssl.h>
17
23
 
24
+ extern VALUE rb_cIO;
25
+
18
26
  static VALUE mOSSL = Qnil;
19
27
  static VALUE eOSSLError = Qnil;
20
28
 
@@ -22,6 +30,9 @@ static VALUE mSSL = Qnil;
22
30
  static VALUE cSSLSocket = Qnil;
23
31
  static VALUE eSSLError = Qnil;
24
32
 
33
+ static VALUE mWaitReadable = Qnil;
34
+ static VALUE mWaitWritable = Qnil;
35
+
25
36
  static VALUE eReadAgain = Qnil;
26
37
  static VALUE eWriteAgain = Qnil;
27
38
 
@@ -81,8 +92,14 @@ void Init_openssl_nonblock()
81
92
  cSSLSocket = rb_define_class_under(mSSL, "SSLSocket", rb_cObject);
82
93
  eSSLError = rb_define_class_under(mSSL, "SSLError", eOSSLError);
83
94
 
95
+ mWaitReadable = rb_define_module_under(rb_cIO, "WaitReadable");
96
+ mWaitWritable = rb_define_module_under(rb_cIO, "WaitWritable");
97
+
84
98
  eReadAgain = rb_define_class_under(mSSL, "ReadAgain", rb_eStandardError);
99
+ rb_include_module(eReadAgain, mWaitReadable);
100
+
85
101
  eWriteAgain = rb_define_class_under(mSSL, "WriteAgain", rb_eStandardError);
102
+ rb_include_module(eWriteAgain, mWaitWritable);
86
103
 
87
104
  rb_define_method(cSSLSocket, "connect_nonblock", ossl_nonblock_connect_nonblock, 0);
88
105
  rb_define_method(cSSLSocket, "accept_nonblock", ossl_nonblock_accept_nonblock, 0);
@@ -327,4 +344,6 @@ ossl_nonblock_write_nonblock(VALUE self, VALUE str)
327
344
 
328
345
  end:
329
346
  return INT2NUM(nwrite);
330
- }
347
+ }
348
+
349
+ #endif /* RUBY_VERSION_CODE < 192 */
@@ -2,10 +2,10 @@ require 'rubygems'
2
2
 
3
3
  GEMSPEC = Gem::Specification.new do |s|
4
4
  s.name = "openssl-nonblock"
5
- s.version = "0.2.0"
5
+ s.version = "0.2.1"
6
6
  s.authors = "Tony Arcieri"
7
7
  s.email = "tony@medioh.com"
8
- s.date = "2009-03-09"
8
+ s.date = "2009-12-15"
9
9
  s.summary = "Non-blocking support for Ruby OpenSSL"
10
10
  s.platform = Gem::Platform::RUBY
11
11
  s.required_ruby_version = '>= 1.8.6'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openssl-nonblock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Arcieri
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-03-09 00:00:00 -06:00
12
+ date: 2009-12-15 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -27,8 +27,10 @@ files:
27
27
  - ext/openssl_nonblock.c
28
28
  - Rakefile
29
29
  - openssl-nonblock.gemspec
30
- has_rdoc: false
30
+ has_rdoc: true
31
31
  homepage: http://rev.rubyforge.org
32
+ licenses: []
33
+
32
34
  post_install_message:
33
35
  rdoc_options: []
34
36
 
@@ -49,9 +51,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
49
51
  requirements: []
50
52
 
51
53
  rubyforge_project: rev
52
- rubygems_version: 1.3.1
54
+ rubygems_version: 1.3.5
53
55
  signing_key:
54
- specification_version: 2
56
+ specification_version: 3
55
57
  summary: Non-blocking support for Ruby OpenSSL
56
58
  test_files: []
57
59