~bkerensa/ubuntu/raring/puppet/new-upstream-release

« back to all changes in this revision

Viewing changes to lib/puppet/file_bucket/dipper.rb

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2011-07-25 01:00:37 UTC
  • mfrom: (1.1.24 upstream) (3.1.25 sid)
  • Revision ID: james.westby@ubuntu.com-20110725010037-875vuxs10eboqgw3
Tags: 2.7.1-1ubuntu1
* Merge from debian unstable.  Remaining changes:
  - debian/puppetmaster-passenger.postinst: Use cacrl instead of hostcrl to
    set the location of the CRL in apache2 configuration. Fix apache2
    configuration on upgrade as well (LP: #641001)
  - move all puppet dependencies to puppet-common since all the code
    actually located in puppet-common.
  - move libagueas from a recommend to a dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 
40
40
      # Make a HEAD request for the file so that we don't waste time
41
41
      # uploading it if it already exists in the bucket.
42
 
      unless Puppet::FileBucket::File.head("#{@rest_path}#{file_bucket_file.checksum_type}/#{file_bucket_file.checksum_data}#{files_original_path}")
43
 
        file_bucket_file.save(dest_path)
 
42
      unless Puppet::FileBucket::File.indirection.head("#{@rest_path}#{file_bucket_file.checksum_type}/#{file_bucket_file.checksum_data}#{files_original_path}")
 
43
        Puppet::FileBucket::File.indirection.save(file_bucket_file, dest_path)
44
44
      end
45
45
 
46
46
      return file_bucket_file.checksum_data
53
53
  # Retrieve a file by sum.
54
54
  def getfile(sum)
55
55
    source_path = "#{@rest_path}md5/#{sum}"
56
 
    file_bucket_file = Puppet::FileBucket::File.find(source_path, :bucket_path => @local_path)
 
56
    file_bucket_file = Puppet::FileBucket::File.indirection.find(source_path, :bucket_path => @local_path)
57
57
 
58
58
    raise Puppet::Error, "File not found" unless file_bucket_file
59
59
    file_bucket_file.to_s