switchman 1.9.9 → 1.9.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/switchman/shard_internal.rb +1 -0
- data/lib/switchman/active_record/association.rb +6 -0
- data/lib/switchman/active_record/migration.rb +7 -0
- data/lib/switchman/active_record/query_methods.rb +2 -0
- data/lib/switchman/engine.rb +2 -1
- data/lib/switchman/version.rb +1 -1
- metadata +3 -4
- data/db/shard_1708.sqlite3 +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c35d2245d3da6dcc3684f329bec545e30a722fc
|
4
|
+
data.tar.gz: 0cdf83ae2ff27aa3d2591d99996cce15fd42ef12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73897cada38b50274a7c8ba0ee54b52f9fd43e77472ff6ade73dbd7a122c6ffadc06787546cff8b4905549aab08e3c0ccf9607c6c48bc6fd55eb07427874f6c5
|
7
|
+
data.tar.gz: cbea8fa73620127f37b97c115c6e25e27856766be69e45659147ebdf4e9fedccb75fd366a4322777a02d90698f9a2445e4139597469ca3de98c419f875abac37
|
@@ -156,6 +156,8 @@ module Switchman
|
|
156
156
|
end
|
157
157
|
|
158
158
|
def infer_shards_from_primary_key(predicates, binds = nil)
|
159
|
+
return unless klass.integral_id?
|
160
|
+
|
159
161
|
primary_key = predicates.detect do |predicate|
|
160
162
|
predicate.is_a?(::Arel::Nodes::Binary) && predicate.left.is_a?(::Arel::Attributes::Attribute) &&
|
161
163
|
predicate.left.relation.is_a?(::Arel::Table) && predicate.left.relation.model == klass &&
|
data/lib/switchman/engine.rb
CHANGED
@@ -111,7 +111,7 @@ module Switchman
|
|
111
111
|
|
112
112
|
::ActiveRecord::Associations::Association.prepend(ActiveRecord::Association)
|
113
113
|
::ActiveRecord::Associations::BelongsToAssociation.prepend(ActiveRecord::BelongsToAssociation)
|
114
|
-
::ActiveRecord::Associations::CollectionProxy.
|
114
|
+
::ActiveRecord::Associations::CollectionProxy.prepend(ActiveRecord::CollectionProxy)
|
115
115
|
if ::Rails.version < '5'
|
116
116
|
::ActiveRecord::Associations::Builder::CollectionAssociation.include(ActiveRecord::Builder::CollectionAssociation)
|
117
117
|
end
|
@@ -129,6 +129,7 @@ module Switchman
|
|
129
129
|
|
130
130
|
::ActiveRecord::LogSubscriber.prepend(ActiveRecord::LogSubscriber)
|
131
131
|
::ActiveRecord::Migration.prepend(ActiveRecord::Migration)
|
132
|
+
::ActiveRecord::Migrator.prepend(ActiveRecord::Migrator)
|
132
133
|
|
133
134
|
::ActiveRecord::Reflection::AbstractReflection.include(ActiveRecord::Reflection::AbstractReflection)
|
134
135
|
::ActiveRecord::Reflection::AssociationReflection.prepend(ActiveRecord::Reflection::AssociationScopeCache)
|
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: 1.9.
|
4
|
+
version: 1.9.10
|
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: 2017-
|
13
|
+
date: 2017-06-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: railties
|
@@ -177,7 +177,6 @@ files:
|
|
177
177
|
- db/migrate/20130328212039_create_switchman_shards.rb
|
178
178
|
- db/migrate/20130328224244_create_default_shard.rb
|
179
179
|
- db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
|
180
|
-
- db/shard_1708.sqlite3
|
181
180
|
- lib/switchman.rb
|
182
181
|
- lib/switchman/action_controller/caching.rb
|
183
182
|
- lib/switchman/active_record/abstract_adapter.rb
|
@@ -244,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
244
243
|
version: '0'
|
245
244
|
requirements: []
|
246
245
|
rubyforge_project:
|
247
|
-
rubygems_version: 2.
|
246
|
+
rubygems_version: 2.6.11
|
248
247
|
signing_key:
|
249
248
|
specification_version: 4
|
250
249
|
summary: Rails 4 sharding magic
|
data/db/shard_1708.sqlite3
DELETED
File without changes
|