nio4r 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 96d59635d5568ac28d3463cd275c144d164b2237
4
- data.tar.gz: 05fec0902ed45c022b84a4ab5b7346b8d7f3e433
3
+ metadata.gz: 339fc3cc040e41d266a9f83ab155d903294fcdc5
4
+ data.tar.gz: 8872185b3bfadc884b36b65ea1a17a2c082d7090
5
5
  SHA512:
6
- metadata.gz: 1b90ca4d7cbcefe3bf6edc25670788f7c28bfd9839cb521f2a7517f0d6afa735e4abdcb9b417d1fdfb6cc530a01e6a8c63517652b4ba947a367669f13b5e3524
7
- data.tar.gz: a0d543b2c2afc1c404a82c1c7cffc5ce8a9ae37d3c0df0d002d7d975ae5fbe26e29a47e16b59694c77bab76be2fe1928a3999fafb814fe2c83667fd207f5aa42
6
+ metadata.gz: 73083b74bdcb581449b5b0534209fdd9b1c08059ee946eaf9f8155d72605030c127046a7819d4ed325e0bf3e525c4aec81a41c00b55077f9e5b4629dd147d931
7
+ data.tar.gz: 44eb8368129b34cfb8780b98334ff8a67029d1751fdfc756ee761cb19c975f55a95c5166a251dba88ea7f587a3441f19650dcb13d936d88c60f847bda9c20d1d
data/.rubocop.yml ADDED
@@ -0,0 +1,61 @@
1
+ #
2
+ # Deliberate style choices
3
+ #
4
+
5
+ LineLength:
6
+ Max: 100
7
+
8
+ Style/StringLiterals:
9
+ EnforcedStyle: double_quotes
10
+
11
+ Metrics/MethodLength:
12
+ CountComments: false
13
+ Max: 40
14
+
15
+ Metrics/AbcSize:
16
+ Max: 40
17
+
18
+ Metrics/PerceivedComplexity:
19
+ Max: 15
20
+
21
+ Metrics/CyclomaticComplexity:
22
+ Max: 10
23
+
24
+ Style/GlobalVars:
25
+ Enabled: false
26
+
27
+ Style/TrivialAccessors:
28
+ Enabled: false
29
+
30
+ #
31
+ # Auto-generated overrides
32
+ #
33
+
34
+ # Offense count: 2
35
+ Lint/HandleExceptions:
36
+ Enabled: false
37
+
38
+ # Offense count: 3
39
+ Lint/Loop:
40
+ Enabled: false
41
+
42
+ # Offense count: 1
43
+ Lint/NonLocalExitFromIterator:
44
+ Enabled: false
45
+
46
+ # Offense count: 7
47
+ Lint/UselessAssignment:
48
+ Enabled: false
49
+
50
+ # Offense count: 1
51
+ # Configuration parameters: SupportedStyles, IndentOneStep.
52
+ Style/CaseIndentation:
53
+ IndentWhenRelativeTo: end
54
+
55
+ # Offense count: 1
56
+ Style/Documentation:
57
+ Enabled: false
58
+
59
+ # Offense count: 2
60
+ Style/RescueModifier:
61
+ Enabled: false
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,35 @@
1
+ # This configuration was generated by `rubocop --auto-gen-config`
2
+ # on 2015-04-24 03:08:21 -0700 using RuboCop version 0.30.1.
3
+ # The point is for the user to remove these configuration records
4
+ # one by one as the offenses are removed from the code base.
5
+ # Note that changes in the inspected code, or installation of new
6
+ # versions of RuboCop, may require this file to be generated again.
7
+
8
+ # Offense count: 2
9
+ Lint/HandleExceptions:
10
+ Enabled: false
11
+
12
+ # Offense count: 3
13
+ Lint/Loop:
14
+ Enabled: false
15
+
16
+ # Offense count: 1
17
+ Lint/NonLocalExitFromIterator:
18
+ Enabled: false
19
+
20
+ # Offense count: 7
21
+ Lint/UselessAssignment:
22
+ Enabled: false
23
+
24
+ # Offense count: 1
25
+ # Configuration parameters: SupportedStyles, IndentOneStep.
26
+ Style/CaseIndentation:
27
+ IndentWhenRelativeTo: end
28
+
29
+ # Offense count: 1
30
+ Style/Documentation:
31
+ Enabled: false
32
+
33
+ # Offense count: 2
34
+ Style/RescueModifier:
35
+ Enabled: false
data/.travis.yml CHANGED
@@ -1,17 +1,27 @@
1
+ language: ruby
2
+ sudo: false
3
+
1
4
  rvm:
2
- - 1.9.3
3
5
  - 2.0.0
4
6
  - 2.1.1
7
+ - 2.2.2
5
8
  - ruby-head
6
9
  - jruby
7
10
  - jruby-head
8
11
  - rbx-2
9
12
 
13
+ env:
14
+ - NIO4R_PURE=false
15
+ - NIO4R_PURE=true
16
+
10
17
  matrix:
18
+ fast_finish: true
11
19
  allow_failures:
12
20
  - rvm: ruby-head
13
21
  - rvm: jruby-head
14
22
  - rvm: rbx-2
23
+ - rvm: jruby
24
+ env: NIO4R_PURE=true
15
25
 
16
26
  notifications:
17
27
  irc: "irc.freenode.org#celluloid"
data/CHANGES.md CHANGED
@@ -1,3 +1,16 @@
1
+ 1.2.0 (2015-12-22)
2
+ ------------------
3
+ * Add NIO::Monitor#interests= API for changing interests. Contributed by
4
+ @UpeksheJay as a Google Summer of Code project.
5
+ * Update to libev 4.22
6
+
7
+ 1.1.1 (2015-07-17)
8
+ ------------------
9
+ * Update to libev 4.20
10
+ * Fall back to io.h if unistd.h is not found
11
+ * RSpec updates
12
+ * RuboCop
13
+
1
14
  1.1.0 (2015-01-10)
2
15
  ------------------
3
16
  * Update to libev 4.19
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem 'jruby-openssl' if defined? JRUBY_VERSION
4
- gem 'coveralls', :require => false
3
+ gem "jruby-openssl" if defined? JRUBY_VERSION
4
+ gem "coveralls", require: false
5
5
 
6
6
  # Specify your gem's dependencies in nio4r.gemspec
7
7
  gemspec
data/Rakefile CHANGED
@@ -4,6 +4,6 @@ require "rake/clean"
4
4
 
5
5
  Dir[File.expand_path("../tasks/**/*.rake", __FILE__)].each { |task| load task }
6
6
 
7
- task :default => %w(compile spec)
7
+ task default: %w(compile spec rubocop)
8
8
 
9
9
  CLEAN.include "**/*.o", "**/*.so", "**/*.bundle", "**/*.jar", "pkg", "tmp"
@@ -1,9 +1,10 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- $:.push File.expand_path('../../lib', __FILE__)
4
- require 'nio'
5
- require 'socket'
3
+ $LOAD_PATH.push File.expand_path("../../lib", __FILE__)
4
+ require "nio"
5
+ require "socket"
6
6
 
7
+ # Echo server example written with nio4r
7
8
  class EchoServer
8
9
  def initialize(host, port)
9
10
  @selector = NIO::Selector.new
@@ -16,7 +17,7 @@ class EchoServer
16
17
  end
17
18
 
18
19
  def run
19
- while true
20
+ loop do
20
21
  @selector.select { |monitor| monitor.value.call(monitor) }
21
22
  end
22
23
  end
@@ -42,6 +43,4 @@ class EchoServer
42
43
  end
43
44
  end
44
45
 
45
- if $0 == __FILE__
46
- EchoServer.new("localhost", 1234).run
47
- end
46
+ EchoServer.new("localhost", 1234).run if $PROGRAM_NAME == __FILE__
data/ext/libev/Changes CHANGED
@@ -12,9 +12,24 @@ TODO: document file descriptor usage per loop
12
12
  TODO: store loop pid_t and compare isndie signal handler,store 1 for same, 2 for differign pid, clean up in loop_fork
13
13
  TODO: embed watchers need updating when fd changes
14
14
  TODO: document portability requirements for atomic pointer access
15
- TODO: possible cb aliasing?
16
15
  TODO: document requirements for function pointers and calling conventions.
17
16
 
17
+ 4.22 Sun Dec 20 22:11:50 CET 2015
18
+ - when epoll detects unremovable fds in the fd set, rebuild
19
+ only the epoll descriptor, not the signal pipe, to avoid
20
+ SIGPIPE in ev_async_send. This doesn't solve it on fork,
21
+ so document what needs to be done in ev_loop_fork
22
+ (analyzed by Benjamin Mahler).
23
+ - remove superfluous sys/timeb.h include on win32
24
+ (analyzed by Jason Madden).
25
+ - updated libecb.
26
+
27
+ 4.20 Sat Jun 20 13:01:43 CEST 2015
28
+ - prefer noexcept over throw () with C++ 11.
29
+ - update ecb.h due to incompatibilities with c11.
30
+ - fix a potential aliasing issue when reading and writing
31
+ watcher callbacks.
32
+
18
33
  4.19 Thu Sep 25 08:18:25 CEST 2014
19
34
  - ev.h wasn't valid C++ anymore, which tripped compilers other than
20
35
  clang, msvc or gcc (analyzed by Raphael 'kena' Poss). Unfortunately,