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' } # # verify { file_contains '/etc/apache2/apache2.conf', 'mod_gzip'} # module File Sprinkle::Verify.register(Sprinkle::Verifiers::File) # Checks to make sure path is a file on the remote server. def has_file(path) @commands << "test -f #{path}" end def file_contains(path, text) @commands << "grep '#{text}' #{path}" end end end end