jetfuel 1.19.7 → 1.19.8

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: b1cb7c092fe5077070a6a33af5db17748361352f
4
- data.tar.gz: cc7f24e7852085ba183a1351a7100e4ae3f2023f
3
+ metadata.gz: 38da21f546405a1487999fc73fb207b78ef3b5ee
4
+ data.tar.gz: c188755a2d169b98abaaacb0026b3c41964e8e8b
5
5
  SHA512:
6
- metadata.gz: f56b9ef7fac2f869e4a9c6f05d367e94e2845b8a51b6cb0646e73aec0ff9045811e725d14694178bbcdd1012384b288bef3b1b42ffcbccae5d609f1ff15a5efd
7
- data.tar.gz: 43b9f53ff27d7130521a981f9cceb4564aacec5e904bdc9a990524abf951c27ecc8f6f4c24d488868957d8a2e10ec24ec02862f36fddf241ea9f45a66ebab8c1
6
+ metadata.gz: 16bebaac7ae113be86657ff3952ec76f506915595567856292d77e2fda53831df677236503473498a86d93566b140fb3bb7e7f336c7428f44467932658b90ab9
7
+ data.tar.gz: 43f9e7266f703b1ff11fe02d91c3dfedcb17eb7f447dad57fa7612faeaaf459a455998ecd0fdf77fb8553a1712a8a507a11df45bce591bdb782f761fbbaf2344
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jetfuel (1.19.7)
4
+ jetfuel (1.19.8)
5
5
  bundler (~> 1.3)
6
6
  rails (= 4.1.1)
7
7
 
