Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Guardfile has the duckpunch to let it work with vendor/

  • Loading branch information...
commit dc2bd6da6c04c91f6a6e03cfb0e26461d53a79bd 1 parent a87999b
Philip (flip) Kromer authored
Showing with 13 additions and 4 deletions.
  1. +13 −4 Guardfile
View
17 Guardfile
@@ -6,16 +6,25 @@
# watch(%r{^homebase/vendor/[^/]+/(.+)}){|m| fn = "cookbooks/#{m[1]}" ; p [m, fn] ; fn }
# end
+# fuckaduck -- there's no way to tell guard NOT to ignore vendor.
+# so we nuke it from orbit it's the only way to be sure
+Listen::DirectoryRecord::DEFAULT_IGNORED_DIRECTORIES.reject!{ |p| p == 'vendor' }
+ignore.directory_record.instance_eval{ @ignoring_patterns.reject!{|patt| patt.to_s =~ /vendor/ } }
+ignore /^(?:\.rbx|\.bundle|\.git|\.svn|log|tmp)\//
+# /kludge
+
+
+# ignore %r{.*_flymake\.\w+$} # ignore emacs compilation
+filter %r{\.e?rb$}
# run the right knife command on changes within the cookbooks, roles and data_bags directories
guard 'chef' do
file_chars = '[\w\-\:\.]+'
- # watch files in vendor/foo-pantry/cookbooks/*; act on them if they are
- # symlinked into action
+ # watch files in vendor/foo-pantry/cookbooks/*; act on them if they are symlinked into action
watch(%r{vendor/[^/]+/((?:cookbooks|roles|data_bags)/#{file_chars})}){|m| m[1] if File.exists?(m[1]) }
- #
- watch(%r{^[^/]*cookbooks/(#{file_chars})/})
+
+ watch(%r{^[^/]*cookbooks/(#{file_chars})/}) # cookbooks and site-cookbooks
watch(%r{^data_bags/(#{file_chars})/})
watch(%r{^roles/(#{file_chars})\.(rb|json)\z})
watch(%r{^environments/(#{file_chars}\.(rb|json))\z})
Please sign in to comment.
Something went wrong with that request. Please try again.