parent
01d0b78abb
commit
bcff13a16a
|
|
@ -77,6 +77,8 @@ Lint/EmptyFile:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Lint/FloatComparison:
|
Lint/FloatComparison:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
Lint/HashCompareByIdentity:
|
||||||
|
Enabled: true
|
||||||
Lint/IdentityComparison:
|
Lint/IdentityComparison:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Lint/MissingSuper:
|
Lint/MissingSuper:
|
||||||
|
|
@ -90,6 +92,8 @@ Lint/OutOfRangeRegexpRef:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Lint/RaiseException:
|
Lint/RaiseException:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
Lint/RedundantSafeNavigation:
|
||||||
|
Enabled: true
|
||||||
Lint/SelfAssignment:
|
Lint/SelfAssignment:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Lint/StructNewOverride:
|
Lint/StructNewOverride:
|
||||||
|
|
@ -205,6 +209,8 @@ Style/CaseLikeIf:
|
||||||
Style/ClassAndModuleChildren:
|
Style/ClassAndModuleChildren:
|
||||||
Exclude:
|
Exclude:
|
||||||
- test/**/*.rb
|
- test/**/*.rb
|
||||||
|
Style/ClassEqualityComparison:
|
||||||
|
Enabled: true
|
||||||
Style/CombinableLoops:
|
Style/CombinableLoops:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Style/Documentation:
|
Style/Documentation:
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# This configuration was generated by
|
# This configuration was generated by
|
||||||
# `rubocop --auto-gen-config`
|
# `rubocop --auto-gen-config --auto-gen-only-exclude`
|
||||||
# on 2020-09-04 16:17:09 UTC using RuboCop version 0.90.0.
|
# on 2020-10-08 15:38:52 UTC using RuboCop version 0.93.0.
|
||||||
# The point is for the user to remove these configuration records
|
# The point is for the user to remove these configuration records
|
||||||
# one by one as the offenses are removed from the code base.
|
# one by one as the offenses are removed from the code base.
|
||||||
# Note that changes in the inspected code, or installation of new
|
# Note that changes in the inspected code, or installation of new
|
||||||
|
|
@ -20,8 +20,9 @@ Style/CombinableLoops:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/jekyll/tags/post_url.rb'
|
- 'lib/jekyll/tags/post_url.rb'
|
||||||
|
|
||||||
# Offense count: 2
|
# Offense count: 1
|
||||||
|
# Configuration parameters: AllowedMethods.
|
||||||
|
# AllowedMethods: respond_to_missing?
|
||||||
Style/OptionalBooleanParameter:
|
Style/OptionalBooleanParameter:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/jekyll/collection.rb'
|
|
||||||
- 'lib/jekyll/log_adapter.rb'
|
- 'lib/jekyll/log_adapter.rb'
|
||||||
|
|
|
||||||
2
Gemfile
2
Gemfile
|
|
@ -23,7 +23,7 @@ group :test do
|
||||||
gem "nokogiri", "~> 1.7"
|
gem "nokogiri", "~> 1.7"
|
||||||
gem "rspec"
|
gem "rspec"
|
||||||
gem "rspec-mocks"
|
gem "rspec-mocks"
|
||||||
gem "rubocop", "~> 0.92.0"
|
gem "rubocop", "~> 0.93.0"
|
||||||
gem "rubocop-performance"
|
gem "rubocop-performance"
|
||||||
gem "test-dependency-theme", :path => File.expand_path("test/fixtures/test-dependency-theme", __dir__)
|
gem "test-dependency-theme", :path => File.expand_path("test/fixtures/test-dependency-theme", __dir__)
|
||||||
gem "test-theme", :path => File.expand_path("test/fixtures/test-theme", __dir__)
|
gem "test-theme", :path => File.expand_path("test/fixtures/test-theme", __dir__)
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ module Jekyll
|
||||||
end
|
end
|
||||||
|
|
||||||
def validate_permalink!(filename)
|
def validate_permalink!(filename)
|
||||||
if self.data["permalink"]&.to_s&.empty?
|
if self.data["permalink"] == ""
|
||||||
raise Errors::InvalidPermalinkError, "Invalid permalink in #{filename}"
|
raise Errors::InvalidPermalinkError, "Invalid permalink in #{filename}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -194,11 +194,11 @@ module Jekyll
|
||||||
def excerpt
|
def excerpt
|
||||||
return @excerpt if defined?(@excerpt)
|
return @excerpt if defined?(@excerpt)
|
||||||
|
|
||||||
@excerpt = data["excerpt"]&.to_s
|
@excerpt = data["excerpt"] ? data["excerpt"].to_s : nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def generate_excerpt?
|
def generate_excerpt?
|
||||||
!excerpt_separator.empty? && self.class == Jekyll::Page && html?
|
!excerpt_separator.empty? && instance_of?(Jekyll::Page) && html?
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ class TestTags < JekyllUnitTest
|
||||||
site.read if override["read_all"]
|
site.read if override["read_all"]
|
||||||
|
|
||||||
info = { :filters => [Jekyll::Filters], :registers => { :site => site } }
|
info = { :filters => [Jekyll::Filters], :registers => { :site => site } }
|
||||||
@converter = site.converters.find { |c| c.class == converter_class }
|
@converter = site.converters.find { |c| c.instance_of?(converter_class) }
|
||||||
payload = { "highlighter_prefix" => @converter.highlighter_prefix,
|
payload = { "highlighter_prefix" => @converter.highlighter_prefix,
|
||||||
"highlighter_suffix" => @converter.highlighter_suffix, }
|
"highlighter_suffix" => @converter.highlighter_suffix, }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue