json-rpc-objects 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.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.1.0"
8
+ s.version = "0.1.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-01-13}
12
+ s.date = %q{2011-01-16}
13
13
  s.email = %q{martinkozak@martinkozak.net}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE.txt",
@@ -114,7 +114,7 @@ module JsonRpcObjects
114
114
  :message => @message
115
115
  }
116
116
 
117
- if not @error.nil?
117
+ if not @data.nil?
118
118
  data[:error] = @data
119
119
  end
120
120
 
@@ -71,8 +71,12 @@ module JsonRpcObjects
71
71
  def __assign_data(data)
72
72
  @data = data[:data]
73
73
  data.delete(:data)
74
- end
75
-
74
+
75
+ if @data.nil?
76
+ super(data)
77
+ end
78
+ end
79
+
76
80
  end
77
81
  end
78
82
  end
@@ -8,7 +8,7 @@ req = JsonRpcObjects::V20::Request::create(:alfa, [:beta], :"version" => :"1.0")
8
8
  puts req.to_json
9
9
 
10
10
  require "../error"
11
- err = JsonRpcObjects::V20::Error::create(200, "some problem")
11
+ err = JsonRpcObjects::V20::Error::create(200, "some problem", :data => "Additional data.")
12
12
 
13
13
  require "../response"
14
14
  res = JsonRpcObjects::V20::Response::create(nil, err, :id => 12345)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - "Martin Koz\xC3\xA1k"
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-01-13 00:00:00 +01:00
17
+ date: 2011-01-16 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -207,7 +207,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
207
207
  requirements:
208
208
  - - ">="
209
209
  - !ruby/object:Gem::Version
210
- hash: -3503757597753248663
210
+ hash: 759814957860137869
211
211
  segments:
212
212
  - 0
213
213
  version: "0"