diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index 12737c52fcceb..5629861639d7a 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -30,9 +30,6 @@ def self.add_shared_options_for(name) class_option :database, type: :string, aliases: "-d", default: "sqlite3", desc: "Preconfigure for selected database (options: #{DATABASES.join('/')})" - class_option :skip_gemfile, type: :boolean, default: false, - desc: "Don't create a Gemfile" - class_option :skip_git, type: :boolean, aliases: "-G", default: false, desc: "Skip .gitignore file" @@ -399,7 +396,7 @@ def exec_bundle_command(bundle_command, command, env) end def bundle_install? - !(options[:skip_gemfile] || options[:skip_bundle] || options[:pretend]) + !(options[:skip_bundle] || options[:pretend]) end def spring_install? diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index 917a65e91b7c7..250beb3ae8e5b 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -356,7 +356,7 @@ def create_root_files build(:gitattributes) end - build(:gemfile) unless options[:skip_gemfile] + build(:gemfile) build(:version_control) build(:package_json) unless options[:skip_javascript] end diff --git a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb index bc7665d73fc0e..9fcf3243a9b22 100644 --- a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb +++ b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb @@ -247,7 +247,7 @@ def create_root_files build(:gemspec) unless options[:skip_gemspec] build(:license) build(:gitignore) unless options[:skip_git] - build(:gemfile) unless options[:skip_gemfile] + build(:gemfile) build(:version_control) end diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 5be3ae60a039f..a9caa3addf903 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -116,15 +116,6 @@ def test_skip_bundle assert_webpack_installation_skipped(output) end - def test_skip_gemfile - generator([destination_root], skip_gemfile: true) - output = run_generator_instance - - assert_empty @bundle_commands - assert_no_file "Gemfile" - assert_webpack_installation_skipped(output) - end - def test_assets run_generator diff --git a/railties/test/generators/shared_generator_tests.rb b/railties/test/generators/shared_generator_tests.rb index 9fe6a8e09bfc1..4e66f727ed07b 100644 --- a/railties/test/generators/shared_generator_tests.rb +++ b/railties/test/generators/shared_generator_tests.rb @@ -95,14 +95,6 @@ def test_template_is_executed_when_supplied_an_https_path assert_equal url, applied end - def test_skip_gemfile - generator([destination_root], skip_gemfile: true, skip_webpack_install: true) - run_generator_instance - - assert_empty @bundle_commands - assert_no_file "Gemfile" - end - def test_skip_git run_generator [destination_root, "--skip-git", "--full"] assert_no_file(".gitignore")