Class: Encryptbot::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/encryptbot/configuration.rb', line 8

def initialize
  @heroku_app = nil
  @heroku_token = nil
  @route53_hosted_zone_id = nil
  @route53_acme_record_name = nil
  @route53_access_key_id = nil
  @route53_secret_access_key = nil
  @acme_email = nil
  @test_mode = false # use lets encrypt staging
  @domains = [] #["*.domain1.com","*.domain2.com"]
end

Instance Attribute Details

#acme_emailObject

Returns the value of attribute acme_email.



3
4
5
# File 'lib/encryptbot/configuration.rb', line 3

def acme_email
  @acme_email
end

#domainsObject

Returns the value of attribute domains.



3
4
5
# File 'lib/encryptbot/configuration.rb', line 3

def domains
  @domains
end

#heroku_appObject

Returns the value of attribute heroku_app.



3
4
5
# File 'lib/encryptbot/configuration.rb', line 3

def heroku_app
  @heroku_app
end

#heroku_tokenObject

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_idObject

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_nameObject

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_idObject

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_keyObject

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

#test_modeObject

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

Returns:

  • (Boolean)


20
21
22
# File 'lib/encryptbot/configuration.rb', line 20

def valid?
  heroku_app && heroku_token && acme_email && domains.any? && route53_access_key_id
end