api-client 2.0.3 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/lib/api-client/base.rb +1 -1
- data/lib/api-client/version.rb +1 -1
- data/spec/api-client/base_spec.rb +6 -0
- data/spec/spec_helper.rb +3 -0
- metadata +4 -4
data/CHANGELOG.md
CHANGED
data/lib/api-client/base.rb
CHANGED
@@ -62,7 +62,7 @@ module ApiClient
|
|
62
62
|
#
|
63
63
|
# @return [String] a string with the root node name for this class.
|
64
64
|
def self.root_node
|
65
|
-
@root_node.blank? ? self.to_s.split('::').last.
|
65
|
+
@root_node.blank? ? self.to_s.split('::').last.underscore : @root_node
|
66
66
|
end
|
67
67
|
|
68
68
|
# Set a custom root node name instead of the Class name.
|
data/lib/api-client/version.rb
CHANGED
@@ -96,6 +96,12 @@ describe ApiClient::Base do
|
|
96
96
|
Admin.root_node.should == 'user'
|
97
97
|
end
|
98
98
|
end
|
99
|
+
|
100
|
+
context 'on a class with a compost name' do
|
101
|
+
it 'should return the class name' do
|
102
|
+
InvoiceItem.root_node.should == 'invoice_item'
|
103
|
+
end
|
104
|
+
end
|
99
105
|
end
|
100
106
|
|
101
107
|
describe '.root_node=' do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: api-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
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: 2013-
|
12
|
+
date: 2013-07-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -197,7 +197,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
197
197
|
version: '0'
|
198
198
|
segments:
|
199
199
|
- 0
|
200
|
-
hash:
|
200
|
+
hash: 3129970379733886747
|
201
201
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
202
202
|
none: false
|
203
203
|
requirements:
|
@@ -206,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
206
206
|
version: '0'
|
207
207
|
segments:
|
208
208
|
- 0
|
209
|
-
hash:
|
209
|
+
hash: 3129970379733886747
|
210
210
|
requirements: []
|
211
211
|
rubyforge_project:
|
212
212
|
rubygems_version: 1.8.25
|