redis-rpc 1.0.1 → 1.0.2

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: 8b39d936035d3ed70f13c3b547a77964d30622ae
4
- data.tar.gz: 450f0a57a5a00d61ba149e0d811b5df3d2920b2a
3
+ metadata.gz: 4d3ecb20c2a9175a75952447dd563e997930e368
4
+ data.tar.gz: c143b84721db85c020cea88dd5e5dac40c62bd57
5
5
  SHA512:
6
- metadata.gz: 647e5f0e65306e8ccd535a44cf66cd340d3a1b91f0b7b053086f7d4c070431af7eda4881dd600c29c81f06d4b28d3d1b32a0fa6f460ead41678e5a331c42ffaf
7
- data.tar.gz: 30a6301bc1d7557846c9b9111c1d965f89476c0dfbf35a5e398828b16d9669bc58a4d2a832f67c3f62fe56dde6f6122d9fbb447e947088913e6f32e766269e19
6
+ metadata.gz: f3793b860b784c9b0477dbd76b421694c28a0ec213f956a6eb45d89a4dcfd61c99b668aa98c6ac116a2265e2010e614253f7abe8ad6bc04ea832f3fdb00048a5
7
+ data.tar.gz: 21ea793d240f13eb46fecc7a717309c7a14019decc4832887da460f4bde6f2f74a41cfb8e35940038cb2c8f39f8d9878430f3a65c1f3e6978d376c279d3f396a
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- redis-rpc (1.0.0)
4
+ redis-rpc (1.0.1)
5
5
  multi_json (~> 1.3)
6
6
  redis
7
7
 
@@ -8,5 +8,5 @@ require File.expand_path('../calc', __FILE__)
8
8
  redis_server = Redis.new
9
9
  message_queue = 'calc'
10
10
  local_object = Calculator.new
11
- server = RedisRpc::Server.new redis_server, message_queue, local_object
11
+ server = RedisRpc::Server.new redis_server, message_queue, local_object, verbose: true
12
12
  server.run
@@ -81,11 +81,12 @@ module RedisRpc
81
81
  end
82
82
 
83
83
  class Server
84
- def initialize( redis_server, message_queue, local_object, timeout=nil )
84
+ def initialize( redis_server, message_queue, local_object, timeout=nil, verbose: false)
85
85
  @redis_server = redis_server
86
86
  @message_queue = message_queue
87
87
  @local_object = local_object
88
88
  @timeout = timeout
89
+ @verbose = verbose
89
90
  end
90
91
 
91
92
  def run
@@ -119,6 +120,10 @@ module RedisRpc
119
120
  rpc_response = {'exception' => err.to_s, 'backtrace' => err.backtrace}
120
121
  end
121
122
 
123
+ if @verbose
124
+ p rpc_response
125
+ end
126
+
122
127
  # response tansport
123
128
  rpc_raw_response = MultiJson.dump rpc_response
124
129
  @redis_server.multi do
@@ -1,3 +1,3 @@
1
1
  module RedisRpc
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
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.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phuong Nguyen