active_record_shards 3.6.3 → 3.6.4
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/active_record_shards.rb +1 -0
- data/lib/active_record_shards/association_collection_connection_selection.rb +1 -0
- data/lib/active_record_shards/configuration_parser.rb +1 -0
- data/lib/active_record_shards/connection_handler.rb +1 -0
- data/lib/active_record_shards/connection_pool.rb +1 -0
- data/lib/active_record_shards/connection_specification.rb +1 -0
- data/lib/active_record_shards/connection_switcher.rb +1 -0
- data/lib/active_record_shards/default_slave_patches.rb +5 -5
- data/lib/active_record_shards/migration.rb +1 -0
- data/lib/active_record_shards/model.rb +1 -0
- data/lib/active_record_shards/schema_dumper_extension.rb +1 -0
- data/lib/active_record_shards/shard_selection.rb +1 -0
- data/lib/active_record_shards/shard_support.rb +1 -0
- data/lib/active_record_shards/tasks.rb +1 -0
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 185c5b0d6e81f17254e3c4687b97dcb3c0a69986
|
4
|
+
data.tar.gz: ac63618aa52c5775dec4c8dd475c9495f0deb67d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3428a13e140cbee27cd54b376234684ab183045d4a1589cd583581c619e7e29d9d7b7ee55004470ab059a657fa491602ae7f0ff4c67ef807ac50bc379853aec
|
7
|
+
data.tar.gz: 82a4920c11bf3d2f97cf8ee8742724675ead818d4864067f6a276569027d77d1ed79a3b115455487e795070325231428b75e01fbd8c172571a98c7799eb7b775
|
data/lib/active_record_shards.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
module ActiveRecordShards
|
2
3
|
module DefaultSlavePatches
|
3
4
|
def self.wrap_method_in_on_slave(class_method, base, method)
|
4
|
-
|
5
|
-
|
6
|
-
base_methods = (base.methods | base.private_methods).map(&:to_sym)
|
5
|
+
base_methods = if class_method
|
6
|
+
base.methods + base.private_methods
|
7
7
|
else
|
8
|
-
|
8
|
+
base.instance_methods + base.private_instance_methods
|
9
9
|
end
|
10
10
|
|
11
11
|
return unless base_methods.include?(method)
|
@@ -24,7 +24,7 @@ module ActiveRecordShards
|
|
24
24
|
RUBY
|
25
25
|
end
|
26
26
|
|
27
|
-
CLASS_SLAVE_METHODS = [ :find_by_sql, :count_by_sql, :calculate, :find_one, :find_some, :find_every, :
|
27
|
+
CLASS_SLAVE_METHODS = [ :find_by_sql, :count_by_sql, :calculate, :find_one, :find_some, :find_every, :exists?, :table_exists? ]
|
28
28
|
|
29
29
|
def self.extended(base)
|
30
30
|
CLASS_SLAVE_METHODS.each { |m| ActiveRecordShards::DefaultSlavePatches.wrap_method_in_on_slave(true, base, m) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record_shards
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.6.
|
4
|
+
version: 3.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mick Staugaard
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-05-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|
@@ -150,6 +150,20 @@ dependencies:
|
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: phenix
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 0.2.0
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 0.2.0
|
153
167
|
description: Easily run queries on shard and slave databases.
|
154
168
|
email:
|
155
169
|
- mick@staugaard.com
|
@@ -194,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
194
208
|
version: '0'
|
195
209
|
requirements: []
|
196
210
|
rubyforge_project:
|
197
|
-
rubygems_version: 2.
|
211
|
+
rubygems_version: 2.5.1
|
198
212
|
signing_key:
|
199
213
|
specification_version: 4
|
200
214
|
summary: Simple database switching for ActiveRecord.
|