rjr 0.19.2 → 0.19.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rjr/dispatcher.rb +1 -1
- data/lib/rjr/node.rb +1 -1
- data/lib/rjr/nodes/amqp.rb +1 -1
- data/lib/rjr/nodes/local.rb +1 -1
- data/lib/rjr/nodes/tcp.rb +1 -1
- data/lib/rjr/nodes/unix.rb +1 -1
- data/lib/rjr/nodes/web.rb +1 -1
- data/lib/rjr/nodes/ws.rb +1 -1
- data/lib/rjr/version.rb +1 -1
- data/specs/nodes/local_spec.rb +5 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef759c6e069a5831e1b57e26bdd3e8aeb560f82d
|
4
|
+
data.tar.gz: 7986d34c9707c318afd490db353c47ea65b59a5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3da6b7f0a0549219905d532d871d649f8917e6d958eff478fc632f7de4bdb495ac40fa50753d60539576dd11ad7c4c319d8314dfac343b6fae9747ac92e9b408
|
7
|
+
data.tar.gz: 27de0be3ee6605c79c8258ac9479cb656021d4c3263c07028cf9f79c595aa6a466fd423697b41266102886e0d896dd5e235c67ac413e201833f71e99e33b7df8
|
data/lib/rjr/dispatcher.rb
CHANGED
@@ -180,7 +180,7 @@ class Dispatcher
|
|
180
180
|
# TODO needs to be constantized first (see TODO in lib/rjr/message)
|
181
181
|
# raise result.error_class.new(result.error_msg) unless result.success
|
182
182
|
#else
|
183
|
-
|
183
|
+
fail result.error_msg
|
184
184
|
#end
|
185
185
|
end
|
186
186
|
return result.result
|
data/lib/rjr/node.rb
CHANGED
@@ -280,7 +280,7 @@ class Node
|
|
280
280
|
@pending.delete_if { |_, start_time| (now - start_time) > @timeout }
|
281
281
|
end
|
282
282
|
pending_ids = @pending.keys
|
283
|
-
|
283
|
+
fail 'Timed out' unless pending_ids.include? message_id
|
284
284
|
|
285
285
|
# Prune invalid responses
|
286
286
|
@responses.keep_if { |response| @pending.has_key? response.first }
|
data/lib/rjr/nodes/amqp.rb
CHANGED
data/lib/rjr/nodes/local.rb
CHANGED
data/lib/rjr/nodes/tcp.rb
CHANGED
data/lib/rjr/nodes/unix.rb
CHANGED
data/lib/rjr/nodes/web.rb
CHANGED
data/lib/rjr/nodes/ws.rb
CHANGED
data/lib/rjr/version.rb
CHANGED
data/specs/nodes/local_spec.rb
CHANGED
@@ -52,6 +52,9 @@ module RJR::Nodes
|
|
52
52
|
end
|
53
53
|
|
54
54
|
it "should invoke callbacks" do
|
55
|
+
# same workaround as in #notify test above
|
56
|
+
m,c = Mutex.new, ConditionVariable.new
|
57
|
+
|
55
58
|
node = Local.new
|
56
59
|
cbp = nil
|
57
60
|
foobar_invoked = false
|
@@ -63,9 +66,11 @@ module RJR::Nodes
|
|
63
66
|
node.dispatcher.handle('callback') { |param|
|
64
67
|
callback_invoked = true
|
65
68
|
cbp = param
|
69
|
+
m.synchronize { c.signal }
|
66
70
|
}
|
67
71
|
|
68
72
|
node.invoke 'foobar', 'myparam'
|
73
|
+
m.synchronize { c.wait m, 0.1 } unless callback_invoked
|
69
74
|
foobar_invoked.should be_truthy
|
70
75
|
callback_invoked.should be_truthy
|
71
76
|
cbp.should == 'cp'
|
metadata
CHANGED
@@ -1,14 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rjr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.19.
|
4
|
+
version: 0.19.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mo Morsi
|
8
|
+
- Ladislav Smola
|
9
|
+
- André Dieb Martins
|
10
|
+
- Eric Bakan
|
11
|
+
- Jonas Collberg
|
8
12
|
autorequire:
|
9
13
|
bindir: bin
|
10
14
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
15
|
+
date: 2015-11-10 00:00:00.000000000 Z
|
12
16
|
dependencies:
|
13
17
|
- !ruby/object:Gem::Dependency
|
14
18
|
name: rspec
|