nio4r 0.5.0 → 1.0.0

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: 3f003ce03885c6b5029c3adac1440958302ad814
4
- data.tar.gz: 12ba4fbebda0e4b470627eeaefe39650651ac5dc
3
+ metadata.gz: f8caeb8b7d6d5b461cb97472c6c7a540808ad8e5
4
+ data.tar.gz: 669ff217c7261624c5ba626723701397bfa785b2
5
5
  SHA512:
6
- metadata.gz: e4f9306f866dce0e04dd5f5243f757f67ba05c289036f46b0fbd5693e58a2bc094de39112a46f7080269ce8c9ff6b7e3efa61c143c14489831739b917b8b203b
7
- data.tar.gz: 290986bcc1442b86a029ce860ee5f48607f7434776866302ceb66ce113020adbc836bd4e684ca71ebf9da276ad8d7781abbcc63dd7683df4494e165832f78d42
6
+ metadata.gz: b23efa474808fcf2ed6432537547e4e10cc23b7e0b7f3f8bbc2eff1d39b4da33fc10e1b2bff2ed19e056c9feb82230a4f5179f71b537ac3e5371a92461a1b1f7
7
+ data.tar.gz: df78f33b747ff374ded33c42fb705db55d11dbea978430baf89fca72912964e672447773ce6830c6a35e98960a823000e8a67b45f0c18c8800798c34a8efeb63
@@ -1,23 +1,17 @@
1
1
  rvm:
2
- - 1.8.7
3
2
  - 1.9.3
4
3
  - 2.0.0
5
- - ree
4
+ - 2.1.0
6
5
  - ruby-head
7
- - jruby-18mode
8
- - jruby-19mode
6
+ - jruby
9
7
  - jruby-head
10
- - rbx-18mode
11
- - rbx-19mode
8
+ - rbx
12
9
 
13
10
  matrix:
14
11
  allow_failures:
15
- - rvm: 1.8.7 # not sure why 1.8 isn't passing, but it's dead
16
- - rvm: ree # also dead
17
12
  - rvm: ruby-head
18
13
  - rvm: jruby-head
19
- - rvm: rbx-18mode # sure would like to get this fixed!
20
- - rvm: rbx-19mode # ditto
14
+ - rvm: rbx
21
15
 
22
16
  notifications:
23
17
  irc: "irc.freenode.org#celluloid"
data/CHANGES.md CHANGED
@@ -1,3 +1,9 @@
1
+ 1.0.0 (2014-01-14)
2
+ ------------------
3
+ * Have Selector#register obtain the actual IO from a Monitor object
4
+ because Monitor#initialize might convert it.
5
+ * Drop 1.8 support
6
+
1
7
  0.5.0 (2013-08-06)
2
8
  ------------------
3
9
  * Fix segv when attempting to register to a closed selector
