# File common/lib/symbiosis/config_file.rb, line 141 def outdated?(templ = self.template) # # The checksum we're going to look at. # checksum = nil # # First read the filename, and then generate the snippet. # [File.readlines(self.filename), self.generate_config(template).split($/)].each do |snippet| # # Make sure we don't barf on empty files/templates -- these definitely # do not contain checksums. # break unless snippet.last.is_a?(String) # # We expect the checksum to be the last line of the file # if snippet.last.chomp =~ /^#{self.comment_char} Checksum MD5 ([a-f0-9]{32,32})$/ # # OK we've found the checksum # if checksum.nil? checksum = $1 else return checksum != $1 end end # # The checksum should not be nil now. # break if checksum.nil? end # # If no checksum can be found, assume it is out of date. # return true end