Class: CarthageCacheRes::MissingConfigurationKey
- Inherits:
-
Struct
- Object
- Struct
- CarthageCacheRes::MissingConfigurationKey
- Defined in:
- lib/carthage_cache_res/configuration_validator.rb
Instance Attribute Summary collapse
-
#keyname ⇒ Object
Returns the value of attribute keyname.
-
#solution ⇒ Object
Returns the value of attribute solution.
Class Method Summary collapse
- .missing_aws_access_key_id ⇒ Object
- .missing_aws_key(keyname, name) ⇒ Object
- .missing_aws_region ⇒ Object
- .missing_aws_secret_access_key ⇒ Object
- .missing_bucket_name ⇒ Object
Instance Attribute Details
#keyname ⇒ Object
Returns the value of attribute keyname
3 4 5 |
# File 'lib/carthage_cache_res/configuration_validator.rb', line 3 def keyname @keyname end |
#solution ⇒ Object
Returns the value of attribute solution
3 4 5 |
# File 'lib/carthage_cache_res/configuration_validator.rb', line 3 def solution @solution end |
Class Method Details
.missing_aws_access_key_id ⇒ Object
28 29 30 |
# File 'lib/carthage_cache_res/configuration_validator.rb', line 28 def self.missing_aws_access_key_id missing_aws_key("access_key_id", "access key ID") end |
.missing_aws_key(keyname, name) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/carthage_cache_res/configuration_validator.rb', line 14 def self.missing_aws_key(keyname, name) solution = "You need to specify the AWS #{name} to be used.\n" \ "You can either define a environmental variable " \ "AWS_REGION or add ':#{keyname}: YOUR_KEY_VALUE' " \ "under the :aws_s3_client_options: key in the " \ ".carthage_cache_res.yml file.\nYou can also run " \ "'carthage_cache_res config' to generate the config file." self.new("aws_s3_client_options.#{keyname}", solution) end |
.missing_aws_region ⇒ Object
24 25 26 |
# File 'lib/carthage_cache_res/configuration_validator.rb', line 24 def self.missing_aws_region missing_aws_key("region", "region") end |
.missing_aws_secret_access_key ⇒ Object
32 33 34 |
# File 'lib/carthage_cache_res/configuration_validator.rb', line 32 def self.missing_aws_secret_access_key missing_aws_key("secret_access_key", "secret access key") end |
.missing_bucket_name ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/carthage_cache_res/configuration_validator.rb', line 5 def self.missing_bucket_name solution = "You need to specify the AWS S3 bucket to be used.\n" \ "You can either pass the '--bucket-name' option or " \ " add ':bucket_name: YOUR_BUCKET_NAME' to " \ ".carthage_cache_res.yml file.\nYou can also run " \ "'carthage_cache_res config' to generate the config file." self.new(:bucket_name, solution) end |