lib/sprinkle/verifiers/file.rb in mitchellh-sprinkle-0.1.5 vs lib/sprinkle/verifiers/file.rb in mitchellh-sprinkle-0.1.6
- old
+ new
@@ -1,9 +1,18 @@
module Sprinkle
module Verifiers
+ # = File Verifier
+ #
+ # Contains a verifier to check the existance of a file.
+ #
+ # == Example Usage
+ #
+ # verify { has_file '/etc/apache2/apache2.conf' }
+ #
module File
Sprinkle::Verify.register(Sprinkle::Verifiers::File)
+ # Checks to make sure <tt>path</tt> is a file on the remote server.
def has_file(path)
@commands << "test -f #{path}"
end
end
end
\ No newline at end of file