Class: AWSConfiguration

Inherits:
Object
  • Object
show all
Defined in:
lib/ey_db_backup/aws_configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#access_key_idObject

Returns the value of attribute access_key_id.



4
5
6
# File 'lib/ey_db_backup/aws_configuration.rb', line 4

def access_key_id
  @access_key_id
end

#bucket_nameObject

Returns the value of attribute bucket_name.



6
7
8
# File 'lib/ey_db_backup/aws_configuration.rb', line 6

def bucket_name
  @bucket_name
end

#databasesObject

Returns the value of attribute databases.



9
10
11
# File 'lib/ey_db_backup/aws_configuration.rb', line 9

def databases
  @databases
end

#environmentObject

Returns the value of attribute environment.



8
9
10
# File 'lib/ey_db_backup/aws_configuration.rb', line 8

def environment
  @environment
end

#export_pathObject

Returns the value of attribute export_path.



7
8
9
# File 'lib/ey_db_backup/aws_configuration.rb', line 7

def export_path
  @export_path
end

#secret_access_keyObject

Returns the value of attribute secret_access_key.



5
6
7
# File 'lib/ey_db_backup/aws_configuration.rb', line 5

def secret_access_key
  @secret_access_key
end

Instance Method Details

#read_from_yamlObject



11
12
13
14
15
16
17
18
19
# File 'lib/ey_db_backup/aws_configuration.rb', line 11

def read_from_yaml
  s3_credentials_yml = YAML.load_file("config/config.yml")
  @access_key_id =  s3_credentials_yml["access_key_id"]
  @secret_access_key = s3_credentials_yml["secret_access_key"]
  @bucket_name = s3_credentials_yml["bucket_name"]
  @export_path = s3_credentials_yml["export_path"]
  @environment = s3_credentials_yml["environment"]
  @databases = s3_credentials_yml["databases"]
end