json-rpc-objects 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGES.txt +5 -0
  3. data/Gemfile +3 -1
  4. data/Gemfile.lock +63 -12
  5. data/LICENSE.txt +1 -1
  6. data/README.md +40 -41
  7. data/Rakefile +2 -2
  8. data/VERSION +1 -1
  9. data/json-rpc-objects.gemspec +25 -11
  10. data/lib/json-rpc-objects/error.rb +1 -1
  11. data/lib/json-rpc-objects/exceptions/invalid-code.rb +25 -0
  12. data/lib/json-rpc-objects/generic.rb +2 -2
  13. data/lib/json-rpc-objects/generic/error.rb +1 -1
  14. data/lib/json-rpc-objects/generic/object.rb +4 -5
  15. data/lib/json-rpc-objects/generic/request.rb +1 -1
  16. data/lib/json-rpc-objects/generic/response.rb +1 -1
  17. data/lib/json-rpc-objects/request.rb +4 -5
  18. data/lib/json-rpc-objects/response.rb +3 -4
  19. data/lib/json-rpc-objects/serializer.rb +1 -2
  20. data/lib/json-rpc-objects/serializer/marshal.rb +1 -1
  21. data/lib/json-rpc-objects/serializer/none.rb +1 -1
  22. data/lib/json-rpc-objects/utils.rb +6 -0
  23. data/lib/json-rpc-objects/utils/hash.rb +198 -0
  24. data/lib/json-rpc-objects/utils/object.rb +85 -0
  25. data/lib/json-rpc-objects/utils/string.rb +46 -0
  26. data/lib/json-rpc-objects/v10/error.rb +1 -1
  27. data/lib/json-rpc-objects/v10/request.rb +4 -5
  28. data/lib/json-rpc-objects/v10/response.rb +1 -1
  29. data/lib/json-rpc-objects/v10/tests/test.rb +1 -1
  30. data/lib/json-rpc-objects/v11/alt/error.rb +1 -1
  31. data/lib/json-rpc-objects/v11/alt/fakes/request.rb +1 -2
  32. data/lib/json-rpc-objects/v11/alt/fakes/response.rb +1 -2
  33. data/lib/json-rpc-objects/v11/alt/procedure-call.rb +4 -4
  34. data/lib/json-rpc-objects/v11/alt/procedure-parameter-description.rb +1 -1
  35. data/lib/json-rpc-objects/v11/alt/procedure-return.rb +2 -1
  36. data/lib/json-rpc-objects/v11/alt/request.rb +1 -1
  37. data/lib/json-rpc-objects/v11/alt/response.rb +1 -1
  38. data/lib/json-rpc-objects/v11/alt/service-description.rb +1 -1
  39. data/lib/json-rpc-objects/v11/alt/service-procedure-description.rb +2 -4
  40. data/lib/json-rpc-objects/v11/alt/tests/test.rb +1 -1
  41. data/lib/json-rpc-objects/v11/generic-types.rb +1 -1
  42. data/lib/json-rpc-objects/v11/wd/error.rb +5 -6
  43. data/lib/json-rpc-objects/v11/wd/extensions.rb +1 -1
  44. data/lib/json-rpc-objects/v11/wd/fakes/request.rb +1 -2
  45. data/lib/json-rpc-objects/v11/wd/fakes/response.rb +1 -2
  46. data/lib/json-rpc-objects/v11/wd/procedure-call.rb +13 -15
  47. data/lib/json-rpc-objects/v11/wd/procedure-parameter-description.rb +8 -8
  48. data/lib/json-rpc-objects/v11/wd/procedure-return.rb +4 -5
  49. data/lib/json-rpc-objects/v11/wd/request.rb +1 -1
  50. data/lib/json-rpc-objects/v11/wd/response.rb +1 -1
  51. data/lib/json-rpc-objects/v11/wd/service-description.rb +6 -8
  52. data/lib/json-rpc-objects/v11/wd/service-procedure-description.rb +8 -10
  53. data/lib/json-rpc-objects/v11/wd/tests/test.rb +1 -1
  54. data/lib/json-rpc-objects/v20/error.rb +6 -4
  55. data/lib/json-rpc-objects/v20/request.rb +6 -6
  56. data/lib/json-rpc-objects/v20/response.rb +2 -2
  57. data/lib/json-rpc-objects/v20/tests/test.rb +2 -2
  58. data/lib/json-rpc-objects/version.rb +18 -6
  59. data/spec/request_spec.rb +11 -0
  60. data/spec/spec_helper.rb +18 -0
  61. metadata +69 -51
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: eadd3626dc9e70dcffc6f0f93a96295785ff1eec
4
+ data.tar.gz: dca0aa2fee5a1ef1c1d113e6a43b8f1885012b82
5
+ SHA512:
6
+ metadata.gz: 6b9fe6aca1ad153d470bd8e496a18209dde6484a9f2b88a850ce85737c1f22d6b88875c5fae0d076e3fd7df9b4730c2d8a077fae07188a3f22cc70a828af86b5
7
+ data.tar.gz: 043e0051b6643000249d3309f4512218ee6aa49949e1b3b47e5350e8b8d319b04576b81d0459f41b298ea709de0cafaaceae307a0e60f5ba5d2958cb940f5b53
@@ -1,4 +1,9 @@
1
1
 
