combi 0.0.10 → 0.0.11
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/in_process.rb +2 -2
- data/lib/combi/response_store.rb +1 -1
- data/lib/combi/version.rb +1 -1
- data/spec/shared_examples/standard_bus.rb +5 -5
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5754ce80d853984cac8db9f58119d8e499d83b04
|
4
|
+
data.tar.gz: 375933615435921daa9cc0965c9a294b42a11d53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 943979e726a1abc9af9fc7092b68ac3f042b9a3938ea3101a54528111d630e2ca508b43707c3a767a37835b21d28351c0c0302f509b0da933a6b0e4821b591dd
|
7
|
+
data.tar.gz: 78548a1418e88f096e86137ab7a6411cce165dbfdad779ea73beca1d91058475a90ccf0355b47e8dc84ac74b1e42db1521d99cca68d0575cab686e20421231b7
|
@@ -13,7 +13,7 @@ module Combi
|
|
13
13
|
service_instance = handler[:service_instance]
|
14
14
|
message = JSON.parse(message.to_json)
|
15
15
|
if service_instance.respond_to?(kind)
|
16
|
-
waiter.timeout(options[:timeout],
|
16
|
+
waiter.timeout(options[:timeout], 'error' => 'Timeout::Error')
|
17
17
|
begin
|
18
18
|
Timeout.timeout(options[:timeout]) do
|
19
19
|
response = service_instance.send(kind, message)
|
@@ -32,7 +32,7 @@ module Combi
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
rescue Timeout::Error => e
|
35
|
-
waiter.fail Timeout::Error
|
35
|
+
waiter.fail 'error' => 'Timeout::Error'
|
36
36
|
rescue Exception => e
|
37
37
|
waiter.fail 'error' => { 'message' => e.message, 'backtrace' => e.backtrace}
|
38
38
|
end
|
data/lib/combi/response_store.rb
CHANGED
data/lib/combi/version.rb
CHANGED
@@ -68,8 +68,9 @@ shared_examples_for "standard_bus" do
|
|
68
68
|
prepare
|
69
69
|
EM.synchrony do
|
70
70
|
service_result = EM::Synchrony.sync consumer.request(:sleep, :do_it, params, { timeout: time_base/2.0 })
|
71
|
-
service_result.should
|
72
|
-
service_result.
|
71
|
+
service_result.should be_a Hash
|
72
|
+
service_result.should have_key 'error'
|
73
|
+
service_result['error'].should eq 'Timeout::Error'
|
73
74
|
done(time_base) #timeout response must came before this timeout
|
74
75
|
end
|
75
76
|
finalize
|
@@ -162,9 +163,8 @@ shared_examples_for "standard_bus" do
|
|
162
163
|
EM.synchrony do
|
163
164
|
begin
|
164
165
|
service_result = EM::Synchrony.sync consumer.request(:some_not_service, :do_it, {}, { timeout: 0.1 })
|
165
|
-
if
|
166
|
-
|
167
|
-
service_result.message.should eq "Timeout::Error"
|
166
|
+
if consumer.class == Combi::Queue
|
167
|
+
service_result['error'].should eq "Timeout::Error"
|
168
168
|
else
|
169
169
|
service_result['error'].should eq error_message
|
170
170
|
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.11
|
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-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: yajl-ruby
|
@@ -196,9 +196,8 @@ 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.2
|
200
200
|
signing_key:
|
201
201
|
specification_version: 4
|
202
202
|
summary: Mini Bus for microservices
|
203
203
|
test_files: []
|
204
|
-
has_rdoc:
|