switchman 3.0.12 → 3.0.13

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
  SHA256:
3
- metadata.gz: a1e19102ef71895fd381f6da856f98b71a44102fbbc08b9738f510c18fe198ed
4
- data.tar.gz: acf67d407d42a2d32c617696f66000d358f4fbfbc7b12077e32945c07553853f
3
+ metadata.gz: eb102ddffa5ff2319a8e73b4d62ff8b3ff18fe2e9905c9ecb03c4aa20fda4bd7
4
+ data.tar.gz: 941b024d4e92811e51bf53dedba0039aaea52c169398d0b50ecc7da6bc0aefbb
5
5
  SHA512:
6
- metadata.gz: 9fad637185836ac6f213b6bd61870fd3390a0f10f66d74fcb0c913977e6c5d394cfee57ceab430800dc0b96a43508f131864b1aad4fb037bea861166fed30dd5
7
- data.tar.gz: 6f3592f8ed5a920a9e556fd0a888ac59ce17ca144f85a3d78077f6a3ab036ec385f7e7070b08fd0db9de93fd54f408315837fc97e118229259e43147b017aae7
6
+ metadata.gz: ea2c591ba32875d6cce5016c285fc3398e2bb491a7631ee5c900f3033c008292a38fd51c77d6a2b9abb00996963e8d8b0a61ca43c44a468025750a5aacd459be
7
+ data.tar.gz: e7e3f2b2ee7551e38f5d2d41b66eee7fb335c630ed1096598e25a1d09af506dfcbe63920de25828ce842c4b83c55a4abc70221e5c5a2fdc2e7f64b3fe181b50a
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Switchman
4
- VERSION = '3.0.12'
4
+ VERSION = '3.0.13'
5
5
  end
@@ -35,9 +35,9 @@ module Switchman
35
35
 
36
36
  scope = base_scope.order(::Arel.sql('database_server_id IS NOT NULL, database_server_id, id'))
37
37
  if servers != DatabaseServer.all
38
- conditions = ['database_server_id IN (?)', servers.map(&:id)]
39
- conditions.first << ' OR database_server_id IS NULL' if servers.include?(Shard.default.database_server)
40
- scope = scope.where(conditions)
38
+ database_server_ids = servers.map(&:id)
39
+ database_server_ids << nil if servers.include?(Shard.default.database_server)
40
+ scope = scope.where(database_server_id: database_server_ids)
41
41
  end
42
42
 
43
43
  scope = shard_scope(scope, shard) if shard
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: switchman
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.12
4
+ version: 3.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer
8
8
  - James Williams
9
9
  - Jacob Fugal
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-03-22 00:00:00.000000000 Z
13
+ date: 2022-03-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord
@@ -300,7 +300,7 @@ licenses:
300
300
  - MIT
301
301
  metadata:
302
302
  rubygems_mfa_required: 'true'
303
- post_install_message:
303
+ post_install_message:
304
304
  rdoc_options: []
305
305
  require_paths:
306
306
  - lib
@@ -316,7 +316,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
316
316
  version: '0'
317
317
  requirements: []
318
318
  rubygems_version: 3.1.4
319
- signing_key:
319
+ signing_key:
320
320
  specification_version: 4
321
321
  summary: Rails sharding magic
322
322
  test_files: []