second_level_cache 2.3.2 → 2.3.3

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: 9fd6197c452055e9009c07da895d21ea853b132b
4
- data.tar.gz: a0d81043575caa9d6093c9dd51fe1e84d2bff1f7
3
+ metadata.gz: 1c4b3cf277afefb0bc9e4943fe03fbd45ad1c487
4
+ data.tar.gz: 6869caa60874ba8b133552c4a32db346e86bd0fa
5
5
  SHA512:
6
- metadata.gz: a439c2b62f440b2d4d7cb9344a586273cca00d4858f5d1a417393639ff89afbc58875b305a08e69be31d7397b44406f8a033ee43b9d6572c071b7ff3a7fd161c
7
- data.tar.gz: 3088fdd16e92a72769dab464d413cd4e788038818bf655b3a785addc6751d39a3cc0210b0799eb58f484bcf28e8f0421f7c04e9e9361e124ea7d60750eed791e
6
+ metadata.gz: e02c7b7980021f26efd958825dd3c69a06717f6a07c93e94ae812a7bf89383fe44482699e59c6fb78728cdeb935bba86b7e727a7a0142d83ad0ae17d51981f9a
7
+ data.tar.gz: 1d6f9f6f1f335f4ad5f3507491b15cf9034d9a74029a1c751bf792fe67b6c294a295ad221c6f909c8bac638599d0d717514d58297d1b4c0a4f5aeada4af3c418
data/Gemfile CHANGED
@@ -2,4 +2,4 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'rails', '~> 5.0.0'
5
+ gem 'rails', '~> 5.1.0'
@@ -19,7 +19,6 @@ module SecondLevelCache
19
19
  return super(id) unless select_all_column?
20
20
 
21
21
  id = id.id if ActiveRecord::Base == id
22
-
23
22
  if cachable?
24
23
  record = @klass.read_second_level_cache(id)
25
24
  if record
@@ -61,12 +60,13 @@ module SecondLevelCache
61
60
 
62
61
  private
63
62
 
63
+ # readonly_value - active_record/relation/query_methods.rb Rails 5.1 true/false
64
64
  def cachable?
65
65
  limit_one? &&
66
66
  order_values.blank? &&
67
67
  includes_values.blank? &&
68
68
  preload_values.blank? &&
69
- readonly_value.nil? &&
69
+ readonly_value.blank? &&
70
70
  joins_values.blank? &&
71
71
  !@klass.locking_enabled? &&
72
72
  where_clause_match_equality?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SecondLevelCache
4
- VERSION = '2.3.2'.freeze
4
+ VERSION = '2.3.3'.freeze
5
5
  end
@@ -30,8 +30,8 @@ Gem::Specification.new do |gem|
30
30
  gem.require_paths = ['lib']
31
31
  gem.version = SecondLevelCache::VERSION
32
32
 
33
- gem.add_runtime_dependency 'activesupport', ['>= 5.0.0.beta3', '< 5.1.0']
34
- gem.add_runtime_dependency 'activerecord', ['>= 5.0.0.beta3', '< 5.1.0']
33
+ gem.add_runtime_dependency 'activesupport', ['>= 5.0.0', '< 5.2']
34
+ gem.add_runtime_dependency 'activerecord', ['>= 5.0.0', '< 5.2']
35
35
 
36
36
  gem.add_development_dependency 'sqlite3'
37
37
  gem.add_development_dependency 'rake'
data/test/model/user.rb CHANGED
@@ -49,6 +49,6 @@ class Namespace < ActiveRecord::Base
49
49
  end
50
50
 
51
51
  class ForkedUserLink < ActiveRecord::Base
52
- belongs_to :forked_from_user, class_name: User
53
- belongs_to :forked_to_user, class_name: User
52
+ belongs_to :forked_from_user, class_name: 'User'
53
+ belongs_to :forked_to_user, class_name: 'User'
54
54
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: second_level_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.2
4
+ version: 2.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hooopo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-21 00:00:00.000000000 Z
11
+ date: 2017-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,40 +16,40 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.0.0.beta3
19
+ version: 5.0.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: 5.1.0
22
+ version: '5.2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 5.0.0.beta3
29
+ version: 5.0.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: 5.1.0
32
+ version: '5.2'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: activerecord
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 5.0.0.beta3
39
+ version: 5.0.0
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: 5.1.0
42
+ version: '5.2'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 5.0.0.beta3
49
+ version: 5.0.0
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: 5.1.0
52
+ version: '5.2'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: sqlite3
55
55
  requirement: !ruby/object:Gem::Requirement