Sha256: efa4e57b118a2e2054aca83efd145086c0e53e25dc944432d6e7d36140992e1a

Contents?: true

Size: 1.04 KB

Versions: 16

Compression:

Stored size: 1.04 KB

Contents

class TestCredentials

  @@aws_access_key_id = nil 
  @@aws_secret_access_key = nil 
  @@account_number = nil

  def self.aws_access_key_id
    @@aws_access_key_id
  end
  def self.aws_access_key_id=(newval)
    @@aws_access_key_id = newval
  end
  def self.account_number
    @@account_number
  end
  def self.account_number=(newval)
    @@account_number = newval
  end
  def self.aws_secret_access_key
    @@aws_secret_access_key
  end
  def self.aws_secret_access_key=(newval)
    @@aws_secret_access_key = newval
  end

  require 'yaml'
  def self.get_credentials
    #Dir.chdir do
      begin
        Dir.chdir('.rightscale') do 
          credentials = YAML::load(File.open("testcredentials.yml"))
          puts credentials.inspect
            self.aws_access_key_id = credentials["access_key"]
            self.aws_secret_access_key = credentials["secret_key"]
            puts 'akey=' + self.aws_access_key_id
        end
      rescue Exception => e
        puts "Couldn't chdir to ~/.rightscale: #{e.message}"
          raise e
      end
    #end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
appoxy-aws-1.11.22 test/test_credentials.rb
appoxy-aws-1.11.23 test/test_credentials.rb
appoxy-aws-1.11.24 test/test_credentials.rb
appoxy-aws-1.11.25 test/test_credentials.rb
appoxy-aws-1.11.26 test/test_credentials.rb
appoxy-aws-1.11.27 test/test_credentials.rb
appoxy-aws-1.11.28 test/test_credentials.rb
appoxy-aws-1.11.29 test/test_credentials.rb
appoxy-aws-1.11.30 test/test_credentials.rb
appoxy-aws-1.11.31 test/test_credentials.rb
appoxy-aws-1.11.32 test/test_credentials.rb
appoxy-aws-1.11.34 test/test_credentials.rb
appoxy-aws-1.11.35 test/test_credentials.rb
hubertlepicki-aws-1.11.32 test/test_credentials.rb
hubertlepicki-aws-1.11.33 test/test_credentials.rb
hubertlepicki-aws-1.11.34 test/test_credentials.rb