class Vvm::Cli
Public Instance Methods
install(version, *conf)
click to toggle source
# File lib/vvm/cli.rb, line 10 def install(version, *conf) i = Installer.new(Version.format(version), conf) i.checkout i.configure i.make_install Installer.cp_etc invoke :use, [version], {} if options[:use] i.message end
invoke_command(command, *args)
click to toggle source
Calls superclass method
# File lib/vvm/cli.rb, line 70 def invoke_command(command, *args) validate_before_invoke(command.name) super end
list()
click to toggle source
# File lib/vvm/cli.rb, line 54 def list Installer.pull puts Version.list.join("\n") end
rebuild(version, *conf)
click to toggle source
# File lib/vvm/cli.rb, line 41 def rebuild(version, *conf) r = Installer.new(Version.format(version), conf) r.make_clean r.configure r.make_install end
reinstall(version, *conf)
click to toggle source
# File lib/vvm/cli.rb, line 35 def reinstall(version, *conf) invoke :uninstall, [version] invoke :install, [version, *conf] end
uninstall(version)
click to toggle source
# File lib/vvm/cli.rb, line 65 def uninstall(version) Uninstaller.new(Version.format(version)).uninstall end
update()
click to toggle source
# File lib/vvm/cli.rb, line 21 def update Installer.pull if (current = Version.current) == 'system' run 'vvm install --use latest' run 'vvm use system' unless $?.success? else run 'vvm use system' run 'vvm install --use latest' action = $?.success? ? 'uninstall' : 'use' run "vvm #{action} #{current}" end end
use(version)
click to toggle source
# File lib/vvm/cli.rb, line 49 def use(version) Switcher.new(Version.format(version)).use end
versions()
click to toggle source
# File lib/vvm/cli.rb, line 60 def versions puts Version.versions.join("\n") end