redis-rpc 1.0.2 → 1.0.3

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: 4d3ecb20c2a9175a75952447dd563e997930e368
4
- data.tar.gz: c143b84721db85c020cea88dd5e5dac40c62bd57
3
+ metadata.gz: 9f7f8124ddfe3927903b239fe8f3285dd82a933a
4
+ data.tar.gz: d1adf6844fd8ce34f835a6fc889875dbf47c362b
5
5
  SHA512:
6
- metadata.gz: f3793b860b784c9b0477dbd76b421694c28a0ec213f956a6eb45d89a4dcfd61c99b668aa98c6ac116a2265e2010e614253f7abe8ad6bc04ea832f3fdb00048a5
7
- data.tar.gz: 21ea793d240f13eb46fecc7a717309c7a14019decc4832887da460f4bde6f2f74a41cfb8e35940038cb2c8f39f8d9878430f3a65c1f3e6978d376c279d3f396a
6
+ metadata.gz: 095bf7c31bf0eafdf4d067fe0af0ca6b2938b2ffd590dce73c56e786531321d0b5368519c129423358cb2e1c1dddfa07643a23c467df84df882dd5eea9589d65
7
+ data.tar.gz: 784810d273cef3e441c4ab729c8c3601060bc2ee8c8e540adc46fda0287300a98bbaf421bafb0e49957c6d604e6e2c86a16daab7fb639503b5d50cdabad50b10
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- redis-rpc (1.0.1)
4
+ redis-rpc (1.0.3)
5
5
  multi_json (~> 1.3)
6
6
  redis
7
7
 
@@ -11,7 +11,7 @@ GEM
11
11
  diff-lcs (1.1.3)
12
12
  multi_json (1.13.1)
13
13
  rake (0.9.2)
14
- redis (4.0.2)
14
+ redis (4.0.3)
15
15
  rspec (2.9.0)
16
16
  rspec-core (~> 2.9.0)
17
17
  rspec-expectations (~> 2.9.0)
@@ -0,0 +1,2 @@
1
+ #!/bin/bash
2
+ rm *.gem; gem build redis-rpc.gemspec; gem push *.gem
@@ -1,3 +1,3 @@
1
1
  module RedisRpc
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
data/lib/redis-rpc.rb CHANGED
@@ -20,7 +20,14 @@ require 'redis'
20
20
 
21
21
  module RedisRpc
22
22
 
23
- class RemoteException < Exception; end
23
+ class RemoteException < Exception
24
+ attr_reader :remote_backtrace
25
+ def initialize(message, remote_backtrace)
26
+ super(message)
27
+ @remote_backtrace = remote_backtrace
28
+ end
29
+ end
30
+
24
31
  class TimeoutException < Exception; end
25
32
  class MalformedResponseException < RemoteException
26
33
  def initialize(response)
@@ -57,7 +64,7 @@ module RedisRpc
57
64
 
58
65
  # response handling
59
66
  rpc_response = MultiJson.load rpc_raw_response
60
- raise RemoteException, rpc_response['exception'] if rpc_response.has_key? 'exception'
67
+ raise RemoteException.new(rpc_response['exception'], rpc_response['backtrace']) if rpc_response.has_key? 'exception'
61
68
  raise MalformedResponseException, rpc_response unless rpc_response.has_key? 'return_value'
62
69
  return rpc_response['return_value']
63
70
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-rpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phuong Nguyen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-09-10 00:00:00.000000000 Z
12
+ date: 2018-11-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redis
@@ -113,6 +113,7 @@ files:
113
113
  - README.markdown
114
114
  - Rakefile
115
115
  - VERSION
116
+ - build-and-publish.sh
116
117
  - docs/github-flavored-markdown.rb
117
118
  - docs/redisrpc_example.ai
118
119
  - docs/redisrpc_example.png