Class: Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(aws_access_key_id: '', aws_secret_access_key: '', backup_folder: 'db/backups', bucket: '', file_suffix: '', region: '', remote_path: '_backups/database/', repository: 'file system') ⇒ Configuration

Returns a new instance of Configuration.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/configuration.rb', line 15

def initialize(
  aws_access_key_id: '',
  aws_secret_access_key: '',
  backup_folder: 'db/backups',
  bucket: '',
  file_suffix: '',
  region: '',
  remote_path: '_backups/database/',
  repository: 'file system'
)
  @aws_access_key_id = aws_access_key_id
  @aws_secret_access_key = aws_secret_access_key
  @backup_folder = backup_folder
  @bucket = bucket
  @file_suffix = file_suffix
  @region = region
  @remote_path = remote_path
  @repository = repository
end

Instance Attribute Details

#aws_access_key_idObject

Returns the value of attribute aws_access_key_id.



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

def aws_access_key_id
  @aws_access_key_id
end

#aws_secret_access_keyObject

Returns the value of attribute aws_secret_access_key.



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

def aws_secret_access_key
  @aws_secret_access_key
end

#backup_folderObject

Returns the value of attribute backup_folder.



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

def backup_folder
  @backup_folder
end

#bucketObject

Returns the value of attribute bucket.



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

def bucket
  @bucket
end

#file_suffixObject

Returns the value of attribute file_suffix.



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

def file_suffix
  @file_suffix
end

#hooksObject

Returns the value of attribute hooks.



13
14
15
# File 'lib/configuration.rb', line 13

def hooks
  @hooks
end

#regionObject

Returns the value of attribute region.



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

def region
  @region
end

#remote_pathObject

Returns the value of attribute remote_path.



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

def remote_path
  @remote_path
end

#repositoryObject

Returns the value of attribute repository.



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

def repository
  @repository
end

Instance Method Details

#s3?Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/configuration.rb', line 39

def s3?
  repository.downcase == 's3'
end