ocache 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/lib/ocache.rb +1 -1
- data/lib/ocache/handler.rb +1 -1
- data/lib/ocache/hook.rb +11 -0
- data/lib/ocache/proxy.rb +1 -1
- data/lib/ocache/version.rb +2 -2
- data/test/dummy/log/test.log +121650 -0
- data/test/dummy/tmp/cache/BFB/370/votes%2Fexpensive_class_method +0 -0
- data/test/dummy/tmp/cache/E07/560/queryables%2Fexpensive_class_method +0 -0
- data/test/ocache_benchmark_test.rb +2 -2
- data/test/ocache_test.rb +3 -3
- metadata +7 -3
- data/lib/ocache/hooks/rails.rb +0 -15
Binary file
|
Binary file
|
data/test/ocache_test.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
|
-
class
|
4
|
-
|
3
|
+
class OcacheTest < ActiveSupport::TestCase
|
4
|
+
setup do
|
5
5
|
Rails.cache.write('init', true)
|
6
6
|
Rails.cache.clear
|
7
7
|
@options = {direction: true, created_at: DateTime.parse('january 7th 1986 00:00:00 +0000'), updated_at: DateTime.parse('january 7th 1986 00:00:00 +0000')}
|
8
8
|
end
|
9
9
|
|
10
|
-
test '
|
10
|
+
test 'caching is enabled' do
|
11
11
|
assert Rails.application.config.action_controller.perform_caching
|
12
12
|
end
|
13
13
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ocache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luke Heuer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -34,7 +34,7 @@ files:
|
|
34
34
|
- Rakefile
|
35
35
|
- lib/ocache.rb
|
36
36
|
- lib/ocache/handler.rb
|
37
|
-
- lib/ocache/
|
37
|
+
- lib/ocache/hook.rb
|
38
38
|
- lib/ocache/proxy.rb
|
39
39
|
- lib/ocache/version.rb
|
40
40
|
- test/dummy/README.rdoc
|
@@ -77,6 +77,8 @@ files:
|
|
77
77
|
- test/dummy/public/422.html
|
78
78
|
- test/dummy/public/500.html
|
79
79
|
- test/dummy/public/favicon.ico
|
80
|
+
- test/dummy/tmp/cache/BFB/370/votes%2Fexpensive_class_method
|
81
|
+
- test/dummy/tmp/cache/E07/560/queryables%2Fexpensive_class_method
|
80
82
|
- test/ocache_benchmark_test.rb
|
81
83
|
- test/ocache_test.rb
|
82
84
|
- test/test_helper.rb
|
@@ -145,6 +147,8 @@ test_files:
|
|
145
147
|
- test/dummy/public/favicon.ico
|
146
148
|
- test/dummy/Rakefile
|
147
149
|
- test/dummy/README.rdoc
|
150
|
+
- test/dummy/tmp/cache/BFB/370/votes%2Fexpensive_class_method
|
151
|
+
- test/dummy/tmp/cache/E07/560/queryables%2Fexpensive_class_method
|
148
152
|
- test/ocache_benchmark_test.rb
|
149
153
|
- test/ocache_test.rb
|
150
154
|
- test/test_helper.rb
|
data/lib/ocache/hooks/rails.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
module OCache
|
2
|
-
def self.rails_hook!
|
3
|
-
ActiveSupport.on_load(:active_record) do
|
4
|
-
include OCache::Handler
|
5
|
-
end
|
6
|
-
|
7
|
-
Module.__send__(:include, OCache::Handler)
|
8
|
-
end
|
9
|
-
|
10
|
-
class Rails < ::Rails::Engine
|
11
|
-
initializer 'ocache' do
|
12
|
-
OCache.rails_hook!
|
13
|
-
end
|
14
|
-
end if defined?(::Rails)
|
15
|
-
end
|