firebolt 0.10.1 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -2,6 +2,7 @@
2
2
  *.rbc
3
3
  .bundle
4
4
  .config
5
+ .ruby-*
5
6
  .yardoc
6
7
  Gemfile.lock
7
8
  InstalledFiles
data/firebolt.gemspec CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  #
24
24
  spec.add_dependency "json"
25
25
  spec.add_dependency "rufus-scheduler"
26
- spec.add_dependency "sucker_punch", "< 1.0"
26
+ spec.add_dependency "sucker_punch", ">= 1.0"
27
27
 
28
28
  ##
29
29
  # Development Dependencies
@@ -1,3 +1,5 @@
1
+ require 'firebolt/warmer'
2
+
1
3
  module Firebolt
2
4
  class FileWarmer
3
5
  include ::Firebolt::Warmer
@@ -3,7 +3,6 @@ require 'fileutils'
3
3
 
4
4
  namespace :firebolt do
5
5
  namespace :cache do
6
-
7
6
  desc 'Rebuild the cache by purging and re-warming'
8
7
  task :rebuild => :environment do
9
8
  ::Rake::Task['firebolt:cache:purge'].invoke
@@ -29,8 +28,7 @@ namespace :firebolt do
29
28
  ::Firebolt.initialize!
30
29
  warmer = ::Firebolt.config.warmer
31
30
  puts "Warming the cache with #{warmer}"
32
- ::SuckerPunch::Queue[:firebolt_queue].perform(warmer)
31
+ ::Firebolt::WarmCacheJob.new.perform(warmer)
33
32
  end
34
-
35
33
  end
36
34
  end
@@ -1,3 +1,3 @@
1
1
  module Firebolt
2
- VERSION = "0.10.1"
2
+ VERSION = "0.11.0"
3
3
  end
@@ -1,6 +1,6 @@
1
1
  module Firebolt
2
- class CacheWorker
3
- include ::SuckerPunch::Worker
2
+ class WarmCacheJob
3
+ include ::SuckerPunch::Job
4
4
 
5
5
  def perform(warmer_class)
6
6
  cache_warmer = warmer_class.new
data/lib/firebolt.rb CHANGED
@@ -5,10 +5,10 @@ require "rufus/scheduler"
5
5
 
6
6
  require "firebolt/keys"
7
7
  require "firebolt/cache"
8
- require "firebolt/cache_worker"
9
8
  require "firebolt/config"
10
- require "firebolt/warmer"
11
9
  require "firebolt/file_warmer"
10
+ require "firebolt/warm_cache_job"
11
+ require "firebolt/warmer"
12
12
  require "firebolt/version"
13
13
 
14
14
  require "firebolt/railtie" if defined?(::Rails::Railtie)
@@ -35,19 +35,13 @@ module Firebolt
35
35
  end
36
36
  end
37
37
 
38
- def self.configure_sucker_punch
39
- ::SuckerPunch.config do
40
- queue :name => :firebolt_queue, :worker => ::Firebolt::CacheWorker, :workers => 2
41
- end
42
- end
43
-
44
38
  def self.initialize_rufus_scheduler
45
39
  return if config.warming_frequency.nil?
46
40
 
47
41
  warming_frequency = ::Rufus.to_time_string(config.warming_frequency)
48
42
 
49
43
  ::Rufus::Scheduler.start_new.every(warming_frequency) do
50
- ::SuckerPunch::Queue[:firebolt_queue].async.perform(config.warmer)
44
+ ::Firebolt::WarmCacheJob.new.async.perform(config.warmer)
51
45
  end
52
46
  end
53
47
 
@@ -59,12 +53,11 @@ module Firebolt
59
53
  raise "Firebolt.config.cache has not been set" unless config.cache
60
54
  raise "Firebolt.config.warmer has not been set" unless config.warmer
61
55
 
62
- configure_sucker_punch
63
56
  initialize_rufus_scheduler
64
57
 
65
58
  # Initial warming
66
59
  warmer = config.use_file_warmer? ? ::Firebolt::FileWarmer : config.warmer
67
- ::SuckerPunch::Queue[:firebolt_queue].async.perform(warmer)
60
+ ::Firebolt::WarmCacheJob.new.async.perform(config.warmer)
68
61
 
69
62
  initialized!
70
63
  end
metadata CHANGED
@@ -1,72 +1,87 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: firebolt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.11.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Adam Hutchison
8
9
  - BJ Neilsen
9
- autorequire:
10
+ autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2013-08-09 00:00:00.000000000 Z
13
+ date: 2013-08-22 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: json
17
+ version_requirements: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - ">="
20
+ - !ruby/object:Gem::Version
21
+ version: !binary |-
22
+ MA==
23
+ none: false
16
24
  requirement: !ruby/object:Gem::Requirement
17
25
  requirements:
18
- - - '>='
26
+ - - ">="
19
27
  - !ruby/object:Gem::Version
20
- version: '0'
21
- type: :runtime
28
+ version: !binary |-
29
+ MA==
30
+ none: false
22
31
  prerelease: false
32
+ type: :runtime
33
+ - !ruby/object:Gem::Dependency
34
+ name: rufus-scheduler
23
35
  version_requirements: !ruby/object:Gem::Requirement
24
36
  requirements:
25
- - - '>='
37
+ - - ">="
26
38
  - !ruby/object:Gem::Version
