suspenders 1.52.0 → 1.55.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/.standard.yml +2 -0
  4. data/.travis.yml +6 -3
  5. data/CONTRIBUTING.md +15 -15
  6. data/GOALS.md +65 -0
  7. data/Gemfile +1 -1
  8. data/NEWS.md +52 -0
  9. data/README.md +6 -5
  10. data/Rakefile +6 -5
  11. data/docs/heroku_deploy.md +19 -0
  12. data/lib/suspenders.rb +7 -0
  13. data/lib/suspenders/actions.rb +2 -2
  14. data/lib/suspenders/adapters/heroku.rb +27 -14
  15. data/lib/suspenders/app_builder.rb +42 -111
  16. data/lib/suspenders/generators/advisories_generator.rb +15 -0
  17. data/lib/suspenders/generators/analytics_generator.rb +1 -1
  18. data/lib/suspenders/generators/app_generator.rb +36 -58
  19. data/lib/suspenders/generators/base.rb +40 -1
  20. data/lib/suspenders/generators/ci_generator.rb +19 -9
  21. data/lib/suspenders/generators/db_optimizations_generator.rb +5 -17
  22. data/lib/suspenders/generators/factories_generator.rb +2 -2
  23. data/lib/suspenders/generators/forms_generator.rb +1 -1
  24. data/lib/suspenders/generators/inline_svg_generator.rb +14 -0
  25. data/lib/suspenders/generators/jobs_generator.rb +4 -4
  26. data/lib/suspenders/generators/js_driver_generator.rb +7 -4
  27. data/lib/suspenders/generators/json_generator.rb +1 -1
  28. data/lib/suspenders/generators/lint_generator.rb +5 -0
  29. data/lib/suspenders/generators/preloader_generator.rb +122 -0
  30. data/lib/suspenders/generators/production/compression_generator.rb +14 -0
  31. data/lib/suspenders/generators/production/deployment_generator.rb +1 -12
  32. data/lib/suspenders/generators/production/email_generator.rb +9 -12
  33. data/lib/suspenders/generators/production/manifest_generator.rb +8 -7
  34. data/lib/suspenders/generators/production/single_redirect.rb +15 -0
  35. data/lib/suspenders/generators/production/timeout_generator.rb +3 -2
  36. data/lib/suspenders/generators/profiler_generator.rb +35 -0
  37. data/lib/suspenders/generators/runner_generator.rb +48 -0
  38. data/lib/suspenders/generators/staging/pull_requests_generator.rb +4 -12
  39. data/lib/suspenders/generators/static_generator.rb +5 -1
  40. data/lib/suspenders/generators/stylelint_generator.rb +2 -1
  41. data/lib/suspenders/generators/stylesheet_base_generator.rb +7 -8
  42. data/lib/suspenders/generators/testing_generator.rb +3 -14
  43. data/lib/suspenders/version.rb +6 -6
  44. data/spec/adapters/heroku_spec.rb +36 -10
  45. data/spec/expand_json_spec.rb +89 -0
  46. data/spec/fakes/bin/heroku +1 -1
  47. data/spec/fakes/bin/hub +1 -1
  48. data/spec/features/advisories_spec.rb +24 -0
  49. data/spec/features/api_spec.rb +1 -1
  50. data/spec/features/ci_spec.rb +31 -0
  51. data/spec/features/cli_help_spec.rb +4 -4
  52. data/spec/features/db_optimizations_spec.rb +19 -0
  53. data/spec/features/heroku_spec.rb +9 -16
  54. data/spec/features/inline_svg_spec.rb +10 -0
  55. data/spec/features/lint_spec.rb +26 -0
  56. data/spec/features/new_project_spec.rb +40 -60
  57. data/spec/features/preloader_spec.rb +25 -0
  58. data/spec/features/production/compression_spec.rb +23 -0
  59. data/spec/features/production/email_spec.rb +10 -10
  60. data/spec/features/production/manifest_spec.rb +16 -14
  61. data/spec/features/production/single_redirect_spec.rb +25 -0
  62. data/spec/features/profiler_spec.rb +20 -0
  63. data/spec/features/runner_spec.rb +30 -0
  64. data/spec/features/staging/pull_requests_spec.rb +1 -1
  65. data/spec/features/static_spec.rb +17 -0
  66. data/spec/features/stylelint_spec.rb +7 -7
  67. data/spec/spec_helper.rb +3 -3
  68. data/spec/support/contain_json_matcher.rb +16 -10
  69. data/spec/support/fake_github.rb +3 -3
  70. data/spec/support/fake_heroku.rb +8 -8
  71. data/spec/support/project_files.rb +12 -0
  72. data/spec/support/rails_template.rb +1 -0
  73. data/spec/support/suspenders.rb +21 -19
  74. data/suspenders.gemspec +20 -20
  75. data/templates/Gemfile.erb +2 -10
  76. data/templates/_javascript.html.erb +1 -1
  77. data/templates/application.scss +0 -1
  78. data/templates/bin_auto_migrate +5 -0
  79. data/templates/bin_deploy +0 -2
  80. data/templates/bin_setup +2 -2
  81. data/templates/bin_setup_review_app.erb +0 -1
  82. data/templates/capybara_silence_puma.rb +1 -0
  83. data/templates/chromedriver.rb +14 -4
  84. data/templates/descriptions/advisories.md +5 -0
  85. data/templates/descriptions/analytics.md +4 -0
  86. data/templates/descriptions/ci.md +4 -0
  87. data/templates/descriptions/compression.md +4 -0
  88. data/templates/descriptions/db_optimizations.md +2 -0
  89. data/templates/descriptions/deployment.md +5 -0
  90. data/templates/descriptions/email.md +9 -0
  91. data/templates/descriptions/factories.md +12 -0
  92. data/templates/descriptions/force_tls.md +1 -0
  93. data/templates/descriptions/forms.md +1 -0
  94. data/templates/descriptions/inline_svg.md +2 -0
  95. data/templates/descriptions/jobs.md +3 -0
  96. data/templates/descriptions/js_driver.md +4 -0
  97. data/templates/descriptions/json.md +1 -0
  98. data/templates/descriptions/lint.md +3 -0
  99. data/templates/descriptions/manifest.md +2 -0
  100. data/templates/descriptions/preloader.md +3 -0
  101. data/templates/descriptions/profiler.md +7 -0
  102. data/templates/descriptions/pull_requests.md +4 -0
  103. data/templates/descriptions/runner.md +10 -0
  104. data/templates/descriptions/single_redirect.md +1 -0
  105. data/templates/descriptions/static.md +5 -0
  106. data/templates/descriptions/stylelint.md +3 -0
  107. data/templates/descriptions/stylesheet_base.md +4 -0
  108. data/templates/descriptions/testing.md +9 -0
  109. data/templates/descriptions/timeout.md +4 -0
  110. data/templates/descriptions/views.md +8 -0
  111. data/templates/errors.rb +3 -3
  112. data/templates/hound.yml +1 -2
  113. data/templates/inline_svg.rb +3 -0
  114. data/templates/partials/ci_simplecov.rb +14 -0
  115. data/templates/partials/db_optimizations_configuration.rb +7 -0
  116. data/templates/partials/deployment_readme.md +8 -0
  117. data/templates/partials/email_smtp.rb +2 -0
  118. data/templates/partials/profiler_readme.md +8 -0
  119. data/templates/partials/pull_requests_config.rb +4 -0
  120. data/templates/partials/runner_readme.md +31 -0
  121. data/templates/partials/runner_setup.rb +2 -0
  122. data/templates/rack_mini_profiler.rb +2 -0
  123. data/templates/rails_helper.rb +4 -1
  124. data/templates/{dotfiles/.env → sample_env} +0 -2
  125. data/templates/spec_helper.rb +4 -7
  126. data/templates/spring.rb +6 -0
  127. data/templates/suspenders_gitignore +1 -1
  128. metadata +103 -17
  129. data/templates/browserslist +0 -3
  130. data/templates/dotfiles/.ctags +0 -2
  131. data/templates/puma.rb +0 -28
