json-rpc-objects 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/json-rpc-objects.gemspec +1 -1
- data/lib/json-rpc-objects/error.rb +3 -3
- data/lib/json-rpc-objects/v10/fakes/error.rb +12 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/json-rpc-objects.gemspec
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
require "json-rpc-objects/v20/
|
2
|
+
require "json-rpc-objects/v20/error"
|
3
3
|
|
4
4
|
##
|
5
5
|
# Main JSON-RPC Objects module.
|
@@ -17,11 +17,11 @@ module JsonRpcObjects
|
|
17
17
|
# Returns request of the latest standard.
|
18
18
|
#
|
19
19
|
# @param [Array] args for target constructor
|
20
|
-
# @return [JsonRpcObjects::
|
20
|
+
# @return [JsonRpcObjects::V20::Error] error object
|
21
21
|
#
|
22
22
|
|
23
23
|
def self.create(*args)
|
24
|
-
JsonRpcObjects::
|
24
|
+
JsonRpcObjects::V20::Error::create(*args)
|
25
25
|
end
|
26
26
|
|
27
27
|
end
|
@@ -33,7 +33,18 @@ module JsonRpcObjects
|
|
33
33
|
# @return [JsonRpcObjects::V10::Error] new object
|
34
34
|
#
|
35
35
|
|
36
|
-
def self.create(
|
36
|
+
def self.create(code, message = nil, opts = { })
|
37
|
+
if message.nil? and opts.empty?
|
38
|
+
data = code
|
39
|
+
elsif not opts.empty?
|
40
|
+
data = {
|
41
|
+
:message => message,
|
42
|
+
:data => opts
|
43
|
+
}
|
44
|
+
elsif
|
45
|
+
data = message
|
46
|
+
end
|
47
|
+
|
37
48
|
self::new(data)
|
38
49
|
end
|
39
50
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 2
|
9
|
+
version: 0.1.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- "Martin Koz\xC3\xA1k"
|
@@ -207,7 +207,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
207
207
|
requirements:
|
208
208
|
- - ">="
|
209
209
|
- !ruby/object:Gem::Version
|
210
|
-
hash:
|
210
|
+
hash: 4360897851459333970
|
211
211
|
segments:
|
212
212
|
- 0
|
213
213
|
version: "0"
|