[前][次][番号順一覧][スレッド一覧]

ruby-changes:62228

From: Utkarsh <ko1@a...>
Date: Wed, 15 Jul 2020 16:05:42 +0900 (JST)
Subject: [ruby-changes:62228] ecb87b55d8 (master): [rubygems/rubygems] Lock rubocop version to 0.80.1

https://git.ruby-lang.org/ruby.git/commit/?id=ecb87b55d8

From ecb87b55d8ef3e2e9b5ce2c66d51d65228316754 Mon Sep 17 00:00:00 2001
From: Utkarsh Gupta <utkarsh@d...>
Date: Sun, 21 Jun 2020 16:46:34 +0530
Subject: [rubygems/rubygems] Lock rubocop version to 0.80.1

The later RuboCop versions don't work with ruby2.3
so we should lock the version to what works with
ruby2.3 as we haven't dropped the support yet.

And since we're using the older version of rubocop,
also fix `Max` value of `LineLength` to 120, which
is the current standard. Without this, rubocop
will throw the line length offenses.

Signed-off-by: Utkarsh Gupta <utkarsh@d...>

https://github.com/rubygems/rubygems/commit/46d0a800a2

diff --git a/lib/bundler/templates/newgem/rubocop.yml.tt b/lib/bundler/templates/newgem/rubocop.yml.tt
index ca11bac..00a72e3 100644
--- a/lib/bundler/templates/newgem/rubocop.yml.tt
+++ b/lib/bundler/templates/newgem/rubocop.yml.tt
@@ -5,3 +5,6 @@ Style/StringLiterals: https://github.com/ruby/ruby/blob/trunk/lib/bundler/templates/newgem/rubocop.yml.tt#L5
 Style/StringLiteralsInInterpolation:
   Enabled: true
   EnforcedStyle: double_quotes
+
+Layout/LineLength:
+  Max: 120
diff --git a/spec/bundler/commands/newgem_spec.rb b/spec/bundler/commands/newgem_spec.rb
index b1e84c7..0287fb6 100644
--- a/spec/bundler/commands/newgem_spec.rb
+++ b/spec/bundler/commands/newgem_spec.rb
@@ -177,7 +177,7 @@ RSpec.describe "bundle gem" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/newgem_spec.rb#L177
 
     it "run rubocop inside the generated gem with no offenses" do
       prepare_gemspec(bundled_app(gem_name, "#{gem_name}.gemspec"))
-      gems = ["rake", "rubocop"]
+      gems = ["rake", "rubocop -v 0.80.1"]
       path = Bundler.feature_flag.default_install_uses_path? ? local_gem_path(:base => bundled_app(gem_name)) : system_gem_path
       realworld_system_gems gems, :path => path
       bundle "exec rubocop --ignore-parent-exclusion", :dir => bundled_app(gem_name)
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]