Class: Encryptbot::Configuration
- Inherits:
-
Object
- Object
- Encryptbot::Configuration
- Defined in:
- lib/encryptbot/configuration.rb
Instance Attribute Summary collapse
-
#acme_email ⇒ Object
Returns the value of attribute acme_email.
-
#cloudflare_api_key ⇒ Object
Returns the value of attribute cloudflare_api_key.
-
#cloudflare_email ⇒ Object
Returns the value of attribute cloudflare_email.
-
#domains ⇒ Object
Returns the value of attribute domains.
-
#dyn_customer_name ⇒ Object
Returns the value of attribute dyn_customer_name.
-
#dyn_password ⇒ Object
Returns the value of attribute dyn_password.
-
#dyn_username ⇒ Object
Returns the value of attribute dyn_username.
-
#heroku_app ⇒ Object
Returns the value of attribute heroku_app.
-
#heroku_token ⇒ Object
Returns the value of attribute heroku_token.
-
#route53_access_key_id ⇒ Object
Returns the value of attribute route53_access_key_id.
-
#route53_acme_record_name ⇒ Object
Returns the value of attribute route53_acme_record_name.
-
#route53_hosted_zone_id ⇒ Object
Returns the value of attribute route53_hosted_zone_id.
-
#route53_secret_access_key ⇒ Object
Returns the value of attribute route53_secret_access_key.
-
#slack_bot_username ⇒ Object
Returns the value of attribute slack_bot_username.
-
#slack_webhook ⇒ Object
Returns the value of attribute slack_webhook.
-
#test_mode ⇒ Object
Returns the value of attribute test_mode.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #valid? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/encryptbot/configuration.rb', line 11 def initialize @heroku_app = nil @heroku_token = nil @cloudflare_api_key = nil @cloudflare_email = nil @dyn_customer_name = nil @dyn_username = nil @dyn_password = nil @route53_hosted_zone_id = nil @route53_acme_record_name = nil @route53_access_key_id = nil @route53_secret_access_key = nil @acme_email = nil @slack_webhook = nil @slack_bot_username = "encryptbot" @test_mode = false # use lets encrypt staging @domains = [] #[{domain: "*.domain.com", service: "cloudflare"}, {domain: "*.domain.com", service: "dyn"}] end |
Instance Attribute Details
#acme_email ⇒ Object
Returns the value of attribute acme_email.
3 4 5 |
# File 'lib/encryptbot/configuration.rb', line 3 def acme_email @acme_email end |
#cloudflare_api_key ⇒ Object
Returns the value of attribute cloudflare_api_key.
3 4 5 |
# File 'lib/encryptbot/configuration.rb', line 3 def cloudflare_api_key @cloudflare_api_key end |
#cloudflare_email ⇒ Object
Returns the value of attribute cloudflare_email.
3 4 5 |
# File 'lib/encryptbot/configuration.rb', line 3 def cloudflare_email @cloudflare_email end |
#domains ⇒ Object
Returns the value of attribute domains.
3 4 5 |
# File 'lib/encryptbot/configuration.rb', line 3 def domains @domains end |
#dyn_customer_name ⇒ Object
Returns the value of attribute dyn_customer_name.
3 4 5 |
# File 'lib/encryptbot/configuration.rb', line 3 def dyn_customer_name @dyn_customer_name end |
#dyn_password ⇒ Object
Returns the value of attribute dyn_password.
3 4 5 |
# File 'lib/encryptbot/configuration.rb', line 3 def dyn_password @dyn_password end |
#dyn_username ⇒ Object
Returns the value of attribute dyn_username.
3 4 5 |
# File 'lib/encryptbot/configuration.rb', line 3 def dyn_username @dyn_username end |
#heroku_app ⇒ Object
Returns the value of attribute heroku_app.
3 4 5 |
# File 'lib/encryptbot/configuration.rb', line 3 def heroku_app @heroku_app end |
#heroku_token ⇒ Object
Returns the value of attribute heroku_token.
3 4 5 |
# File 'lib/encryptbot/configuration.rb', line 3 def heroku_token @heroku_token end |
#route53_access_key_id ⇒ Object
Returns the value of attribute route53_access_key_id.
3 4 5 |
# File 'lib/encryptbot/configuration.rb', line 3 def route53_access_key_id @route53_access_key_id end |
#route53_acme_record_name ⇒ Object
Returns the value of attribute route53_acme_record_name.
3 4 5 |
# File 'lib/encryptbot/configuration.rb', line 3 def route53_acme_record_name @route53_acme_record_name end |
#route53_hosted_zone_id ⇒ Object
Returns the value of attribute route53_hosted_zone_id.
3 4 5 |
# File 'lib/encryptbot/configuration.rb', line 3 def route53_hosted_zone_id @route53_hosted_zone_id end |
#route53_secret_access_key ⇒ Object
Returns the value of attribute route53_secret_access_key.
3 4 5 |
# File 'lib/encryptbot/configuration.rb', line 3 def route53_secret_access_key @route53_secret_access_key end |
#slack_bot_username ⇒ Object
Returns the value of attribute slack_bot_username.
3 4 5 |
# File 'lib/encryptbot/configuration.rb', line 3 def slack_bot_username @slack_bot_username end |
#slack_webhook ⇒ Object
Returns the value of attribute slack_webhook.
3 4 5 |
# File 'lib/encryptbot/configuration.rb', line 3 def slack_webhook @slack_webhook end |
#test_mode ⇒ Object
Returns the value of attribute test_mode.
3 4 5 |
# File 'lib/encryptbot/configuration.rb', line 3 def test_mode @test_mode end |
Instance Method Details
#valid? ⇒ Boolean
30 31 32 33 |
# File 'lib/encryptbot/configuration.rb', line 30 def valid? heroku_app && heroku_token && acme_email && domains.any? && (cloudflare_api_key || dyn_customer_name || route53_access_key_id) end |