Class: Configuration
- Inherits:
-
Object
- Object
- Configuration
- Defined in:
- lib/configuration.rb
Instance Attribute Summary collapse
-
#aws_access_key_id ⇒ Object
Returns the value of attribute aws_access_key_id.
-
#aws_secret_access_key ⇒ Object
Returns the value of attribute aws_secret_access_key.
-
#backup_folder ⇒ Object
Returns the value of attribute backup_folder.
-
#bucket ⇒ Object
Returns the value of attribute bucket.
-
#file_suffix ⇒ Object
Returns the value of attribute file_suffix.
-
#region ⇒ Object
Returns the value of attribute region.
-
#remote_path ⇒ Object
Returns the value of attribute remote_path.
-
#repository ⇒ Object
Returns the value of attribute repository.
Instance Method Summary collapse
-
#initialize(repository: 'file system', backup_folder: 'db/backups', file_suffix: '', aws_access_key_id: '', aws_secret_access_key: '', bucket: '', region: '', remote_path: '_backups/database/') ⇒ Configuration
constructor
A new instance of Configuration.
- #s3? ⇒ Boolean
Constructor Details
#initialize(repository: 'file system', backup_folder: 'db/backups', file_suffix: '', aws_access_key_id: '', aws_secret_access_key: '', bucket: '', region: '', remote_path: '_backups/database/') ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/configuration.rb', line 5 def initialize( repository: 'file system', backup_folder: 'db/backups', file_suffix: '', aws_access_key_id: '', aws_secret_access_key: '', bucket: '', region: '', remote_path: '_backups/database/' ) @repository = repository @backup_folder = backup_folder @file_suffix = file_suffix @aws_access_key_id = aws_access_key_id @aws_secret_access_key = aws_secret_access_key @bucket = bucket @region = region @remote_path = remote_path end |
Instance Attribute Details
#aws_access_key_id ⇒ Object
Returns the value of attribute aws_access_key_id.
2 3 4 |
# File 'lib/configuration.rb', line 2 def aws_access_key_id @aws_access_key_id end |
#aws_secret_access_key ⇒ Object
Returns the value of attribute aws_secret_access_key.
2 3 4 |
# File 'lib/configuration.rb', line 2 def aws_secret_access_key @aws_secret_access_key end |
#backup_folder ⇒ Object
Returns the value of attribute backup_folder.
2 3 4 |
# File 'lib/configuration.rb', line 2 def backup_folder @backup_folder end |
#bucket ⇒ Object
Returns the value of attribute bucket.
2 3 4 |
# File 'lib/configuration.rb', line 2 def bucket @bucket end |
#file_suffix ⇒ Object
Returns the value of attribute file_suffix.
2 3 4 |
# File 'lib/configuration.rb', line 2 def file_suffix @file_suffix end |
#region ⇒ Object
Returns the value of attribute region.
2 3 4 |
# File 'lib/configuration.rb', line 2 def region @region end |
#remote_path ⇒ Object
Returns the value of attribute remote_path.
2 3 4 |
# File 'lib/configuration.rb', line 2 def remote_path @remote_path end |
#repository ⇒ Object
Returns the value of attribute repository.
2 3 4 |
# File 'lib/configuration.rb', line 2 def repository @repository end |
Instance Method Details
#s3? ⇒ Boolean
25 26 27 |
# File 'lib/configuration.rb', line 25 def s3? repository.downcase == 's3' end |