Sha256: 084f5b56ce642c88d11904b775883c4121522232e553c7c8480419df3a1d2cb0
Contents?: true
Size: 1.1 KB
Versions: 1
Compression:
Stored size: 1.1 KB
Contents
module Subtrac module Commands class Create def initialize(args, options) options.project = ask("What is the name of the project you would like to create? ") if options.project.nil? options.client = ask("Which client is this project for? ") if options.client.nil? use_custom_template = agree("Would you like to use a custom template for this project? [y/n]") if options.template.nil? if use_custom_template then Subtrac.load_config() list_of_templates = Dir.entries(File.join(Config.svn_dir,"templates")) # The new and improved choose()... choose do |menu| menu.prompt = "Which template would you like to use for this project? " list_of_templates.each do |t| unless File.directory?(t) menu.choice t do options.template = t end end end end Subtrac.create_project(options.project,options.client,options.template) else Subtrac.create_project(options.project,options.client) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ktec-subtrac-0.1.54 | lib/subtrac/commands/create_project.rb |