data/README.md CHANGED
@@ -1,44 +1,48 @@
1
- New IO for Ruby
1
+ ![nio4r](https://raw.github.com/celluloid/nio4r/master/logo.png)
2
2
  ===============
3
- [![Gem
4
- Version](https://badge.fury.io/rb/nio4r.png)](http://rubygems.org/gems/nio4r)
5
- [![Build
6
- Status](https://secure.travis-ci.org/celluloid/nio4r.png?branch=master)](http://travis-ci.org/celluloid/nio4r)
7
- [![Code
8
- Climate](https://codeclimate.com/github/celluloid/nio4r.png)](https://codeclimate.com/github/celluloid/nio4r)
9
- [![Coverage
10
- Status](https://coveralls.io/repos/celluloid/nio4r/badge.png?branch=master)](https://coveralls.io/r/celluloid/nio4r)
11
-
12
- When it comes to managing many IO objects on Ruby, there aren't a whole lot of
13
- options. The most powerful API Ruby itself gives you is Kernel.select, and
14
- select is hurting when it comes to performance and in terms of having a nice
15
- API.
16
-
17
- Once upon a time Java was a similar mess. They got out of it by adding the
18
- Java NIO API. Java NIO provides a high performance selector API for monitoring
19
- large numbers of file descriptors.
20
-
21
- This library aims to incorporate the ideas of Java NIO in Ruby. These are:
22
-
23
- * Expose high level interfaces for doing high performance IO, but keep the
24
- codebase small to encourage multiple implementations on different platforms
25
- * Be as portable as possible, in this case across several Ruby VMs
3
+ [![Gem Version](https://badge.fury.io/rb/nio4r.png)](http://rubygems.org/gems/nio4r)
4
+ [![Build Status](https://secure.travis-ci.org/celluloid/nio4r.png?branch=master)](http://travis-ci.org/celluloid/nio4r)
5
+ [![Code Climate](https://codeclimate.com/github/celluloid/nio4r.png)](https://codeclimate.com/github/celluloid/nio4r)
6
+ [![Coverage Status](https://coveralls.io/repos/celluloid/nio4r/badge.png?branch=master)](https://coveralls.io/r/celluloid/nio4r)
7
+
8
+ nio4r: New IO for Ruby.
9
+
10
+ nio4r provides an abstract, cross-platform stateful I/O selector API for Ruby.
11
+ I/O selectors are the heart of "reactor"-based event loops, and monitor
12
+ multiple I/O objects for various types of readiness, e.g. ready for reading or
13
+ writing.
14
+
15
+ The most similar API provided by Ruby today is Kernel.select, however the
16
+ select API requires you to pass in arrays of all of the I/O objects you're
17
+ interested in every time. nio4r provides a more object-oriented API that lets
18
+ you register I/O objects with a selector then handle them when they're selected
19
+ for various types of events.
20
+
21
+ nio4r is modeled after the Java NIO API, but simplified for ease-of-use.
22
+
23
+ Its goals are:
24
+
25
+ * Expose high-level interfaces for stateful IO selectors
26
+ * Keep the API small to maximize both portability and performance across many
27
+ different OSes and Ruby VMs
26
28
  * Provide inherently thread-safe facilities for working with IO objects
27
29
 
30
+ [Celluloid::IO](https://github.com/celluloid/celluloid-io) uses nio4r to
31
+ monitor multiple IO objects from a single Celluloid actor.
32
+
28
33
  Supported Platforms
29
34
  -------------------
30
35
 
31
36
  nio4r is known to work on the following Ruby implementations:
32
37
 
33
- * MRI/YARV 1.8.7, 1.9.2, 1.9.3
34
- * REE (2011.12)
35
- * JRuby 1.6.x (and likely earlier versions too)
36
- * Rubinius 1.x/2.0
38
+ * MRI/YARV 1.9.3, 2.0.0, 2.1.0
39
+ * JRuby 1.7.x
40
+ * Rubinius 2.x
37
41
  * A pure Ruby implementation based on Kernel.select is also provided
38
42
 
39
43
  Platform notes:
40
44
 
41
- * MRI/YARV and Rubinius implement nio4j with a C extension based on libev,
45
+ * MRI/YARV and Rubinius implement nio4r with a C extension based on libev,
42
46
  which provides a high performance binding to native IO APIs
43
47
  * JRuby uses a Java extension based on the high performance Java NIO subsystem
44
48
  * A pure Ruby implementation is also provided for Ruby implementations which
@@ -177,8 +181,8 @@ however this is not the case today.
177
181
  License
178
182
  -------
179
183
 
180
- Copyright (c) 2011-12 Tony Arcieri. Distributed under the MIT License. See
184
+ Copyright (c) 2014 Tony Arcieri. Distributed under the MIT License. See
181
185
  LICENSE.txt for further details.
182
186
 
183
- Includes libev. Copyright (C)2007-09 Marc Alexander Lehmann. Distributed under
184
- the BSD license. See ext/libev/LICENSE for details.
187
+ Includes libev 4.15. Copyright (C)2007-09 Marc Alexander Lehmann. Distributed
188
+ under the BSD license. See ext/libev/LICENSE for details.
@@ -222,7 +222,7 @@ static VALUE NIO_Selector_register_synchronized(VALUE *args)
222
222
  monitor_args[2] = self;
223
223
 
224
224
  monitor = rb_class_new_instance(3, monitor_args, cNIO_Monitor);
225
- rb_hash_aset(selectables, io, monitor);
225
+ rb_hash_aset(selectables, rb_funcall(monitor, rb_intern("io"), 0), monitor);
226
226
 
227
227
  return monitor;
228
228
  }
@@ -27,7 +27,7 @@ module NIO
27
27
  end
28
28
 
29
29
  monitor = Monitor.new(io, interest, self)
30
- @selectables[io] = monitor
30
+ @selectables[monitor.io] = monitor
31
31
 
32
32
  monitor
33
33
  end
@@ -1,3 +1,3 @@
1
1
  module NIO
2
- VERSION = "0.5.0"
2
+ VERSION = "1.0.0"
3
3
  end
Binary file
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nio4r
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 1.0.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-08-07 00:00:00.000000000 Z
11
+ date: 2014-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: New IO for Ruby
@@ -60,9 +60,9 @@ extensions:
60
60
  - ext/nio4r/extconf.rb
61
61
  extra_rdoc_files: []
62
62
  files:
63
- - .gitignore
64
- - .rspec
65
- - .travis.yml
63
+ - ".gitignore"
64
+ - ".rspec"
65
+ - ".travis.yml"
66
66
  - CHANGES.md
67
67
  - Gemfile
68
68
  - LICENSE.txt
@@ -95,6 +95,7 @@ files:
95
95
  - lib/nio/monitor.rb
96
96
  - lib/nio/selector.rb
97
97
  - lib/nio/version.rb
98
+ - logo.png
98
99
  - nio4r.gemspec
99
100
  - spec/nio/acceptables_spec.rb
100
101
  - spec/nio/monitor_spec.rb
@@ -116,17 +117,17 @@ require_paths:
116
117
  - lib
117
118
  required_ruby_version: !ruby/object:Gem::Requirement
118
119
  requirements:
119
- - - '>='
120
+ - - ">="
120
121
  - !ruby/object:Gem::Version
121
122
  version: '0'
122
123
  required_rubygems_version: !ruby/object:Gem::Requirement
123
124
  requirements:
124
- - - '>='
125
+ - - ">="
125
126
  - !ruby/object:Gem::Version
126
127
  version: '0'
127
128
  requirements: []
128
129
  rubyforge_project:
129
- rubygems_version: 2.0.3
130
+ rubygems_version: 2.2.0
130
131
  signing_key:
131
132
  specification_version: 4
132
133
  summary: NIO provides a high performance selector API for monitoring IO objects