@@ -15,10 +15,11 @@ module Suspenders
15
15
  :set_heroku_honeybadger_env,
16
16
  :set_heroku_rails_secrets,
17
17
  :set_heroku_remotes,
18
+ :set_heroku_buildpacks
18
19
  )
19
20
 
20
21
  def readme
21
- template 'README.md.erb', 'README.md'
22
+ template "README.md.erb", "README.md"
22
23
  end
23
24
 
24
25
  def gitignore
@@ -32,7 +33,7 @@ module Suspenders
32
33
  def setup_rack_mini_profiler
33
34
  copy_file(
34
35
  "rack_mini_profiler.rb",
35
- "config/initializers/rack_mini_profiler.rb",
36
+ "config/initializers/rack_mini_profiler.rb"
36
37
  )
37
38
  end
38
39
 
@@ -41,15 +42,15 @@ module Suspenders
41
42
  end
42
43
 
43
44
  def raise_on_delivery_errors
44
- replace_in_file 'config/environments/development.rb',
45
- 'raise_delivery_errors = false', 'raise_delivery_errors = true'
45
+ replace_in_file "config/environments/development.rb",
46
+ "raise_delivery_errors = false", "raise_delivery_errors = true"
46
47
  end
47
48
 
48
49
  def set_test_delivery_method
