Class: WaterWheel::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_directoriesObject

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_filesObject

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_idObject

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_nameObject

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_regionObject

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_keyObject

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_runObject

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_prefixesObject

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_countObject

Returns the value of attribute parallel_count.



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

def parallel_count
  @parallel_count
end

#providerObject

Returns the value of attribute provider.



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

def provider
  @provider
end

#storage_classObject

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