diff --git a/jekyll.gemspec b/jekyll.gemspec index b4d3483f..53882996 100644 --- a/jekyll.gemspec +++ b/jekyll.gemspec @@ -25,7 +25,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency('liquid', "~> 2.5.2") s.add_runtime_dependency('classifier', "~> 1.3") - s.add_runtime_dependency('listen', "~> 1.3.0") + s.add_runtime_dependency('listen', "~> 1.3") s.add_runtime_dependency('maruku', "~> 0.6.0") s.add_runtime_dependency('pygments.rb', "~> 0.5.0") s.add_runtime_dependency('commander', "~> 4.1.3") @@ -46,6 +46,7 @@ Gem::Specification.new do |s| s.add_development_dependency('simplecov', "~> 0.7") s.add_development_dependency('simplecov-gem-adapter', "~> 1.0.1") s.add_development_dependency('coveralls', "~> 0.7.0") + s.add_development_dependency('mime-types', "~> 1.5") s.add_development_dependency('activesupport', '~> 3.2.13') s.add_development_dependency('jekyll_test_plugin') 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} "