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 +4 -4
- data/.travis.yml +1 -0
- data/CHANGES.md +5 -0
- data/Rakefile +1 -1
- data/cool.io.gemspec +2 -7
- data/ext/cool.io/loop.c +1 -8
- data/lib/cool.io/dns_resolver.rb +1 -1
- data/lib/cool.io/meta.rb +1 -0
- data/lib/cool.io/socket.rb +1 -0
- data/lib/cool.io/version.rb +1 -1
- data/spec/stat_watcher_spec.rb +5 -1
- data/spec/tcp_server_spec.rb +2 -2
- data/spec/unix_listener_spec.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37807c46856601fd727656d90c4af1f64eccc5eb
|
4
|
+
data.tar.gz: 1bb8d77e08a56cdfde19fd3de75f42b288d540fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72e28304c36f3d1e2079d2d25c896a0bd9b82f85b52bf7c1e3d430ec0b95a75c9acd460b9dd52dd288c2b9d6ef47e6629840b2026d74fd47491ef17cfc408bfc
|
7
|
+
data.tar.gz: 2e6299a6f8032b8b018e6881408606452c9c582b77e18dc145b0c649257836b1f2d456879e5c0af2a2af45e8fbaf15f7086b46259f7709a0e2cc839dd054b672
|
data/.travis.yml
CHANGED
data/CHANGES.md
CHANGED
data/Rakefile
CHANGED
data/cool.io.gemspec
CHANGED
@@ -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.
|
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
|
data/ext/cool.io/loop.c
CHANGED
@@ -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
|
{
|
data/lib/cool.io/dns_resolver.rb
CHANGED
@@ -168,7 +168,7 @@ module Coolio
|
|
168
168
|
return unless rcode == 0
|
169
169
|
|
170
170
|
# Extract the question and answer counts
|
171
|
-
qdcount,
|
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
|
data/lib/cool.io/meta.rb
CHANGED
data/lib/cool.io/socket.rb
CHANGED
data/lib/cool.io/version.rb
CHANGED
data/spec/stat_watcher_spec.rb
CHANGED
@@ -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
|
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
|
|
data/spec/tcp_server_spec.rb
CHANGED
@@ -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
|
-
|
201
|
+
_size = write(data + "fff")
|
202
202
|
end
|
203
203
|
end
|
204
204
|
|
data/spec/unix_listener_spec.rb
CHANGED
@@ -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
|
-
|
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.
|
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-
|
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.
|
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.
|
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.
|
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
|