class Rack2Aws::Configuration::RackspaceConfig

Public Class Methods

load() click to toggle source
# File lib/rack2aws/config.rb, line 150
def self.load()
  @config_path ||= "#{ENV['HOME']}/.rack/config"

  if !File.exist?(@config_path)
    raise FileNotFoundError, "Rackspace configuration file not found"
  end

  props_reader = PropertiesReader.new(@config_path)
  return {
    :provider => 'Rackspace',
    :rackspace_api_key => props_reader.get("api-key"),
    :rackspace_username => props_reader.get("username"),
    :rackspace_region => props_reader.get("region")
  }
end