summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUtkarsh Gupta <utkarsh@debian.org>2020-06-16 19:07:21 +0530
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-06-18 19:14:15 +0900
commit22ee047f7328f05e75634d4c4b177a94642c4032 (patch)
tree40bf9fbdb0d574c41334a6f779f6de100741d76d
parentec98d5615360c33fa2419b22cf2ac7d1834d9c18 (diff)
[rubygems/rubygems] Only add .rubocop.yml when --rubocop flag is passed
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org> https://github.com/rubygems/rubygems/commit/ef2dae4222
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3212
-rw-r--r--lib/bundler/cli/gem.rb1
-rw-r--r--spec/bundler/commands/newgem_spec.rb7
2 files changed, 0 insertions, 8 deletions
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb
index df93fd92a6..5b4e436d99 100644
--- a/lib/bundler/cli/gem.rb
+++ b/lib/bundler/cli/gem.rb
@@ -79,7 +79,6 @@ module Bundler
]
templates.merge!("gitignore.tt" => ".gitignore") if Bundler.git_present?
- templates.merge!("rubocop.yml.tt" => ".rubocop.yml")
if test_framework = ask_and_set_test_framework
config[:test] = test_framework
diff --git a/spec/bundler/commands/newgem_spec.rb b/spec/bundler/commands/newgem_spec.rb
index 0216e31019..d0add6dfde 100644
--- a/spec/bundler/commands/newgem_spec.rb
+++ b/spec/bundler/commands/newgem_spec.rb
@@ -326,7 +326,6 @@ RSpec.describe "bundle gem" do
expect(bundled_app("#{gem_name}/lib/#{require_path}.rb")).to exist
expect(bundled_app("#{gem_name}/lib/#{require_path}/version.rb")).to exist
expect(bundled_app("#{gem_name}/.gitignore")).to exist
- expect(bundled_app("#{gem_name}/.rubocop.yml")).to exist
expect(bundled_app("#{gem_name}/bin/setup")).to exist
expect(bundled_app("#{gem_name}/bin/console")).to exist
@@ -385,12 +384,6 @@ RSpec.describe "bundle gem" do
expect(bundled_app("#{gem_name}/lib/#{require_path}.rb").read).to match(/class Error < StandardError; end$/)
end
- it "creates a default .rubocop.yml" do
- bundle "gem #{gem_name}"
-
- expect(bundled_app("#{gem_name}/.rubocop.yml")).to exist
- end
-
it "runs rake without problems" do
bundle "gem #{gem_name}"