2
+ 0.4.4 (2015-03-14)
3
+ * 'hash-utils' gem dependency removed
4
+ * JsonRpcObjects::V11::Error and JsonRpcObjects::V20::Error now throws
5
+ JsonRpcObjects::Exceptions::InvalidCode in case of invalid error code
6
+
2
7
  0.4.3 (2013-05-06)
3
8
  * none (passthru) serializer
4
9
  * method name should allow strings to be given, not symbols only
data/Gemfile CHANGED
@@ -1,10 +1,12 @@
1
1
  source "http://rubygems.org"
2
2
  # Add dependencies required to use your gem here.
3
3
  # Example:
4
- gem "hash-utils", ">= 0.18.0"
5
4
  gem "addressable", ">= 2.2.2"
6
5
  gem "abstract", ">= 1.0.0"
7
6
  gem "json-rpc-objects-json", ">= 0.1.1"
7
+ gem "ruby-version", ">= 0.4.0"
8
+ gem "rspec"
9
+ gem 'rspec-its'
8
10
 
9
11
  # Add dependencies to develop your gem here.
10
12
  # Include everything needed to run rake, tests, features, etc.
@@ -2,23 +2,69 @@ GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
4
  abstract (1.0.0)
5
- addressable (2.3.4)
6
- git (1.2.5)
7
- hash-utils (2.1.1)
8
- ruby-version (>= 0.4.0)
9
- jeweler (1.8.4)
10
- bundler (~> 1.0)
5
+ addressable (2.3.8)
6
+ builder (3.2.2)
7
+ descendants_tracker (0.0.4)
8
+ thread_safe (~> 0.3, >= 0.3.1)
9
+ diff-lcs (1.2.5)
10
+ faraday (0.9.1)
11
+ multipart-post (>= 1.2, < 3)
12
+ git (1.2.9.1)
13
+ github_api (0.12.4)
14
+ addressable (~> 2.3)
15
+ descendants_tracker (~> 0.0.4)
16
+ faraday (~> 0.8, < 0.10)
17
+ hashie (>= 3.4)
18
+ multi_json (>= 1.7.5, < 2.0)
19
+ nokogiri (~> 1.6.6)
20
+ oauth2
21
+ hashie (3.4.2)
22
+ highline (1.7.3)
23
+ jeweler (2.0.1)
24
+ builder
25
+ bundler (>= 1.0)
11
26
  git (>= 1.2.5)
27
+ github_api
28
+ highline (>= 1.6.15)
29
+ nokogiri (>= 1.5.10)
12
30
  rake
13
31
  rdoc
14
- json (1.7.7)
15
32
  json-rpc-objects-json (0.1.1)
16
33
  multi_json
