From 3ffa8fddae9676185c9f7ced6be7abc867302a23 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Thu, 3 Jan 2019 19:28:58 +0530 Subject: [PATCH 01/34] Fix excluding spec files from Metrics/BlockLength --- .rubocop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index ae05986..b86484d 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -35,7 +35,7 @@ Metrics/AbcSize: Max: 21 Metrics/BlockLength: Exclude: - - spec/**/* + - !ruby/regexp /^spec/ Metrics/ClassLength: Max: 240 Metrics/LineLength: From bd085e9bb8cee98cae7be06439c3847e9502917c Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Thu, 3 Jan 2019 19:30:25 +0530 Subject: [PATCH 02/34] Release :gem: v0.5.1 --- rubocop-jekyll.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rubocop-jekyll.gemspec b/rubocop-jekyll.gemspec index efe51f9..a2f9312 100644 --- a/rubocop-jekyll.gemspec +++ b/rubocop-jekyll.gemspec @@ -4,7 +4,7 @@ $LOAD_PATH.unshift File.expand_path("lib", __dir__) Gem::Specification.new do |s| s.name = "rubocop-jekyll" - s.version = "0.5.0" + s.version = "0.5.1" s.authors = ["Ashwin Maroli"] s.email = ["ashmaroli@gmail.com"] s.homepage = "https://github.com/ashmaroli/rubocop-jekyll" From c939c7c6284c106153bf1d47d21a1a8f2aba1e11 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Wed, 23 Jan 2019 13:08:00 +0530 Subject: [PATCH 03/34] Allow using RuboCop v0.63.x (#7) --- README.md | 2 +- rubocop-jekyll.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dc53a18..701c55b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A RuboCop extension to enforce common code style in Jekyll and Jekyll plugins. [![Gem Version](https://img.shields.io/gem/v/rubocop-jekyll.svg?label=Latest%20Release)][rubygems] -[![RuboCop Support](https://img.shields.io/badge/Rubocop%20Support-0.57.2%20--%200.62.x-green.svg)][rubocop-releases] +[![RuboCop Support](https://img.shields.io/badge/Rubocop%20Support-0.57.2%20--%200.63.x-green.svg)][rubocop-releases] [rubygems]: https://rubygems.org/gems/rubocop-jekyll [rubocop-releases]: https://github.com/rubocop-hq/rubocop/releases diff --git a/rubocop-jekyll.gemspec b/rubocop-jekyll.gemspec index a2f9312..dc1fd4b 100644 --- a/rubocop-jekyll.gemspec +++ b/rubocop-jekyll.gemspec @@ -19,5 +19,5 @@ Gem::Specification.new do |s| s.require_paths = ["lib"] s.required_ruby_version = ">= 2.3.0" - s.add_runtime_dependency "rubocop", ">= 0.57.2", "< 0.63.0" + s.add_runtime_dependency "rubocop", ">= 0.57.2", "< 0.64.0" end From 74b1b57d7b5b50eeb4a8eb41b2107d2fe8d3c72c Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Wed, 23 Jan 2019 13:13:43 +0530 Subject: [PATCH 04/34] Release :gem: v0.6.0 --- README.md | 4 ++-- rubocop-jekyll.gemspec | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 701c55b..1e23202 100644 --- a/README.md +++ b/README.md @@ -23,12 +23,12 @@ or if you prefer Bundler, add it to your `Gemfile` or `gemspec` ```ruby # Gemfile -gem "rubocop-jekyll", "~> 0.5.0" +gem "rubocop-jekyll", "~> 0.6.0" ``` ```ruby # .gemspec -spec.add_development_dependency "rubocop-jekyll", "~> 0.5.0" +spec.add_development_dependency "rubocop-jekyll", "~> 0.6.0" ``` and run `bundle install` diff --git a/rubocop-jekyll.gemspec b/rubocop-jekyll.gemspec index dc1fd4b..8ec6d09 100644 --- a/rubocop-jekyll.gemspec +++ b/rubocop-jekyll.gemspec @@ -4,7 +4,7 @@ $LOAD_PATH.unshift File.expand_path("lib", __dir__) Gem::Specification.new do |s| s.name = "rubocop-jekyll" - s.version = "0.5.1" + s.version = "0.6.0" s.authors = ["Ashwin Maroli"] s.email = ["ashmaroli@gmail.com"] s.homepage = "https://github.com/ashmaroli/rubocop-jekyll" From a8452a782d7c6b146880f51722acb292e68c4fc5 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Sun, 10 Feb 2019 21:55:48 +0530 Subject: [PATCH 05/34] Add a Pull Request Template --- .github/PULL_REQUEST_TEMPLATE.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..6dc40f9 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,24 @@ + + + + +RuboCop v[RUBOCOP-VERSION] Release Details: https://github.com/rubocop-hq/rubocop/releases/tag/v[RUBOCOP-VERSION] From 338c484b386fedcaf26852596e1d3f07f714cc3c Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Sun, 10 Feb 2019 17:39:01 +0100 Subject: [PATCH 06/34] Allow using RuboCop v0.64.x (#8) --- README.md | 2 +- rubocop-jekyll.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1e23202..0c5ab1e 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A RuboCop extension to enforce common code style in Jekyll and Jekyll plugins. [![Gem Version](https://img.shields.io/gem/v/rubocop-jekyll.svg?label=Latest%20Release)][rubygems] -[![RuboCop Support](https://img.shields.io/badge/Rubocop%20Support-0.57.2%20--%200.63.x-green.svg)][rubocop-releases] +[![RuboCop Support](https://img.shields.io/badge/Rubocop%20Support-0.57.2%20--%200.64.x-green.svg)][rubocop-releases] [rubygems]: https://rubygems.org/gems/rubocop-jekyll [rubocop-releases]: https://github.com/rubocop-hq/rubocop/releases diff --git a/rubocop-jekyll.gemspec b/rubocop-jekyll.gemspec index 8ec6d09..3deb702 100644 --- a/rubocop-jekyll.gemspec +++ b/rubocop-jekyll.gemspec @@ -19,5 +19,5 @@ Gem::Specification.new do |s| s.require_paths = ["lib"] s.required_ruby_version = ">= 2.3.0" - s.add_runtime_dependency "rubocop", ">= 0.57.2", "< 0.64.0" + s.add_runtime_dependency "rubocop", ">= 0.57.2", "< 0.65.0" end From b92639e591d2cb42a1c29d16ced69be22aad68a9 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Sun, 10 Feb 2019 22:13:03 +0530 Subject: [PATCH 07/34] Release :gem: v0.7.0 --- README.md | 4 ++-- rubocop-jekyll.gemspec | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0c5ab1e..c4c5282 100644 --- a/README.md +++ b/README.md @@ -23,12 +23,12 @@ or if you prefer Bundler, add it to your `Gemfile` or `gemspec` ```ruby # Gemfile -gem "rubocop-jekyll", "~> 0.6.0" +gem "rubocop-jekyll", "~> 0.7.0" ``` ```ruby # .gemspec -spec.add_development_dependency "rubocop-jekyll", "~> 0.6.0" +spec.add_development_dependency "rubocop-jekyll", "~> 0.7.0" ``` and run `bundle install` diff --git a/rubocop-jekyll.gemspec b/rubocop-jekyll.gemspec index 3deb702..c1a3ba9 100644 --- a/rubocop-jekyll.gemspec +++ b/rubocop-jekyll.gemspec @@ -4,7 +4,7 @@ $LOAD_PATH.unshift File.expand_path("lib", __dir__) Gem::Specification.new do |s| s.name = "rubocop-jekyll" - s.version = "0.6.0" + s.version = "0.7.0" s.authors = ["Ashwin Maroli"] s.email = ["ashmaroli@gmail.com"] s.homepage = "https://github.com/ashmaroli/rubocop-jekyll" From 2305d2b1fe8202f945f238a15296c73b156d55d0 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Wed, 20 Feb 2019 07:17:18 +0100 Subject: [PATCH 08/34] Allow Rubocop 0.65.0 (#9) --- README.md | 2 +- rubocop-jekyll.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c4c5282..5867b75 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A RuboCop extension to enforce common code style in Jekyll and Jekyll plugins. [![Gem Version](https://img.shields.io/gem/v/rubocop-jekyll.svg?label=Latest%20Release)][rubygems] -[![RuboCop Support](https://img.shields.io/badge/Rubocop%20Support-0.57.2%20--%200.64.x-green.svg)][rubocop-releases] +[![RuboCop Support](https://img.shields.io/badge/Rubocop%20Support-0.57.2%20--%200.65.x-green.svg)][rubocop-releases] [rubygems]: https://rubygems.org/gems/rubocop-jekyll [rubocop-releases]: https://github.com/rubocop-hq/rubocop/releases diff --git a/rubocop-jekyll.gemspec b/rubocop-jekyll.gemspec index c1a3ba9..8a94ecc 100644 --- a/rubocop-jekyll.gemspec +++ b/rubocop-jekyll.gemspec @@ -19,5 +19,5 @@ Gem::Specification.new do |s| s.require_paths = ["lib"] s.required_ruby_version = ">= 2.3.0" - s.add_runtime_dependency "rubocop", ">= 0.57.2", "< 0.65.0" + s.add_runtime_dependency "rubocop", ">= 0.57.2", "< 0.66.0" end From 8377ffe9737285dc8b0260d29a3e7f0f7651fc1e Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Wed, 20 Feb 2019 11:53:11 +0530 Subject: [PATCH 09/34] Release :gem: v0.8.0 --- README.md | 4 ++-- rubocop-jekyll.gemspec | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5867b75..cf6ff07 100644 --- a/README.md +++ b/README.md @@ -23,12 +23,12 @@ or if you prefer Bundler, add it to your `Gemfile` or `gemspec` ```ruby # Gemfile -gem "rubocop-jekyll", "~> 0.7.0" +gem "rubocop-jekyll", "~> 0.8.0" ``` ```ruby # .gemspec -spec.add_development_dependency "rubocop-jekyll", "~> 0.7.0" +spec.add_development_dependency "rubocop-jekyll", "~> 0.8.0" ``` and run `bundle install` diff --git a/rubocop-jekyll.gemspec b/rubocop-jekyll.gemspec index 8a94ecc..fa5a543 100644 --- a/rubocop-jekyll.gemspec +++ b/rubocop-jekyll.gemspec @@ -4,7 +4,7 @@ $LOAD_PATH.unshift File.expand_path("lib", __dir__) Gem::Specification.new do |s| s.name = "rubocop-jekyll" - s.version = "0.7.0" + s.version = "0.8.0" s.authors = ["Ashwin Maroli"] s.email = ["ashmaroli@gmail.com"] s.homepage = "https://github.com/ashmaroli/rubocop-jekyll" From ebc067460f3a80178dda1e3ce25d0a41cc1ff622 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 18 Mar 2019 15:39:55 +0530 Subject: [PATCH 10/34] Reset Naming/UncommunicativeMethodParamName config --- .rubocop.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index b86484d..a21effc 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -57,9 +57,6 @@ Naming/FileName: Enabled: false Naming/MemoizedInstanceVariableName: EnforcedStyleForLeadingUnderscores: optional -Naming/UncommunicativeMethodParamName: - AllowedNames: - - _ Style/AccessModifierDeclarations: From 0a82fa1343d2d30742f95a3d08a8de2736d6d78b Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 18 Mar 2019 15:48:34 +0530 Subject: [PATCH 11/34] Allow using RuboCop v0.66.x (#10) --- README.md | 2 +- rubocop-jekyll.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cf6ff07..1b718cf 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A RuboCop extension to enforce common code style in Jekyll and Jekyll plugins. [![Gem Version](https://img.shields.io/gem/v/rubocop-jekyll.svg?label=Latest%20Release)][rubygems] -[![RuboCop Support](https://img.shields.io/badge/Rubocop%20Support-0.57.2%20--%200.65.x-green.svg)][rubocop-releases] +[![RuboCop Support](https://img.shields.io/badge/Rubocop%20Support-0.57.2%20--%200.66.x-green.svg)][rubocop-releases] [rubygems]: https://rubygems.org/gems/rubocop-jekyll [rubocop-releases]: https://github.com/rubocop-hq/rubocop/releases diff --git a/rubocop-jekyll.gemspec b/rubocop-jekyll.gemspec index fa5a543..e1191a8 100644 --- a/rubocop-jekyll.gemspec +++ b/rubocop-jekyll.gemspec @@ -19,5 +19,5 @@ Gem::Specification.new do |s| s.require_paths = ["lib"] s.required_ruby_version = ">= 2.3.0" - s.add_runtime_dependency "rubocop", ">= 0.57.2", "< 0.66.0" + s.add_runtime_dependency "rubocop", ">= 0.57.2", "< 0.67.0" end From 45c69d31bae7eae253e93c296713ca6e31730ade Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 18 Mar 2019 15:56:36 +0530 Subject: [PATCH 12/34] Release :gem: v0.9.0 --- README.md | 4 ++-- rubocop-jekyll.gemspec | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1b718cf..0dfeada 100644 --- a/README.md +++ b/README.md @@ -23,12 +23,12 @@ or if you prefer Bundler, add it to your `Gemfile` or `gemspec` ```ruby # Gemfile -gem "rubocop-jekyll", "~> 0.8.0" +gem "rubocop-jekyll", "~> 0.9.0" ``` ```ruby # .gemspec -spec.add_development_dependency "rubocop-jekyll", "~> 0.8.0" +spec.add_development_dependency "rubocop-jekyll", "~> 0.9.0" ``` and run `bundle install` diff --git a/rubocop-jekyll.gemspec b/rubocop-jekyll.gemspec index e1191a8..cb335e2 100644 --- a/rubocop-jekyll.gemspec +++ b/rubocop-jekyll.gemspec @@ -4,7 +4,7 @@ $LOAD_PATH.unshift File.expand_path("lib", __dir__) Gem::Specification.new do |s| s.name = "rubocop-jekyll" - s.version = "0.8.0" + s.version = "0.9.0" s.authors = ["Ashwin Maroli"] s.email = ["ashmaroli@gmail.com"] s.homepage = "https://github.com/ashmaroli/rubocop-jekyll" From 36f4ed2382e69867b1800e7930d93b8400cb7921 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Fri, 17 May 2019 00:16:18 +0530 Subject: [PATCH 13/34] Update homepage URL in gemspec --- rubocop-jekyll.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rubocop-jekyll.gemspec b/rubocop-jekyll.gemspec index cb335e2..13f5be8 100644 --- a/rubocop-jekyll.gemspec +++ b/rubocop-jekyll.gemspec @@ -7,7 +7,7 @@ Gem::Specification.new do |s| s.version = "0.9.0" s.authors = ["Ashwin Maroli"] s.email = ["ashmaroli@gmail.com"] - s.homepage = "https://github.com/ashmaroli/rubocop-jekyll" + s.homepage = "https://github.com/jekyll/rubocop-jekyll" s.license = "MIT" s.summary = "Code style check for Jekyll and Jekyll plugins" s.description = "A RuboCop extension to enforce common code style in Jekyll and Jekyll plugins" From be8160f035678c3b36c354e5482c9cd01dfa6316 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Wed, 22 May 2019 02:47:38 +0530 Subject: [PATCH 14/34] Bump supported RuboCop version: v0.68.0 - 0.69.x (#12) Merge pull request 12 --- .rubocop.yml | 7 +++++-- README.md | 2 +- rubocop-jekyll.gemspec | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index a21effc..4685653 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,3 +1,6 @@ +require: + - rubocop-performance + AllCops: TargetRubyVersion: 2.3 Exclude: @@ -13,9 +16,9 @@ Layout/AlignHash: EnforcedHashRocketStyle: table Layout/IndentationWidth: Severity: error -Layout/IndentArray: +Layout/IndentFirstArrayElement: EnforcedStyle: consistent -Layout/IndentHash: +Layout/IndentFirstHashElement: EnforcedStyle: consistent Layout/MultilineMethodCallIndentation: EnforcedStyle: indented diff --git a/README.md b/README.md index 0dfeada..3a4cda4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A RuboCop extension to enforce common code style in Jekyll and Jekyll plugins. [![Gem Version](https://img.shields.io/gem/v/rubocop-jekyll.svg?label=Latest%20Release)][rubygems] -[![RuboCop Support](https://img.shields.io/badge/Rubocop%20Support-0.57.2%20--%200.66.x-green.svg)][rubocop-releases] +[![RuboCop Support](https://img.shields.io/badge/Rubocop%20Support-0.68.0%20--%200.69.x-green.svg)][rubocop-releases] [rubygems]: https://rubygems.org/gems/rubocop-jekyll [rubocop-releases]: https://github.com/rubocop-hq/rubocop/releases diff --git a/rubocop-jekyll.gemspec b/rubocop-jekyll.gemspec index 13f5be8..fa2a2a1 100644 --- a/rubocop-jekyll.gemspec +++ b/rubocop-jekyll.gemspec @@ -19,5 +19,6 @@ Gem::Specification.new do |s| s.require_paths = ["lib"] s.required_ruby_version = ">= 2.3.0" - s.add_runtime_dependency "rubocop", ">= 0.57.2", "< 0.67.0" + s.add_runtime_dependency "rubocop", ">= 0.68.0", "< 0.70.0" + s.add_runtime_dependency "rubocop-performance", "~> 1.2" end From d1907d712e73bec2592b38d9ce047f43fbd4450b Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Tue, 21 May 2019 17:17:41 -0400 Subject: [PATCH 15/34] Update history to reflect merge of #12 [ci skip] --- History.markdown | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 History.markdown diff --git a/History.markdown b/History.markdown new file mode 100644 index 0000000..9b05dca --- /dev/null +++ b/History.markdown @@ -0,0 +1,5 @@ +## HEAD + +### Minor Enhancements + + * Bump supported RuboCop version: v0.68.0 - 0.69.x (#12) From 6f2b971ac3aad9a4cf41bca45ffe91ad3e87640d Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Sun, 16 Jun 2019 12:38:49 +0530 Subject: [PATCH 16/34] Allow using upto RuboCop v0.71.x (#15) * Allow using RuboCop v0.70.x * Allow using RuboCop v0.71.x --- README.md | 2 +- rubocop-jekyll.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3a4cda4..b011b42 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A RuboCop extension to enforce common code style in Jekyll and Jekyll plugins. [![Gem Version](https://img.shields.io/gem/v/rubocop-jekyll.svg?label=Latest%20Release)][rubygems] -[![RuboCop Support](https://img.shields.io/badge/Rubocop%20Support-0.68.0%20--%200.69.x-green.svg)][rubocop-releases] +[![RuboCop Support](https://img.shields.io/badge/Rubocop%20Support-0.68.0%20--%200.71.x-green.svg)][rubocop-releases] [rubygems]: https://rubygems.org/gems/rubocop-jekyll [rubocop-releases]: https://github.com/rubocop-hq/rubocop/releases diff --git a/rubocop-jekyll.gemspec b/rubocop-jekyll.gemspec index fa2a2a1..14b1fe1 100644 --- a/rubocop-jekyll.gemspec +++ b/rubocop-jekyll.gemspec @@ -19,6 +19,6 @@ Gem::Specification.new do |s| s.require_paths = ["lib"] s.required_ruby_version = ">= 2.3.0" - s.add_runtime_dependency "rubocop", ">= 0.68.0", "< 0.70.0" + s.add_runtime_dependency "rubocop", ">= 0.68.0", "< 0.72.0" s.add_runtime_dependency "rubocop-performance", "~> 1.2" end From af8b7721038c136065ecf4efe00f5fd5d00ed9df Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Sun, 16 Jun 2019 12:43:56 +0530 Subject: [PATCH 17/34] Update history to reflect merge of #15 --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 9b05dca..e81d25b 100644 --- a/History.markdown +++ b/History.markdown @@ -3,3 +3,4 @@ ### Minor Enhancements * Bump supported RuboCop version: v0.68.0 - 0.69.x (#12) + * Bump supported RuboCop version: v0.68.0 - 0.71.x (#15) From b7331d4c41d09b20a4911e49c4efe95f8f8d1424 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Sun, 16 Jun 2019 12:56:07 +0530 Subject: [PATCH 18/34] Release :gem: v0.10.0 --- README.md | 4 ++-- rubocop-jekyll.gemspec | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b011b42..9742e90 100644 --- a/README.md +++ b/README.md @@ -23,12 +23,12 @@ or if you prefer Bundler, add it to your `Gemfile` or `gemspec` ```ruby # Gemfile -gem "rubocop-jekyll", "~> 0.9.0" +gem "rubocop-jekyll", "~> 0.10.0" ``` ```ruby # .gemspec -spec.add_development_dependency "rubocop-jekyll", "~> 0.9.0" +spec.add_development_dependency "rubocop-jekyll", "~> 0.10.0" ``` and run `bundle install` diff --git a/rubocop-jekyll.gemspec b/rubocop-jekyll.gemspec index 14b1fe1..fb10726 100644 --- a/rubocop-jekyll.gemspec +++ b/rubocop-jekyll.gemspec @@ -4,7 +4,7 @@ $LOAD_PATH.unshift File.expand_path("lib", __dir__) Gem::Specification.new do |s| s.name = "rubocop-jekyll" - s.version = "0.9.0" + s.version = "0.10.0" s.authors = ["Ashwin Maroli"] s.email = ["ashmaroli@gmail.com"] s.homepage = "https://github.com/jekyll/rubocop-jekyll" From 4c253f0384b99a6c1a6294efcbb3b6c6b9312c92 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Thu, 19 Mar 2020 16:26:00 +0530 Subject: [PATCH 19/34] Test repos with Travis CI (#17) Test this repository against some of the plugin repos to see if changes to RuboCop version may break test builds on those repos. --- .gitignore | 2 ++ .travis.yml | 28 +++++++++++++++ Gemfile | 3 ++ script/cibuild | 58 ++++++++++++++++++++++++++++++ script/process_repo_bundle_list.rb | 23 ++++++++++++ 5 files changed, 114 insertions(+) create mode 100644 .travis.yml create mode 100755 script/cibuild create mode 100644 script/process_repo_bundle_list.rb diff --git a/.gitignore b/.gitignore index cec3cb5..01f4627 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ +.tmp/ +vendor/ *.gem Gemfile.lock diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..af5d545 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,28 @@ +language: ruby +rvm: 2.4.6 +cache: + directories: + - /home/travis/.rvm/ + - vendor/bundle +before_install: +- gem update --system --no-document +- gem install bundler --no-document +script: script/cibuild $NWO +env: +- NWO="jekyll/jekyll-admin" +- NWO="jekyll/jekyll-archives" +- NWO="jekyll/jekyll-coffeescript" +- NWO="jekyll/jekyll-commonmark" +- NWO="jekyll/jekyll-compose" +- NWO="jekyll/jekyll-feed" +- NWO="jekyll/github-metadata" +- NWO="jekyll/jekyll-import" +- NWO="jekyll/jekyll-mentions" +- NWO="jekyll/jekyll-redirect-from" +- NWO="jekyll/jekyll-sass-converter" +- NWO="jekyll/jekyll-seo-tag" +- NWO="jekyll/jekyll-sitemap" +- NWO="jekyll/jekyll-watch" +- NWO="benbalter/jekyll-avatar" +notifications: + email: false diff --git a/Gemfile b/Gemfile index bb94df8..b1cf1df 100644 --- a/Gemfile +++ b/Gemfile @@ -2,3 +2,6 @@ source "https://rubygems.org" gemspec + +# To cache all transitive dependencies of Jekyll in Travis jobs +gem "jekyll" diff --git a/script/cibuild b/script/cibuild new file mode 100755 index 0000000..2f04f07 --- /dev/null +++ b/script/cibuild @@ -0,0 +1,58 @@ +#!/bin/bash -e + +repo_nwo="$1" +if test -z "$repo_nwo"; then + echo "usage: $0 owner/repo" + exit 1 +fi + +ROOT="$(pwd)" +TMPDIR="$ROOT/.tmp" + +if [[ $1 == http* ]]; then + clone_url="$1" + clone_location="$TMPDIR/enterprise" + rm -rf "$clone_location" +else + clone_url="https://github.com/$repo_nwo" + clone_location="$TMPDIR/$repo_nwo" +fi + +# Color helpers +cyanize() { echo "\e[36m$1\e[0m"; } +gogreen() { echo "\e[32m\e[1m$1\e[0m"; } + +# Let's start! +echo "" +echo -e " REPO URL: $(cyanize $clone_url)" +echo -e "CLONE LOCATION: $(cyanize $clone_location)" + +if ! [ -d $clone_location ]; then + echo "" + echo -e "$(gogreen 'Cloning REPO URL into CLONE LOCATION...')\c" + mkdir -p $clone_location + git clone --recurse-submodules -q "$clone_url" "$clone_location" + echo -e " Done!" +fi + +mkdir -p $clone_location/vendor/bundle +cp -r $ROOT/vendor $clone_location + +echo -e "$(gogreen 'CD into CLONE LOCATION...')" +cd $clone_location + +echo -e "$(gogreen 'Setting up Gemfile...')\c" +BUNDLE_GEMFILE=$(pwd)/Gemfile +BUNDLE_PATH=$(pwd)/vendor/bundle +bundle install --quiet +bundle list > repo-bundle-list.tmp +ruby $ROOT/script/process_repo_bundle_list.rb $clone_location +echo -e " Done!" + +echo -e "$(gogreen 'Setting up bundle for CLONE LOCATION...')\c" +bundle install --quiet +echo -e " Done!" + +echo -e "$(gogreen 'Running RuboCop in CLONE LOCATION...')" +echo "RuboCop $(bundle exec rubocop --version)" +bundle exec rubocop diff --git a/script/process_repo_bundle_list.rb b/script/process_repo_bundle_list.rb new file mode 100644 index 0000000..313938c --- /dev/null +++ b/script/process_repo_bundle_list.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +path = ARGV[0] +return unless path + +text = File.read(File.join(path, "repo-bundle-list.tmp")) +gemspec_basename = File.basename(Dir["#{path}/*.gemspec"][0], ".gemspec") +data = text.scan(%r!\s+\* (.*) \((.*)\)!).reject do |(name, version)| + name.start_with?("rubocop") || name == gemspec_basename +end +File.open(File.join(path, 'Gemfile'), "wb") do |f| + f.puts(<<~TXT) + # frozen_string_literal: true + + source "https://rubygems.org" + gemspec + + # rubocop:disable Bundler/OrderedGems + TXT + data.each { |name, version| f.puts("gem #{name.inspect}, #{version.inspect}") } + f.puts('gem "rubocop-jekyll", :github => "jekyll/rubocop-jekyll"') + f.puts "# rubocop:enable Bundler/OrderedGems" +end From 6c7404b3e9f4ae8d4475d02877564621a1341181 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Thu, 19 Mar 2020 17:27:50 +0530 Subject: [PATCH 20/34] Use current state of rubocop-jekyll in Travis jobs --- .travis.yml | 3 +++ script/cibuild | 2 +- script/process_repo_bundle_list.rb | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index af5d545..43e920b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,5 +24,8 @@ env: - NWO="jekyll/jekyll-sitemap" - NWO="jekyll/jekyll-watch" - NWO="benbalter/jekyll-avatar" +branches: + only: + - master notifications: email: false diff --git a/script/cibuild b/script/cibuild index 2f04f07..f9d6d3e 100755 --- a/script/cibuild +++ b/script/cibuild @@ -46,7 +46,7 @@ BUNDLE_GEMFILE=$(pwd)/Gemfile BUNDLE_PATH=$(pwd)/vendor/bundle bundle install --quiet bundle list > repo-bundle-list.tmp -ruby $ROOT/script/process_repo_bundle_list.rb $clone_location +ruby $ROOT/script/process_repo_bundle_list.rb $clone_location $ROOT echo -e " Done!" echo -e "$(gogreen 'Setting up bundle for CLONE LOCATION...')\c" diff --git a/script/process_repo_bundle_list.rb b/script/process_repo_bundle_list.rb index 313938c..147134b 100644 --- a/script/process_repo_bundle_list.rb +++ b/script/process_repo_bundle_list.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -path = ARGV[0] +path, root = ARGV.values_at(0, 1) return unless path text = File.read(File.join(path, "repo-bundle-list.tmp")) @@ -18,6 +18,6 @@ # rubocop:disable Bundler/OrderedGems TXT data.each { |name, version| f.puts("gem #{name.inspect}, #{version.inspect}") } - f.puts('gem "rubocop-jekyll", :github => "jekyll/rubocop-jekyll"') + f.puts(%(gem "rubocop-jekyll", :path => #{root.inspect})) f.puts "# rubocop:enable Bundler/OrderedGems" end From 06b1925cdc236bb07fdc3c7059ffde508208cf83 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Thu, 19 Mar 2020 15:40:25 +0100 Subject: [PATCH 21/34] chore(deps): RuboCop v0.80.x (#16) Merge pull request 16 --- .rubocop.yml | 19 ++++++++++++------- .travis.yml | 8 ++++++++ README.md | 2 +- rubocop-jekyll.gemspec | 2 +- 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 4685653..249ff29 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -11,14 +11,16 @@ AllCops: - vendor/**/* - tmp/**/* - -Layout/AlignHash: +Layout/LineLength: + Max: 100 + Severity: warning +Layout/HashAlignment: EnforcedHashRocketStyle: table Layout/IndentationWidth: Severity: error -Layout/IndentFirstArrayElement: +Layout/FirstArrayElementIndentation: EnforcedStyle: consistent -Layout/IndentFirstHashElement: +Layout/FirstHashElementIndentation: EnforcedStyle: consistent Layout/MultilineMethodCallIndentation: EnforcedStyle: indented @@ -41,9 +43,6 @@ Metrics/BlockLength: - !ruby/regexp /^spec/ Metrics/ClassLength: Max: 240 -Metrics/LineLength: - Max: 100 - Severity: warning Metrics/MethodLength: CountComments: false Max: 20 @@ -79,6 +78,12 @@ Style/GuardClause: Style/HashSyntax: EnforcedStyle: hash_rockets Severity: error +Style/HashEachMethods: + Enabled: true +Style/HashTransformKeys: + Enabled: true +Style/HashTransformValues: + Enabled: true Style/ModuleFunction: Enabled: false Style/MultilineTernaryOperator: diff --git a/.travis.yml b/.travis.yml index 43e920b..849bce0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,6 +24,14 @@ env: - NWO="jekyll/jekyll-sitemap" - NWO="jekyll/jekyll-watch" - NWO="benbalter/jekyll-avatar" +matrix: + # These repos are currently locked to rubocop-jekyll-0.10.x or older + allow_failures: + - env: NWO="jekyll/jekyll-admin" + - env: NWO="jekyll/jekyll-import" + - env: NWO="jekyll/jekyll-redirect-from" + - env: NWO="jekyll/jekyll-watch" + - env: NWO="benbalter/jekyll-avatar" branches: only: - master diff --git a/README.md b/README.md index 9742e90..45fcc79 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A RuboCop extension to enforce common code style in Jekyll and Jekyll plugins. [![Gem Version](https://img.shields.io/gem/v/rubocop-jekyll.svg?label=Latest%20Release)][rubygems] -[![RuboCop Support](https://img.shields.io/badge/Rubocop%20Support-0.68.0%20--%200.71.x-green.svg)][rubocop-releases] +[![RuboCop Support](https://img.shields.io/badge/Rubocop%20Support-0.68.0%20--%200.80.x-green.svg)][rubocop-releases] [rubygems]: https://rubygems.org/gems/rubocop-jekyll [rubocop-releases]: https://github.com/rubocop-hq/rubocop/releases diff --git a/rubocop-jekyll.gemspec b/rubocop-jekyll.gemspec index fb10726..b86eb83 100644 --- a/rubocop-jekyll.gemspec +++ b/rubocop-jekyll.gemspec @@ -19,6 +19,6 @@ Gem::Specification.new do |s| s.require_paths = ["lib"] s.required_ruby_version = ">= 2.3.0" - s.add_runtime_dependency "rubocop", ">= 0.68.0", "< 0.72.0" + s.add_runtime_dependency "rubocop", ">= 0.68.0", "< 0.81.0" s.add_runtime_dependency "rubocop-performance", "~> 1.2" end From f1ea96f26c1f9d7e0056deadf1d3a35641cab6ad Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Thu, 19 Mar 2020 10:40:26 -0400 Subject: [PATCH 22/34] Update history to reflect merge of #16 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index e81d25b..30c8c52 100644 --- a/History.markdown +++ b/History.markdown @@ -4,3 +4,4 @@ * Bump supported RuboCop version: v0.68.0 - 0.69.x (#12) * Bump supported RuboCop version: v0.68.0 - 0.71.x (#15) + * chore(deps): RuboCop v0.80.x (#16) From 1c51af2acfb5dc87aceaf11f56f2b8d435fbb4a1 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Thu, 19 Mar 2020 20:48:26 +0530 Subject: [PATCH 23/34] Release :gem: v0.11.0 --- README.md | 4 ++-- rubocop-jekyll.gemspec | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 45fcc79..8d5f601 100644 --- a/README.md +++ b/README.md @@ -23,12 +23,12 @@ or if you prefer Bundler, add it to your `Gemfile` or `gemspec` ```ruby # Gemfile -gem "rubocop-jekyll", "~> 0.10.0" +gem "rubocop-jekyll", "~> 0.11.0" ``` ```ruby # .gemspec -spec.add_development_dependency "rubocop-jekyll", "~> 0.10.0" +spec.add_development_dependency "rubocop-jekyll", "~> 0.11.0" ``` and run `bundle install` diff --git a/rubocop-jekyll.gemspec b/rubocop-jekyll.gemspec index b86eb83..a5cf253 100644 --- a/rubocop-jekyll.gemspec +++ b/rubocop-jekyll.gemspec @@ -4,7 +4,7 @@ $LOAD_PATH.unshift File.expand_path("lib", __dir__) Gem::Specification.new do |s| s.name = "rubocop-jekyll" - s.version = "0.10.0" + s.version = "0.11.0" s.authors = ["Ashwin Maroli"] s.email = ["ashmaroli@gmail.com"] s.homepage = "https://github.com/jekyll/rubocop-jekyll" From d2dd59edf585ade7428291f85bebbc2cebe828d4 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Mon, 13 Apr 2020 13:11:40 +0200 Subject: [PATCH 24/34] chore(ci): Test against Ruby 2.5 (#18) Merge pull request 18 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 849bce0..562bbcd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: ruby -rvm: 2.4.6 +rvm: 2.5.8 cache: directories: - /home/travis/.rvm/ From 511d0e278aefad97b3bfa8f3530b0b4ac31c222a Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Mon, 13 Apr 2020 07:11:42 -0400 Subject: [PATCH 25/34] Update history to reflect merge of #18 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 30c8c52..fdeb6b6 100644 --- a/History.markdown +++ b/History.markdown @@ -5,3 +5,4 @@ * Bump supported RuboCop version: v0.68.0 - 0.69.x (#12) * Bump supported RuboCop version: v0.68.0 - 0.71.x (#15) * chore(deps): RuboCop v0.80.x (#16) + * chore(ci): Test against Ruby 2.5 (#18) From 3d07baafed6f96b3737b598c73b053d51e7ae330 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 13 Apr 2020 17:06:21 +0530 Subject: [PATCH 26/34] Properly document recent history --- History.markdown | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/History.markdown b/History.markdown index fdeb6b6..201aa1f 100644 --- a/History.markdown +++ b/History.markdown @@ -1,8 +1,20 @@ ## HEAD +### Development Fixes + + * chore(ci): Test against Ruby 2.5 (#18) + +## 0.11.0 / 2020-03-19 + ### Minor Enhancements + * Bump supported RuboCop version: v0.68.0 - 0.80.x (#16) + +### Development Fixes + + * Test repos with Travis CI (#17) + +## Legacy + * Bump supported RuboCop version: v0.68.0 - 0.69.x (#12) * Bump supported RuboCop version: v0.68.0 - 0.71.x (#15) - * chore(deps): RuboCop v0.80.x (#16) - * chore(ci): Test against Ruby 2.5 (#18) From e9af56d538464c7edbcceebbf383b5053fcbe17e Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Mon, 13 Apr 2020 18:34:51 +0200 Subject: [PATCH 27/34] chore: Target Ruby 2.4 (#19) Merge pull request 19 --- .rubocop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index 249ff29..0804736 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,7 +2,7 @@ require: - rubocop-performance AllCops: - TargetRubyVersion: 2.3 + TargetRubyVersion: 2.4 Exclude: - bin/**/* - exe/**/* From 5e24a8057017b55aaf22c895cdb1f333a0243843 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Mon, 13 Apr 2020 12:34:53 -0400 Subject: [PATCH 28/34] Update history to reflect merge of #19 [ci skip] --- History.markdown | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/History.markdown b/History.markdown index 201aa1f..9a9abe7 100644 --- a/History.markdown +++ b/History.markdown @@ -4,6 +4,10 @@ * chore(ci): Test against Ruby 2.5 (#18) +### Bug Fixes + + * chore: Target Ruby 2.4 (#19) + ## 0.11.0 / 2020-03-19 ### Minor Enhancements @@ -12,9 +16,6 @@ ### Development Fixes - * Test repos with Travis CI (#17) - -## Legacy - + * Test repos with Travis CI ## Legacy (#17) * Bump supported RuboCop version: v0.68.0 - 0.69.x (#12) * Bump supported RuboCop version: v0.68.0 - 0.71.x (#15) From ddcaf2342f623ceeb984068ebd7ef734f9bdd6b8 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 13 Apr 2020 23:19:56 +0530 Subject: [PATCH 29/34] Update section heading and entry title in History --- History.markdown | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/History.markdown b/History.markdown index 9a9abe7..b2e30f0 100644 --- a/History.markdown +++ b/History.markdown @@ -1,12 +1,12 @@ ## HEAD -### Development Fixes +### Minor Enhancements - * chore(ci): Test against Ruby 2.5 (#18) + * Have AllCops target Ruby 2.4 in `.rubocop.yml` (#19) -### Bug Fixes +### Development Fixes - * chore: Target Ruby 2.4 (#19) + * chore(ci): Test against Ruby 2.5 (#18) ## 0.11.0 / 2020-03-19 From 601b2fa03cb8674189a61afb86ba866455081e29 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 13 Apr 2020 23:32:07 +0530 Subject: [PATCH 30/34] Rectify documentation of historical releases --- History.markdown | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/History.markdown b/History.markdown index b2e30f0..ef35071 100644 --- a/History.markdown +++ b/History.markdown @@ -16,6 +16,11 @@ ### Development Fixes - * Test repos with Travis CI ## Legacy (#17) + * Test repos with Travis CI (#17) + +## 0.10.0 / 2019-06-16 + +### Minor Enhancements + * Bump supported RuboCop version: v0.68.0 - 0.69.x (#12) * Bump supported RuboCop version: v0.68.0 - 0.71.x (#15) From 65c7162a0e5102b992dddb1aecc7eac74f56d321 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Thu, 16 Sep 2021 17:19:43 +0530 Subject: [PATCH 31/34] Remove TravisCI config and test scripts --- .travis.yml | 39 -------------------- script/cibuild | 58 ------------------------------ script/process_repo_bundle_list.rb | 23 ------------ 3 files changed, 120 deletions(-) delete mode 100644 .travis.yml delete mode 100755 script/cibuild delete mode 100644 script/process_repo_bundle_list.rb diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 562bbcd..0000000 --- a/.travis.yml +++ /dev/null @@ -1,39 +0,0 @@ -language: ruby -rvm: 2.5.8 -cache: - directories: - - /home/travis/.rvm/ - - vendor/bundle -before_install: -- gem update --system --no-document -- gem install bundler --no-document -script: script/cibuild $NWO -env: -- NWO="jekyll/jekyll-admin" -- NWO="jekyll/jekyll-archives" -- NWO="jekyll/jekyll-coffeescript" -- NWO="jekyll/jekyll-commonmark" -- NWO="jekyll/jekyll-compose" -- NWO="jekyll/jekyll-feed" -- NWO="jekyll/github-metadata" -- NWO="jekyll/jekyll-import" -- NWO="jekyll/jekyll-mentions" -- NWO="jekyll/jekyll-redirect-from" -- NWO="jekyll/jekyll-sass-converter" -- NWO="jekyll/jekyll-seo-tag" -- NWO="jekyll/jekyll-sitemap" -- NWO="jekyll/jekyll-watch" -- NWO="benbalter/jekyll-avatar" -matrix: - # These repos are currently locked to rubocop-jekyll-0.10.x or older - allow_failures: - - env: NWO="jekyll/jekyll-admin" - - env: NWO="jekyll/jekyll-import" - - env: NWO="jekyll/jekyll-redirect-from" - - env: NWO="jekyll/jekyll-watch" - - env: NWO="benbalter/jekyll-avatar" -branches: - only: - - master -notifications: - email: false diff --git a/script/cibuild b/script/cibuild deleted file mode 100755 index f9d6d3e..0000000 --- a/script/cibuild +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash -e - -repo_nwo="$1" -if test -z "$repo_nwo"; then - echo "usage: $0 owner/repo" - exit 1 -fi - -ROOT="$(pwd)" -TMPDIR="$ROOT/.tmp" - -if [[ $1 == http* ]]; then - clone_url="$1" - clone_location="$TMPDIR/enterprise" - rm -rf "$clone_location" -else - clone_url="https://github.com/$repo_nwo" - clone_location="$TMPDIR/$repo_nwo" -fi - -# Color helpers -cyanize() { echo "\e[36m$1\e[0m"; } -gogreen() { echo "\e[32m\e[1m$1\e[0m"; } - -# Let's start! -echo "" -echo -e " REPO URL: $(cyanize $clone_url)" -echo -e "CLONE LOCATION: $(cyanize $clone_location)" - -if ! [ -d $clone_location ]; then - echo "" - echo -e "$(gogreen 'Cloning REPO URL into CLONE LOCATION...')\c" - mkdir -p $clone_location - git clone --recurse-submodules -q "$clone_url" "$clone_location" - echo -e " Done!" -fi - -mkdir -p $clone_location/vendor/bundle -cp -r $ROOT/vendor $clone_location - -echo -e "$(gogreen 'CD into CLONE LOCATION...')" -cd $clone_location - -echo -e "$(gogreen 'Setting up Gemfile...')\c" -BUNDLE_GEMFILE=$(pwd)/Gemfile -BUNDLE_PATH=$(pwd)/vendor/bundle -bundle install --quiet -bundle list > repo-bundle-list.tmp -ruby $ROOT/script/process_repo_bundle_list.rb $clone_location $ROOT -echo -e " Done!" - -echo -e "$(gogreen 'Setting up bundle for CLONE LOCATION...')\c" -bundle install --quiet -echo -e " Done!" - -echo -e "$(gogreen 'Running RuboCop in CLONE LOCATION...')" -echo "RuboCop $(bundle exec rubocop --version)" -bundle exec rubocop diff --git a/script/process_repo_bundle_list.rb b/script/process_repo_bundle_list.rb deleted file mode 100644 index 147134b..0000000 --- a/script/process_repo_bundle_list.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -path, root = ARGV.values_at(0, 1) -return unless path - -text = File.read(File.join(path, "repo-bundle-list.tmp")) -gemspec_basename = File.basename(Dir["#{path}/*.gemspec"][0], ".gemspec") -data = text.scan(%r!\s+\* (.*) \((.*)\)!).reject do |(name, version)| - name.start_with?("rubocop") || name == gemspec_basename -end -File.open(File.join(path, 'Gemfile'), "wb") do |f| - f.puts(<<~TXT) - # frozen_string_literal: true - - source "https://rubygems.org" - gemspec - - # rubocop:disable Bundler/OrderedGems - TXT - data.each { |name, version| f.puts("gem #{name.inspect}, #{version.inspect}") } - f.puts(%(gem "rubocop-jekyll", :path => #{root.inspect})) - f.puts "# rubocop:enable Bundler/OrderedGems" -end From 36baa0c1e573821ff57ce471c01dfe30b998c23d Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Thu, 16 Sep 2021 18:36:57 +0530 Subject: [PATCH 32/34] Require RuboCop v1.18.x (#22) --- .rubocop.yml | 238 ++++++++++++++++++++++++++++++++++++++--- lib/rubocop-jekyll.rb | 2 +- rubocop-jekyll.gemspec | 4 +- 3 files changed, 225 insertions(+), 19 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 0804736..2a442ec 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,7 +2,7 @@ require: - rubocop-performance AllCops: - TargetRubyVersion: 2.4 + TargetRubyVersion: 2.5 Exclude: - bin/**/* - exe/**/* @@ -11,29 +11,125 @@ AllCops: - vendor/**/* - tmp/**/* -Layout/LineLength: - Max: 100 - Severity: warning -Layout/HashAlignment: - EnforcedHashRocketStyle: table -Layout/IndentationWidth: +Gemspec/DateAssignment: + Enabled: true + + +Layout/BeginEndAlignment: + Enabled: true +Layout/EmptyComment: + Enabled: false +Layout/EmptyLinesAroundAttributeAccessor: + Enabled: true +Layout/EndAlignment: Severity: error Layout/FirstArrayElementIndentation: EnforcedStyle: consistent Layout/FirstHashElementIndentation: EnforcedStyle: consistent +Layout/HashAlignment: + EnforcedHashRocketStyle: table +Layout/IndentationWidth: + Severity: error +Layout/LineLength: + Max: 100 + Severity: warning Layout/MultilineMethodCallIndentation: EnforcedStyle: indented Layout/MultilineOperationIndentation: EnforcedStyle: indented -Layout/EmptyComment: - Enabled: false -Layout/EndAlignment: - Severity: error +Layout/SpaceAroundMethodCallOperator: + Enabled: true +Layout/SpaceBeforeBrackets: + Enabled: true +Layout/SpaceInsideHashLiteralBraces: + Enabled: true +Lint/AmbiguousAssignment: + Enabled: true +Lint/BinaryOperatorWithIdenticalOperands: + Enabled: true +Lint/ConstantDefinitionInBlock: + Enabled: true +Lint/DeprecatedConstants: + Enabled: true +Lint/DeprecatedOpenSSLConstant: + Enabled: true +Lint/DuplicateBranch: + Enabled: true +Lint/DuplicateElsifCondition: + Enabled: true +Lint/DuplicateRegexpCharacterClassElement: + Enabled: true +Lint/DuplicateRequire: + Enabled: true +Lint/DuplicateRescueException: + Enabled: true +Lint/EmptyBlock: + Enabled: true +Lint/EmptyClass: + Enabled: true +Lint/EmptyConditionalBody: + Enabled: true +Lint/EmptyFile: + Enabled: true +Lint/FloatComparison: + Enabled: true +Lint/HashCompareByIdentity: + Enabled: true +Lint/IdentityComparison: + Enabled: true +Lint/LambdaWithoutLiteralBlock: + Enabled: true +Lint/MissingSuper: + Enabled: false +Lint/MixedRegexpCaptureTypes: + Enabled: false +Lint/NestedPercentLiteral: + Enabled: true +Lint/NoReturnInBeginEndBlocks: + Enabled: true +Lint/NumberedParameterAssignment: + Enabled: true +Lint/OrAssignmentToConstant: + Enabled: true +Lint/OutOfRangeRegexpRef: + Enabled: true +Lint/RaiseException: + Enabled: true +Lint/RedundantDirGlobSort: + Enabled: true +Lint/RedundantSafeNavigation: + Enabled: true +Lint/SelfAssignment: + Enabled: true +Lint/StructNewOverride: + Enabled: true +Lint/SymbolConversion: + Enabled: true +Lint/ToEnumArguments: + Enabled: false +Lint/TopLevelReturnWithArgument: + Enabled: true +Lint/TrailingCommaInAttributeDeclaration: + Enabled: true +Lint/TripleQuotes: + Enabled: true +Lint/UnexpectedBlockArity: + Enabled: true +Lint/UnmodifiedReduceAccumulator: + Enabled: true Lint/UnreachableCode: Severity: error +Lint/UnreachableLoop: + Enabled: true +Lint/UselessMethodDefinition: + Enabled: true +Lint/UselessTimes: + Enabled: true +Lint/Void: + Enabled: true Metrics/AbcSize: @@ -61,33 +157,117 @@ Naming/MemoizedInstanceVariableName: EnforcedStyleForLeadingUnderscores: optional +Performance/AncestorsInclude: + Enabled: false +Performance/ArraySemiInfiniteRangeSlice: + Enabled: true +Performance/BigDecimalWithNumericArgument: + Enabled: true +Performance/BlockGivenWithExplicitBlock: + Enabled: true +Performance/ChainArrayAllocation: + Enabled: true +Performance/CollectionLiteralInLoop: + Enabled: true +Performance/ConstantRegexp: + Enabled: true +Performance/MethodObjectAsBlock: + Enabled: true +Performance/RedundantSortBlock: + Enabled: true +Performance/RedundantStringChars: + Enabled: true +Performance/ReverseFirst: + Enabled: true +Performance/SortReverse: + Enabled: false +Performance/Squeeze: + Enabled: true +Performance/StringInclude: + Enabled: true +Performance/Sum: + Enabled: true + + Style/AccessModifierDeclarations: Enabled: false +Style/AccessorGrouping: + Enabled: true Style/Alias: EnforcedStyle: prefer_alias_method Style/AndOr: Severity: error -Style/FrozenStringLiteralComment: - EnforcedStyle: always +Style/ArgumentsForwarding: + Enabled: false +Style/ArrayCoercion: + Enabled: true +Style/BisectedAttrAccessor: + Enabled: true +Style/CaseLikeIf: + Enabled: true +Style/StringChars: + Enabled: true +Style/ClassAndModuleChildren: + Enabled: true +Style/ClassEqualityComparison: + Enabled: true +Style/CollectionCompact: + Enabled: true +Style/CombinableLoops: + Enabled: true +Style/DocumentDynamicEvalDefinition: + Enabled: true Style/Documentation: Enabled: false Style/DoubleNegation: Enabled: false +Style/EndlessMethod: + Enabled: true +Style/ExplicitBlockArgument: + Enabled: false +Style/ExponentialNotation: + Enabled: true +Style/FormatStringToken: + Enabled: true +Style/FrozenStringLiteralComment: + EnforcedStyle: always +Style/GlobalStdStream: + Enabled: true Style/GuardClause: Enabled: false +Style/HashAsLastArrayItem: + Enabled: true +Style/HashConversion: + Enabled: true +Style/HashEachMethods: + Enabled: true +Style/HashExcept: + Enabled: true +Style/HashLikeCase: + Enabled: true Style/HashSyntax: EnforcedStyle: hash_rockets Severity: error -Style/HashEachMethods: - Enabled: true Style/HashTransformKeys: - Enabled: true + Enabled: false Style/HashTransformValues: Enabled: true +Style/IfWithBooleanLiteralBranches: + Enabled: true +Style/KeywordParametersOrder: + Enabled: true +Style/MixinUsage: + Enabled: true Style/ModuleFunction: Enabled: false Style/MultilineTernaryOperator: Severity: error +Style/NegatedIfElseCondition: + Enabled: true +Style/NilLambda: + Enabled: true +Style/OptionalBooleanParameter: + Enabled: true Style/PercentLiteralDelimiters: PreferredDelimiters: "%q": "{}" @@ -97,16 +277,42 @@ Style/PercentLiteralDelimiters: "%w": "()" "%W": "()" "%x": "()" +Style/RedundantArgument: + Enabled: true +Style/RedundantAssignment: + Enabled: true +Style/RedundantFetchBlock: + Enabled: false +Style/RedundantFileExtensionInRequire: + Enabled: true +Style/RedundantRegexpCharacterClass: + Enabled: true +Style/RedundantRegexpEscape: + Enabled: true +Style/RedundantSelfAssignment: + Enabled: true Style/RegexpLiteral: EnforcedStyle: percent_r Style/RescueModifier: Enabled: false +Style/SafeNavigation: + Enabled: true Style/SignalException: EnforcedStyle: only_raise +Style/SingleArgumentDig: + Enabled: true +Style/SlicingWithRange: + Enabled: false +Style/SoleNestedConditional: + Enabled: true +Style/StringConcatenation: + Enabled: true Style/StringLiterals: EnforcedStyle: double_quotes Style/StringLiteralsInInterpolation: EnforcedStyle: double_quotes +Style/SwapValues: + Enabled: true Style/SymbolArray: EnforcedStyle: brackets Style/TrailingCommaInArrayLiteral: diff --git a/lib/rubocop-jekyll.rb b/lib/rubocop-jekyll.rb index c9f0571..26a52c0 100644 --- a/lib/rubocop-jekyll.rb +++ b/lib/rubocop-jekyll.rb @@ -1,4 +1,4 @@ # frozen_string_literal: true path_to_cops = File.join(File.expand_path("rubocop", __dir__), "cop", "**", "*.rb") -Dir[path_to_cops].each { |cop| require cop } +Dir[path_to_cops].sort.each { |cop| require cop } diff --git a/rubocop-jekyll.gemspec b/rubocop-jekyll.gemspec index a5cf253..e28d91a 100644 --- a/rubocop-jekyll.gemspec +++ b/rubocop-jekyll.gemspec @@ -17,8 +17,8 @@ Gem::Specification.new do |s| end s.require_paths = ["lib"] - s.required_ruby_version = ">= 2.3.0" + s.required_ruby_version = ">= 2.5.0" - s.add_runtime_dependency "rubocop", ">= 0.68.0", "< 0.81.0" + s.add_runtime_dependency "rubocop", "~> 1.18.0" s.add_runtime_dependency "rubocop-performance", "~> 1.2" end From 7fff35e3d94b464a2ef2318fc26cbaafcbb21afa Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Thu, 16 Sep 2021 18:52:59 +0530 Subject: [PATCH 33/34] Update history to reflect merge of #22 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index ef35071..4b06526 100644 --- a/History.markdown +++ b/History.markdown @@ -2,6 +2,7 @@ ### Minor Enhancements + * Require RuboCop v1.18.x (#22) * Have AllCops target Ruby 2.4 in `.rubocop.yml` (#19) ### Development Fixes From 1b0f945844788c164f9eed989ba977200a427dc4 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Thu, 16 Sep 2021 19:01:28 +0530 Subject: [PATCH 34/34] Release :gem: v0.12.0 --- History.markdown | 2 +- README.md | 6 +++--- rubocop-jekyll.gemspec | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/History.markdown b/History.markdown index 4b06526..f2e9859 100644 --- a/History.markdown +++ b/History.markdown @@ -1,4 +1,4 @@ -## HEAD +## 0.12.0 / 2021-09-16 ### Minor Enhancements diff --git a/README.md b/README.md index 8d5f601..1d7b10b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A RuboCop extension to enforce common code style in Jekyll and Jekyll plugins. [![Gem Version](https://img.shields.io/gem/v/rubocop-jekyll.svg?label=Latest%20Release)][rubygems] -[![RuboCop Support](https://img.shields.io/badge/Rubocop%20Support-0.68.0%20--%200.80.x-green.svg)][rubocop-releases] +[![RuboCop Support](https://img.shields.io/badge/RuboCop%20Support-1.18.x-green.svg)][rubocop-releases] [rubygems]: https://rubygems.org/gems/rubocop-jekyll [rubocop-releases]: https://github.com/rubocop-hq/rubocop/releases @@ -23,12 +23,12 @@ or if you prefer Bundler, add it to your `Gemfile` or `gemspec` ```ruby # Gemfile -gem "rubocop-jekyll", "~> 0.11.0" +gem "rubocop-jekyll", "~> 0.12.0" ``` ```ruby # .gemspec -spec.add_development_dependency "rubocop-jekyll", "~> 0.11.0" +spec.add_development_dependency "rubocop-jekyll", "~> 0.12.0" ``` and run `bundle install` diff --git a/rubocop-jekyll.gemspec b/rubocop-jekyll.gemspec index e28d91a..becefc0 100644 --- a/rubocop-jekyll.gemspec +++ b/rubocop-jekyll.gemspec @@ -4,7 +4,7 @@ $LOAD_PATH.unshift File.expand_path("lib", __dir__) Gem::Specification.new do |s| s.name = "rubocop-jekyll" - s.version = "0.11.0" + s.version = "0.12.0" s.authors = ["Ashwin Maroli"] s.email = ["ashmaroli@gmail.com"] s.homepage = "https://github.com/jekyll/rubocop-jekyll"