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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 97f411fd12c611ab77bdb7d712d1f730860e5277
4
- data.tar.gz: 3b1d25f4770067a7cec2438cee45169764e7ba1e
3
+ metadata.gz: 577b1cd392ebf0a76ad72ec4f86d9863a37f8eb2
4
+ data.tar.gz: 57b769b316f2ffa168f1ca4168fb6cf6c2ae83f5
5
5
  SHA512:
6
- metadata.gz: 6401515f104325cb921ac7fa914c5c0d409a6610ebcbf9644b218c2731693f1a0ead7bc29502a0ffee1a22dd75c07f2e5457ea43c94e31575ceb65020791ef92
7
- data.tar.gz: f951e853addddd91526ecc72a27ab05a81b3e5e19b4a6b5d81f5e060f24754a7e6c8ac80c0f482be5f859a71a5f26732c1f0969f537b86851c2f854eb46c49b4
6
+ metadata.gz: 9f619119002cf575bab823a3425800533ca8003162f1ef46fed5fec946f81eef9c51d5998db9f9dd617f80c415e3a87edf710f84bcf292c1b07b1a4e17cffe6d
7
+ data.tar.gz: 57cb3d6d23b9cc1ba98f9f3203499b5cbfdc2450ba38b2e976a20f706e811dc79a7a4197c7f42a01f83c5ac821aee36bf61be4c495476101d006df82fd36afd5
@@ -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"
@@ -9,4 +9,6 @@ require "emmy_machine/class_methods"
9
9
  module EmmyMachine
10
10
  include ClassMethods
11
11
  extend ClassMethods
12
+
13
+ autoload :Deferred, 'emmy_machine/deferred'
12
14
  end
@@ -1,4 +1,4 @@
1
- module Emmy
1
+ module EmmyMachine
2
2
  class Deferred
3
3
  using EventObject
4
4
  events :success, :error
@@ -1,3 +1,3 @@
1
1
  module EmmyMachine
2
- VERSION = "0.1.11"
2
+ VERSION = "0.1.12"
3
3
  end
@@ -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.11
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
@@ -1,11 +0,0 @@
1
- module EmmyMachine
2
- class Engine
3
- include Emmy::Engine
4
-
5
- # initializer do |app|
6
- # end
7
-
8
- # rake_tasks do
9
- # end
10
- end
11
- end