switchman 3.5.17 → 3.5.18
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 +4 -4
- data/lib/switchman/active_record/query_methods.rb +4 -2
- data/lib/switchman/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7cdaed95d542d3c212685130e78318ab37685b8fbf757fa54bb4948d517c6da6
|
|
4
|
+
data.tar.gz: 4326b2c5eccec1fea66ea9f0df42f2442239856330fd663138981dfcae1017ad
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c03b4ee181f6bf4f0bdd002c00c743c41c94afae189e0e7a18dab7abeb6f79477ea9f330c33f3968f26278fec0e20b42f7364cd05c5192b59ef9095ac9afed32
|
|
7
|
+
data.tar.gz: '09244d984c8116ed0d2596b2b4b9791bd0a95ad58d93879e08afbc0df3c470f3c71859c2d03089eea361fc8ea80f10762956891236767d127b1c5b97e8ff7062'
|
|
@@ -112,7 +112,9 @@ module Switchman
|
|
|
112
112
|
return unless klass.integral_id?
|
|
113
113
|
|
|
114
114
|
primary_key = predicates.detect do |predicate|
|
|
115
|
-
(predicate.is_a?(::Arel::Nodes::
|
|
115
|
+
(predicate.is_a?(::Arel::Nodes::Equality) ||
|
|
116
|
+
predicate.is_a?(::Arel::Nodes::In) ||
|
|
117
|
+
predicate.is_a?(::Arel::Nodes::HomogeneousIn)) &&
|
|
116
118
|
predicate.left.is_a?(::Arel::Attributes::Attribute) &&
|
|
117
119
|
predicate.left.relation.is_a?(::Arel::Table) && predicate.left.relation.klass == klass &&
|
|
118
120
|
klass.primary_key == predicate.left.name
|
|
@@ -209,7 +211,7 @@ module Switchman
|
|
|
209
211
|
when String, Array
|
|
210
212
|
values = (Hash === rest.first) ? rest.first.values : rest
|
|
211
213
|
|
|
212
|
-
if values.grep(ActiveRecord::Relation).first
|
|
214
|
+
if shard_source_value != :explicit && values.grep(ActiveRecord::Relation).first
|
|
213
215
|
raise "Sub-queries are not allowed as simple substitutions; " \
|
|
214
216
|
"please build your relation with more structured methods so that Switchman is able to introspect it."
|
|
215
217
|
end
|
data/lib/switchman/version.rb
CHANGED
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: 3.5.
|
|
4
|
+
version: 3.5.18
|
|
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: 2024-01-
|
|
13
|
+
date: 2024-01-17 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: activerecord
|