diff --git a/.rubocop.yml b/.rubocop.yml index 8f961cf5..f483e1dd 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,6 +1,6 @@ --- AllCops: - TargetRubyVersion: 2.0 + TargetRubyVersion: 2.1 Include: - lib/**/*.rb Exclude: @@ -117,8 +117,6 @@ Style/Documentation: - !ruby/regexp /features\/.*.rb$/ Style/DoubleNegation: Enabled: false -Style/Encoding: - EnforcedStyle: when_needed Style/GuardClause: Enabled: false Style/HashSyntax: diff --git a/Gemfile b/Gemfile index 8ff6d132..92f6f45e 100644 --- a/Gemfile +++ b/Gemfile @@ -30,7 +30,7 @@ group :test do gem "nokogiri", RUBY_VERSION >= "2.2" ? "~> 1.7" : "~> 1.7.0" gem "rspec" 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-theme", :path => File.expand_path("test/fixtures/test-theme", __dir__) diff --git a/features/step_definitions.rb b/features/step_definitions.rb index 29900491..c69cc089 100644 --- a/features/step_definitions.rb +++ b/features/step_definitions.rb @@ -156,7 +156,7 @@ end When(%r!^I run jekyll(.*)$!) do |args| run_jekyll(args) if args.include?("--verbose") || ENV["DEBUG"] - $stderr.puts "\n#{jekyll_run_output}\n" + warn "\n#{jekyll_run_output}\n" end end @@ -165,7 +165,7 @@ end When(%r!^I run bundle(.*)$!) do |args| run_bundle(args) if args.include?("--verbose") || ENV["DEBUG"] - $stderr.puts "\n#{jekyll_run_output}\n" + warn "\n#{jekyll_run_output}\n" end end @@ -174,7 +174,7 @@ end When(%r!^I run gem(.*)$!) do |args| run_rubygem(args) if args.include?("--verbose") || ENV["DEBUG"] - $stderr.puts "\n#{jekyll_run_output}\n" + warn "\n#{jekyll_run_output}\n" end end diff --git a/lib/jekyll/commands/build.rb b/lib/jekyll/commands/build.rb index 1bd176b8..96a48cdf 100644 --- a/lib/jekyll/commands/build.rb +++ b/lib/jekyll/commands/build.rb @@ -96,7 +96,7 @@ module Jekyll ) end end - end # end of class << self + end end end end diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb index 5c502d68..575dca65 100644 --- a/lib/jekyll/configuration.rb +++ b/lib/jekyll/configuration.rb @@ -207,7 +207,7 @@ module Jekyll rescue ArgumentError => err Jekyll.logger.warn "WARNING:", "Error reading configuration. " \ "Using defaults (and options)." - $stderr.puts err + warn err end configuration.fix_common_issues.backwards_compatibilize.add_default_collections diff --git a/lib/jekyll/converters/markdown/redcarpet_parser.rb b/lib/jekyll/converters/markdown/redcarpet_parser.rb index 35c6e5fe..7a8c6ec5 100644 --- a/lib/jekyll/converters/markdown/redcarpet_parser.rb +++ b/lib/jekyll/converters/markdown/redcarpet_parser.rb @@ -47,7 +47,7 @@ class Jekyll::Converters::Markdown::RedcarpetParser end module WithRouge - def block_code(code, lang) + def block_code(_code, lang) code = "
#{super}" "