msgpack-rpc-stack 0.6.0 → 0.6.1

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
  SHA256:
3
- metadata.gz: 683e6a13433eb438c4419fb25ea5fee45e962d514a57a6e39bafa2353bbfb696
4
- data.tar.gz: '09d5688ed44711735ceac17612d72819ae66054909994f2d9c72fff51af3b062'
3
+ metadata.gz: 14473a3f2c45d8d7f62a1c14805b6eb72b7fc9bf922f232731b3d116235bb3b9
4
+ data.tar.gz: 22c080853d2f37db6312c2dde0de15917e4d0977e0a6f5b2813f8afa075bd60a
5
5
  SHA512:
6
- metadata.gz: f648b548781007f6ee994581dd0431b18d17d3e96731f4c2191145d74a46d46f03378b66d93c8d121f5b1afccadfac3728642716349c9c3418bcdf6b79e350bf
7
- data.tar.gz: 95e607468e69253201aa543c7c86b3523851b5ec22e0b813236d6e159373e7acd6e753ff5362761b431b730019c3e7fdd0b2dba3adfe62560ea84fc44554f52b
6
+ metadata.gz: 8c78b9fb98522c47f4866dfd0f3b266f83498e1f728437bff372bfa62642ebbaf2386651f48587dcefab9a21b786daee1b8c9019d6c27f1e5002ea464b7990dc
7
+ data.tar.gz: d3d50d58eec555bc209eb32c8d60da251b3e8ffbdada602b46713c2d0149d95085a1d239e0d5343f3f957e66b182562829b97ecf539aa7bfa937c5707ee8f79a
data/README.md CHANGED
@@ -61,8 +61,8 @@ class RpcServer < EM::Connection
61
61
 
62
62
  # send_dataメソッドはEM::Connectionで提供されるので定義なし
63
63
 
64
- def on_error(msg)
65
- $logger.error(msg)
64
+ def on_error(e)
65
+ $logger.error(e.message)
66
66
  end
67
67
 
68
68
  #
@@ -176,8 +176,8 @@ class Server
176
176
  end
177
177
  private :send_data
178
178
 
179
- def on_error(msg)
180
- $logger.error(msg)
179
+ def on_error(e)
180
+ $logger.error(e.message)
181
181
  end
182
182
  private :on_error
183
183
 
data/example/server.rb CHANGED
@@ -71,8 +71,8 @@ class Server
71
71
  end
72
72
  private :send_data
73
73
 
74
- def on_error(msg)
75
- $logger.error(msg)
74
+ def on_error(e)
75
+ $logger.error(e.message)
76
76
  end
77
77
  private :on_error
78
78
 
@@ -34,8 +34,8 @@ class RpcServer < EM::Connection
34
34
 
35
35
  # send_dataメソッドはEM::Connectionで提供されるので定義なし
36
36
 
37
- def on_error(msg)
38
- $logger.error(msg)
37
+ def on_error(e)
38
+ $logger.error(e.message)
39
39
  end
40
40
 
41
41
  #
@@ -18,7 +18,11 @@ module MessagePack
18
18
  m = Module.new {
19
19
  klass.instance_variable_set(:@msgpack_options, {})
20
20
 
21
- def msgpack_options(opts = nil)
21
+ def msgpack_options(opts = :none)
22
+ if opts.nil? || opts.kind_of?(Hash)
23
+ @msgpack_options = opts
24
+ end
25
+
22
26
  return (@msgpack_options = opts)
23
27
  end
24
28
 
@@ -74,8 +74,12 @@ module MessagePack
74
74
  return @remote_async
75
75
  end
76
76
 
77
- def msgpack_options(opts = nil)
78
- return (@msgpack_options = opts)
77
+ def msgpack_options(opts = :none)
78
+ if opts.nil? || opts.kind_of?(Hash)
79
+ @msgpack_options = opts
80
+ end
81
+
82
+ return @msgpack_options
79
83
  end
80
84
 
81
85
  def new_unpacker
@@ -1,5 +1,5 @@
1
1
  module MessagePack
2
2
  module Rpc
3
- VERSION = "0.6.0"
3
+ VERSION = "0.6.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: msgpack-rpc-stack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi Kuwagata
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-25 00:00:00.000000000 Z
11
+ date: 2019-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler