firebolt 0.13.2 → 0.14.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 +4 -4
- data/README.md +1 -1
- data/lib/firebolt.rb +8 -6
- data/lib/firebolt/config.rb +1 -2
- data/lib/firebolt/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a28b97526fd8ebd8b21e24f319fc2e96bd1e961e
|
4
|
+
data.tar.gz: 01ee01dd4f75a83a7aa2da7a66973f6c41790797
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df9b7e9e7135c96ff2b68e335a6bf3288c6b22c30631b213391ca9ab728e8893a84ea48ae5269545718743f4c6a46c21765e2cb971dac5c7fcdbabf7ecbe5ed5
|
7
|
+
data.tar.gz: 09b9fe7b11a968b2c380dce14846aee63f820ffdda7306dd6006505e967251ba7bda45cec79c5580549868423726bfaa9241f6bb127cc4023889f84128504f10
|
data/README.md
CHANGED
@@ -32,7 +32,7 @@ To use Firebolt, you first need to configure it.
|
|
32
32
|
config.warmer = ::YourAwesomeCacheWarmer
|
33
33
|
|
34
34
|
# Optional
|
35
|
-
config.cache_file_enabled = true
|
35
|
+
config.cache_file_enabled = true
|
36
36
|
config.cache_file_path = '/path/to/your/project/tmp' # Defaults to /tmp
|
37
37
|
end
|
38
38
|
```
|
data/lib/firebolt.rb
CHANGED
@@ -51,18 +51,20 @@ module Firebolt
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def self.initialize!(&block)
|
54
|
-
return if initialized?
|
54
|
+
return if initialized?
|
55
55
|
|
56
56
|
configure(&block) if block_given?
|
57
57
|
|
58
58
|
raise "Firebolt.config.cache has not been set" unless config.cache
|
59
59
|
raise "Firebolt.config.warmer has not been set" unless config.warmer
|
60
60
|
|
61
|
-
|
61
|
+
unless skip_warming?
|
62
|
+
initialize_rufus_scheduler
|
62
63
|
|
63
|
-
|
64
|
-
|
65
|
-
|
64
|
+
# Initial warming
|
65
|
+
warmer = config.use_file_warmer? ? ::Firebolt::FileWarmer : config.warmer
|
66
|
+
::Concurrent::Future.execute { ::Firebolt::WarmCacheJob.new.perform(warmer) }
|
67
|
+
end
|
66
68
|
|
67
69
|
initialized!
|
68
70
|
end
|
@@ -82,6 +84,6 @@ module Firebolt
|
|
82
84
|
end
|
83
85
|
|
84
86
|
def self.skip_warming?
|
85
|
-
ENV['FIREBOLT_SKIP_WARMING'] || ENV['RAILS_ENV'] == 'test'
|
87
|
+
ENV['FIREBOLT_SKIP_WARMING'] || ENV['RAILS_ENV'] == 'test' || config.skip_warming == true
|
86
88
|
end
|
87
89
|
end
|
data/lib/firebolt/config.rb
CHANGED
@@ -43,7 +43,7 @@ module Firebolt
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
-
hash_accessor :cache, :cache_file_enabled, :cache_file_path, :namespace, :warmer, :warming_frequency
|
46
|
+
hash_accessor :cache, :cache_file_enabled, :cache_file_path, :namespace, :skip_warming, :warmer, :warming_frequency
|
47
47
|
|
48
48
|
##
|
49
49
|
# Public instance methods
|
@@ -60,7 +60,6 @@ module Firebolt
|
|
60
60
|
def cache_file_path=(path)
|
61
61
|
raise ArgumentError, "Directory '#{path}' does not exist or is not writable." unless ::File.writable?(path)
|
62
62
|
|
63
|
-
self[:cache_file_enabled] = true
|
64
63
|
self[:cache_file_path] = path
|
65
64
|
end
|
66
65
|
|
data/lib/firebolt/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firebolt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Hutchison
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-09-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
@@ -159,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
159
|
version: '0'
|
160
160
|
requirements: []
|
161
161
|
rubyforge_project:
|
162
|
-
rubygems_version: 2.
|
162
|
+
rubygems_version: 2.5.1
|
163
163
|
signing_key:
|
164
164
|
specification_version: 4
|
165
165
|
summary: Firebolt is a simple cache warmer. It warms the cache using a specially defined
|