17
- multi_json (1.7.2)
18
- rake (10.0.4)
19
- rdoc (4.0.1)
20
- json (~> 1.4)
34
+ jwt (1.5.1)
35
+ mini_portile (0.6.2)
36
+ multi_json (1.11.2)
37
+ multi_xml (0.5.5)
38
+ multipart-post (2.0.0)
39
+ nokogiri (1.6.6.2)
40
+ mini_portile (~> 0.6.0)
41
+ oauth2 (1.0.0)
42
+ faraday (>= 0.8, < 0.10)
43
+ jwt (~> 1.0)
44
+ multi_json (~> 1.3)
45
+ multi_xml (~> 0.5)
46
+ rack (~> 1.2)
47
+ rack (1.6.4)
48
+ rake (10.4.2)
49
+ rdoc (4.2.0)
50
+ rspec (3.3.0)
51
+ rspec-core (~> 3.3.0)
52
+ rspec-expectations (~> 3.3.0)
53
+ rspec-mocks (~> 3.3.0)
54
+ rspec-core (3.3.2)
55
+ rspec-support (~> 3.3.0)
56
+ rspec-expectations (3.3.1)
57
+ diff-lcs (>= 1.2.0, < 2.0)
58
+ rspec-support (~> 3.3.0)
59
+ rspec-its (1.2.0)
60
+ rspec-core (>= 3.0.0)
61
+ rspec-expectations (>= 3.0.0)
62
+ rspec-mocks (3.3.2)
63
+ diff-lcs (>= 1.2.0, < 2.0)
64
+ rspec-support (~> 3.3.0)
65
+ rspec-support (3.3.0)
21
66
  ruby-version (0.4.3)
67
+ thread_safe (0.3.5)
22
68
 
23
69
  PLATFORMS
24
70
  ruby
@@ -27,6 +73,11 @@ DEPENDENCIES
27
73
  abstract (>= 1.0.0)
28
74
  addressable (>= 2.2.2)
29
75
  bundler (>= 1.0.0)
30
- hash-utils (>= 0.18.0)
31
76
  jeweler (>= 1.5.2)
32
77
  json-rpc-objects-json (>= 0.1.1)
78
+ rspec
79
+ rspec-its
80
+ ruby-version (>= 0.4.0)
81
+
82
+ BUNDLED WITH
83
+ 1.10.6
@@ -1,4 +1,4 @@
1
- Copyright (c) 2011-2013 Martin Kozák (martinkozak@martinkozak.net)
1
+ Copyright (c) 2011-2015 Martin Poljak (martin@poljak.cz)
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -48,19 +48,23 @@ the versions (typically server).
48
48
  Concrete version use example (creates call to `subtract` method with
49
49
  ID "a2b3"):
50
50
 
51
- require "json-rpc-objects/v10/request"
52
- require "json-rpc-objects/v11/alt/request"
53
- require "json-rpc-objects/v20/request"
54
-
55
- JsonRpcObjects::V10::Request::create(:subtract, ["1", "2"], :id => "a2b3")
56
- JsonRpcObjects::V11::Alt::Request::create(:subtract, ["1", "2"], :id => "a2b3")
57
- JsonRpcObjects::V20::Request::create(:subtract, ["1", "2"], :id => "a2b3")
58
-
51
+ ```ruby
52
+ require "json-rpc-objects/v10/request"
53
+ require "json-rpc-objects/v11/alt/request"
54
+ require "json-rpc-objects/v20/request"
55
+
56
+ JsonRpcObjects::V10::Request::create(:subtract, ["1", "2"], :id => "a2b3")
57
+ JsonRpcObjects::V11::Alt::Request::create(:subtract, ["1", "2"], :id => "a2b3")
58
+ JsonRpcObjects::V20::Request::create(:subtract, ["1", "2"], :id => "a2b3")
59
+ ```
60
+
59
61
  Or incoming data processing request:
60
62
 
61
- require "json-rpc-objects/request"
62
- JsonRpcObjects::Request::parse(string)
63
-
63
+ ```ruby
64
+ require "json-rpc-objects/request"
65
+ JsonRpcObjects::Request::parse(string)
66
+ ```
67
+
64
68
  …which will simply return request object of appropriate class according
65
69
  to its version. Be warn, to distinguish between 1.1 Alt and 1.1 WD is
66
70
  impossible in most of cases. It isn't problem for simple use, but it
@@ -73,12 +77,14 @@ In some cases, for example in case implementing of JSON-RPC server, you
73
77
  need make response to request by the same protocol version. It can be
74
78
  achieved by simple way:
75
79
 
