Module: Rightstuff::Credentials

Defined in:
lib/rightstuff/credentials.rb

Overview

Rightstuff::Credentials imposes no restrictions on the structure of the data It only requires that:

  1. the user has a file called ~/.credentials,

  2. the the file does not have any permissions for other users,

  3. the file contails YAML::load-able data.

Instance Method Summary collapse

Instance Method Details

#rightscale_dataObject



12
13
14
15
16
17
# File 'lib/rightstuff/credentials.rb', line 12

def rightscale_data
  return @rightscale_data if @rightscale_data
  raise "Missing credentials file '#{ rightscale_data_path }'" if ! File.exist?( rightscale_data_path )
  check_permissions
  @rightscale_data = YAML.load_file( rightscale_data_path )
end