data/README.md CHANGED
@@ -58,8 +58,7 @@ It includes application gems like:
58
58
  * [Bourbon](https://github.com/thoughtbot/bourbon) for Sass mixins
59
59
  * [Twitter Bootstrap](https://getbootstrap.com) for scaffold application styles
60
60
  * [Leather](https://github.com/dvanderbeek/leather) for Devise with styled views, a bootstrap UI Kit page, and some useful bootstrap component helpers
61
- * [Delayed Job](https://github.com/collectiveidea/delayed_job) for background
62
- processing
61
+ * [Sidekiq](https://github.com/mperham/sidekiq) for background job processing
63
62
  * [Email Validator](https://github.com/balexand/email_validator) for email
64
63
  validation
65
64
  * [Flutie](https://github.com/thoughtbot/flutie) for and `body_class` view
@@ -196,11 +195,6 @@ Snow Leopard (OS X 10.6).
196
195
  Use [Command Line Tools for XCode](https://developer.apple.com/downloads/index.action)
197
196
  for Lion (OS X 10.7) or Mountain Lion (OS X 10.8).
198
197
 
199
- We use [Capybara Webkit](https://github.com/thoughtbot/capybara-webkit) for
200
- full-stack JavaScript integration testing. It requires QT. Instructions for
201
- installing QT are
202
- [here](https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit).
203
-
204
198
  PostgreSQL needs to be installed and running for the `db:create` rake task.
205
199
 
206
200
  Issues
@@ -91,13 +91,13 @@ module Jetfuel
91
91
  end
92
92
 
93
93
  def setup_asset_host
94
- replace_in_file 'config/environments/production.rb',
95
- '# config.action_controller.asset_host = "http://assets.example.com"',
96
- "config.action_controller.asset_host = ENV.fetch('ASSET_HOST')"
94
+ # replace_in_file 'config/environments/production.rb',
95
+ # '# config.action_controller.asset_host = "http://assets.example.com"',
96
+ # "config.action_controller.asset_host = ENV.fetch('ASSET_HOST')"
97
97
 
98
- replace_in_file 'config/environments/production.rb',
99
- "config.assets.version = '1.0'",
100
- "config.assets.version = ENV.fetch('ASSETS_VERSION')"
98
+ # replace_in_file 'config/environments/production.rb',
99
+ # "config.assets.version = '1.0'",
100
+ # "config.assets.version = ENV.fetch('ASSETS_VERSION')"
101
101
 
102
102
  replace_in_file 'config/environments/production.rb',
103
103
  'config.serve_static_assets = false',
@@ -175,7 +175,7 @@ end
175
175
  end
176
176
 
177
177
  def setup_capistrano_specific_gems
178
- inject_into_file 'Gemfile', "\n\s\sgem 'capistrano', '~> 3.2'\n\s\sgem 'capistrano-rails', '~> 1.1'",
178
+ inject_into_file 'Gemfile', "\n\s\sgem 'capistrano', '~> 3.2'\n\s\sgem 'capistrano-rails', '~> 1.1'\n\s\sgem 'capistrano-sidekiq'",
179
179
  after: /gem 'spring-commands-rspec'/
180
180
  end
181
181
 
@@ -203,9 +203,10 @@ end
203
203
  copy_file 'i18n.rb', 'spec/support/i18n.rb'
204
204
  end
205
205
 
206
- def configure_background_jobs_for_rspec
206
+ def configure_background_jobs
207
+ run 'mkdir app/workers'
207
208
  copy_file 'background_jobs_rspec.rb', 'spec/support/background_jobs.rb'
208
- run 'bundle exec rails g delayed_job:active_record'
209
+ # run 'bundle exec rails g delayed_job:active_record'
209
210
  end
210
211
 
211
212
  def configure_action_mailer_in_specs
@@ -394,6 +395,16 @@ fi
394
395
  "Rails.application.routes.draw do\nend"
395
396
  end
396
397
 
398
+ def add_sidekiq_web_routes
399
+ replace_in_file 'config/routes.rb',
400
+ /Rails\.application\.routes\.draw/,
401
+ "require 'sidekiq/web'\n\nRails.application.routes.draw"
402
+
403
+ replace_in_file 'config/routes.rb',
404
+ /\nend/,
405
+ "\n\s\smount Sidekiq::Web, at: '/sidekiq'\nend"
406
+ end
407
+
397
408
  def disable_xml_params
398
409
  copy_file 'disable_xml_params.rb', 'config/initializers/disable_xml_params.rb'
399
410
  end
@@ -38,6 +38,7 @@ module Jetfuel
38
38
  invoke :copy_miscellaneous_files
39
39
  invoke :customize_error_pages
40
40
  invoke :remove_routes_comment_lines
41
+ invoke :add_sidekiq_web_routes
41
42
  invoke :setup_git
42
43
  invoke :setup_database
43
44
  invoke :create_heroku_apps
@@ -93,7 +94,7 @@ module Jetfuel
93
94
  build :set_up_factory_girl_for_rspec
94
95
  build :generate_rspec
95
96
  build :configure_rspec
96
- build :configure_background_jobs_for_rspec
97
+ build :configure_background_jobs
97
98
  build :enable_database_cleaner
98
99
  build :configure_spec_support_features
99
100
  build :configure_travis
@@ -221,6 +222,10 @@ module Jetfuel
221
222
  build :remove_routes_comment_lines
222
223
  end
223
224
 
225
+ def add_sidekiq_web_routes
226
+ build :add_sidekiq_web_routes
227
+ end
228
+
224
229
  def outro
225
230
  say 'Congratulations! You are all fueled up.'
226
231
  say "Remember to run 'rails generate airbrake' with your API key."
@@ -1,5 +1,5 @@
1
1
  module Jetfuel
2
2
  RAILS_VERSION = '4.1.1'
3
3
  RUBY_VERSION = IO.read("#{File.dirname(__FILE__)}/../../.ruby-version").strip
4
- VERSION = '1.19.7'
4
+ VERSION = '1.19.8'
5
5
  end
data/templates/Capfile CHANGED
@@ -20,6 +20,8 @@ require 'capistrano/deploy'
20
20
  require 'capistrano/bundler'
21
21
  require 'capistrano/rails/assets'
22
22
  require 'capistrano/rails/migrations'
23
+ require 'capistrano/sidekiq'
24
+ require 'capistrano/sidekiq/monit'
23
25
 
24
26
  # Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
25
27
  Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
@@ -5,7 +5,9 @@ ruby '<%= Jetfuel::RUBY_VERSION %>'
5
5
  gem 'airbrake'
6
6
  gem 'bourbon', '~> 3.2.1'
7
7
  gem 'coffee-rails'
8
- gem 'delayed_job_active_record'
8
+ gem 'sidekiq'
9
+ gem 'sinatra', require: false
10
+ gem 'slim'
9
11
  gem 'email_validator'
10
12
  gem 'flutie'
11
13
  gem 'jquery-rails'
@@ -1,19 +1,17 @@
1
- module BackgroundJobs
2
- def run_background_jobs_immediately
3
- delay_jobs = Delayed::Worker.delay_jobs
4
- Delayed::Worker.delay_jobs = false
5
- yield
6
- ensure
7
- Delayed::Worker.delay_jobs = delay_jobs
8
- end
9
- end
10
-
1
+ require 'sidekiq/testing'
11
2
  RSpec.configure do |config|
12
- config.around(:each, type: :feature) do |example|
13
- run_background_jobs_immediately do
14
- example.run
3
+ config.before(:each) do | example |
4
+ # Clears out the jobs for tests using the fake testing
5
+ Sidekiq::Worker.clear_all
6
+
7
+ if example.metadata[:sidekiq] == :fake
8
+ Sidekiq::Testing.fake!
9
+ elsif example.metadata[:sidekiq] == :inline
10
+ Sidekiq::Testing.inline!
11
+ elsif example.metadata[:type] == :acceptance
12
+ Sidekiq::Testing.inline!
13
+ else
14
+ Sidekiq::Testing.fake!
15
15
  end
16
16
  end
17
-
18
- config.include BackgroundJobs
19
- end
17
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jetfuel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.7
4
+ version: 1.19.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - FlyoverWorks