nio4r 0.4.6-java → 0.5.0-java

Sign up to get free protection for your applications and to get access to all the features.
data/lib/nio/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module NIO
2
- VERSION = "0.4.6"
2
+ VERSION = "0.5.0"
3
3
  end
data/nio4r.gemspec CHANGED
@@ -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
 
data/spec/spec_helper.rb CHANGED
@@ -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,7 +1,7 @@
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
  prerelease:
6
6
  platform: java
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-27 00:00:00.000000000 Z
12
+ date: 2013-08-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake-compiler
@@ -114,7 +114,7 @@ files:
114
114
  - tasks/extension.rake
115
115
  - tasks/rspec.rake
116
116
  - lib/nio4r_ext.jar
117
- homepage: https://github.com/tarcieri/nio4r
117
+ homepage: https://github.com/celluloid/nio4r
118
118
  licenses: []
119
119
  post_install_message:
120
120
  rdoc_options: []