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 +4 -4
- data/Gemfile.lock +2 -2
- data/build-and-publish.sh +2 -0
- data/lib/redis-rpc/version.rb +1 -1
- data/lib/redis-rpc.rb +9 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f7f8124ddfe3927903b239fe8f3285dd82a933a
|
4
|
+
data.tar.gz: d1adf6844fd8ce34f835a6fc889875dbf47c362b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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)
|
data/lib/redis-rpc/version.rb
CHANGED
data/lib/redis-rpc.rb
CHANGED
@@ -20,7 +20,14 @@ require 'redis'
|
|
20
20
|
|
21
21
|
module RedisRpc
|
22
22
|
|
23
|
-
class RemoteException < Exception
|
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['
|
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.
|
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-
|
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
|