Skip to content

Commit

Permalink
support following at least one symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
jtolio committed Dec 13, 2011
1 parent c6917a5 commit 3c09121
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
2 changes: 1 addition & 1 deletion lib/guard/coffeescript.rb
Expand Up @@ -58,7 +58,7 @@ def start
# @raise [:task_has_failed] when stop has failed
#
def run_all
run_on_change(Watcher.match_files(self, Dir.glob(File.join('**', '*.coffee'))))
run_on_change(Watcher.match_files(self, Dir.glob('**{,/*/**}/*.coffee')))
end

# Gets called when watched paths and files have changes.
Expand Down
22 changes: 2 additions & 20 deletions lib/guard/coffeescript/inspector.rb
Expand Up @@ -16,9 +16,7 @@ class << self
def clean(paths)
paths.uniq!
paths.compact!
paths = paths.select { |p| coffee_file?(p) }
clear_coffee_files_list
paths
paths.select { |p| coffee_file?(p) }
end

private
Expand All @@ -29,23 +27,7 @@ def clean(paths)
# @return [Boolean] when the file valid
#
def coffee_file?(path)
coffee_files.include?(path)
end

# Scans the project and keeps a list of all
# CoffeeScript files.
#
# @see #clear_coffee_files_list
# @return [Array<String>] the valid files
#
def coffee_files
@coffee_files ||= Dir.glob('**/*.coffee')
end

# Clears the list of CoffeeScript files in this project.
#
def clear_coffee_files_list
@coffee_files = nil
path =~ /.coffee$/ && File.exists?(path)
end

end
Expand Down

0 comments on commit 3c09121

Please sign in to comment.