module Vpsb module Tasks class WebRole < BaseTask include AskSupport PATH = 'bootstrap_server_app_in_do/roles/web.json' prepare_squence :ruby_version, :unicorn_worker_processes, :unicorn_worker_timeout def call prepare ask_loop(proc {|r| process(r)}) do ap preparation_results p "Save this configuration y[es]/n[o]?" end Vpsb::Helpers::FileReplace.replace_json(PATH, core.get(:web_role_json)) end private def process(result) return true if result[0].to_s.downcase == 'y' reprepare false end end end end