All pastes #740873 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-10-18 09:43 UTC
rendered paste body
class Adaptor
  def initialize(clientbucket = '/var/lib/puppet/clientbucket')
    @clientbucket = clientbucket
  end
        
  def get_newest_contents_file(filename)
    Dir["#@clientbucket/**/paths"].each do |path|
      line = File.read(path).strip
      if line == filename
        content = File.read(line)
        p line => content
      end
    end
  end
end