libuv 0.11.2 → 0.11.3

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: 6b1083a5f79f1e3c76247f6871cb52a299362315
4
- data.tar.gz: 86311c897d2e2da79fd28d8a756236cfbd5a3f12
3
+ metadata.gz: 1fe9ee08be8c2527dd4810ff7683f399b646c0eb
4
+ data.tar.gz: 92d29fcd1707362680066afb0f21b45a2a1e7b84
5
5
  SHA512:
6
- metadata.gz: 78c74f51d1a890826f005654693b0b9c92a97ea0d9aecee10b91f877ec6ca98880400f0fbf2770286198397006d2d4bb52ef97667a299d526cc88de40e448fe1
7
- data.tar.gz: 30440c1b0b077e34b8a7519ab2a34e4a4dcbd04004158716f8fe8151ae9d5150002eb0e28887a128308d2a31f9a0e7dfc5430d4a4348b507dd658a6bf8e8d2b7
6
+ metadata.gz: 6e5865042d0c622d070b3c4d81a30b19f4c219e945ac3529df684d2b1d2066df7f94d2660b79ac6d36f679817f1a096474381c567f3543ba123d7c07b5617746
7
+ data.tar.gz: 9bb4ac8f38daba15b1a442abc4be838cec7d6f30e7959ec38318e8c9b99a8e3a9accde93aeb39ad5f877d18531e87be9110d9c21fc37f570f245e74d8375afbc
@@ -2,9 +2,9 @@ language: ruby
2
2
  rvm:
3
3
  - "1.9.3"
4
4
  - "2.0.0"
5
- - rbx-20mode
6
- - jruby-19mode
7
- - jruby-20mode
5
+ - ruby-head
6
+ - rbx-2.2.1
7
+ - jruby-head
8
8
  branches:
9
9
  only:
10
10
  - master
data/Gemfile CHANGED
@@ -1,2 +1,4 @@
1
1
  source "https://rubygems.org"
2
2
  gemspec
3
+
4
+ gem "rubysl", :platform => :rbx
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rspec/core/rake_task' # testing framework
3
3
  require 'yard' # yard documentation
4
4
  require 'ffi' # loads the extension
5
5
  require 'rake/clean' # for the :clobber rake task
6
- require 'libuv/ext/tasks' # platform specific rake tasks used by compile
6
+ require File.expand_path('../lib/libuv/ext/tasks', __FILE__) # platform specific rake tasks used by compile
7
7
 
8
8
 
9
9
 
@@ -11,12 +11,21 @@ module Libuv
11
11
  TLS_ERROR = "TLS write failed".freeze
12
12
 
13
13
 
14
+ attr_reader :connected
15
+
16
+
14
17
  def initialize(loop, acceptor = nil)
15
18
  @loop = loop
16
19
 
17
20
  tcp_ptr = ::Libuv::Ext.create_handle(:uv_tcp)
18
21
  error = check_result(::Libuv::Ext.tcp_init(loop.handle, tcp_ptr))
19
- error = check_result(::Libuv::Ext.accept(acceptor, tcp_ptr)) if acceptor && error.nil?
22
+
23
+ if acceptor && error.nil?
24
+ error = check_result(::Libuv::Ext.accept(acceptor, tcp_ptr))
25
+ @connected = true
26
+ else
27
+ @connected = false
28
+ end
20
29
 
21
30
  super(tcp_ptr, error)
22
31
  end
@@ -27,6 +36,8 @@ module Libuv
27
36
  # --------------------------------------
28
37
  #
29
38
  def start_tls(args = {})
39
+ return unless @connected && @tls.nil?
40
+
30
41
  @handshake = false
31
42
  @pending_writes = []
32
43
  @tls = ::RubyTls::Connection.new(self)
@@ -79,6 +90,8 @@ module Libuv
79
90
  # overwrite the default close to ensure
80
91
  # pending writes are rejected
81
92
  def close
93
+ @connected = false
94
+
82
95
  if not @pending_writes.nil?
83
96
  @pending_writes.each do |deferred, data|
84
97
  deferred.reject(TLS_ERROR)
@@ -229,6 +242,8 @@ module Libuv
229
242
 
230
243
  def on_connect(req, status)
231
244
  ::Libuv::Ext.free(req)
245
+ @connected = true
246
+
232
247
  begin
233
248
  @callback.call(self)
234
249
  rescue Exception => e
@@ -1,3 +1,3 @@
1
1
  module Libuv
2
- VERSION = '0.11.2'
2
+ VERSION = '0.11.3'
3
3
  end
@@ -17,7 +17,8 @@ Gem::Specification.new do |gem|
17
17
 
18
18
  gem.add_runtime_dependency 'ffi', '>= 1.9'
19
19
  gem.add_runtime_dependency 'thread_safe'
20
- gem.add_runtime_dependency 'ruby-tls'
20
+ gem.add_runtime_dependency 'ruby-tls', '>= 1.0.1'
21
+
21
22
  gem.add_development_dependency 'rspec', '>= 2.14'
22
23
  gem.add_development_dependency 'rake', '>= 10.1'
23
24
  gem.add_development_dependency 'yard'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libuv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.2
4
+ version: 0.11.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bulat Shakirzyanov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-24 00:00:00.000000000 Z
12
+ date: 2013-11-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi
@@ -45,14 +45,14 @@ dependencies:
45
45
  requirements:
46
46
  - - ">="
47
47
  - !ruby/object:Gem::Version
48
- version: '0'
48
+ version: 1.0.1
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: '0'
55
+ version: 1.0.1
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rspec
58
58
  requirement: !ruby/object:Gem::Requirement