From b21b016cf90bfedf116439690e9067c3d5ab2cc6 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 23 Apr 2018 22:44:27 +0530 Subject: [PATCH] Use Rubocop w/ config inherited from Jekyll-3.8.0 --- .rubocop.yml | 4 ++-- jekyll-watch.gemspec | 2 +- lib/jekyll/watcher.rb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index a1906ef..8f090b6 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,7 +2,7 @@ inherit_gem: jekyll: .rubocop.yml AllCops: - TargetRubyVersion: 2.2 + TargetRubyVersion: 2.1 Include: - lib/**/*.rb @@ -22,7 +22,7 @@ Lint/HandleExceptions: Exclude: - lib/jekyll/watcher.rb -Lint/RescueWithoutErrorClass: +Style/RescueStandardError: Exclude: - lib/jekyll/watcher.rb diff --git a/jekyll-watch.gemspec b/jekyll-watch.gemspec index 6454f28..753e576 100644 --- a/jekyll-watch.gemspec +++ b/jekyll-watch.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency "jekyll", "~> 3.6" spec.add_development_dependency "rake" spec.add_development_dependency "rspec", "~> 3.0" - spec.add_development_dependency "rubocop", "0.51" + spec.add_development_dependency "rubocop", "~> 0.55.0" end diff --git a/lib/jekyll/watcher.rb b/lib/jekyll/watcher.rb index 4c368de..3b1fe1b 100644 --- a/lib/jekyll/watcher.rb +++ b/lib/jekyll/watcher.rb @@ -30,7 +30,7 @@ def watch(options, site = nil) unless options["serving"] trap("INT") do listener.stop - puts " Halting auto-regeneration." + Jekyll.logger.info "", "Halting auto-regeneration." exit 0 end @@ -128,7 +128,7 @@ def process(site, time) Jekyll.logger.warn "Error:", e.message Jekyll.logger.warn "Error:", "Run jekyll build --trace for more information." end - puts "" + Jekyll.logger.info "" end end end