Skip to content

Commit 04b759b

Browse files
authored
Lock RuboCop to v1.18.x (#348)
Merge pull request 348
1 parent 6d4913f commit 04b759b

File tree

7 files changed

+97
-21
lines changed

7 files changed

+97
-21
lines changed

.rubocop.yml

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,38 @@
1+
inherit_from: .rubocop_todo.yml
2+
13
require: rubocop-jekyll
24

35
inherit_gem:
46
rubocop-jekyll: .rubocop.yml
57

68
AllCops:
7-
TargetRubyVersion: 2.4
8-
Include:
9-
- lib/**/*.rb
10-
9+
TargetRubyVersion: 2.5
10+
SuggestExtensions: false
1111
Exclude:
12-
- .gitignore
13-
- .rspec
14-
- .rubocop.yml
15-
- .travis.yml
12+
- vendor/**/*
1613

17-
- Gemfile.lock
18-
- History.markdown
19-
- LICENSE.txt
20-
- README.md
14+
Layout/LineEndStringConcatenationIndentation:
15+
Enabled: true
2116

22-
- script/**/*
23-
- vendor/**/*
17+
Lint/EmptyInPattern:
18+
Enabled: false
2419

20+
Naming/InclusiveLanguage:
21+
Enabled: false
2522
Naming/MemoizedInstanceVariableName:
2623
Exclude:
2724
- lib/jekyll-feed/page-without-a-file.rb
25+
26+
Performance/MapCompact:
27+
Enabled: true
28+
Performance/RedundantEqualityComparisonBlock:
29+
Enabled: true
30+
Performance/RedundantSplitRegexpArgument:
31+
Enabled: true
32+
33+
Style/InPatternThen:
34+
Enabled: false
35+
Style/MultilineInPatternThen:
36+
Enabled: false
37+
Style/QuotedSymbols:
38+
Enabled: true

.rubocop_todo.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# This configuration was generated by
2+
# `rubocop --auto-gen-config`
3+
# on 2021-09-17 11:44:51 UTC using RuboCop version 1.18.4.
4+
# The point is for the user to remove these configuration records
5+
# one by one as the offenses are removed from the code base.
6+
# Note that changes in the inspected code, or installation of new
7+
# versions of RuboCop, may require this file to be generated again.
8+
9+
# Offense count: 1
10+
# Cop supports --auto-correct.
11+
Layout/EmptyLines:
12+
Exclude:
13+
- 'spec/jekyll-feed_spec.rb'
14+
15+
# Offense count: 15
16+
# Cop supports --auto-correct.
17+
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
18+
# URISchemes: http, https
19+
Layout/LineLength:
20+
Max: 144
21+
22+
# Offense count: 3
23+
# Configuration parameters: AllowedMethods.
24+
# AllowedMethods: enums
25+
Lint/ConstantDefinitionInBlock:
26+
Exclude:
27+
- 'spec/jekyll-feed_spec.rb'
28+
- 'spec/spec_helper.rb'
29+
30+
# Offense count: 3
31+
# Cop supports --auto-correct.
32+
Performance/RegexpMatch:
33+
Exclude:
34+
- 'spec/jekyll-feed_spec.rb'
35+
36+
# Offense count: 2
37+
# Cop supports --auto-correct.
38+
# Configuration parameters: AutoCorrect.
39+
Performance/StringInclude:
40+
Exclude:
41+
- 'spec/jekyll-feed_spec.rb'
42+
43+
# Offense count: 2
44+
# Cop supports --auto-correct.
45+
# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
46+
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
47+
Style/HashSyntax:
48+
Exclude:
49+
- 'spec/jekyll-feed_spec.rb'
50+
51+
# Offense count: 7
52+
# Cop supports --auto-correct.
53+
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
54+
# SupportedStyles: single_quotes, double_quotes
55+
Style/StringLiterals:
56+
Exclude:
57+
- 'spec/jekyll-feed_spec.rb'
58+
59+
# Offense count: 5
60+
# Cop supports --auto-correct.
61+
# Configuration parameters: EnforcedStyleForMultiline.
62+
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
63+
Style/TrailingCommaInHashLiteral:
64+
Exclude:
65+
- 'spec/jekyll-feed_spec.rb'

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
source "https://rubygems.org"
44
gemspec
55

6-
gem "rss" if RUBY_VERSION >= "3.0.0"
76
gem "jekyll", ENV["JEKYLL_VERSION"] if ENV["JEKYLL_VERSION"]
87
gem "kramdown-parser-gfm" if ENV["JEKYLL_VERSION"] == "~> 3.9"
8+
gem "rss" if RUBY_VERSION >= "3.0.0"
99

1010
install_if -> { Gem.win_platform? } do
1111
gem "tzinfo", "~> 1.2"

appveyor.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ environment:
1111
- RUBY_FOLDER_VER: "26"
1212
JEKYLL_VERSION : ">= 4.0.0.pre.alpha1"
1313
- RUBY_FOLDER_VER: "26"
14-
- RUBY_FOLDER_VER: "24"
1514

1615
install:
1716
- SET PATH=C:\Ruby%RUBY_FOLDER_VER%-x64\bin;%PATH%

jekyll-feed.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ Gem::Specification.new do |spec|
1616
spec.test_files = spec.files.grep(%r!^spec/!)
1717
spec.require_paths = ["lib"]
1818

19-
spec.required_ruby_version = ">= 2.4.0"
19+
spec.required_ruby_version = ">= 2.5.0"
2020

2121
spec.add_dependency "jekyll", ">= 3.7", "< 5.0"
2222

2323
spec.add_development_dependency "bundler"
2424
spec.add_development_dependency "nokogiri", "~> 1.6"
2525
spec.add_development_dependency "rake", "~> 12.0"
2626
spec.add_development_dependency "rspec", "~> 3.0"
27-
spec.add_development_dependency "rubocop-jekyll", "~> 0.5"
27+
spec.add_development_dependency "rubocop-jekyll", "~> 0.12.0"
2828
spec.add_development_dependency "typhoeus", ">= 0.7", "< 2.0"
2929
end

lib/jekyll-feed/generator.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ def feed_path(collection: "posts", category: nil)
5454
def collections
5555
return @collections if defined?(@collections)
5656

57-
@collections = if config["collections"].is_a?(Array)
57+
@collections = case config["collections"]
58+
when Array
5859
config["collections"].map { |c| [c, {}] }.to_h
59-
elsif config["collections"].is_a?(Hash)
60+
when Hash
6061
config["collections"]
6162
else
6263
{}

script/fmt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -e
33

4-
echo "Rubocop $(bundle exec rubocop --version)"
4+
echo "RuboCop $(bundle exec rubocop --version)"
55
bundle exec rubocop -D -E $@
66
success=$?
77
if ((success != 0)); then

0 commit comments

Comments
 (0)