lib/kapify/base.rb in kapify-0.0.11 vs lib/kapify/base.rb in kapify-0.0.12
- old
+ new
@@ -39,6 +39,12 @@
config_file = File.join(File.dirname(__FILE__), "../generators/kapify/#{generator}/templates/#{template_name}")
end
put ERB.new(File.read(config_file)).result(binding), target
end
+ def ask_with_default(prompt, default_value)
+ Capistrano::CLI.ui.ask(prompt) do |q|
+ q.default = default_value
+ q.answer_type = ->(res) { res.to_s }
+ end
+ end
end