Sha256: f23a055ea5429cbc52b4be64d9433fa173422450b64c72c0dc8acc9c89dc0778
Contents?: true
Size: 1.66 KB
Versions: 1
Compression:
Stored size: 1.66 KB
Contents
#!/usr/bin/ruby # = Boned # # # Usage: # # $ boned -h # $ boned [-d] start-master # #-- # Put our local lib in first place BASE_PATH = File.expand_path File.join(File.dirname(__FILE__), '..') lib_dir = File.join(BASE_PATH, 'lib') $:.unshift lib_dir #$:.unshift '/Users/delano/Projects/opensource/drydock/lib' require 'rubygems' require 'drydock' require 'boned' require 'boned/cli' # Command-line interface for bin/stella class Boned::CLI::Definition extend Drydock debug :off default :info global :V, :version, "Display version" do puts "Boned: #{Boned::VERSION} (api: #{Boned::APIVERSION})" exit end global :R, :rackup, String, "Specify a rackup file" global :e, :environment, String, "Rack environment" global :v, :verbose, "Increase output" do; 1 end global :d, :daemon, "Run as a daemon" global :p, :port, Integer, "Port to run on" global :D, :debug do Drydock.debug true Boned.enable_debug end command :start => Boned::CLI command :stop => Boned::CLI command :stop_redis => Boned::CLI command :info => Boned::CLI end begin Drydock.run!(ARGV, STDIN) if Drydock.run? && !Drydock.has_run? rescue Boned::Problem => ex STDERR.puts ex.message STDERR.puts ex.backtrace if Drydock.debug? exit 1 rescue Drydock::ArgError, Drydock::OptError => ex STDERR.puts ex.message STDERR.puts ex.usage rescue Drydock::InvalidArgument => ex STDERR.puts ex.message rescue Drydock::UnknownCommand => ex STDERR.puts "Unknown command: %s" % ex.name rescue Interrupt puts $/, "Exiting... " exit 1 rescue => ex STDERR.puts "ERROR (#{ex.class.to_s}): #{ex.message}" STDERR.puts ex.backtrace if Drydock.debug? end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
boned-0.2.6 | bin/boned |