background_cache 0.2.1 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/background_cache.gemspec +1 -1
- data/lib/background_cache/daemon.rb +1 -0
- data/lib/background_cache.rb +11 -2
- metadata +4 -4
data/background_cache.gemspec
CHANGED
data/lib/background_cache.rb
CHANGED
@@ -18,10 +18,18 @@ require 'background_cache/mem_cache'
|
|
18
18
|
module BackgroundCache
|
19
19
|
|
20
20
|
class AppInstance
|
21
|
-
|
21
|
+
if defined?(ActionDispatch::Routing::UrlFor)
|
22
|
+
include ActionDispatch::Routing::UrlFor
|
23
|
+
elsif defined?(ActionController::UrlWriter)
|
24
|
+
include ActionController::UrlWriter
|
25
|
+
end
|
22
26
|
include Rack::Test::Methods
|
23
27
|
def app
|
24
|
-
|
28
|
+
if defined?(Rails::Application)
|
29
|
+
Rails::Application.subclasses.first
|
30
|
+
elsif defined?(ActionController::Dispatcher)
|
31
|
+
ActionController::Dispatcher.new
|
32
|
+
end
|
25
33
|
end
|
26
34
|
end
|
27
35
|
|
@@ -42,6 +50,7 @@ module BackgroundCache
|
|
42
50
|
end
|
43
51
|
|
44
52
|
def self.manual(cache, instance=nil)
|
53
|
+
ENV['BACKGROUND_CACHE'] = '1'
|
45
54
|
unless instance
|
46
55
|
instance = self.boot
|
47
56
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: background_cache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 3
|
10
|
+
version: 0.2.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Winton Welsh
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-10-
|
18
|
+
date: 2011-10-25 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rails
|