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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0fe1a0e108ca214d83011674329c5b74e25bd258
4
- data.tar.gz: 8b49b4c6af876d50bb682cd343e9ecbe764adb3f
3
+ metadata.gz: 185c5b0d6e81f17254e3c4687b97dcb3c0a69986
4
+ data.tar.gz: ac63618aa52c5775dec4c8dd475c9495f0deb67d
5
5
  SHA512:
6
- metadata.gz: b05dd1f52e2ce8ebe90ad20f6720f673d8678f41adada752a194fa2fc64d6add00da6f44b7c20e03693ba1f05904fe8580be0f449269512ead30cd8090b8097b
7
- data.tar.gz: c651051f455d93e4bf9b60af647749875e18a82ec5d873cf23056592baa846240caca4a838bf5c505989c37be4e5f81651c2003ba9395a6836e54fae529a9ca5
6
+ metadata.gz: d3428a13e140cbee27cd54b376234684ab183045d4a1589cd583581c619e7e29d9d7b7ee55004470ab059a657fa491602ae7f0ff4c67ef807ac50bc379853aec
7
+ data.tar.gz: 82a4920c11bf3d2f97cf8ee8742724675ead818d4864067f6a276569027d77d1ed79a3b115455487e795070325231428b75e01fbd8c172571a98c7799eb7b775
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'active_record'
2
3
  require 'active_record/base'
3
4
  require 'active_record_shards/configuration_parser'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module ActiveRecordShards
2
3
  module AssociationCollectionConnectionSelection
3
4
  def on_slave_if(condition)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'active_support/core_ext'
2
3
 
3
4
  module ActiveRecordShards
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  ActiveRecord::ConnectionAdapters::ConnectionHandler.class_eval do
2
3
  if ActiveRecord::VERSION::MAJOR >= 4
3
4
  def retrieve_connection_pool(klass)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module ActiveRecordShards
2
3
  ConnectionPoolNameDecorator = Struct.new(:name)
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class ActiveRecord::Base
2
3
  def self.establish_connection(spec = ENV["DATABASE_URL"])
3
4
  if ActiveRecord::VERSION::STRING >= '4.1.0'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'active_record_shards/shard_support'
2
3
 
3
4
  module ActiveRecordShards
@@ -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
- if class_method
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
- base_methods = (base.instance_methods | base.private_instance_methods).map(&:to_sym)
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, :quote_value, :sanitize_sql_hash_for_conditions, :exists?, :table_exists? ]
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) }
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module ActiveRecord
2
3
  class Migrator
3
4
  class << self
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module ActiveRecordShards
2
3
  module Model
3
4
  def not_sharded
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module ActiveRecordShards
2
3
  module SchemaDumperExtension
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module ActiveRecordShards
2
3
  class ShardSelection
3
4
  NO_SHARD = :_no_shard
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module ActiveRecordShards
2
3
  class ShardSupport
3
4
  class ShardEnumerator
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'active_record_shards'
2
3
 
3
4
  %w[db:drop db:create db:abort_if_pending_migrations db:reset db:test:purge].each do |name|
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.3
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-03-23 00:00:00.000000000 Z
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.4.5.1
211
+ rubygems_version: 2.5.1
198
212
  signing_key:
199
213
  specification_version: 4
200
214
  summary: Simple database switching for ActiveRecord.