Exception: GitHubPages::HealthCheck::Errors::WildcardRecordError

Inherits:
GitHubPages::HealthCheck::Error show all
Defined in:
lib/github-pages-health-check/errors/wildcard_record_error.rb

Constant Summary collapse

DOCUMENTATION_PATH =
"/pages/configuring-a-custom-domain-for-your-github-pages-site/verifying-your-custom-domain-for-github-pages/"

Constants inherited from GitHubPages::HealthCheck::Error

GitHubPages::HealthCheck::Error::DOCUMENTATION_BASE, GitHubPages::HealthCheck::Error::LOCAL_ONLY

Instance Attribute Summary collapse

Attributes inherited from GitHubPages::HealthCheck::Error

#domain, #repository

Instance Method Summary collapse

Methods inherited from GitHubPages::HealthCheck::Error

inherited, #message_with_url, subclasses, #to_s

Constructor Details

#initialize(repository: nil, domain: nil, parent_domain: nil) ⇒ WildcardRecordError

Returns a new instance of WildcardRecordError.



11
12
13
14
# File 'lib/github-pages-health-check/errors/wildcard_record_error.rb', line 11

def initialize(repository: nil, domain: nil, parent_domain: nil)
  super(:repository => repository, :domain => domain)
  @parent_domain = parent_domain
end

Instance Attribute Details

#parent_domainObject (readonly)

Returns the value of attribute parent_domain.



9
10
11
# File 'lib/github-pages-health-check/errors/wildcard_record_error.rb', line 9

def parent_domain
  @parent_domain
end

Instance Method Details

#messageObject



16
17
18
19
20
21
22
# File 'lib/github-pages-health-check/errors/wildcard_record_error.rb', line 16

def message
  <<-MSG
    The DNS record for your domain appears to be *.#{parent_domain}, a wildcard record.
    Your GitHub Pages site will still work, but unless you verify ownership of #{parent_domain},
    any GitHub Pages user can serve their content from an arbitrary subdomain of it.
  MSG
end