49
50
  inject_into_file(
50
51
  "config/environments/development.rb",
51
52
  "\n config.action_mailer.delivery_method = :file",
52
- after: "config.action_mailer.raise_delivery_errors = true",
53
+ after: "config.action_mailer.raise_delivery_errors = true"
53
54
  )
54
55
  end
55
56
 
@@ -89,47 +90,35 @@ module Suspenders
89
90
 
90
91
  RUBY
91
92
 
92
- inject_into_class 'config/application.rb', 'Application', config
93
+ inject_into_class "config/application.rb", "Application", config
93
94
  end
94
95
 
95
96
  def configure_local_mail
96
97
  copy_file "email.rb", "config/initializers/email.rb"
97
98
  end
98
99
 
99
- def enable_rack_canonical_host
100
- config = <<-RUBY
101
- config.middleware.use Rack::CanonicalHost, ENV.fetch("APPLICATION_HOST")
102
- RUBY
103
-
104
- configure_environment "production", config
105
- end
106
-
107
- def enable_rack_deflater
108
- configure_environment "production", "config.middleware.use Rack::Deflater"
109
- end
110
-
111
100
  def setup_asset_host
112
- replace_in_file 'config/environments/production.rb',
101
+ replace_in_file "config/environments/production.rb",
113
102
  "# config.action_controller.asset_host = 'http://assets.example.com'",
114
103
  'config.action_controller.asset_host = ENV.fetch("ASSET_HOST", ENV.fetch("APPLICATION_HOST"))'
115
104
 
116
105
  if File.exist?("config/initializers/assets.rb")
117
- replace_in_file 'config/initializers/assets.rb',
106
+ replace_in_file "config/initializers/assets.rb",
118
107
  "config.assets.version = '1.0'",
119
108
  'config.assets.version = (ENV["ASSETS_VERSION"] || "1.0")'
120
109
  end
121
110
 
122
- config = <<-EOD
123
- config.public_file_server.headers = {
124
- "Cache-Control" => "public, max-age=31557600",
125
- }
111
+ config = <<~EOD
112
+ config.public_file_server.headers = {
113
+ "Cache-Control" => "public, max-age=31557600",
114
+ }
126
115
  EOD
127
116
 
128
117
  configure_environment("production", config)
129
118
  end
130
119
 
131
120
  def setup_secret_token
132
- template 'secrets.yml', 'config/secrets.yml', force: true
121
+ template "secrets.yml", "config/secrets.yml", force: true
133
122
  end
134
123
 
135
124
  def disallow_wrapping_parameters
@@ -137,7 +126,7 @@ config.public_file_server.headers = {
137
126
  end
138
127
 
139
128
  def use_postgres_config_template
140
- template 'postgresql_database.yml.erb', 'config/database.yml',
129
+ template "postgresql_database.yml.erb", "config/database.yml",
141
130
  force: true
142
131
  end
143
132
 
@@ -146,9 +135,9 @@ config.public_file_server.headers = {
146
135
  end
147
136
 
148
137
  def replace_gemfile(path)
149
- template 'Gemfile.erb', 'Gemfile', force: true do |content|
138
+ template "Gemfile.erb", "Gemfile", force: true do |content|
150
139
  if path
151
- content.gsub(%r{gem .suspenders.}) { |s| %{#{s}, path: "#{path}"} }
140
+ content.gsub(%r{gem .suspenders.}) { |s| %(#{s}, path: "#{path}") }
152
141
  else
153
142
  content
154
143
  end
@@ -156,7 +145,7 @@ config.public_file_server.headers = {
156
145
  end
157
146
 
158
147
  def ruby_version
159
- create_file '.ruby-version', "#{Suspenders::RUBY_VERSION}\n"
148
+ create_file ".ruby-version", "#{Suspenders::RUBY_VERSION}\n"
160
149
  end
161
150
 
162
151
  def configure_i18n_for_missing_translations
@@ -165,7 +154,7 @@ config.public_file_server.headers = {
165
154
  end
166
155
 
167
156
  def configure_action_mailer_in_specs
168
- copy_file 'action_mailer.rb', 'spec/support/action_mailer.rb'
157
+ copy_file "action_mailer.rb", "spec/support/action_mailer.rb"
169
158
  end
170
159
 
171
160
  def configure_time_formats
@@ -174,109 +163,51 @@ config.public_file_server.headers = {
174
163
  end
175
164
 
176
165
  def configure_action_mailer
177
- action_mailer_host "development", %{"localhost:3000"}
178
- action_mailer_asset_host "development", %{"http://localhost:3000"}
179
- action_mailer_host "test", %{"www.example.com"}
180
- action_mailer_asset_host "test", %{"http://www.example.com"}
166
+ action_mailer_host "development", %("localhost:3000")
167
+ action_mailer_asset_host "development", %("http://localhost:3000")
168
+ action_mailer_host "test", %("www.example.com")
169
+ action_mailer_asset_host "test", %("http://www.example.com")
181
170
  action_mailer_host "production", %{ENV.fetch("APPLICATION_HOST")}
182
171
  action_mailer_asset_host(
183
172
  "production",
184
- %{ENV.fetch("ASSET_HOST", ENV.fetch("APPLICATION_HOST"))},
173
+ %{ENV.fetch("ASSET_HOST", ENV.fetch("APPLICATION_HOST"))}
185
174
  )
186
175
  end
187
176
 
188
- def replace_default_puma_configuration
189
- copy_file "puma.rb", "config/puma.rb", force: true
190
- end
191
-
192
- def set_up_forego
193
- copy_file "Procfile", "Procfile"
194
- end
195
-
196
- def setup_default_directories
197
- [
198
- 'app/views/pages',
199
- 'spec/lib',
200
- 'spec/controllers',
201
- 'spec/helpers',
202
- 'spec/support/matchers',
203
- 'spec/support/mixins',
204
- 'spec/support/shared_examples'
205
- ].each do |dir|
206
- empty_directory_with_keep_file dir
207
- end
208
- end
209
-
210
- def copy_dotfiles
211
- directory("dotfiles", ".")
212
- end
213
-
214
177
  def create_heroku_apps(flags)
215
178
  create_staging_heroku_app(flags)
216
179
  create_production_heroku_app(flags)
217
180
  end
218
181
 
219
182
  def configure_automatic_deployment
220
- deploy_command = <<-YML.strip_heredoc
221
- deployment:
222
- staging:
223
- branch: master
224
- commands:
225
- - bin/deploy staging
226
- YML
227
-
228
- append_file "circle.yml", deploy_command
183
+ append_file "Procfile", "release: bin/auto_migrate\n"
184
+ copy_file "bin_auto_migrate", "bin/auto_migrate"
229
185
  end
230
186
 
231
187
  def create_github_repo(repo_name)
232
188
  run "hub create #{repo_name}"
233
189
  end
234
190
 
235
- def setup_bundler_audit
236
- copy_file "bundler_audit.rake", "lib/tasks/bundler_audit.rake"
237
- append_file "Rakefile", %{\ntask default: "bundle:audit"\n}
238
- end
239
-
240
- def setup_spring
241
- bundle_command "exec spring binstub --all"
242
- end
243
-
244
191
  def copy_miscellaneous_files
245
- copy_file "browserslist", "browserslist"
246
192
  copy_file "errors.rb", "config/initializers/errors.rb"
247
193
  copy_file "json_encoding.rb", "config/initializers/json_encoding.rb"
248
194
  end
249
195
 
250
- def customize_error_pages
251
- meta_tags =<<-EOS
252
- <meta charset="utf-8" />
253
- <meta name="viewport" content="initial-scale=1" />
254
- EOS
255
-
256
- %w(500 404 422).each do |page|
257
- path = "public/#{page}.html"
258
- if File.exist?(path)
259
- inject_into_file path, meta_tags, after: "<head>\n"
260
- replace_in_file path, /<!--.+-->\n/, ''
261
- end
262
- end
263
- end
264
-
265
196
  def remove_config_comment_lines
266
197
  config_files = [
267
198
  "application.rb",
268
199
  "environment.rb",
269
200
  "environments/development.rb",
270
201
  "environments/production.rb",
271
- "environments/test.rb",
202
+ "environments/test.rb"
272
203
  ]
273
204
 
274
205
  config_files.each do |config_file|
275
206
  path = File.join(destination_root, "config/#{config_file}")
276
207
 
277
- accepted_content = File.readlines(path).reject do |line|
208
+ accepted_content = File.readlines(path).reject { |line|
278
209
  line =~ /^.*#.*$/ || line =~ /^$\n/
279
- end
210
+ }
280
211
 
281
212
  File.open(path, "w") do |file|
282
213
  accepted_content.each { |line| file.puts line }
@@ -285,23 +216,23 @@ config.public_file_server.headers = {
285
216
  end
286
217
 
287
218
  def remove_routes_comment_lines
288
- replace_in_file 'config/routes.rb',
219
+ replace_in_file "config/routes.rb",
289
220
  /Rails\.application\.routes\.draw do.*end/m,
290
221
  "Rails.application.routes.draw do\nend"
291
222
  end
292
223
 
293
224
  def setup_default_rake_task
294
- append_file 'Rakefile' do
295
- <<-EOS
296
- task(:default).clear
297
- task default: [:spec]
298
-
299
- if defined? RSpec
300
- task(:spec).clear
301
- RSpec::Core::RakeTask.new(:spec) do |t|
302
- t.verbose = false
303
- end
304
- end
225
+ append_file "Rakefile" do
226
+ <<~EOS
227
+ task(:default).clear
228
+ task default: [:spec]
229
+
230
+ if defined? RSpec
231
+ task(:spec).clear
232
+ RSpec::Core::RakeTask.new(:spec) do |t|
233
+ t.verbose = false
234
+ end
235
+ end
305
236
  EOS
306
237
  end
307
238
  end
@@ -309,7 +240,7 @@ end
309
240
  private
310
241
 
311
242
  def raise_on_missing_translations_in(environment)
312
- config = 'config.action_view.raise_on_missing_translations = true'
243
+ config = "config.action_view.raise_on_missing_translations = true"
313
244
 
314
245
  uncomment_lines("config/environments/#{environment}.rb", config)
315
246
  end
@@ -0,0 +1,15 @@
1
+ require_relative "base"
2
+
3
+ module Suspenders
4
+ class AdvisoriesGenerator < Generators::Base
5
+ def bundler_audit_gem
6
+ gem "bundler-audit", ">= 0.7.0", require: false, group: %i[development test]
7
+ Bundler.with_unbundled_env { run "bundle install" }
8
+ end
9
+
10
+ def rake_task
11
+ copy_file "bundler_audit.rake", "lib/tasks/bundler_audit.rake"
12
+ append_file "Rakefile", %(\ntask default: "bundle:audit"\n)
13
+ end
14
+ end
15
+ end
@@ -10,7 +10,7 @@ module Suspenders
10
10
  def render_partial
11
11
  if File.exist?(js_partial)
12
12
  inject_into_file js_partial,
13
- %{\n\n<%= render "analytics" %>},
13
+ %(\n\n<%= render "analytics" %>),
14
14
  after: "<%= yield :javascript %>"
15
15
  end
16
16
  end
@@ -1,39 +1,39 @@
1
- require 'rails/generators'
2
- require 'rails/generators/rails/app/app_generator'
1
+ require "rails/generators"
2
+ require "rails/generators/rails/app/app_generator"
3
3
 
4
4
  module Suspenders
5
5
  class AppGenerator < Rails::Generators::AppGenerator
6
6
  hide!
7
7
 
8
8
  class_option :database, type: :string, aliases: "-d", default: "postgresql",
9
- desc: "Configure for selected database (options: #{DATABASES.join("/")})"
9
+ desc: "Configure for selected database (options: #{DATABASES.join("/")})"
10
10
 
11
11
  class_option :heroku, type: :boolean, aliases: "-H", default: false,
12
- desc: "Create staging and production Heroku apps"
12
+ desc: "Create staging and production Heroku apps"
13
13
 
14
14
  class_option :heroku_flags, type: :string, default: "",
15
- desc: "Set extra Heroku flags"
15
+ desc: "Set extra Heroku flags"
16
16
 
17
17
  class_option :github, type: :string, default: nil,
18
- desc: "Create Github repository and add remote origin pointed to repo"
18
+ desc: "Create Github repository and add remote origin pointed to repo"
19
19
 
20
20
  class_option :version, type: :boolean, aliases: "-v", group: :suspenders,
21
- desc: "Show Suspenders version number and quit"
21
+ desc: "Show Suspenders version number and quit"
22
22
 
23
- class_option :help, type: :boolean, aliases: '-h', group: :suspenders,
24
- desc: "Show this help message and quit"
23
+ class_option :help, type: :boolean, aliases: "-h", group: :suspenders,
24
+ desc: "Show this help message and quit"
25
25
 
26
26
  class_option :path, type: :string, default: nil,
27
- desc: "Path to the gem"
27
+ desc: "Path to the gem"
28
28
 
29
29
  class_option :skip_test, type: :boolean, default: true,
30
- desc: "Skip Test Unit"
30
+ desc: "Skip Test Unit"
31
31
 
32
32
  class_option :skip_system_test,
33
- type: :boolean, default: true, desc: "Skip system test files"
33
+ type: :boolean, default: true, desc: "Skip system test files"
34
34
 
35
35
  class_option :skip_turbolinks,
36
- type: :boolean, default: true, desc: "Skip turbolinks gem"
36
+ type: :boolean, default: true, desc: "Skip turbolinks gem"
37
37
 
38
38
  def finish_template
39
39
  invoke :suspenders_customization
@@ -47,14 +47,9 @@ module Suspenders
47
47
  invoke :setup_secret_token
48
48
  invoke :configure_app
49
49
  invoke :copy_miscellaneous_files
50
- invoke :customize_error_pages
51
- invoke :setup_dotfiles
52
50
  invoke :setup_database
53
51
  invoke :create_github_repo
54
- invoke :setup_bundler_audit
55
- invoke :setup_spring
56
52
  invoke :generate_default
57
- invoke :setup_default_directories
58
53
  invoke :create_heroku_apps
59
54
  invoke :generate_deployment_default
60
55
  invoke :remove_config_comment_lines
@@ -64,13 +59,13 @@ module Suspenders
64
59
 
65
60
  def customize_gemfile
66
61
  build :replace_gemfile, options[:path]
67
- bundle_command 'install'
62
+ bundle_command "install"
68
63
  end
69
64
 
70
65
  def setup_database
71
- say 'Setting up database'
66
+ say "Setting up database"
72
67
 
73
- if 'postgresql' == options[:database]
68
+ if options[:database] == "postgresql"
74
69
  build :use_postgres_config_template
75
70
  end
76
71
 
@@ -78,7 +73,7 @@ module Suspenders
78
73
  end
79
74
 
80
75
  def setup_development_environment
81
- say 'Setting up the development environment'
76
+ say "Setting up the development environment"
82
77
  build :configure_local_mail
83
78
  build :raise_on_missing_assets_in_test
84
79
  build :raise_on_delivery_errors
@@ -91,25 +86,20 @@ module Suspenders
91
86
  end
92
87
 
93
88
  def setup_production_environment
94
- say 'Setting up the production environment'
95
- build :enable_rack_canonical_host
96
- build :enable_rack_deflater
89
+ say "Setting up the production environment"
97
90
  build :setup_asset_host
98
91
  end
99
92
 
100
93
  def setup_secret_token
101
- say 'Moving secret token out of version control'
94
+ say "Moving secret token out of version control"
102
95
  build :setup_secret_token
103
96
  end
104
97
 
105
98
  def configure_app
106
- say 'Configuring app'
99
+ say "Configuring app"
107
100
  build :configure_action_mailer
108
101
  build :configure_time_formats
109
102
  build :setup_default_rake_task
110
- build :replace_default_puma_configuration
111
- build :set_up_forego
112
- build :setup_rack_mini_profiler
113
103
  end
114
104
 
115
105
  def create_heroku_apps
@@ -121,6 +111,7 @@ module Suspenders
121
111
  build :set_heroku_application_host
122
112
  build :set_heroku_honeybadger_env
123
113
  build :set_heroku_backup_schedule
114
+ build :set_heroku_buildpacks
124
115
  build :create_heroku_pipeline
125
116
  build :configure_automatic_deployment
126
117
  end
@@ -128,39 +119,16 @@ module Suspenders
128
119
 
129
120
  def create_github_repo
130
121
  if !options[:skip_git] && options[:github]
131
- say 'Creating Github repo'
122
+ say "Creating Github repo"
132
123
  build :create_github_repo, options[:github]
133
124
  end
134
125
  end
135
126
 
136
- def setup_dotfiles
137
- build :copy_dotfiles
138
- end
139
-
140
- def setup_default_directories
141
- build :setup_default_directories
142
- end
143
-
144
- def setup_bundler_audit
145
- say "Setting up bundler-audit"
146
- build :setup_bundler_audit
147
- end
148
-
149
- def setup_spring
150
- say "Springifying binstubs"
151
- build :setup_spring
152
- end
153
-
154
127
  def copy_miscellaneous_files
155
- say 'Copying miscellaneous support files'
128
+ say "Copying miscellaneous support files"
156
129
  build :copy_miscellaneous_files
157
130
  end
158
131
 
159
- def customize_error_pages
160
- say 'Customizing the 500/404/422 pages'
161
- build :customize_error_pages
162
- end
163
-
164
132
  def remove_config_comment_lines
165
133
  build :remove_config_comment_lines
166
134
  end
@@ -171,6 +139,8 @@ module Suspenders
171
139
 
172
140
  def generate_default
173
141
  run("spring stop")
142
+ generate("suspenders:runner")
143
+ generate("suspenders:profiler")
174
144
  generate("suspenders:json")
175
145
  generate("suspenders:static")
176
146
  generate("suspenders:stylesheet_base")
@@ -185,11 +155,15 @@ module Suspenders
185
155
  generate("suspenders:lint")
186
156
  generate("suspenders:jobs")
187
157
  generate("suspenders:analytics")
188
- generate("suspenders:views")
158
+ generate("suspenders:inline_svg")
159
+ generate("suspenders:advisories")
160
+ generate("suspenders:preloader")
189
161
  end
190
162
 
191
163
  def generate_deployment_default
192
164
  generate("suspenders:staging:pull_requests")
165
+ generate("suspenders:production:single_redirect")
166
+ generate("suspenders:production:compression")
193
167
  generate("suspenders:production:force_tls")
194
168
  generate("suspenders:production:email")
195
169
  generate("suspenders:production:timeout")
@@ -197,13 +171,17 @@ module Suspenders
197
171
  generate("suspenders:production:manifest")
198
172
  end
199
173
 
174
+ def generate_views
175
+ generate("suspenders:views")
176
+ end
177
+
200
178
  def outro
201
- say 'Congratulations! You just pulled our suspenders.'
179
+ say "Congratulations! You just pulled our suspenders."
202
180
  say honeybadger_outro
203
181
  end
204
182
 
205
183
  def self.banner
206
- "suspenders #{arguments.map(&:usage).join(' ')} [options]"
184
+ "suspenders #{arguments.map(&:usage).join(" ")} [options]"
207
185
  end
208
186
 
209
187
  protected