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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -7
- data/lib/jetfuel/app_builder.rb +20 -9
- data/lib/jetfuel/generators/app_generator.rb +6 -1
- data/lib/jetfuel/version.rb +1 -1
- data/templates/Capfile +2 -0
- data/templates/Gemfile.erb +3 -1
- data/templates/background_jobs_rspec.rb +14 -16
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38da21f546405a1487999fc73fb207b78ef3b5ee
|
4
|
+
data.tar.gz: c188755a2d169b98abaaacb0026b3c41964e8e8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16bebaac7ae113be86657ff3952ec76f506915595567856292d77e2fda53831df677236503473498a86d93566b140fb3bb7e7f336c7428f44467932658b90ab9
|
7
|
+
data.tar.gz: 43f9e7266f703b1ff11fe02d91c3dfedcb17eb7f447dad57fa7612faeaaf459a455998ecd0fdf77fb8553a1712a8a507a11df45bce591bdb782f761fbbaf2344
|
data/Gemfile.lock
CHANGED
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
|
-
* [
|
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
|
data/lib/jetfuel/app_builder.rb
CHANGED
@@ -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
|
-
|
96
|
-
|
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
|
-
|
100
|
-
|
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
|
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 :
|
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."
|
data/lib/jetfuel/version.rb
CHANGED
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 }
|
data/templates/Gemfile.erb
CHANGED
@@ -1,19 +1,17 @@
|
|
1
|
-
|
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.
|
13
|
-
|
14
|
-
|
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
|