76
- require "json-rpc-objects/request"
77
-
78
- request = JsonRpcObjects::Request::parse(string)
79
- ... <data processing>
80
- response = request.class::version.response::create(<some args>)
81
-
80
+ ```ruby
81
+ require "json-rpc-objects/request"
82
+
83
+ request = JsonRpcObjects::Request::parse(string)
84
+ # ... <data processing>
85
+ response = request.class::version.response::create(<some args>)
86
+ ```
87
+
82
88
  This code analyzes protocol version of the request and creates response
83
89
  of the same protocol version. It utilizes call handler, so you can call
84
90
  for example `request.class::version.service_procedure_description::create(<arguments>)`
@@ -108,40 +114,33 @@ widespread compatibility,
108
114
  You can set the default serializer for whole library session (both class
109
115
  and instance of the class are supported):
110
116
 
111
- require "json-rpc-objects/serializer/marshal"
112
-
113
- JsonRpcObjects::default_serializer(JsonRpcObjects::Serializer::Marshal)
114
-
115
- # it's setting default serializer for all new instances, without
116
- # arguments it returns the default serializer
117
+ ```ruby
118
+ require "json-rpc-objects/serializer/marshal"
119
+
120
+ JsonRpcObjects::default_serializer(JsonRpcObjects::Serializer::Marshal)
121
+
122
+ # it's setting default serializer for all new instances, without
123
+ # arguments it returns the default serializer
124
+ ```
117
125
 
118
126
  Or by individual object assigning (only instances are supported):
119
127
 
120
- require "json-rpc-objects/serializer/marshal"
121
-
122
- serializer = JsonRpcObjects::Serializer::Marshal::new
123
- JsonRpcObjects::V10::Request::parse(data, serializer)
124
-
128
+ ```ruby
129
+ require "json-rpc-objects/serializer/marshal"
130
+
131
+ serializer = JsonRpcObjects::Serializer::Marshal::new
132
+ JsonRpcObjects::V10::Request::parse(data, serializer)
133
+ ```
134
+
125
135
  …and the same for constructor. The `#serializer` property is also
126
136
  accessible, both readable and writable on all objects. By the same way,
127
137
  serializer is received by the generic parsers `JsonRpcObjects::Request`
128
138
  and so too.
129
139
 
130
- Contributing
131
- ------------
132
-
133
- 1. Fork it.
134
- 2. Create a branch (`git checkout -b 20101220-my-change`).
135
- 3. Commit your changes (`git commit -am "Added something"`).
136
- 4. Push to the branch (`git push origin 20101220-my-change`).
137
- 5. Create an [Issue][6] with a link to your branch.
138
- 6. Enjoy a refreshing Diet Coke and wait.
139
-
140
-
141
140
  Copyright
142
141
  ---------
143
142
 
144
- Copyright &copy; 2011 [Martin Kozák][7]. See `LICENSE.txt` for
143
+ Copyright &copy; 2011 &ndash; 2015 [Martin Poljak][7]. See `LICENSE.txt` for
145
144
  further details.
146
145
 
147
146
  [1]: http://en.wikipedia.org/wiki/JSON-RPC
@@ -150,7 +149,7 @@ further details.
150
149
  [4]: http://groups.google.com/group/json-rpc/web/json-rpc-1-1-alt
151
150
  [5]: http://groups.google.com/group/json-rpc/web/json-rpc-2-0
152
151
  [6]: http://github.com/martinkozak/json-rpc-objects/issues
153
- [7]: http://www.martinkozak.net/
152
+ [7]: http://www.martinpoljak.net/
154
153
 
155
154
  [9]: http://www.yaml.org/
156
155
  [10]: http://ruby-doc.org/core/classes/Marshal.html
data/Rakefile CHANGED
@@ -19,8 +19,8 @@ Jeweler::Tasks.new do |gem|
19
19
  gem.homepage = "http://github.com/martinkozak/json-rpc-objects"
20
20
  gem.license = "MIT"
21
21
  gem.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.'
22
- gem.email = "martinkozak@martinkozak.net"
23
- gem.authors = ["Martin Kozák"]
22
+ gem.email = "martin@poljak.cz"
23
+ gem.authors = ["Martin Poljak"]
24
24
  # Include your dependencies below. Runtime dependencies are required when using your gem,
