lagomorph 0.0.5 → 0.0.6

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: d84d2d06c66e1ba50d4fce8260fa4efa470e2aeb
4
- data.tar.gz: 5cd22001cb2c8e234da6741c310c9475b283aad8
3
+ metadata.gz: 483bc1b6e1a97b531654120b767eff3201166782
4
+ data.tar.gz: 07e0501db9e080fa6e60f619b5c976528b70f6b9
5
5
  SHA512:
6
- metadata.gz: 67005a913fe51d9531ad6b2e465efc43ea6072d0ddd5dbd95d9d1b9f06ab50efa7f4191d9e5bd4586b5421d3ff7a22c1eda745b93f730ce3fc4fb06531ee27ff
7
- data.tar.gz: 18618597fa30d726afabc535e8b41b059668eae9706a1c5006abf38207f7d8b02de012f973c8291b75c31b2f1e1be161f3a6d248babbbb1127760fe8a68098bd
6
+ metadata.gz: 03b13faa49e5c457d4e79676a28e40ad8bde4d2c7ce0ed659504847490b5879398a3633ab770b9248fdb19733f3d3728d62d0a32556f02035c5d10b57cfc3c71
7
+ data.tar.gz: d175e19314090d8d766b40da4486026840c908213ce5ceb2fea927d0ceedb86ae66efcea25259fd16fdc64f2e61b1d01eca9c1778cc93aa393e7c47be456d89f
@@ -24,7 +24,11 @@ module Lagomorph
24
24
  publish_rpc_call(payload, correlation_id)
25
25
  response = block_till_receive_response(correlation_id)
26
26
 
27
- response['result'] || fail(RpcError, response.fetch('error'))
27
+ if response.key?('result')
28
+ response['result']
29
+ else
30
+ fail(RpcError, response.fetch('error', 'Unknown error'))
31
+ end
28
32
  end
29
33
 
30
34
  def close_channel
@@ -1,3 +1,3 @@
1
1
  module Lagomorph
2
- VERSION = "0.0.5"
2
+ VERSION = '0.0.6'
3
3
  end
@@ -60,6 +60,11 @@ describe 'a Lagomorph RPC process' do
60
60
  it { expect(result).to eq 'test' }
61
61
  end
62
62
 
63
+ context 'when a worker for an rpc call yields a nil result' do
64
+ let(:result) { rpc_call.dispatch(queue, 'echo', nil) }
65
+ it { expect(result).to eq nil }
66
+ end
67
+
63
68
  context 'when a generate_failure rpc call is made on the ping queue' do
64
69
  let(:result) { rpc_call.dispatch(queue, 'generate_failure') }
65
70
  it { expect { result }.to raise_error Lagomorph::RpcError,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lagomorph
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Berardi
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-11-14 00:00:00.000000000 Z
12
+ date: 2014-11-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement