class RocketFuel::CommandLineInterface

Public Instance Methods

fix(fix) click to toggle source
# File lib/rocket_fuel/command_line_interface.rb, line 17
def fix(fix)
  require 'rocket_fuel/precheck'
  require 'rocket_fuel/fix'
  if fix_class = RocketFuel::Precheck.fixes[fix.to_sym]
    the_fix = fix_class.new
    say(the_fix.title)
    say('Fixing...')
    the_fix.run
    say('')

    if the_fix.check
      if the_fix.check.ok?
        say('Fix successful.', :green)
      else
        say('Fix failed.', :red)
      end
    end
  end
end
install() click to toggle source
# File lib/rocket_fuel/command_line_interface.rb, line 40
def install
  require 'rocket_fuel/install'
  if options[:force] || precheck.ok?
    RocketFuel::Install::Run.new(options).run
  end
end
precheck() click to toggle source
# File lib/rocket_fuel/command_line_interface.rb, line 6
def precheck
  require 'rocket_fuel/precheck'
  say '***Rocket Fuel: Checking prerequisites***', :blue
  say ''

  RocketFuel::Precheck::Run.new.tap do |run|
    run.results
  end
end