second_level_cache 2.3.0.beta → 2.3.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4abc1a1470dbaddc2928a7b91c0c629eb0c92891
|
4
|
+
data.tar.gz: eb785ea9967fa623b5492ef1677388e53d693fe7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e828132b84bec6a95eb5506b0d8ea55f2c713d1e6ef775d40780f8ab75ba490c2bab37c63c77a26a2ffd81669fc577f2de76e623e5dd9576cc890af3e504f3e7
|
7
|
+
data.tar.gz: a453166bc6e5216b5b4dd3b3abbea6a995b626916eff9346bbf5bfa1d7a53f2af93825cfb93077c6482c4cd0fc134fb97465a6c1452b58729c728b6d28c7b11d
|
data/README.md
CHANGED
@@ -7,14 +7,14 @@ require 'second_level_cache/active_record/belongs_to_association'
|
|
7
7
|
require 'second_level_cache/active_record/has_one_association'
|
8
8
|
require 'second_level_cache/active_record/preloader'
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
10
|
+
# http://api.rubyonrails.org/classes/ActiveSupport/LazyLoadHooks.html
|
11
|
+
# ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Base)
|
12
|
+
ActiveSupport.on_load(:active_record) do
|
13
|
+
include SecondLevelCache::Mixin
|
14
|
+
prepend SecondLevelCache::ActiveRecord::Base
|
15
|
+
extend SecondLevelCache::ActiveRecord::FetchByUniqKey
|
16
|
+
prepend SecondLevelCache::ActiveRecord::Persistence
|
16
17
|
|
17
|
-
ActiveRecord::Base.send(:prepend, SecondLevelCache::ActiveRecord::Persistence)
|
18
18
|
ActiveRecord::Associations::BelongsToAssociation.send(:prepend, SecondLevelCache::ActiveRecord::Associations::BelongsToAssociation)
|
19
19
|
ActiveRecord::Associations::HasOneAssociation.send(:prepend, SecondLevelCache::ActiveRecord::Associations::HasOneAssociation)
|
20
20
|
ActiveRecord::Associations::Preloader::BelongsTo.send(:prepend, SecondLevelCache::ActiveRecord::Associations::Preloader::BelongsTo)
|
data/lib/second_level_cache.rb
CHANGED
@@ -2,6 +2,7 @@ require 'active_support/all'
|
|
2
2
|
require 'second_level_cache/config'
|
3
3
|
require 'second_level_cache/record_marshal'
|
4
4
|
require 'second_level_cache/record_relation'
|
5
|
+
require 'second_level_cache/active_record'
|
5
6
|
|
6
7
|
module SecondLevelCache
|
7
8
|
def self.configure
|
@@ -100,5 +101,3 @@ module SecondLevelCache
|
|
100
101
|
end
|
101
102
|
end
|
102
103
|
end
|
103
|
-
|
104
|
-
require 'second_level_cache/active_record' if defined?(ActiveRecord)
|
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.0
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hooopo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -142,7 +142,6 @@ files:
|
|
142
142
|
- lib/second_level_cache/active_record/has_one_association.rb
|
143
143
|
- lib/second_level_cache/active_record/persistence.rb
|
144
144
|
- lib/second_level_cache/active_record/preloader.rb
|
145
|
-
- lib/second_level_cache/active_record/railtie.rb
|
146
145
|
- lib/second_level_cache/config.rb
|
147
146
|
- lib/second_level_cache/record_marshal.rb
|
148
147
|
- lib/second_level_cache/record_relation.rb
|
@@ -184,9 +183,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
184
183
|
version: '0'
|
185
184
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
185
|
requirements:
|
187
|
-
- - "
|
186
|
+
- - ">="
|
188
187
|
- !ruby/object:Gem::Version
|
189
|
-
version:
|
188
|
+
version: '0'
|
190
189
|
requirements: []
|
191
190
|
rubyforge_project:
|
192
191
|
rubygems_version: 2.5.1
|
@@ -1,16 +0,0 @@
|
|
1
|
-
module SecondLevelCache
|
2
|
-
module ActiveRecord
|
3
|
-
class Railtie < Rails::Railtie
|
4
|
-
initializer 'second_level_cache.active_record.initialization' do
|
5
|
-
::ActiveRecord::Base.send(:include, SecondLevelCache::Mixin)
|
6
|
-
::ActiveRecord::Base.send(:prepend, SecondLevelCache::ActiveRecord::Base)
|
7
|
-
::ActiveRecord::Base.send(:extend, SecondLevelCache::ActiveRecord::FetchByUniqKey)
|
8
|
-
|
9
|
-
::ActiveRecord::Base.send(:prepend, SecondLevelCache::ActiveRecord::Persistence)
|
10
|
-
::ActiveRecord::Associations::BelongsToAssociation.send(:prepend, SecondLevelCache::ActiveRecord::Associations::BelongsToAssociation)
|
11
|
-
::ActiveRecord::Associations::HasOneAssociation.send(:prepend, SecondLevelCache::ActiveRecord::Associations::HasOneAssociation)
|
12
|
-
::ActiveRecord::Associations::Preloader::BelongsTo.send(:prepend, SecondLevelCache::ActiveRecord::Associations::Preloader::BelongsTo)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|