active_record_shards 3.3.7 → 3.3.8

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
  SHA1:
3
- metadata.gz: a1b7e6290155b61ab8d6de57e98a4c6e6727366f
4
- data.tar.gz: a7347ed77bc82aaf391c060446f249df215c1d2d
3
+ metadata.gz: 980b70eaf5ffddcd5bf9cd6a5eb4b273d4cf44b2
4
+ data.tar.gz: bbd7dad9a93782e167c8b57b9e181f553e026e74
5
5
  SHA512:
6
- metadata.gz: 0411bc3189931932d5c0c68f04b0384ff6238c21b2efacd1fa5f4fe6c4b838f1709dadffc0ca03e97fa97561b774c74ad702a275a63e138a8b63681d0751307f
7
- data.tar.gz: 3014ac7e0b4a5676bb38dc6f49b85af28848205274e6ce9b2ad59c6eb354e2f9c2206cf3a1899fcb8554b7a44c3ce798d4b28f9c9d15c6d9a4ea413706fd0c80
6
+ metadata.gz: 0c95e6b73354dbc310dfca4310c5573e207013a8a834eed811f5c14e69c65ed59a1c51334f6f9e04b3a598d690c1f7c0084ba57524e459c6d67527d726048b13
7
+ data.tar.gz: 411529c94179ce6dafeca4bda7fae80cd9d1731bfa47ac35e870dd4a911d051b7d6fe40ccb7a69bc3d3e009a0d47aa2ab808b531878b850c28b4046e8137f66d
@@ -11,7 +11,11 @@ module ActiveRecordShards
11
11
  if self == ActiveRecord::Base
12
12
  supports_sharding?
13
13
  elsif self == base_class
14
- @sharded != false
14
+ if @sharded.nil?
15
+ ActiveRecord::Base.is_sharded?
16
+ else
17
+ @sharded != false
18
+ end
15
19
  else
16
20
  base_class.is_sharded?
17
21
  end
@@ -70,7 +70,7 @@ namespace :db do
70
70
 
71
71
  namespace :test do
72
72
  desc 'Purges the test databases by dropping and creating'
73
- task :purge do
73
+ task :purge => :load_config do
74
74
  begin
75
75
  saved_env = Rails.env
76
76
  Rails.env = 'test'
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.3.7
4
+ version: 3.3.8
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: 2015-02-27 00:00:00.000000000 Z
13
+ date: 2015-03-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord