Use correct type for removed paths passed to update
This commit is contained in:
parent
03c95f0863
commit
dc3eac9e96
1 changed files with 3 additions and 1 deletions
|
@ -91,7 +91,7 @@ module Middleman
|
||||||
|
|
||||||
stop_listener! if @listener
|
stop_listener! if @listener
|
||||||
|
|
||||||
update([], @files.values)
|
update([], @files.values.map { |source_file| source_file[:full_path] })
|
||||||
|
|
||||||
poll_once!
|
poll_once!
|
||||||
|
|
||||||
|
@ -262,11 +262,13 @@ module Middleman
|
||||||
]) unless valid_updates.empty? && valid_removes.empty?
|
]) unless valid_updates.empty? && valid_removes.empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Contract IsA['Middleman::SourceFile'] => Any
|
||||||
def add_file_to_cache(f)
|
def add_file_to_cache(f)
|
||||||
@files[f[:full_path]] = f
|
@files[f[:full_path]] = f
|
||||||
@extensionless_files[strip_extensions(f[:full_path])] = f
|
@extensionless_files[strip_extensions(f[:full_path])] = f
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Contract IsA['Middleman::SourceFile'] => Any
|
||||||
def remove_file_from_cache(f)
|
def remove_file_from_cache(f)
|
||||||
@files.delete(f[:full_path])
|
@files.delete(f[:full_path])
|
||||||
@extensionless_files.delete(strip_extensions(f[:full_path]))
|
@extensionless_files.delete(strip_extensions(f[:full_path]))
|
||||||
|
|
Loading…
Add table
Reference in a new issue