Skip to content

Commit da22dcc

Browse files
author
David Heinemeier Hansson
authored
Puma is the only option used for the web server (rails#42998)
Doesn't make sense to remove the configuration needed as an option any more.
1 parent d9eeedf commit da22dcc

File tree

4 files changed

+1
-12
lines changed

4 files changed

+1
-12
lines changed

railties/lib/rails/app_updater.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def generator_options
2727
options[:skip_action_mailer] = !defined?(ActionMailer::Railtie)
2828
options[:skip_action_cable] = !defined?(ActionCable::Engine)
2929
options[:skip_sprockets] = !defined?(Sprockets::Railtie)
30-
options[:skip_puma] = !defined?(Puma)
3130
options[:skip_bootsnap] = !defined?(Bootsnap)
3231
options[:skip_spring] = !defined?(Spring)
3332
options[:updating] = true

railties/lib/rails/generators/app_base.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ def self.add_shared_options_for(name)
5555
class_option :skip_active_storage, type: :boolean, default: false,
5656
desc: "Skip Active Storage files"
5757

58-
class_option :skip_puma, type: :boolean, aliases: "-P", default: false,
59-
desc: "Skip Puma related files"
60-
6158
class_option :skip_action_cable, type: :boolean, aliases: "-C", default: false,
6259
desc: "Skip Action Cable files"
6360

@@ -168,7 +165,6 @@ def database_gemfile_entry # :doc:
168165
end
169166

170167
def web_server_gemfile_entry # :doc:
171-
return [] if options[:skip_puma]
172168
comment = "Use Puma as the app server"
173169
GemfileEntry.new("puma", "~> 5.0", comment)
174170
end

railties/lib/rails/generators/rails/app/app_generator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def config
122122
template "application.rb"
123123
template "environment.rb"
124124
template "cable.yml" unless options[:updating] || options[:skip_action_cable]
125-
template "puma.rb" unless options[:updating] || options[:skip_puma]
125+
template "puma.rb" unless options[:updating]
126126
template "spring.rb" if spring_install?
127127
template "storage.yml" unless options[:updating] || skip_active_storage?
128128

railties/test/generators/app_generator_test.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -643,12 +643,6 @@ def test_generator_defaults_to_puma_version
643643
assert_gem "puma", '"~> 5.0"'
644644
end
645645

646-
def test_generator_if_skip_puma_is_given
647-
run_generator [destination_root, "--skip-puma"]
648-
assert_no_file "config/puma.rb"
649-
assert_no_gem "puma"
650-
end
651-
652646
def test_generator_has_assets_gems
653647
run_generator
654648

0 commit comments

Comments
 (0)