Sha256: 683e38e5bdea6232c19d523c4092d3015d0de1d5266c810c2b47d66545b3c26b
Contents?: true
Size: 842 Bytes
Versions: 2
Compression:
Stored size: 842 Bytes
Contents
#!/usr/bin/env ruby begin require 'rubygems' rescue LoadError end require "vegas" $:.unshift File.expand_path("#{File.dirname(__FILE__)}/../lib") require "ginatra" Vegas::Runner.new(Ginatra::App, 'ginatra-server', {:port => Ginatra::Config.port, :host => Ginatra::Config.host}) do |runner, opts, app| opts.banner = "Usage: ginatra-server [[options] start | stop | status]" opts.separator " start - Start the Ginatra HTTP Server" opts.separator " stop - Stop the Ginatra Server" opts.separator " status - How's your Ginatra Server holding up?" if ARGV[-1] == "start" elsif ARGV[-1] == "stop" runner.kill! exit elsif ARGV[-1] == "status" runner.status exit! elsif ARGV.length == 0 || ARGV[-1] !~ /^(start|stop|status)$/ runner.options[:start] = false at_exit { puts opts } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ginatra-2.2.1 | bin/ginatra-server |
ginatra-2.2.0 | bin/ginatra-server |