switchman 1.5.5 → 1.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a9f1b18d5c70d7c7c0db5295eecc955e89eb7ffc
4
- data.tar.gz: 9c87565145d1c2d28319c5dd0fcfba2be42d63e6
3
+ metadata.gz: 9f89b4901f87f3beb95a7714ad526cb67907068d
4
+ data.tar.gz: b16ba8ab6429b604f83a5a6cdc45f5c4a4322e06
5
5
  SHA512:
6
- metadata.gz: e5c427e9b504ba9f24407e635e59d4b53fe898666095390b18049ce17831aa72387bbf04fa4996face96ee1a958f861441a5064f7acc9c79c96f40fd38631d87
7
- data.tar.gz: 23e544a6a514824bdca90f51a12de4832b350a1b63adba3569ec73bd51da8c5267b8b71e53685197330e37973c284314a7895764ee47e91e29892d1d46246afd
6
+ metadata.gz: ccc0efa41d2ecc1b2d7eacda7bb6cf9574156fb4d4fda8c57affb3c115086574a8f500369f9eaf10e59362016f964babad253c68bcdc6f079143a722f23c244d
7
+ data.tar.gz: 203bbd2ed5c185f4e737d292c5b9c16640500811035bc7b21f84b5a10372db1fd466124ed737e063b417c4819a6f8075c338164818ffce551d7748d59ba51bd0
@@ -0,0 +1,9 @@
1
+ module Switchman
2
+ module ActiveRecord
3
+ module Batches
4
+ def batch_order
5
+ "#{connection.quote_local_table_name(table_name)}.#{quoted_primary_key} ASC"
6
+ end
7
+ end
8
+ end
9
+ end
@@ -121,7 +121,7 @@ module Switchman
121
121
  AND a.attnum IN (#{indkey.join(",")})
122
122
  SQL
123
123
 
124
- column_names = columns.values_at(*indkey).compact
124
+ column_names = columns.stringify_keys.values_at(*indkey).compact
125
125
 
126
126
  unless column_names.empty?
127
127
  # add info on sort order for columns (only desc order is explicitly specified, asc is the default)
@@ -66,6 +66,7 @@ module Switchman
66
66
  require "switchman/active_record/association"
67
67
  require "switchman/active_record/attribute_methods"
68
68
  require "switchman/active_record/base"
69
+ require "switchman/active_record/batches"
69
70
  require "switchman/active_record/calculations"
70
71
  require "switchman/active_record/connection_handler"
71
72
  require "switchman/active_record/connection_pool"
@@ -130,6 +131,7 @@ module Switchman
130
131
 
131
132
  ::ActiveRecord::LogSubscriber.prepend(ActiveRecord::LogSubscriber)
132
133
  ::ActiveRecord::Reflection::AssociationReflection.prepend(ActiveRecord::Reflection::AssociationReflection)
134
+ ::ActiveRecord::Relation.prepend(ActiveRecord::Batches)
133
135
  ::ActiveRecord::Relation.prepend(ActiveRecord::Calculations)
134
136
  ::ActiveRecord::Relation.include(ActiveRecord::FinderMethods)
135
137
  ::ActiveRecord::Relation.include(ActiveRecord::QueryMethods)
@@ -1,3 +1,3 @@
1
1
  module Switchman
2
- VERSION = "1.5.5"
2
+ VERSION = "1.5.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: switchman
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.5
4
+ version: 1.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-05-27 00:00:00.000000000 Z
13
+ date: 2016-06-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: railties
@@ -168,6 +168,7 @@ files:
168
168
  - lib/switchman/active_record/association.rb
169
169
  - lib/switchman/active_record/attribute_methods.rb
170
170
  - lib/switchman/active_record/base.rb
171
+ - lib/switchman/active_record/batches.rb
171
172
  - lib/switchman/active_record/calculations.rb
172
173
  - lib/switchman/active_record/connection_handler.rb
173
174
  - lib/switchman/active_record/connection_pool.rb
@@ -226,7 +227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
227
  version: '0'
227
228
  requirements: []
228
229
  rubyforge_project:
229
- rubygems_version: 2.5.1
230
+ rubygems_version: 2.6.4
230
231
  signing_key:
231
232
  specification_version: 4
232
233
  summary: Rails 4 sharding magic