json-rpc-objects 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.txt CHANGED
@@ -1,5 +1,8 @@
1
1
 
2
- 0.3.0
2
+ 0.3.1 (2011-02-03)
3
+ * 2.0 Request and Response can receive ID as Symbol
4
+
5
+ 0.3.0 (2011-02-01)
3
6
  * #error? response method
4
7
  * non-fake request, response and error classes (including ProcedureCall
5
8
  and ProcedureReturn classes of sure) have generic marking Request,
data/README.md CHANGED
@@ -87,11 +87,7 @@ neither 1.0 nor 2.0 implements these objects, so it can simply cause
87
87
  `LoadError` in that case, therefore it really isn't recommended.
88
88
 
89
89
  Be limited by `Error`, `Request` and `Response` classes here or check
90
- the protocol version using `#VERSION` class constant. Also note,
91
- `Request` and `Response` are fake classes for 1.1, and `Error` for 1.0,
92
- so correspondent 2.0 classes aren't ancestors of these, but of
93
- `ProcedureCall` and `ProcedureReturn`. This may be subject of change in
94
- future releases.
90
+ the protocol version using `#VERSION` class constant.
95
91
 
96
92
  Contributing
97
93
  ------------
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{json-rpc-objects}
8
- s.version = "0.3.0"
8
+ s.version = "0.3.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Martin Kozák"]
12
- s.date = %q{2011-02-01}
12
+ s.date = %q{2011-02-03}
13
13
  s.email = %q{martinkozak@martinkozak.net}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE.txt",
@@ -70,11 +70,10 @@ Gem::Specification.new do |s|
70
70
  s.homepage = %q{http://github.com/martinkozak/json-rpc-objects}
71
71
  s.licenses = ["MIT"]
72
72
  s.require_paths = ["lib"]
73
- s.rubygems_version = %q{1.3.7}
73
+ s.rubygems_version = %q{1.5.0}
74
74
  s.summary = %q{Implementation of JSON-RPC objects with respect to specifications compliance and API backward compatibility. Implements all versions of the protocol and support for ability to communicate by the same protocol version which other side uses by a transparent way.}
75
75
 
76
76
  if s.respond_to? :specification_version then
77
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
78
77
  s.specification_version = 3
79
78
 
80
79
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
@@ -53,8 +53,8 @@ module JsonRpcObjects
53
53
  def check!
54
54
  super()
55
55
 
56
- if not @id.kind_of_any? [String, Integer, NilClass]
57
- raise Exception::new("ID must contain String, Number or nil if included.")
56
+ if not @id.kind_of_any? [Symbol, String, Integer, NilClass]
57
+ raise Exception::new("ID must contain Symbol, String, Number or nil if included.")
58
58
  end
59
59
  end
60
60
 
@@ -59,8 +59,8 @@ module JsonRpcObjects
59
59
  def check!
60
60
  super()
61
61
 
62
- if not @id.kind_of_any? [String, Integer, NilClass]
63
- raise Exception::new("ID must contain String, Number or nil if included.")
62
+ if not @id.kind_of_any? [Symbol, String, Integer, NilClass]
63
+ raise Exception::new("ID must contain Symbol, String, Number or nil if included.")
64
64
  end
65
65
  end
66
66
 
@@ -2,7 +2,7 @@
2
2
  $:.push("../../..")
3
3
 
4
4
  require "../request"
5
- req = JsonRpcObjects::V20::Request::create(:alfa, {:alfa => :beta}, :id => 12345, :"$whatever" => false)
5
+ req = JsonRpcObjects::V20::Request::create(:alfa, {:alfa => :beta}, :id => :"12345", :"$whatever" => false)
6
6
  puts req.to_json
7
7
  req = JsonRpcObjects::V20::Request::create(:alfa, [:beta], :"version" => :"1.0")
8
8
  puts req.to_json
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json-rpc-objects
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 3
8
- - 0
9
- version: 0.3.0
4
+ prerelease:
5
+ version: 0.3.1
10
6
  platform: ruby
11
7
  authors:
12
8
  - "Martin Koz\xC3\xA1k"
@@ -14,7 +10,7 @@ autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
12
 
17
- date: 2011-02-01 00:00:00 +01:00
13
+ date: 2011-02-03 00:00:00 +01:00
18
14
  default_executable:
19
15
  dependencies:
20
16
  - !ruby/object:Gem::Dependency
@@ -24,10 +20,6 @@ dependencies:
24
20
  requirements:
25
21
  - - ">="
26
22
  - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- - 1
30
- - 0
31
23
  version: 0.1.0
32
24
  type: :runtime
33
25
  prerelease: false
@@ -39,10 +31,6 @@ dependencies:
39
31
  requirements:
40
32
  - - ">="
41
33
  - !ruby/object:Gem::Version
42
- segments:
43
- - 0
44
- - 3
45
- - 0
46
34
  version: 0.3.0
47
35
  type: :runtime
48
36
  prerelease: false
@@ -54,10 +42,6 @@ dependencies:
54
42
  requirements:
55
43
  - - ">="
56
44
  - !ruby/object:Gem::Version
57
- segments:
58
- - 0
59
- - 1
60
- - 0
61
45
  version: 0.1.0
62
46
  type: :runtime
63
47
  prerelease: false
@@ -69,10 +53,6 @@ dependencies:
69
53
  requirements:
70
54
  - - ">="
71
55
  - !ruby/object:Gem::Version
72
- segments:
73
- - 2
74
- - 2
75
- - 2
76
56
  version: 2.2.2
77
57
  type: :runtime
78
58
  prerelease: false
@@ -84,10 +64,6 @@ dependencies:
84
64
  requirements:
85
65
  - - ">="
86
66
  - !ruby/object:Gem::Version
87
- segments:
88
- - 0
89
- - 7
90
- - 8
91
67
  version: 0.7.8
92
68
  type: :runtime
93
69
  prerelease: false
@@ -99,10 +75,6 @@ dependencies:
99
75
  requirements:
100
76
  - - ~>
101
77
  - !ruby/object:Gem::Version
102
- segments:
103
- - 1
104
- - 0
105
- - 0
106
78
  version: 1.0.0
107
79
  type: :development
108
80
  prerelease: false
@@ -114,10 +86,6 @@ dependencies:
114
86
  requirements:
115
87
  - - ~>
116
88
  - !ruby/object:Gem::Version
117
- segments:
118
- - 1
119
- - 5
120
- - 2
121
89
  version: 1.5.2
122
90
  type: :development
123
91
  prerelease: false
@@ -196,7 +164,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
196
164
  requirements:
197
165
  - - ">="
198
166
  - !ruby/object:Gem::Version
199
- hash: -3073341896383133206
167
+ hash: -3248944426371010650
200
168
  segments:
201
169
  - 0
202
170
  version: "0"
@@ -205,13 +173,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
205
173
  requirements:
206
174
  - - ">="
207
175
  - !ruby/object:Gem::Version
208
- segments:
209
- - 0
210
176
  version: "0"
211
177
  requirements: []
212
178
 
213
179
  rubyforge_project:
214
- rubygems_version: 1.3.7
180
+ rubygems_version: 1.5.0
215
181
  signing_key:
216
182
  specification_version: 3
217
183
  summary: Implementation of JSON-RPC objects with respect to specifications compliance and API backward compatibility. Implements all versions of the protocol and support for ability to communicate by the same protocol version which other side uses by a transparent way.