services 2.2.4 → 2.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bba562140a8277b78a80f08fc3da2ef986e9c809
4
- data.tar.gz: b7dc8f429b69fcf41634603055c9424bf6533ce2
3
+ metadata.gz: 1400e6ff9c2b46562e08881c6d094a0bb5de1459
4
+ data.tar.gz: 5e7b0018546aadd2b51d8e319cc2c5a551d7c893
5
5
  SHA512:
6
- metadata.gz: bc79aed015a6e7fb3170c046210ed0647d8ebc528fc9f32e436c6501e574c64c61a1ae791e9319c1577c4fedf4881a24cdfa07643d822a6316753dcaaa64fa00
7
- data.tar.gz: d13742753844a6dfdf35b98324084ddf774de0561d9da7b49cef635fae36f8b010a629ed94a7ffa9df704df8cb047c9b225483025b33dc51e944c1383845d91d
6
+ metadata.gz: e0bd521415d59a379fb9f3dce599d18631df2e6255239d559d12b52d6e92d235bac4f10234e959257ca44ab0c235c7e4f0ffc565682555247c249167487dbffe
7
+ data.tar.gz: d9af93a2ce8ad3c855bde9e30b9681a2ec0a877758acf5297c0828bddf95524d7926f23a699e2179b18dfa7b2e0e55deaa25922d9c51edc652165205994f5ad9
@@ -7,7 +7,7 @@ module Services
7
7
  object_table_id = "#{object_class.table_name}.id"
8
8
 
9
9
  special_conditions = conditions.extract!(:order, :limit, :page, :per_page)
10
- special_conditions[:order] ||= object_table_id
10
+ special_conditions[:order] = object_table_id unless special_conditions.has_key?(:order)
11
11
 
12
12
  scope = object_class.public_send(Rails::VERSION::MAJOR == 3 ? :scoped : :all)
13
13
  scope = scope.where(object_table_id => ids) unless ids.empty?
@@ -20,6 +20,7 @@ module Services
20
20
  special_conditions.each do |k, v|
21
21
  case k
22
22
  when :order
23
+ next unless v
23
24
  order = case v
24
25
  when 'random' then 'RANDOM()'
25
26
  when /\./ then v
@@ -1,3 +1,3 @@
1
1
  module Services
2
- VERSION = '2.2.4'
2
+ VERSION = '2.2.6'
3
3
  end
@@ -20,7 +20,7 @@ describe Services::Base::CallLogger do
20
20
  expect(logs.last).to match(
21
21
  message: 'END',
22
22
  meta: {
23
- duration: 0.0,
23
+ duration: a_value_within(0.1).of(0.0),
24
24
  service: service.class.to_s,
25
25
  id: an_instance_of(String)
26
26
  },
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: services
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.4
4
+ version: 2.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Meurer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-08 00:00:00.000000000 Z
11
+ date: 2014-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake