jsonrpc2.0 0.1.3 → 0.1.4

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.3'
3
+ s.version = '0.1.4'
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,10 +14,7 @@ class JsonRpcServer
14
14
  raise(ParseError, e.message)
15
15
  end
16
16
 
17
- if message.class == Array
18
- response = message.map{ |e| handle_request(e) }.to_json
19
- response.compact!
20
- else
17
+ if message.class == Hash
21
18
  response = handle_request(message, restrictMethod).to_json
22
19
  end
23
20
  rescue Error => e
@@ -42,7 +39,7 @@ class JsonRpcServer
42
39
  begin
43
40
  method = method('r_' + inRequest['method'])
44
41
 
45
- unless restrictMethod == nil and method == restrictMethod
42
+ unless restrictMethod == nil or method == restrictMethod
46
43
  raise MethodNotAllowed
47
44
  end
48
45
 
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.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-06-21 00:00:00.000000000Z
12
+ date: 2011-06-23 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description:
15
15
  email: dev@coldsun.org