cool.io 1.4.3 → 1.4.4

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: befae475513e70b03f1860baa2564540ee9bbdef
4
- data.tar.gz: 1f492b338548bdd661a008d1621213b7d59ffe86
3
+ metadata.gz: 37807c46856601fd727656d90c4af1f64eccc5eb
4
+ data.tar.gz: 1bb8d77e08a56cdfde19fd3de75f42b288d540fb
5
5
  SHA512:
6
- metadata.gz: 3cdb6490f8a0f81e6f07fe00b4aa7a3e0152f71e8727e6779b8445c970e44c68314011c34101a19ea3ffbae4d2ca5d1e7f3eca3962e10ac780428d7e27ab0a42
7
- data.tar.gz: 985f43951a363925d5da9c7472ec59564d07b317697cefc0a3aae6d4110e686005107616fd6ea723a9a480da749ff844d309545c0aca3073e18d926394272dd0
6
+ metadata.gz: 72e28304c36f3d1e2079d2d25c896a0bd9b82f85b52bf7c1e3d430ec0b95a75c9acd460b9dd52dd288c2b9d6ef47e6629840b2026d74fd47491ef17cfc408bfc
7
+ data.tar.gz: 2e6299a6f8032b8b018e6881408606452c9c582b77e18dc145b0c649257836b1f2d456879e5c0af2a2af45e8fbaf15f7086b46259f7709a0e2cc839dd054b672
@@ -13,4 +13,5 @@ rvm:
13
13
 
14
14
  matrix:
15
15
  allow_failures:
16
+ - rvm: ruby-head
16
17
  - rvm: rbx
data/CHANGES.md CHANGED
@@ -1,3 +1,8 @@
1
+ 1.4.4
2
+ -----
3
+
4
+ * Suppress lots of warnings
5
+
1
6
  1.4.3
2
7
  -----
3
8
 
data/Rakefile CHANGED
@@ -49,7 +49,7 @@ namespace :build do
49
49
  require 'rake_compiler_dock'
50
50
  RakeCompilerDock.sh <<-CROSS
51
51
  bundle
52
- rake cross native gem RUBY_CC_VERSION='2.0.0:2.1.6:2.2.2'
52
+ rake cross native gem RUBY_CC_VERSION='2.0.0:2.1.6:2.2.2:2.3.0'
53
53
  CROSS
54
54
  end
55
55
  end
@@ -2,11 +2,6 @@
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
3
  require "cool.io/version"
4
4
 
5
- module Cool
6
- # Allow Coolio module to be referenced as Cool.io
7
- def self.io; Coolio; end
8
- end
9
-
10
5
  Gem::Specification.new do |s|
11
6
  s.name = "cool.io"
12
7
  s.version = Coolio::VERSION
@@ -21,9 +16,9 @@ Gem::Specification.new do |s|
21
16
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
22
17
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
23
18
  s.require_paths = ["lib"]
24
-
19
+
25
20
  s.add_development_dependency "rake-compiler", "~> 0.9.5"
26
- s.add_development_dependency "rake-compiler-dock", "~> 0.5.0"
21
+ s.add_development_dependency "rake-compiler-dock", "~> 0.5.1"
27
22
  s.add_development_dependency "rspec", ">= 2.13.0"
28
23
  s.add_development_dependency "rdoc", ">= 3.6.0"
29
24
  end
@@ -18,7 +18,6 @@ static VALUE Coolio_Loop_allocate(VALUE klass);
18
18
  static void Coolio_Loop_mark(struct Coolio_Loop *loop);
19
19
  static void Coolio_Loop_free(struct Coolio_Loop *loop);
20
20
 
21
- static VALUE Coolio_Loop_initialize(VALUE self);
22
21
  static VALUE Coolio_Loop_ev_loop_new(VALUE self, VALUE flags);
23
22
  static VALUE Coolio_Loop_run_once(int argc, VALUE *argv, VALUE self);
24
23
  static VALUE Coolio_Loop_run_nonblock(VALUE self);
@@ -43,8 +42,7 @@ void Init_coolio_loop()
43
42
  mCoolio = rb_define_module("Coolio");
44
43
  cCoolio_Loop = rb_define_class_under(mCoolio, "Loop", rb_cObject);
45
44
  rb_define_alloc_func(cCoolio_Loop, Coolio_Loop_allocate);
46
-
47
- rb_define_method(cCoolio_Loop, "initialize", Coolio_Loop_initialize, 0);
45
+
48
46
  rb_define_private_method(cCoolio_Loop, "ev_loop_new", Coolio_Loop_ev_loop_new, 1);
49
47
  rb_define_method(cCoolio_Loop, "run_once", Coolio_Loop_run_once, -1);
50
48
  rb_define_method(cCoolio_Loop, "run_nonblock", Coolio_Loop_run_nonblock, 0);
@@ -79,11 +77,6 @@ static void Coolio_Loop_free(struct Coolio_Loop *loop)
79
77
  xfree(loop);
80
78
  }
81
79
 
82
- static VALUE Coolio_Loop_initialize(VALUE self)
83
- {
84
- return Coolio_Loop_ev_loop_new(self, INT2NUM(0));
85
- }
86
-
87
80
  /* Wrapper for populating a Coolio_Loop struct with a new event loop */
88
81
  static VALUE Coolio_Loop_ev_loop_new(VALUE self, VALUE flags)
89
82
  {
@@ -168,7 +168,7 @@ module Coolio
168
168
  return unless rcode == 0
169
169
 
170
170
  # Extract the question and answer counts
171
- qdcount, ancount = message[4..7].unpack('nn').map { |n| n.to_i }
171
+ qdcount, _ancount = message[4..7].unpack('nn').map { |n| n.to_i }
172
172
 
173
173
  # We only asked one question
174
174
  return unless qdcount == 1
@@ -32,6 +32,7 @@ module Coolio
32
32
  def event_callback(*methods)
33
33
  methods.each do |method|
34
34
  module_eval <<-EOD
35
+ remove_method "#{method}"
35
36
  def #{method}(*args, &block)
36
37
  if block
37
38
  @#{method}_callback = block
@@ -27,6 +27,7 @@ module Coolio
27
27
 
28
28
  watcher_delegate :@_connector
29
29
 
30
+ remove_method :attach
30
31
  def attach(evloop)
31
32
  raise RuntimeError, "connection failed" if @_failed
32
33
 
@@ -1,5 +1,5 @@
1
1
  module Coolio
2
- VERSION = "1.4.3"
2
+ VERSION = "1.4.4"
3
3
 
4
4
  def self.version
5
5
  VERSION
@@ -70,7 +70,11 @@ describe Cool.io::StatWatcher do
70
70
  end
71
71
 
72
72
  it "should raise when the handler does not take 2 parameters" do
73
- class MyStatWatcher < Cool.io::StatWatcher; def on_change; end; end
73
+ class MyStatWatcher < Cool.io::StatWatcher
74
+ remove_method :on_change
75
+ def on_change
76
+ end
77
+ end
74
78
  expect { watcher.accessed }.to raise_error(ArgumentError)
75
79
  end
76
80
 
@@ -72,10 +72,10 @@ ensure
72
72
  end
73
73
 
74
74
  def test_run_once_timeout(timeout = TIMEOUT)
75
+ @data = ""
75
76
  reactor = Coolio::Loop.new
76
77
  server = Cool.io::TCPServer.new(HOST, PORT, MyConnection, method(:on_message))
77
78
  reactor.attach(server)
78
- running = true
79
79
  thread = Thread.new { reactor.run_once(timeout) }
80
80
  sleep timeout
81
81
  server.detach
@@ -198,7 +198,7 @@ describe Coolio::TCPServer do
198
198
  end
199
199
  def on_read(data)
200
200
  @cb.call data
201
- size = write(data + "fff")
201
+ _size = write(data + "fff")
202
202
  end
203
203
  end
204
204
 
@@ -10,7 +10,7 @@ describe Cool.io::UNIXListener, :env => :exclude_win do
10
10
  end
11
11
 
12
12
  it "creates a new UNIXListener" do
13
- listener = Cool.io::UNIXListener.new(@tmp.path)
13
+ _listener = Cool.io::UNIXListener.new(@tmp.path)
14
14
  expect(File.socket?(@tmp.path)).to eq(true)
15
15
  end
16
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cool.io
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Arcieri
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-01-06 00:00:00.000000000 Z
12
+ date: 2016-05-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake-compiler
@@ -31,14 +31,14 @@ dependencies:
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 0.5.0
34
+ version: 0.5.1
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 0.5.0
41
+ version: 0.5.1
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rspec
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -172,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
172
  version: '0'
173
173
  requirements: []
174
174
  rubyforge_project:
175
- rubygems_version: 2.4.5.1
175
+ rubygems_version: 2.5.1
176
176
  signing_key:
177
177
  specification_version: 4
178
178
  summary: A cool framework for doing high performance I/O in Ruby