parent
8c8c88eec0
commit
6bedc7e069
|
@ -368,7 +368,7 @@ Style/GuardClause:
|
||||||
Style/HashAsLastArrayItem:
|
Style/HashAsLastArrayItem:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Style/HashConversion:
|
Style/HashConversion:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Style/HashEachMethods:
|
Style/HashEachMethods:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Style/HashExcept:
|
Style/HashExcept:
|
||||||
|
@ -392,6 +392,8 @@ Style/MapCompactWithConditionalBlock:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Style/MapToHash:
|
Style/MapToHash:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
Style/MinMaxComparison:
|
||||||
|
Enabled: true
|
||||||
Style/MixinUsage:
|
Style/MixinUsage:
|
||||||
Exclude:
|
Exclude:
|
||||||
- test/helper.rb
|
- test/helper.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", "~> 1.45.0"
|
gem "rubocop", "~> 1.48.0"
|
||||||
gem "rubocop-minitest"
|
gem "rubocop-minitest"
|
||||||
gem "rubocop-performance"
|
gem "rubocop-performance"
|
||||||
gem "rubocop-rake"
|
gem "rubocop-rake"
|
||||||
|
|
|
@ -486,7 +486,7 @@ module Jekyll
|
||||||
# Returns nothing
|
# Returns nothing
|
||||||
def limit_posts!
|
def limit_posts!
|
||||||
if limit_posts.positive?
|
if limit_posts.positive?
|
||||||
limit = posts.docs.length < limit_posts ? posts.docs.length : limit_posts
|
limit = [posts.docs.length, limit_posts].min
|
||||||
posts.docs = posts.docs[-limit, limit]
|
posts.docs = posts.docs[-limit, limit]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue