Created
April 13, 2011 17:16
-
-
Save gaffneyc/917933 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run with | |
# watchr .watchr | |
watch('^roles/.*\.rb') { |m| role(m[0]) } | |
watch('^cookbooks/(.+?)/.*') { |m| cookbook(m[1]) } | |
watch('^d.*bags/(.+?)/.*') { |m| dbags(m[1], m[0]) } | |
def role(file) | |
system "knife role from file #{file}" | |
end | |
def cookbook(book) | |
if File.directory?("cookbooks/#{book}") | |
system "knife cookbook test #{book}" | |
end | |
end | |
def dbags(bag, file) | |
system "knife data bag from file #{bag} #{file}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment