Class: Bridgetown::Commands::Doctor

Inherits:
Thor::Group
  • Object
show all
Extended by:
BuildOptions, Summarizable
Includes:
ConfigurationOverridable
Defined in:
lib/bridgetown-core/commands/doctor.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from BuildOptions

extended

Methods included from Summarizable

summary

Methods included from ConfigurationOverridable

#configuration_with_overrides, included

Class Method Details



14
15
16
# File 'lib/bridgetown-core/commands/doctor.rb', line 14

def self.banner
  "bridgetown doctor [options]"
end

Instance Method Details

#doctorObject



19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/bridgetown-core/commands/doctor.rb', line 19

def doctor
  site = Bridgetown::Site.new(configuration_with_overrides(options))
  site.reset
  site.read
  site.generate

  if healthy?(site)
    Bridgetown.logger.info "Your test results", "are in. Everything looks fine."
  else
    abort
  end
end