Class: Tartarus::RemoteStorage::Glacier::Configuration
- Inherits:
-
Object
- Object
- Tartarus::RemoteStorage::Glacier::Configuration
- Defined in:
- lib/tartarus/remote_storage/glacier/configuration.rb
Constant Summary collapse
- REQUIRED_ATTRIBUTES_NAMES =
%i(aws_key aws_secret aws_region account_id vault_name root_path archive_registry_factory).freeze
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.build(aws_key:, aws_secret:, aws_region:, account_id: DEFAULT_ACCOUNT_ID, vault_name:, root_path:, archive_registry_factory:) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/tartarus/remote_storage/glacier/configuration.rb', line 12 def self.build(aws_key:, aws_secret:, aws_region:, account_id: DEFAULT_ACCOUNT_ID, vault_name:, root_path:, archive_registry_factory:) new.tap do |config| config.aws_key = aws_key config.aws_secret = aws_secret config.aws_region = aws_region config.account_id = account_id config.vault_name = vault_name config.root_path = root_path config.archive_registry_factory = archive_registry_factory config.validate! end end |
Instance Method Details
#storage_directory ⇒ Object
29 30 31 |
# File 'lib/tartarus/remote_storage/glacier/configuration.rb', line 29 def storage_directory "#{root_path}/tmp/tartarus/#{archive_registry_factory}" end |
#validate! ⇒ Object
25 26 27 |
# File 'lib/tartarus/remote_storage/glacier/configuration.rb', line 25 def validate! validate_presence end |