activerecord-turntable 3.0.0.alpha2 → 3.0.0.alpha3

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: ab82abdd16e36a30d5c3b55f5cb5ff61d7142dcd
4
- data.tar.gz: 4ece75789087ee54b31484601390ed16392aca31
3
+ metadata.gz: 41a37244828a78c777c27525202b50624b38fe3d
4
+ data.tar.gz: 5c641a6137de50b3b86994b76ec711f074e078f0
5
5
  SHA512:
6
- metadata.gz: f11dca6559d5539c44cf82d863e88acb793eace6fc527d1fe900d8c424fc3f633615242eebd9e86c7977b92b05cb64e0e2f799826e19c12fc13ac84165fac13d
7
- data.tar.gz: 250ab4d9806440953e10acb8f7b94a6b0fc564f54859e8f6c99e69396c598246b1d85f6a0193d76e4555ef366baee651091740733948808c1f6111c259568e4c
6
+ metadata.gz: 1fa1f1bd2cbfeb0152f235feb507bcfc5ab2efc6b6aa722bc1ae711d21e1fe4e682b5c471422c71fe6189388fe16b7a68006b5eb99629ddcaba2f691f03647c4
7
+ data.tar.gz: 931b27608861d82164a1271ae28ffd4abda9374b67d0f71625c9eaa1f6a17f53bcfb6fc765ddf7157128abb38c99dc98835aa118ea622a5f050eec279431ccc4
data/.travis.yml CHANGED
@@ -2,6 +2,7 @@ language: ruby
2
2
  rvm:
3
3
  - 2.2.6
4
4
  - 2.3.3
5
+ - 2.4.0
5
6
  - ruby-head
6
7
  gemfile:
7
8
  - gemfiles/rails5_0.gemfile
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## activerecord-turntable 3.0.0.alpha3 ##
2
+
3
+ ### Bugfix
4
+
5
+ * Disable statement cache when adding shard conditions automatically
6
+
1
7
  ## activerecord-turntable 3.0.0.alpha2 ##
2
8
 
3
9
  ### Improvement
@@ -11,16 +11,22 @@ module ActiveRecord::Turntable
11
11
 
12
12
  protected
13
13
 
14
- # @note Override to pass shard key conditions
15
- def target_scope
16
- return super unless should_use_shard_key?
14
+ # @note Override to pass shard key conditions
15
+ def target_scope
16
+ return super unless should_use_shard_key?
17
17
 
18
- scope = klass.where(
19
- klass.turntable_shard_key =>
20
- owner.send(foreign_shard_key)
21
- )
22
- super.merge!(scope)
23
- end
18
+ scope = klass.where(
19
+ klass.turntable_shard_key =>
20
+ owner.send(foreign_shard_key)
21
+ )
22
+ super.merge!(scope)
23
+ end
24
+
25
+ private
26
+
27
+ def skip_statement_cache?
28
+ super || should_use_shard_key?
29
+ end
24
30
  end
25
31
  end
26
32
  end
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module Turntable
3
- VERSION = "3.0.0.alpha2".freeze
3
+ VERSION = "3.0.0.alpha3".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-turntable
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.alpha2
4
+ version: 3.0.0.alpha3
5
5
  platform: ruby
6
6
  authors:
7
7
  - gussan
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-01-02 00:00:00.000000000 Z
12
+ date: 2017-01-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord