Class: RocketFuel::CommandLineInterface
- Inherits:
-
Thor
- Object
- Thor
- RocketFuel::CommandLineInterface
- Defined in:
- lib/rocket_fuel/command_line_interface.rb
Instance Method Summary collapse
Instance Method Details
#fix(fix) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# 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 ⇒ Object
40 41 42 43 44 45 |
# File 'lib/rocket_fuel/command_line_interface.rb', line 40 def install require 'rocket_fuel/install' if [:force] || precheck.ok? RocketFuel::Install::Run.new().run end end |
#precheck ⇒ Object
6 7 8 9 10 11 12 13 14 |
# 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 |