Exception: GitHubPages::HealthCheck::Error
- Inherits:
-
StandardError
- Object
- StandardError
- GitHubPages::HealthCheck::Error
- Defined in:
- lib/github-pages-health-check/error.rb
Direct Known Subclasses
GitHubPages::HealthCheck::Errors::BuildError, GitHubPages::HealthCheck::Errors::DeprecatedIPError, GitHubPages::HealthCheck::Errors::InvalidAAAARecordError, GitHubPages::HealthCheck::Errors::InvalidARecordError, GitHubPages::HealthCheck::Errors::InvalidCNAMEError, GitHubPages::HealthCheck::Errors::InvalidDNSError, GitHubPages::HealthCheck::Errors::InvalidDomainError, GitHubPages::HealthCheck::Errors::InvalidRepositoryError, GitHubPages::HealthCheck::Errors::MissingAccessTokenError, GitHubPages::HealthCheck::Errors::NotServedByPagesError
Constant Summary collapse
- DOCUMENTATION_BASE =
"https://help.github.com"
- DOCUMENTATION_PATH =
"/categories/github-pages-basics/"
- LOCAL_ONLY =
Error is only used when running locally
false
Instance Attribute Summary collapse
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
-
#repository ⇒ Object
readonly
Returns the value of attribute repository.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(repository: nil, domain: nil) ⇒ Error
constructor
A new instance of Error.
- #message ⇒ Object
-
#message_with_url ⇒ Object
(also: #message_formatted)
Error message, with get more info URL appended.
- #to_s ⇒ Object
Constructor Details
#initialize(repository: nil, domain: nil) ⇒ Error
Returns a new instance of Error.
12 13 14 15 16 |
# File 'lib/github-pages-health-check/error.rb', line 12 def initialize(repository: nil, domain: nil) super @repository = repository @domain = domain end |
Instance Attribute Details
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
10 11 12 |
# File 'lib/github-pages-health-check/error.rb', line 10 def domain @domain end |
#repository ⇒ Object (readonly)
Returns the value of attribute repository.
10 11 12 |
# File 'lib/github-pages-health-check/error.rb', line 10 def repository @repository end |
Class Method Details
.inherited(base) ⇒ Object
18 19 20 |
# File 'lib/github-pages-health-check/error.rb', line 18 def self.inherited(base) subclasses << base end |
.subclasses ⇒ Object
22 23 24 |
# File 'lib/github-pages-health-check/error.rb', line 22 def self.subclasses @subclasses ||= [] end |
Instance Method Details
#message ⇒ Object
26 27 28 |
# File 'lib/github-pages-health-check/error.rb', line 26 def "Something's wrong with your GitHub Pages site." end |
#message_with_url ⇒ Object Also known as: message_formatted
Error message, with get more info URL appended
31 32 33 34 35 |
# File 'lib/github-pages-health-check/error.rb', line 31 def msg = .gsub(/\s+/, " ").squeeze(" ").strip msg << "." unless msg.end_with?(".") # add trailing period if not there "#{msg} #{more_info}" end |
#to_s ⇒ Object
38 39 40 |
# File 'lib/github-pages-health-check/error.rb', line 38 def to_s "#{} (#{name})".tr("\n", " ").squeeze(" ").strip end |