27
- version: '0'
28
- - !ruby/object:Gem::Dependency
29
- name: rufus-scheduler
39
+ version: !binary |-
40
+ MA==
41
+ none: false
30
42
  requirement: !ruby/object:Gem::Requirement
31
43
  requirements:
32
- - - '>='
44
+ - - ">="
33
45
  - !ruby/object:Gem::Version
34
- version: '0'
35
- type: :runtime
46
+ version: !binary |-
47
+ MA==
48
+ none: false
36
49
  prerelease: false
50
+ type: :runtime
51
+ - !ruby/object:Gem::Dependency
52
+ name: sucker_punch
37
53
  version_requirements: !ruby/object:Gem::Requirement
38
54
  requirements:
39
- - - '>='
55
+ - - ">="
40
56
  - !ruby/object:Gem::Version
41
- version: '0'
42
- - !ruby/object:Gem::Dependency
43
- name: sucker_punch
57
+ version: '1.0'
58
+ none: false
44
59
  requirement: !ruby/object:Gem::Requirement
45
60
  requirements:
46
- - - <
61
+ - - ">="
47
62
  - !ruby/object:Gem::Version
48
63
  version: '1.0'
49
- type: :runtime
64
+ none: false
50
65
  prerelease: false
66
+ type: :runtime
67
+ - !ruby/object:Gem::Dependency
68
+ name: rake
51
69
  version_requirements: !ruby/object:Gem::Requirement
52
70
  requirements:
53
- - - <
71
+ - - ">="
54
72
  - !ruby/object:Gem::Version
55
- version: '1.0'
56
- - !ruby/object:Gem::Dependency
57
- name: rake
73
+ version: !binary |-
74
+ MA==
75
+ none: false
58
76
  requirement: !ruby/object:Gem::Requirement
59
77
  requirements:
60
- - - '>='
78
+ - - ">="
61
79
  - !ruby/object:Gem::Version
62
- version: '0'
63
- type: :development
80
+ version: !binary |-
81
+ MA==
82
+ none: false
64
83
  prerelease: false
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - '>='
68
- - !ruby/object:Gem::Version
69
- version: '0'
84
+ type: :development
70
85
  description: Simple little cache warmer.
71
86
  email:
72
87
  - liveh2o@gmail.com
@@ -75,7 +90,7 @@ executables: []
75
90
  extensions: []
76
91
  extra_rdoc_files: []
77
92
  files:
78
- - .gitignore
93
+ - ".gitignore"
79
94
  - Gemfile
80
95
  - LICENSE.txt
81
96
  - README.md
@@ -83,37 +98,45 @@ files:
83
98
  - firebolt.gemspec
84
99
  - lib/firebolt.rb
85
100
  - lib/firebolt/cache.rb
86
- - lib/firebolt/cache_worker.rb
87
101
  - lib/firebolt/config.rb
88
102
  - lib/firebolt/file_warmer.rb
89
103
  - lib/firebolt/keys.rb
90
104
  - lib/firebolt/railtie.rb
91
105
  - lib/firebolt/tasks/cache.rake
92
106
  - lib/firebolt/version.rb
107
+ - lib/firebolt/warm_cache_job.rb
93
108
  - lib/firebolt/warmer.rb
94
109
  homepage: https://github.com/moneydesktop/firebolt
95
110
  licenses:
96
111
  - MIT
97
- metadata: {}
98
- post_install_message:
112
+ post_install_message:
99
113
  rdoc_options: []
100
114
  require_paths:
101
115
  - lib
102
116
  required_ruby_version: !ruby/object:Gem::Requirement
103
117
  requirements:
104
- - - '>='
118
+ - - ">="
105
119
  - !ruby/object:Gem::Version
106
- version: '0'
120
+ segments:
121
+ - 0
122
+ version: !binary |-
123
+ MA==
124
+ hash: 2
125
+ none: false
107
126
  required_rubygems_version: !ruby/object:Gem::Requirement
108
127
  requirements:
109
- - - '>='
128
+ - - ">="
110
129
  - !ruby/object:Gem::Version
111
- version: '0'
130
+ segments:
131
+ - 0
132
+ version: !binary |-
133
+ MA==
134
+ hash: 2
135
+ none: false
112
136
  requirements: []
113
- rubyforge_project:
114
- rubygems_version: 2.0.2
115
- signing_key:
116
- specification_version: 4
117
- summary: Firebolt is a simple cache warmer. It warms the cache using a specially defined
118
- warmer class.
137
+ rubyforge_project:
138
+ rubygems_version: 1.8.24
139
+ signing_key:
140
+ specification_version: 3
141
+ summary: Firebolt is a simple cache warmer. It warms the cache using a specially defined warmer class.
119
142
  test_files: []
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 5358bbd6320ad0b3d252cad6d9b0eb151c50d634
4
- data.tar.gz: 0e1c833b2dfcbdf1b81bf9cf908b945488c882b2
5
- SHA512:
6
- metadata.gz: f7d7d5fff52ae3cd3099b7fa45b5d27e57ef1b5de31402fa6dece5377a2f09cdab376c560e996e9a6ec0da44eb35e77aaabfbd178bd895aa96f3e596828585f4
7
- data.tar.gz: a950137507dacc063f93644e5ed2770aee762c37ca61462d44ba679efbcedfbd30747f53e2ed1e7af21c6f4d2556a1aa114e0f9f26a46505bca7126564cbf468