Class: Phase::Configuration
- Inherits:
-
Object
- Object
- Phase::Configuration
- Defined in:
- lib/phase/configuration.rb
Instance Attribute Summary collapse
-
#adapter ⇒ Object
Returns the value of attribute adapter.
-
#aws_region ⇒ Object
Returns the value of attribute aws_region.
-
#backend ⇒ Object
Returns the value of attribute backend.
-
#bastion_role ⇒ Object
Returns the value of attribute bastion_role.
-
#bastion_user ⇒ Object
Returns the value of attribute bastion_user.
-
#bastions_enabled ⇒ Object
Returns the value of attribute bastions_enabled.
-
#bundle_id_prefix ⇒ Object
Returns the value of attribute bundle_id_prefix.
-
#ipa_bucket_name ⇒ Object
Returns the value of attribute ipa_bucket_name.
-
#ipa_directory_prefix ⇒ Object
Returns the value of attribute ipa_directory_prefix.
-
#private_subnet_name ⇒ Object
Returns the value of attribute private_subnet_name.
-
#public_subnet_name ⇒ Object
Returns the value of attribute public_subnet_name.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #load_phasefile! ⇒ Object
- #set_aws_credentials! ⇒ Object
Constructor Details
#initialize ⇒ Configuration
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/phase/configuration.rb', line 8 def initialize @bastions_enabled = false @bastion_role = nil @bastion_user = nil @public_subnet_name = "public" @private_subnet_name = "private" @aws_region = "us-east-1" @adapter = ::Phase::Adapters::AWS @bundle_id_prefix = "" @ipa_directory_prefix = "" @ipa_bucket_name = "" self.backend = ::Phase::SSH::Backend set_aws_credentials! end |
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
4 5 6 |
# File 'lib/phase/configuration.rb', line 4 def adapter @adapter end |
#aws_region ⇒ Object
Returns the value of attribute aws_region.
4 5 6 |
# File 'lib/phase/configuration.rb', line 4 def aws_region @aws_region end |
#backend ⇒ Object
Returns the value of attribute backend.
4 5 6 |
# File 'lib/phase/configuration.rb', line 4 def backend @backend end |
#bastion_role ⇒ Object
Returns the value of attribute bastion_role.
4 5 6 |
# File 'lib/phase/configuration.rb', line 4 def bastion_role @bastion_role end |
#bastion_user ⇒ Object
Returns the value of attribute bastion_user.
4 5 6 |
# File 'lib/phase/configuration.rb', line 4 def bastion_user @bastion_user end |
#bastions_enabled ⇒ Object
Returns the value of attribute bastions_enabled.
4 5 6 |
# File 'lib/phase/configuration.rb', line 4 def bastions_enabled @bastions_enabled end |
#bundle_id_prefix ⇒ Object
Returns the value of attribute bundle_id_prefix.
4 5 6 |
# File 'lib/phase/configuration.rb', line 4 def bundle_id_prefix @bundle_id_prefix end |
#ipa_bucket_name ⇒ Object
Returns the value of attribute ipa_bucket_name.
4 5 6 |
# File 'lib/phase/configuration.rb', line 4 def ipa_bucket_name @ipa_bucket_name end |
#ipa_directory_prefix ⇒ Object
Returns the value of attribute ipa_directory_prefix.
4 5 6 |
# File 'lib/phase/configuration.rb', line 4 def ipa_directory_prefix @ipa_directory_prefix end |
#private_subnet_name ⇒ Object
Returns the value of attribute private_subnet_name.
4 5 6 |
# File 'lib/phase/configuration.rb', line 4 def private_subnet_name @private_subnet_name end |
#public_subnet_name ⇒ Object
Returns the value of attribute public_subnet_name.
4 5 6 |
# File 'lib/phase/configuration.rb', line 4 def public_subnet_name @public_subnet_name end |
Instance Method Details
#load_phasefile! ⇒ Object
30 31 32 33 34 |
# File 'lib/phase/configuration.rb', line 30 def load_phasefile! if ::File.exist?(phasefile_path) load phasefile_path end end |
#set_aws_credentials! ⇒ Object
36 37 38 39 40 41 |
# File 'lib/phase/configuration.rb', line 36 def set_aws_credentials! Fog.credentials = { aws_access_key_id: ENV.fetch('AWS_ACCESS_KEY_ID'), aws_secret_access_key: ENV.fetch('AWS_SECRET_ACCESS_KEY') } end |