jsonrpc2.0 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/jsonrpc2.0.gemspec +1 -1
- data/lib/jsonrpc2.0/Server.rb +2 -5
- metadata +2 -2
data/jsonrpc2.0.gemspec
CHANGED
data/lib/jsonrpc2.0/Server.rb
CHANGED
@@ -14,10 +14,7 @@ class JsonRpcServer
|
|
14
14
|
raise(ParseError, e.message)
|
15
15
|
end
|
16
16
|
|
17
|
-
if message.class ==
|
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
|
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.
|
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-
|
12
|
+
date: 2011-06-23 00:00:00.000000000Z
|
13
13
|
dependencies: []
|
14
14
|
description:
|
15
15
|
email: dev@coldsun.org
|