Sha256: ac3d784bc91178e70592e0a722da4a13a63cac14b9689f5bceb7548471cb6639
Contents?: true
Size: 861 Bytes
Versions: 2
Compression:
Stored size: 861 Bytes
Contents
#!/usr/bin/env ruby require 'spinebox' Spinebox::Command.dispatch do # Version on "--version, -v", "Show the version", :if => proc { ['--version', '-v'].include?(ARGV.first) } do puts "Spinebox #{Spinebox::VERSION}" exit(0) end # Help on "--help, -h", "Show this help", :if => proc { ['--help', '-h'].include?(ARGV.first) or ARGV.empty? } do puts Spinebox::Command.help exit(0) end # New application on "new APP", "Create a new APP", :if => proc { ['new', 'n'].include?(ARGV.first) } do ARGV.shift Spinebox::Generator.new(ARGV.first) puts ">> Created new spinebox in './#{ARGV.first}'. Let's go!" exit(0) end # Run server on "s, server", "Run the development server", :if => proc { ['server', 's'].include?(ARGV.first) } do Rack::Handler::Thin.run(Spinebox.app, :Port => 3000) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
spinebox-0.0.2 | bin/spinebox |
spinebox-0.0.1 | bin/spinebox |