async 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 +4 -4
- data/README.md +1 -1
- data/lib/async/task.rb +1 -1
- data/lib/async/version.rb +1 -1
- data/spec/async/reactor_spec.rb +8 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dadcd13ad00e72d59192671624f51ed593909778
|
4
|
+
data.tar.gz: 21422d169eec222e93b245076d734b37dd1688b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7433b30a66ed6ecee4d8e031a8e798f6dbf62bf7d0aac9c2a562305671be913a1b8baa445124fc42bdf6462d78d6b835e36d457b5d97a4d5cd6b85f7f495c621
|
7
|
+
data.tar.gz: 28d67d1bbb0737b49e28253053ad4ee2aea54e3de7395f00308b98d3b04229296c4e72266e2821fb1c4ae2b3f8b5d0bf76a153326469e4634a8fb3adff30a88c
|
data/README.md
CHANGED
@@ -14,7 +14,7 @@ Async is a composable asynchronous I/O framework for Ruby based on [nio4r] and [
|
|
14
14
|
|
15
15
|
Several years ago, I was hosting websites on a server in my garage. Back then, my ADSL modem was very basic, and I wanted to have a DNS server which would resolve to an internal IP address when the domain itself resolved to my public IP. Thus was born [RubyDNS]. This project [was originally built on](https://github.com/ioquatix/rubydns/tree/v0.8.5) top of [EventMachine], but a lack of support for [IPv6 at the time](https://github.com/ioquatix/rubydns/issues/45) and [other problems](https://github.com/ioquatix/rubydns/issues/14), meant that I started looking for other options. Around that time [Celluloid] was picking up steam. I had not encountered actors before and I wanted to learn more about it. So, [I reimplemented RubyDNS on top of Celluloid](https://github.com/ioquatix/rubydns/tree/v0.9.0) and this eventually became the first stable release.
|
16
16
|
|
17
|
-
Moving forward, I refactored the internals of RubyDNS into [Celluloid::DNS]. This rewrite helped solidify the design of RubyDNS and to a certain extent it works. However, [unfixed bugs and design problems](https://github.com/celluloid/celluloid/pull/710) in Celluloid meant that RubyDNS 2.0 was delayed by almost 2 years. I wasn't happy releasing
|
17
|
+
Moving forward, I refactored the internals of RubyDNS into [Celluloid::DNS]. This rewrite helped solidify the design of RubyDNS and to a certain extent it works. However, [unfixed bugs and design problems](https://github.com/celluloid/celluloid/pull/710) in Celluloid meant that RubyDNS 2.0 was delayed by almost 2 years. I wasn't happy releasing it with known bugs and problems. After sitting on the problem for a while, and thinking about possible solutions, I decided to build a small event reactor using [nio4r] and [timers], the core parts of [Celluloid::IO] which made it work so well. The result is this project.
|
18
18
|
|
19
19
|
In addition, there is a [similarly designed C++ library of the same name](https://github.com/kurocha/async). These two libraries share similar design principles, but are different in some areas due to the underlying semantic differences of the languages.
|
20
20
|
|
data/lib/async/task.rb
CHANGED
data/lib/async/version.rb
CHANGED
data/spec/async/reactor_spec.rb
CHANGED
@@ -76,6 +76,14 @@ RSpec.describe Async::Reactor do
|
|
76
76
|
expect(arg).to be == :arg
|
77
77
|
end.wait
|
78
78
|
end
|
79
|
+
|
80
|
+
it "passes in the correct number of arguments" do
|
81
|
+
reactor.async(:arg1, :arg2, :arg3) do |task, arg1, arg2, arg3|
|
82
|
+
expect(arg1).to be == :arg1
|
83
|
+
expect(arg2).to be == :arg2
|
84
|
+
expect(arg3).to be == :arg3
|
85
|
+
end.wait
|
86
|
+
end
|
79
87
|
end
|
80
88
|
|
81
89
|
describe '#to_s' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: async
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nio4r
|
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
151
|
version: '0'
|
152
152
|
requirements: []
|
153
153
|
rubyforge_project:
|
154
|
-
rubygems_version: 2.6.
|
154
|
+
rubygems_version: 2.6.12
|
155
155
|
signing_key:
|
156
156
|
specification_version: 4
|
157
157
|
summary: Async is an asynchronous I/O framework based on nio4r.
|