From 3ab98412725b5f70d5f1811e9d532eff65f70fed Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Mon, 28 Oct 2013 14:03:34 -0400 Subject: [PATCH] Fix 1.8.7 syntax errors. --- lib/jekyll/commands/build.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/jekyll/commands/build.rb b/lib/jekyll/commands/build.rb index 56fe90e6..5948dd89 100644 --- a/lib/jekyll/commands/build.rb +++ b/lib/jekyll/commands/build.rb @@ -37,9 +37,8 @@ module Jekyll destination = options['destination'] begin - ignored = Regexp.new(Regexp.escape(Pathname.new(destination) - .relative_path_from(Pathname.new(source)) - .to_path)) + dest = Pathname.new(destination).relative_path_from(Pathname.new(source)).to_path + ignored = Regexp.new(Regexp.escape(dest)) rescue ArgumentError # Destination is outside the source, no need to ignore it. ignored = nil @@ -47,7 +46,7 @@ module Jekyll Jekyll.logger.info "Auto-regeneration:", "enabled" - listener = Listen.to(source, ignore: ignored) do |modified, added, removed| + listener = Listen.to(source, :ignore => ignored) do |modified, added, removed| t = Time.now.strftime("%Y-%m-%d %H:%M:%S") n = modified.length + added.length + removed.length print Jekyll.logger.formatted_topic("Regenerating:") + "#{n} files at #{t} "