shutl_resource 0.10.0 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -83,9 +83,12 @@ module Shutl::Resource
83
83
  end
84
84
  if order_collection?
85
85
  response_object.sort! do |a,b|
86
- a.send(@order_collection_by) <=> b.send(@order_collection_by)
86
+ str_a = a.send(@order_collection_by).to_s
87
+ str_b = b.send(@order_collection_by).to_s
88
+ str_a.casecmp(str_b)
87
89
  end
88
90
  end
91
+
89
92
  RestCollection.new(response_object, response.parsed_response['pagination'])
90
93
  end
91
94
 
@@ -1,5 +1,5 @@
1
1
  module Shutl
2
2
  module Resource
3
- VERSION = '0.10.0'
3
+ VERSION = '0.10.1'
4
4
  end
5
5
  end
@@ -159,7 +159,7 @@ describe Shutl::Resource::Rest do
159
159
  context 'ordering the collection' do
160
160
  let(:body) do
161
161
  '{
162
- "test_rests": [{ "name": "d" }, {"name": "e"}, {"name": "a"}],
162
+ "test_rests": [{ "name": "D" }, {"name": "e"}, {"name": "a"}],
163
163
  "pagination":{"page": 0,"items_on_page": 1,"total_count": 3, "number_of_pages": 3}
164
164
  }'
165
165
  end
@@ -173,7 +173,7 @@ describe Shutl::Resource::Rest do
173
173
  end
174
174
 
175
175
  it 're-orders the result' do
176
- TestRest.all.map(&:name).should == %w(a d e)
176
+ TestRest.all.map(&:name).should == %w(a D e)
177
177
  end
178
178
  end
179
179
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shutl_resource
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -172,7 +172,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
172
172
  version: '0'
173
173
  segments:
174
174
  - 0
175
- hash: -1118351529069476530
175
+ hash: -1307169526788725825
176
176
  required_rubygems_version: !ruby/object:Gem::Requirement
177
177
  none: false
178
178
  requirements:
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
181
181
  version: '0'
182
182
  segments:
183
183
  - 0
184
- hash: -1118351529069476530
184
+ hash: -1307169526788725825
185
185
  requirements: []
186
186
  rubyforge_project:
187
187
  rubygems_version: 1.8.23