nio4r 0.4.6 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module NIO
2
- VERSION = "0.4.6"
2
+ VERSION = "0.5.0"
3
3
  end
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
6
6
  gem.email = ["tony.arcieri@gmail.com"]
7
7
  gem.description = "New IO for Ruby"
8
8
  gem.summary = "NIO provides a high performance selector API for monitoring IO objects"
9
- gem.homepage = "https://github.com/tarcieri/nio4r"
9
+ gem.homepage = "https://github.com/celluloid/nio4r"
10
10
 
11
11
  gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
12
12
  gem.files = `git ls-files`.split("\n")
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  describe TCPSocket do
4
4
  port_offset = 0
5
5
  let(:tcp_port) { 12345 + (port_offset += 1) }
6
-
6
+
7
7
  let :readable_subject do
8
8
  server = TCPServer.new("localhost", tcp_port)
9
9
  sock = TCPSocket.open("localhost", tcp_port)
@@ -67,7 +67,7 @@ describe TCPSocket do
67
67
  it_behaves_like "an NIO selectable"
68
68
  it_behaves_like "an NIO selectable stream"
69
69
  it_behaves_like "an NIO bidirectional stream"
70
-
70
+
71
71
  context :connect do
72
72
  it "selects writable when connected" do
73
73
  selector = NIO::Selector.new
@@ -85,4 +85,4 @@ describe TCPSocket do
85
85
  result.unpack('i').first.should be_zero
86
86
  end
87
87
  end
88
- end
88
+ end
@@ -19,6 +19,11 @@ describe NIO::Selector do
19
19
  it "raises TypeError if asked to register non-IO objects" do
20
20
  expect { subject.register(42, :r) }.to raise_exception TypeError
21
21
  end
22
+
23
+ it "raises when asked to register after closing" do
24
+ subject.close
25
+ expect { subject.register(reader, :r) }.to raise_exception IOError
26
+ end
22
27
  end
23
28
 
24
29
  it "knows which IO objects are registered" do
@@ -34,12 +39,12 @@ describe NIO::Selector do
34
39
  subject.should_not be_registered(reader)
35
40
  monitor.should be_closed
36
41
  end
37
-
42
+
38
43
  it "reports if it is empty" do
39
44
  subject.should be_empty
40
-
45
+
41
46
  monitor = subject.register(reader, :r)
42
-
47
+
43
48
  subject.should_not be_empty
44
49
  end
45
50
 
@@ -1,4 +1,7 @@
1
+ require 'coveralls'
2
+ Coveralls.wear!
3
+
1
4
  require 'rubygems'
2
5
  require 'bundler/setup'
3
6
  require 'nio'
4
- require 'support/selectable_examples'
7
+ require 'support/selectable_examples'
@@ -52,5 +52,4 @@ shared_context "an NIO bidirectional stream" do
52
52
  m.readiness.should == :rw
53
53
  end
54
54
  end
55
-
56
55
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nio4r
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Arcieri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-27 00:00:00.000000000 Z
11
+ date: 2013-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler
@@ -107,7 +107,7 @@ files:
107
107
  - spec/support/selectable_examples.rb
108
108
  - tasks/extension.rake
109
109
  - tasks/rspec.rake
110
- homepage: https://github.com/tarcieri/nio4r
110
+ homepage: https://github.com/celluloid/nio4r
111
111
  licenses: []
112
112
  metadata: {}
113
113
  post_install_message: