Skip to content

Commit d9eeedf

Browse files
author
David Heinemeier Hansson
authored
Legacy option from the days of Bundler opposition (rails#42996)
Don't have to keep all the monuments to old skirmishes around forever.
1 parent e34300a commit d9eeedf

File tree

5 files changed

+3
-23
lines changed

5 files changed

+3
-23
lines changed

railties/lib/rails/generators/app_base.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ def self.add_shared_options_for(name)
3030
class_option :database, type: :string, aliases: "-d", default: "sqlite3",
3131
desc: "Preconfigure for selected database (options: #{DATABASES.join('/')})"
3232

33-
class_option :skip_gemfile, type: :boolean, default: false,
34-
desc: "Don't create a Gemfile"
35-
3633
class_option :skip_git, type: :boolean, aliases: "-G", default: false,
3734
desc: "Skip .gitignore file"
3835

@@ -399,7 +396,7 @@ def exec_bundle_command(bundle_command, command, env)
399396
end
400397

401398
def bundle_install?
402-
!(options[:skip_gemfile] || options[:skip_bundle] || options[:pretend])
399+
!(options[:skip_bundle] || options[:pretend])
403400
end
404401

405402
def spring_install?

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def create_root_files
356356
build(:gitattributes)
357357
end
358358

359-
build(:gemfile) unless options[:skip_gemfile]
359+
build(:gemfile)
360360
build(:version_control)
361361
build(:package_json) unless options[:skip_javascript]
362362
end

railties/lib/rails/generators/rails/plugin/plugin_generator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def create_root_files
247247
build(:gemspec) unless options[:skip_gemspec]
248248
build(:license)
249249
build(:gitignore) unless options[:skip_git]
250-
build(:gemfile) unless options[:skip_gemfile]
250+
build(:gemfile)
251251
build(:version_control)
252252
end
253253

railties/test/generators/app_generator_test.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,6 @@ def test_skip_bundle
116116
assert_webpack_installation_skipped(output)
117117
end
118118

119-
def test_skip_gemfile
120-
generator([destination_root], skip_gemfile: true)
121-
output = run_generator_instance
122-
123-
assert_empty @bundle_commands
124-
assert_no_file "Gemfile"
125-
assert_webpack_installation_skipped(output)
126-
end
127-
128119
def test_assets
129120
run_generator
130121

railties/test/generators/shared_generator_tests.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,6 @@ def test_template_is_executed_when_supplied_an_https_path
9595
assert_equal url, applied
9696
end
9797

98-
def test_skip_gemfile
99-
generator([destination_root], skip_gemfile: true, skip_webpack_install: true)
100-
run_generator_instance
101-
102-
assert_empty @bundle_commands
103-
assert_no_file "Gemfile"
104-
end
105-
10698
def test_skip_git
10799
run_generator [destination_root, "--skip-git", "--full"]
108100
assert_no_file(".gitignore")

0 commit comments

Comments
 (0)