From d827946a1042e69561aa1b6ee2b182106852aaa2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2019 14:32:18 +0000 Subject: [PATCH 1/4] Bump rubocop from 0.60.0 to 0.75.0 Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.60.0 to 0.75.0. - [Release notes](https://github.com/rubocop-hq/rubocop/releases) - [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.60.0...v0.75.0) Signed-off-by: dependabot-preview[bot] --- Gemfile | 2 +- Gemfile.lock | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Gemfile b/Gemfile index cc500dd3b..8c2b4ec43 100644 --- a/Gemfile +++ b/Gemfile @@ -96,7 +96,7 @@ group :development do gem "capistrano3-delayed-job", "~> 1.7.3" gem "erb_lint", require: false gem "mdl", "~> 0.5.0", require: false - gem "rubocop", "~> 0.60.0", require: false + gem "rubocop", "~> 0.75.0", require: false gem "rubocop-rspec", "~> 1.35.0", require: false gem "rvm1-capistrano3", "~> 1.4.0", require: false gem "scss_lint", "~> 0.55.0", require: false diff --git a/Gemfile.lock b/Gemfile.lock index dec178646..69ac9a9d1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -387,7 +387,6 @@ GEM activerecord (>= 4.2) activesupport (>= 4.2) arel (>= 6) - powerpack (0.1.2) public_suffix (4.0.1) puma (4.1.1) nio4r (~> 2.0) @@ -460,14 +459,13 @@ GEM rspec-mocks (~> 3.8.0) rspec-support (~> 3.8.0) rspec-support (3.8.0) - rubocop (0.60.0) + rubocop (0.75.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) - parser (>= 2.5, != 2.5.1.1) - powerpack (~> 0.1) + parser (>= 2.6) rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) - unicode-display_width (~> 1.4.0) + unicode-display_width (>= 1.4.0, < 1.7) rubocop-rspec (1.35.0) rubocop (>= 0.60.0) ruby-progressbar (1.10.1) @@ -550,7 +548,7 @@ GEM thread_safe (~> 0.1) uglifier (4.1.19) execjs (>= 0.3.0, < 3) - unicode-display_width (1.4.1) + unicode-display_width (1.6.0) unicorn (5.4.1) kgio (~> 2.6) raindrops (~> 0.7) @@ -648,7 +646,7 @@ DEPENDENCIES rinku (~> 2.0.2) rollbar (~> 2.18.0) rspec-rails (~> 3.8) - rubocop (~> 0.60.0) + rubocop (~> 0.75.0) rubocop-rspec (~> 1.35.0) rvm1-capistrano3 (~> 1.4.0) sass-rails (~> 5.0, >= 5.0.4) From 74500db17385214d52eb71e51a487bf972d97de1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Tue, 1 Oct 2019 18:01:08 +0200 Subject: [PATCH 2/4] Update indentation consistency rubocop rule The indentation mode has been renamed. --- .rubocop_basic.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.rubocop_basic.yml b/.rubocop_basic.yml index f925b85cd..39ac98fd9 100644 --- a/.rubocop_basic.yml +++ b/.rubocop_basic.yml @@ -30,7 +30,7 @@ FactoryBot/AttributeDefinedStatically: Enabled: true Layout/IndentationConsistency: - EnforcedStyle: rails + EnforcedStyle: indented_internal_methods Layout/IndentationWidth: Enabled: true From 63d31f47c7e0a2e9a1500c127d3fe4380ffd29f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Tue, 1 Oct 2019 18:21:36 +0200 Subject: [PATCH 3/4] Add missing rubocop dependencies Rails and performance cops have been extracted to separate gems. Note in the past we had to add these lines in order to activate Rails cops: ``` Rails: Enabled: true ``` But we didn't do it, and so Rails cops were ignored. With the new version, it's enough to require `rubocop-rails`. --- .rubocop_basic.yml | 5 ++++- Gemfile | 2 ++ Gemfile.lock | 7 +++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.rubocop_basic.yml b/.rubocop_basic.yml index 39ac98fd9..88791f478 100644 --- a/.rubocop_basic.yml +++ b/.rubocop_basic.yml @@ -1,4 +1,7 @@ -require: rubocop-rspec +require: + - rubocop-performance + - rubocop-rails + - rubocop-rspec AllCops: DisplayCopNames: true diff --git a/Gemfile b/Gemfile index 8c2b4ec43..91d13d2b4 100644 --- a/Gemfile +++ b/Gemfile @@ -97,6 +97,8 @@ group :development do gem "erb_lint", require: false gem "mdl", "~> 0.5.0", require: false gem "rubocop", "~> 0.75.0", require: false + gem "rubocop-performance", "~> 1.4.1", require: false + gem "rubocop-rails", "~> 2.3.2", require: false gem "rubocop-rspec", "~> 1.35.0", require: false gem "rvm1-capistrano3", "~> 1.4.0", require: false gem "scss_lint", "~> 0.55.0", require: false diff --git a/Gemfile.lock b/Gemfile.lock index 69ac9a9d1..5876a05db 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -466,6 +466,11 @@ GEM rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 1.7) + rubocop-performance (1.4.1) + rubocop (>= 0.71.0) + rubocop-rails (2.3.2) + rack (>= 1.1) + rubocop (>= 0.72.0) rubocop-rspec (1.35.0) rubocop (>= 0.60.0) ruby-progressbar (1.10.1) @@ -647,6 +652,8 @@ DEPENDENCIES rollbar (~> 2.18.0) rspec-rails (~> 3.8) rubocop (~> 0.75.0) + rubocop-performance (~> 1.4.1) + rubocop-rails (~> 2.3.2) rubocop-rspec (~> 1.35.0) rvm1-capistrano3 (~> 1.4.0) sass-rails (~> 5.0, >= 5.0.4) From 19555442da0d5bfda7cded508769a4efab74abbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Tue, 8 Oct 2019 12:45:03 +0200 Subject: [PATCH 4/4] Update Hound's rubocop version Hound doesn't support version 0.75 yet, so we need to use 0.72.0. --- .hound.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.hound.yml b/.hound.yml index 4010fa02a..a8568704c 100644 --- a/.hound.yml +++ b/.hound.yml @@ -1,5 +1,6 @@ rubocop: config_file: .rubocop_basic.yml + version: 0.72.0 scss: config_file: .scss-lint.yml erblint: