jsonrpc2.0 0.1.6 → 0.1.7

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.6'
3
+ s.version = '0.1.7'
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'
@@ -38,7 +38,7 @@ class JsonRpcServer
38
38
  methodName = 'r_' + inRequest['method']
39
39
 
40
40
  unless restrictMethod == nil or restrictMethod == methodName
41
- raise MethodNotAllowed
41
+ raise(MethodNotAllowed, "Method not allowed!")
42
42
  end
43
43
 
44
44
  method = method(methodName)
@@ -49,6 +49,8 @@ class JsonRpcServer
49
49
  raise(MethodNotFound, e.message)
50
50
  rescue ArgumentError => e
51
51
  raise(InvalidParams, e.message)
52
+ rescue StandardError => e
53
+ raise(InternalError, e.message)
52
54
  end
53
55
 
54
56
  if inRequest.key?('id')
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.6
4
+ version: 0.1.7
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-23 00:00:00.000000000Z
12
+ date: 2011-06-27 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description:
15
15
  email: dev@coldsun.org