Sha256: 207c3538f1335ab31262a1037369e80ffa39abcf255a7d9eebd4a3fb4d3fc965
Contents?: true
Size: 779 Bytes
Versions: 21
Compression:
Stored size: 779 Bytes
Contents
desc 'Create new ZCI-based project' arg 'project_name' arg_name 'project_name' skips_pre command :'init:project' do |c| c.desc 'Root dir of project' c.long_desc <<-EOS.strip_heredoc This is the directory where the project's directory will be made, so if you specify a project name `foo` and the root dir of `.`, the directory `./foo` will be created EOS c.flag :r, :root, :default_value => '.' c.switch :force, :desc => 'Overwrite/ignore existing files and directories' c.action do |global_options, options, args| if args.length < 1 raise 'You must specify the name of your project' end root_dir = options[:root] force = options[:force] project_name = args.first create_scaffold(root_dir, project_name, force) end end
Version data entries
21 entries across 21 versions & 1 rubygems