Class: ApartmentAcmeClient::DomainChecker

Inherits:
Object
  • Object
show all
Defined in:
lib/apartment_acme_client/domain_checker.rb

Instance Method Summary collapse

Instance Method Details

#accessible_domainsObject

returns an array containing 2 lists: successful domains rejected domains (those which don’t appear properly configured in DNS)



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/apartment_acme_client/domain_checker.rb', line 6

def accessible_domains
  possible_domains = ApartmentAcmeClient.domains_to_check

  domains = []
  rejected_domains = []
  possible_domains.each do |domain|
    if ApartmentAcmeClient::Verifier.new(domain).properly_configured?
      domains << domain
    else
      rejected_domains << domain
    end
  end
  [domains, rejected_domains]
end