25
25
  # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
26
26
  # gem.add_runtime_dependency 'jabber4r', '> 0.1'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.3
1
+ 0.4.4
@@ -2,15 +2,17 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
+ # stub: json-rpc-objects 0.4.4 ruby lib
5
6
 
6
7
  Gem::Specification.new do |s|
7
8
  s.name = "json-rpc-objects"
8
- s.version = "0.4.3"
9
+ s.version = "0.4.4"
9
10
 
10
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Martin Koz\u{e1}k"]
12
- s.date = "2013-05-06"
13
- s.email = "martinkozak@martinkozak.net"
12
+ s.require_paths = ["lib"]
13
+ s.authors = ["Martin Poljak"]
14
+ s.date = "2015-08-15"
15
+ s.email = "martin@poljak.cz"
14
16
  s.extra_rdoc_files = [
15
17
  "LICENSE.txt",
16
18
  "README.md"
@@ -26,6 +28,7 @@ Gem::Specification.new do |s|
26
28
  "VERSION",
27
29
  "json-rpc-objects.gemspec",
28
30
  "lib/json-rpc-objects/error.rb",
31
+ "lib/json-rpc-objects/exceptions/invalid-code.rb",
29
32
  "lib/json-rpc-objects/generic.rb",
30
33
  "lib/json-rpc-objects/generic/error.rb",
31
34
  "lib/json-rpc-objects/generic/object.rb",
@@ -36,6 +39,10 @@ Gem::Specification.new do |s|
36
39
  "lib/json-rpc-objects/serializer.rb",
37
40
  "lib/json-rpc-objects/serializer/marshal.rb",
38
41
  "lib/json-rpc-objects/serializer/none.rb",
42
+ "lib/json-rpc-objects/utils.rb",
43
+ "lib/json-rpc-objects/utils/hash.rb",
44
+ "lib/json-rpc-objects/utils/object.rb",
45
+ "lib/json-rpc-objects/utils/string.rb",
39
46
  "lib/json-rpc-objects/v10/error.rb",
40
47
  "lib/json-rpc-objects/v10/request.rb",
41
48
  "lib/json-rpc-objects/v10/response.rb",
@@ -68,37 +75,44 @@ Gem::Specification.new do |s|
68
75
  "lib/json-rpc-objects/v20/request.rb",
69
76
  "lib/json-rpc-objects/v20/response.rb",
70
77
  "lib/json-rpc-objects/v20/tests/test.rb",
71
- "lib/json-rpc-objects/version.rb"
78
+ "lib/json-rpc-objects/version.rb",
79
+ "spec/request_spec.rb",
80
+ "spec/spec_helper.rb"
72
81
  ]
73
82
  s.homepage = "http://github.com/martinkozak/json-rpc-objects"
74
83
  s.licenses = ["MIT"]
75
- s.require_paths = ["lib"]
76
- s.rubygems_version = "1.8.23"
84
+ s.rubygems_version = "2.4.5"
77
85
  s.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."
78
86
 
79
87
  if s.respond_to? :specification_version then
80
- s.specification_version = 3
88
+ s.specification_version = 4
81
89
 
82
90
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
83
- s.add_runtime_dependency(%q<hash-utils>, [">= 0.18.0"])
84
91
  s.add_runtime_dependency(%q<addressable>, [">= 2.2.2"])
85
92
  s.add_runtime_dependency(%q<abstract>, [">= 1.0.0"])
86
93
  s.add_runtime_dependency(%q<json-rpc-objects-json>, [">= 0.1.1"])
94
+ s.add_runtime_dependency(%q<ruby-version>, [">= 0.4.0"])
95
+ s.add_runtime_dependency(%q<rspec>, [">= 0"])
96
+ s.add_runtime_dependency(%q<rspec-its>, [">= 0"])
87
97
  s.add_development_dependency(%q<bundler>, [">= 1.0.0"])
88
98
  s.add_development_dependency(%q<jeweler>, [">= 1.5.2"])
89
99
  else
90
- s.add_dependency(%q<hash-utils>, [">= 0.18.0"])
91
100
  s.add_dependency(%q<addressable>, [">= 2.2.2"])
92
101
  s.add_dependency(%q<abstract>, [">= 1.0.0"])
93
102
  s.add_dependency(%q<json-rpc-objects-json>, [">= 0.1.1"])
103
+ s.add_dependency(%q<ruby-version>, [">= 0.4.0"])
104
+ s.add_dependency(%q<rspec>, [">= 0"])
105
+ s.add_dependency(%q<rspec-its>, [">= 0"])
94
106
  s.add_dependency(%q<bundler>, [">= 1.0.0"])
95
107
  s.add_dependency(%q<jeweler>, [">= 1.5.2"])
96
108
  end
97
109
  else
98
- s.add_dependency(%q<hash-utils>, [">= 0.18.0"])
99
110
  s.add_dependency(%q<addressable>, [">= 2.2.2"])
100
111
  s.add_dependency(%q<abstract>, [">= 1.0.0"])
101
112
  s.add_dependency(%q<json-rpc-objects-json>, [">= 0.1.1"])
113
+ s.add_dependency(%q<ruby-version>, [">= 0.4.0"])
114
+ s.add_dependency(%q<rspec>, [">= 0"])
115
+ s.add_dependency(%q<rspec-its>, [">= 0"])
102
116
  s.add_dependency(%q<bundler>, [">= 1.0.0"])
103
117
  s.add_dependency(%q<jeweler>, [">= 1.5.2"])
104
118
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # (c) 2011 Martin Kozák (martinkozak@martinkozak.net)
2
+ # (c) 2011-2015 Martin Poljak (martin@poljak.cz)
3
3
 
4
4
  require "json-rpc-objects/v20/error"
5
5
 
@@ -0,0 +1,25 @@
1
+ # encoding: utf-8
2
+ # (c) 2015 Martin Poljak (martin@poljak.cz)
3
+
4
+ ##
5
+ # Main JSON-RPC Objects module.
6
+ #
7
+
8
+ module JsonRpcObjects
9
+
10
+ ##
11
+ # Module for exceptions.
12
+ # @since 0.4.4
13
+ #
14
+
15
+ module Exceptions
16
+
17
+ ##
18
+ # Invalid code exception..
19
+ #
20
+
21
+ class InvalidCode < Exception
22
+ end
23
+
24
+ end
25
+ end
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
- # (c) 2011 Martin Kozák (martinkozak@martinkozak.net)
2
+ # (c) 2011-2015 Martin Poljak (martin@poljak.cz)
3
3
  #
4
4
  # @deprecated (since 0.3.0)
5
+ #
5
6
 
6
7
  require "json-rpc-objects/generic/object"
7
-
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # (c) 2011 Martin Kozák (martinkozak@martinkozak.net)
2
+ # (c) 2011-2015 Martin Poljak (martin@poljak.cz)
3
3
 
4
4
  require "json-rpc-objects/generic/object"
5
5
 
@@ -1,11 +1,10 @@
1
1
  # encoding: utf-8
2
- # (c) 2011 Martin Kozák (martinkozak@martinkozak.net)
2
+ # (c) 2011-2015 Martin Poljak (martin@poljak.cz)
3
3
 
4
- require "hash-utils/hash"
5
4
  require "abstract"
6
5
  require "json-rpc-objects/serializer"
7
6
  require "json-rpc-objects/version"
8
-
7
+ require "json-rpc-objects/utils"
9
8
  ##
10
9
  # Main JSON-RPC Objects module.
11
10
  #
@@ -102,6 +101,7 @@ module JsonRpcObjects
102
101
  def initialize(data, serializer = JsonRpcObjects::default_serializer)
103
102
  @serializer = serializer
104
103
  self.data = data
104
+ p self
105
105
  self.check!
106
106
  end
107
107
 
@@ -141,7 +141,7 @@ module JsonRpcObjects
141
141
 
142
142
  def __convert_data(data, mode = nil)
143
143
  if mode != :converted
144
- data.keys_to_sym
144
+ JsonRpcObjects::Utils::Hash.keys_to_sym(data)
145
145
  else
146
146
  data
147
147
  end
@@ -157,4 +157,3 @@ module JsonRpcObjects
157
157
  end
158
158
  end
159
159
  end
160
-