Class: WaterWheel::Configuration
- Inherits:
-
Object
- Object
- WaterWheel::Configuration
- Defined in:
- lib/water_wheel/configuration.rb
Instance Attribute Summary collapse
-
#absolute_path_on_directories ⇒ Object
Returns the value of attribute absolute_path_on_directories.
-
#absolute_path_on_files ⇒ Object
Returns the value of attribute absolute_path_on_files.
-
#aws_access_key_id ⇒ Object
Returns the value of attribute aws_access_key_id.
-
#aws_bucket_name ⇒ Object
Returns the value of attribute aws_bucket_name.
-
#aws_region ⇒ Object
Returns the value of attribute aws_region.
-
#aws_secret_access_key ⇒ Object
Returns the value of attribute aws_secret_access_key.
-
#dry_run ⇒ Object
Returns the value of attribute dry_run.
-
#ordered_omit_path_prefixes ⇒ Object
Returns the value of attribute ordered_omit_path_prefixes.
-
#parallel_count ⇒ Object
Returns the value of attribute parallel_count.
-
#provider ⇒ Object
Returns the value of attribute provider.
-
#storage_class ⇒ Object
Returns the value of attribute storage_class.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #validate! ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/water_wheel/configuration.rb', line 17 def initialize @provider = "AWS" @aws_access_key_id = ENV["AWS_ACCESS_KEY_ID"] @aws_secret_access_key = ENV["AWS_SECRET_ACCESS_KEY"] @aws_region = ENV["AWS_DEFAULT_REGION"] @aws_bucket_name = ENV["WATER_WHEEL_AWS_BUCKET_NAME"] @absolute_path_on_files = [] @absolute_path_on_directories = [] @ordered_omit_path_prefixes = ["/"] @storage_class = "STANDARD" @parallel_count = 3 @dry_run = false end |
Instance Attribute Details
#absolute_path_on_directories ⇒ Object
Returns the value of attribute absolute_path_on_directories.
5 6 7 |
# File 'lib/water_wheel/configuration.rb', line 5 def absolute_path_on_directories @absolute_path_on_directories end |
#absolute_path_on_files ⇒ Object
Returns the value of attribute absolute_path_on_files.
5 6 7 |
# File 'lib/water_wheel/configuration.rb', line 5 def absolute_path_on_files @absolute_path_on_files end |
#aws_access_key_id ⇒ Object
Returns the value of attribute aws_access_key_id.
5 6 7 |
# File 'lib/water_wheel/configuration.rb', line 5 def aws_access_key_id @aws_access_key_id end |
#aws_bucket_name ⇒ Object
Returns the value of attribute aws_bucket_name.
5 6 7 |
# File 'lib/water_wheel/configuration.rb', line 5 def aws_bucket_name @aws_bucket_name end |
#aws_region ⇒ Object
Returns the value of attribute aws_region.
5 6 7 |
# File 'lib/water_wheel/configuration.rb', line 5 def aws_region @aws_region end |
#aws_secret_access_key ⇒ Object
Returns the value of attribute aws_secret_access_key.
5 6 7 |
# File 'lib/water_wheel/configuration.rb', line 5 def aws_secret_access_key @aws_secret_access_key end |
#dry_run ⇒ Object
Returns the value of attribute dry_run.
5 6 7 |
# File 'lib/water_wheel/configuration.rb', line 5 def dry_run @dry_run end |
#ordered_omit_path_prefixes ⇒ Object
Returns the value of attribute ordered_omit_path_prefixes.
5 6 7 |
# File 'lib/water_wheel/configuration.rb', line 5 def ordered_omit_path_prefixes @ordered_omit_path_prefixes end |
#parallel_count ⇒ Object
Returns the value of attribute parallel_count.
5 6 7 |
# File 'lib/water_wheel/configuration.rb', line 5 def parallel_count @parallel_count end |
#provider ⇒ Object
Returns the value of attribute provider.
5 6 7 |
# File 'lib/water_wheel/configuration.rb', line 5 def provider @provider end |
#storage_class ⇒ Object
Returns the value of attribute storage_class.
5 6 7 |
# File 'lib/water_wheel/configuration.rb', line 5 def storage_class @storage_class end |
Instance Method Details
#validate! ⇒ Object
43 44 45 46 47 |
# File 'lib/water_wheel/configuration.rb', line 43 def validate! validate_aws_configuration if provider == "AWS" validate_backup_target validate_parallel_count end |