Update Rubocop to 0.51.0 (#6444)

Merge pull request 6444
This commit is contained in:
jekyllbot 2017-10-19 14:22:36 -04:00 committed by GitHub
parent 32d38e68ef
commit e7f1ce2e2b
10 changed files with 8 additions and 14 deletions

View File

@ -1,6 +1,6 @@
--- ---
AllCops: AllCops:
TargetRubyVersion: 2.0 TargetRubyVersion: 2.1
Include: Include:
- lib/**/*.rb - lib/**/*.rb
Exclude: Exclude:
@ -117,8 +117,6 @@ Style/Documentation:
- !ruby/regexp /features\/.*.rb$/ - !ruby/regexp /features\/.*.rb$/
Style/DoubleNegation: Style/DoubleNegation:
Enabled: false Enabled: false
Style/Encoding:
EnforcedStyle: when_needed
Style/GuardClause: Style/GuardClause:
Enabled: false Enabled: false
Style/HashSyntax: Style/HashSyntax:

View File

@ -30,7 +30,7 @@ group :test do
gem "nokogiri", RUBY_VERSION >= "2.2" ? "~> 1.7" : "~> 1.7.0" gem "nokogiri", RUBY_VERSION >= "2.2" ? "~> 1.7" : "~> 1.7.0"
gem "rspec" gem "rspec"
gem "rspec-mocks" gem "rspec-mocks"
gem "rubocop", "~> 0.50.0" gem "rubocop", "~> 0.51.0"
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__)

View File

@ -156,7 +156,7 @@ end
When(%r!^I run jekyll(.*)$!) do |args| When(%r!^I run jekyll(.*)$!) do |args|
run_jekyll(args) run_jekyll(args)
if args.include?("--verbose") || ENV["DEBUG"] if args.include?("--verbose") || ENV["DEBUG"]
$stderr.puts "\n#{jekyll_run_output}\n" warn "\n#{jekyll_run_output}\n"
end end
end end
@ -165,7 +165,7 @@ end
When(%r!^I run bundle(.*)$!) do |args| When(%r!^I run bundle(.*)$!) do |args|
run_bundle(args) run_bundle(args)
if args.include?("--verbose") || ENV["DEBUG"] if args.include?("--verbose") || ENV["DEBUG"]
$stderr.puts "\n#{jekyll_run_output}\n" warn "\n#{jekyll_run_output}\n"
end end
end end
@ -174,7 +174,7 @@ end
When(%r!^I run gem(.*)$!) do |args| When(%r!^I run gem(.*)$!) do |args|
run_rubygem(args) run_rubygem(args)
if args.include?("--verbose") || ENV["DEBUG"] if args.include?("--verbose") || ENV["DEBUG"]
$stderr.puts "\n#{jekyll_run_output}\n" warn "\n#{jekyll_run_output}\n"
end end
end end

View File

@ -96,7 +96,7 @@ module Jekyll
) )
end end
end end
end # end of class << self end
end end
end end
end end

View File

@ -207,7 +207,7 @@ module Jekyll
rescue ArgumentError => err rescue ArgumentError => err
Jekyll.logger.warn "WARNING:", "Error reading configuration. " \ Jekyll.logger.warn "WARNING:", "Error reading configuration. " \
"Using defaults (and options)." "Using defaults (and options)."
$stderr.puts err warn err
end end
configuration.fix_common_issues.backwards_compatibilize.add_default_collections configuration.fix_common_issues.backwards_compatibilize.add_default_collections

View File

@ -47,7 +47,7 @@ class Jekyll::Converters::Markdown::RedcarpetParser
end end
module WithRouge module WithRouge
def block_code(code, lang) def block_code(_code, lang)
code = "<pre>#{super}</pre>" code = "<pre>#{super}</pre>"
"<div class=\"highlight\">#{add_code_tags(code, lang)}</div>" "<div class=\"highlight\">#{add_code_tags(code, lang)}</div>"

View File

@ -1,4 +1,3 @@
# coding: utf-8
# frozen_string_literal: true # frozen_string_literal: true
require "helper" require "helper"

View File

@ -1,4 +1,3 @@
# encoding: UTF-8
# frozen_string_literal: true # frozen_string_literal: true
require "helper" require "helper"

View File

@ -1,4 +1,3 @@
# coding: utf-8
# frozen_string_literal: true # frozen_string_literal: true
require "helper" require "helper"

View File

@ -1,4 +1,3 @@
# encoding: utf-8
# frozen_string_literal: true # frozen_string_literal: true
require "helper" require "helper"