Sha256: a61c35dbc39616164253202d6d23da998835f100223ad7153441d74803c9dc84
Contents?: true
Size: 1.62 KB
Versions: 1
Compression:
Stored size: 1.62 KB
Contents
#!/usr/bin/env ruby # resolve bin path, ignoring symlinks require "pathname" bin_file = Pathname.new(__FILE__).realpath $:.unshift File.expand_path("../../lib", bin_file) require 'simon' require 'rubygems' require 'commander/import' simon_controller = Simon.new program :version, '0.0.1' program :description, 'CLI tool for Simon, a simple MVC boilerplate' command :create do |c| c.syntax = 'my-simon create, [options]' c.summary = '' c.description = '' c.example 'description', 'command example' c.option '--some-switch', 'Some switch that does something' c.action do |args, options| # Do something or c.when_called My-simon::Commands::Create, puts "\n Create called" simon_controller.rename end end command :add do |c| c.syntax = 'my-simon add, [options]' c.summary = '' c.description = '' c.example 'description', 'command example' c.option '--some-switch', 'Some switch that does something' c.action do |args, options| # Do something or c.when_called My-simon::Commands::Add, end end command :setup do |c| c.syntax = 'my-simon setup, [options]' c.summary = '' c.description = '' c.example 'description', 'command example' c.option '--some-switch', 'Some switch that does something' c.action do |args, options| # Do something or c.when_called My-simon::Commands::Setup, end end command :help do |c| c.syntax = 'my-simon help [options]' c.summary = '' c.description = '' c.example 'description', 'command example' c.option '--some-switch', 'Some switch that does something' c.action do |args, options| # Do something or c.when_called My-simon::Commands::Help end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
my-simon-0.1.4 | bin/simon |