emmy-machine 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/emmy_machine.gemspec +1 -0
- data/lib/emmy_machine.rb +2 -0
- data/lib/emmy_machine/deferred.rb +1 -1
- data/lib/emmy_machine/version.rb +1 -1
- data/spec/emmy_machine_spec.rb +22 -0
- metadata +15 -2
- data/lib/emmy_machine/engine.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 577b1cd392ebf0a76ad72ec4f86d9863a37f8eb2
|
4
|
+
data.tar.gz: 57b769b316f2ffa168f1ca4168fb6cf6c2ae83f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f619119002cf575bab823a3425800533ca8003162f1ef46fed5fec946f81eef9c51d5998db9f9dd617f80c415e3a87edf710f84bcf292c1b07b1a4e17cffe6d
|
7
|
+
data.tar.gz: 57cb3d6d23b9cc1ba98f9f3203499b5cbfdc2450ba38b2e976a20f706e811dc79a7a4197c7f42a01f83c5ac821aee36bf61be4c495476101d006df82fd36afd5
|
data/emmy_machine.gemspec
CHANGED
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_dependency "fibre", "~> 0.9.9"
|
22
22
|
|
23
|
+
spec.add_development_dependency "eventmachine", ">= 1.0.7"
|
23
24
|
spec.add_development_dependency "bundler", "~> 1.6"
|
24
25
|
spec.add_development_dependency "rspec", "~> 3"
|
25
26
|
spec.add_development_dependency "rake"
|
data/lib/emmy_machine.rb
CHANGED
data/lib/emmy_machine/version.rb
CHANGED
data/spec/emmy_machine_spec.rb
CHANGED
@@ -49,4 +49,26 @@ describe EmmyMachine do
|
|
49
49
|
expect(EmmyMachine.running?).to be true
|
50
50
|
end
|
51
51
|
end
|
52
|
+
|
53
|
+
context "Reactor and fiber required" do
|
54
|
+
around do |example|
|
55
|
+
EventMachine.run do
|
56
|
+
Fibre.pool.checkout do
|
57
|
+
example.run
|
58
|
+
EventMachine.stop
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
it "test deferred" do
|
64
|
+
defer = EmmyMachine::Deferred.new
|
65
|
+
EmmyMachine.timer(0) do
|
66
|
+
defer.success!('OK')
|
67
|
+
end
|
68
|
+
res = defer.sync
|
69
|
+
|
70
|
+
expect(res).to eq('OK')
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
52
74
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: emmy-machine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- inre
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.9.9
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: eventmachine
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.0.7
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.0.7
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -82,7 +96,6 @@ files:
|
|
82
96
|
- lib/emmy_machine/class_methods.rb
|
83
97
|
- lib/emmy_machine/connection.rb
|
84
98
|
- lib/emmy_machine/deferred.rb
|
85
|
-
- lib/emmy_machine/engine.rb
|
86
99
|
- lib/emmy_machine/version.rb
|
87
100
|
- lib/emmy_machine/watcher.rb
|
88
101
|
- spec/emmy_machine_spec.rb
|