firebolt 0.13.2 → 0.14.0

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: c5f6d3818aa3574b3122735bda4c7687ed19bdf4
4
- data.tar.gz: 04fd500afdae9d599e22f6599b3ec5ab2ab743e0
3
+ metadata.gz: a28b97526fd8ebd8b21e24f319fc2e96bd1e961e
4
+ data.tar.gz: 01ee01dd4f75a83a7aa2da7a66973f6c41790797
5
5
  SHA512:
6
- metadata.gz: 96299bfa9cf4729757264a178ea7c1981e86ffc194a3f1e9851da4805be9f7aebf13b716166e25ef82207e95f72634ae237855e9adb402d5cc97930df14d6fb1
7
- data.tar.gz: 01844bf0b93e6b574da623e140f8b25edbf83cf7c910b8b0ddae452d3f1723b4e41aef044a45bfc19b511f2fd16c5c18890d3df3c0ba4487d21b9c9d50a3bc6b
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 # Automatically enabled when cache_file_path is set
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
  ```
@@ -51,18 +51,20 @@ module Firebolt
51
51
  end
52
52
 
53
53
  def self.initialize!(&block)
54
- return if initialized? || skip_warming?
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
- initialize_rufus_scheduler
61
+ unless skip_warming?
62
+ initialize_rufus_scheduler
62
63
 
63
- # Initial warming
64
- warmer = config.use_file_warmer? ? ::Firebolt::FileWarmer : config.warmer
65
- ::Concurrent::Future.execute { ::Firebolt::WarmCacheJob.new.perform(warmer) }
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
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module Firebolt
2
- VERSION = "0.13.2"
2
+ VERSION = "0.14.0"
3
3
  end
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.13.2
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-02-05 00:00:00.000000000 Z
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.4.5
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