Permalink
Browse files

support following at least one symlink

  • Loading branch information...
1 parent c6917a5 commit 3c0912150ab56abd06ce830f6fd6532b78454c4f @jtolds jtolds committed Dec 13, 2011
Showing with 3 additions and 21 deletions.
  1. +1 −1 lib/guard/coffeescript.rb
  2. +2 −20 lib/guard/coffeescript/inspector.rb
@@ -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.
@@ -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
@@ -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

0 comments on commit 3c09121

Please sign in to comment.