All pastes #740926 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-10-18 10:44 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|
            file = File.read(path).chomp
            if file == filename
                puts "Path is #{path}"
                return path.gsub(/paths/, 'contents')
            end
        end
    end
end