def puts_green(heredoc) puts set_color heredoc, :green end def ask_with_default(prompt, default) value = ask("#{prompt} [#{default}]") value.blank? ? default : value end gem 'kaminari' run 'bundle install' generate "kaminari:config" if yes?("Do you want to generate the views?") puts_green("Available Views:") puts_green("default") puts_green("bootstrap2") puts_green("bootstrap3") puts_green("bootstrap4") puts_green("bourbon") puts_green("bulma") puts_green("foundation") puts_green("foundation5") puts_green("github") puts_green("google") puts_green("materialize") puts_green("purecss") puts_green("semantic_ui") view = ask_with_default("Which view do you want to generate?", "default") generate "kaminari:views", view end