class Dpl::Providers::Cloudfiles

Public Instance Methods

api() click to toggle source
# File lib/dpl/providers/cloudfiles.rb, line 53
def api
  @api ||= Fog::Storage.new(
    provider: 'Rackspace',
    rackspace_username: username,
    rackspace_api_key: api_key,
    rackspace_region: region
  )
end
container() click to toggle source
Calls superclass method
# File lib/dpl/providers/cloudfiles.rb, line 49
def container
  @container ||= api.directories.get(super) || error(:missing_container)
end
deploy() click to toggle source
# File lib/dpl/providers/cloudfiles.rb, line 32
def deploy
  paths.each do |path|
    container.files.create(key: path, body: File.open(path))
  end
end
glob() click to toggle source
Calls superclass method
# File lib/dpl/providers/cloudfiles.rb, line 43
def glob
  glob = [super]
  glob << File::FNM_DOTMATCH if dot_match?
  glob
end
paths() click to toggle source
# File lib/dpl/providers/cloudfiles.rb, line 38
def paths
  paths = Dir.glob(*glob)
  paths.reject { |path| File.directory?(path) }
end