(Capistrano really needs some better docs.)
#example capistrano menu using highline menu system
# Published under BSD license
# written by:shadowbq - http://shad0wbq.blogspot.com
# verified on: capistrano 2.2.0 & highline 1.4.0
role :comps, "localhost"
desc "Example Highline menu"
task :menu do
Capistrano::CLI.ui.say("\nThis is with a different layout...")
Capistrano::CLI.ui.choose do |menu|
menu.layout = :one_line
menu.header = "Execute"
menu.prompt = "Application? "
menu.choice :hello do
helloworld
end
menu.choices(:skip, :exit) do
Capistrano::CLI.ui.say("Choose not to run..")
end
end
end
task :helloworld do
run "echo helloworld."
end
1 comment:
what other menu layouts are there besides one_line?
Post a Comment