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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f8dd32e52dae0a89b7735c068747bea3631b916
4
- data.tar.gz: 1358f37dd615511fa8167aec2eb1216a01b40090
3
+ metadata.gz: 5754ce80d853984cac8db9f58119d8e499d83b04
4
+ data.tar.gz: 375933615435921daa9cc0965c9a294b42a11d53
5
5
  SHA512:
6
- metadata.gz: 006f1a70c15f329a70d8c66ff5778bc56f476cfb487456aec27c9cf010941f9008ad078353e437645cbed41300dce201cb1e40077243d769a0b293c9e1f8f5d3
7
- data.tar.gz: 785e8e846ac024b3a56b0551113f3a190e017ede7ce78237b718a74a22e9b43c489609baf8b6e65dd05ef14a489b79ce95061d6fdaf6d30e0d439b87b77c740c
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], RuntimeError.new(Timeout::Error))
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.new
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
@@ -47,7 +47,7 @@ module Combi
47
47
  end
48
48
 
49
49
  def initialize(key, response_store, timeout)
50
- self.timeout(timeout, RuntimeError.new(Timeout::Error))
50
+ self.timeout(timeout, 'error' => 'Timeout::Error')
51
51
  end
52
52
 
53
53
  end
@@ -1,3 +1,3 @@
1
1
  module Combi
2
- VERSION = '0.0.10'
2
+ VERSION = '0.0.11'
3
3
  end
@@ -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 be_an Exception
72
- service_result.message.should eq 'Timeout::Error'
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 service_result.is_a? RuntimeError
166
- consumer.class.should eq Combi::Queue
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.10
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-01 00:00:00.000000000 Z
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.0
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: