combi 0.0.13 → 0.0.14
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/lib/combi/buses/web_socket.rb +1 -1
- data/lib/combi/queue_service.rb +1 -1
- data/lib/combi/version.rb +1 -1
- data/spec/lib/combi/buses/web_socket_spec.rb +25 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3a283e392128d694635fce6d3c7dd96de05d5ac
|
4
|
+
data.tar.gz: 764eb5e7ad402be1b8940982e77dc16cf1fa29cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94f13d90ebe75c453e209ae69109e4a0173c6df4c4a1258fc26b79b07ff1e002db408584dc98a0da2e526df8581dda276f4bd58db2825a0df7d850458f47e351
|
7
|
+
data.tar.gz: ff64c2764b536b5a7bc501a3228fc0eb431eb4215e2492f7572abe91bb07744915b36606297652e4740ebd86d60f5d2f3620103044a4eb9b021f870d6762dbfc
|
data/lib/combi/queue_service.rb
CHANGED
@@ -87,7 +87,7 @@ module Combi
|
|
87
87
|
def call(kind, message, options = {})
|
88
88
|
log "sending request #{kind} #{message.inspect[0..500]} with options #{options.inspect}"
|
89
89
|
raise "RPC is not enabled or reply_to is not included" if (@rpc_queue.nil? || @rpc_queue.name.nil?) && options[:reply_to].nil?
|
90
|
-
options[:timeout]
|
90
|
+
options[:expiration] = (options[:timeout] || RPC_DEFAULT_TIMEOUT) * 1000
|
91
91
|
options[:routing_key] ||= 'rcalls_queue'
|
92
92
|
options[:reply_to] ||= @rpc_queue.name
|
93
93
|
request = {
|
data/lib/combi/version.rb
CHANGED
@@ -80,4 +80,29 @@ describe 'Combi::WebSocket' do
|
|
80
80
|
end
|
81
81
|
end
|
82
82
|
end
|
83
|
+
|
84
|
+
context "it don't send messages when is not connected" do
|
85
|
+
Then do
|
86
|
+
em do
|
87
|
+
provider.add_service null_service
|
88
|
+
prepare
|
89
|
+
EM::add_timer(0.1) do
|
90
|
+
consumer.stop!
|
91
|
+
end
|
92
|
+
EM::add_timer(0.2) do
|
93
|
+
EM.synchrony do
|
94
|
+
provider.stop!
|
95
|
+
service_result = EM::Synchrony.sync consumer.request(:null, :do_it, {}, { timeout: 0.3 })
|
96
|
+
service_result.should be_a Hash
|
97
|
+
service_result.should have_key 'error'
|
98
|
+
service_result['error'].should eq 'Timeout::Error'
|
99
|
+
done(0.3) #timeout response must came before this timeout
|
100
|
+
end
|
101
|
+
provider.stop!
|
102
|
+
consumer.stop!
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
83
108
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: combi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- German Del Zotto
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-06-
|
12
|
+
date: 2014-06-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: yajl-ruby
|
@@ -196,8 +196,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
196
196
|
version: '0'
|
197
197
|
requirements: []
|
198
198
|
rubyforge_project:
|
199
|
-
rubygems_version: 2.2.
|
199
|
+
rubygems_version: 2.2.0
|
200
200
|
signing_key:
|
201
201
|
specification_version: 4
|
202
202
|
summary: Mini Bus for microservices
|
203
203
|
test_files: []
|
204
|
+
has_rdoc:
|