Merge pull request #1665 from mojombo/downgrade-listen
Fix Listen implementation so master is compatible with 1.8.7
This commit is contained in:
commit
bca4d37d57
|
@ -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')
|
||||
|
||||
|
|
|
@ -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} "
|
||||
|
|
Loading…
Reference in New Issue