jsonrpc2.0 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/jsonrpc2.0.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'jsonrpc2.0'
3
- s.version = '0.1.8'
3
+ s.version = '0.1.9'
4
4
  s.summary = 'A server and client implementation of the JsonRpc 2.0 protocol.'
5
5
  s.authors = ['Jannik Theiß']
6
6
  s.email = 'dev@coldsun.org'
@@ -14,7 +14,12 @@ class JsonRpcServer
14
14
  raise(ParseError, e.message)
15
15
  end
16
16
 
17
- response = handle_request(message).to_json
17
+ if message.class == Array
18
+ response = message.map{ |e| handle_request(e) }.to_json
19
+ response.compact!
20
+ else
21
+ response = handle_request(message).to_json
22
+ end
18
23
  rescue Error => e
19
24
  id = nil
20
25
  id = message['id'] if (message.class == Hash)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonrpc2.0
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: