Sha256: dcd1b9ef7249b9b07c0cb2b092bb9bf6f2f7d644f77c59750816cfe645778f7b
Contents?: true
Size: 1.16 KB
Versions: 4
Compression:
Stored size: 1.16 KB
Contents
require 'pad_utils' require_relative 'version' module PadGem module Menu def self.ask # TODO: sanitize the values given and provide default options. puts puts "PadGem #{PadGem::VERSION}" puts "************" puts options = Hash.new options[:gem_name] = PadUtils.question_menu("Name of your gem") options[:gem_name] = PadUtils.sanitize(options[:gem_name]) options[:gem_name] = PadUtils.convert_to_ruby_name(options[:gem_name]) sets_executable = PadUtils.yes_no_menu(question: "Add an executable?") if sets_executable options[:executable] = PadUtils.question_menu("Gem executable name") else options[:executable] = nil end options[:ruby_version] = PadUtils.question_menu("Minimum Ruby version") options[:author] = PadUtils.question_menu("Your name") options[:email] = PadUtils.question_menu("Your email address") options[:homepage] = PadUtils.question_menu("Homepage url for #{options[:gem_name]}") options[:gem_ruby_name] = PadUtils.underscore(options[:gem_name]) options[:year] = Date.today.year.to_s puts options end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
pad_gem-1.6.0 | lib/pad_gem/menu.rb |
pad_gem-1.5.0 | lib/pad_gem/menu.rb |
pad_gem-1.4.0 | lib/pad_gem/menu.rb |
pad_gem-1.3.0 | lib/pad_gem/menu.rb |