Sha256: 38dfeec06fe28f69b5ce28e0a3624c5e90a7cc92135b91e60f7e2ac1607e16b6

Contents?: true

Size: 766 Bytes

Versions: 4

Compression:

Stored size: 766 Bytes

Contents

#!/usr/bin/env ruby

require "bundler"
Bundler.setup(:default)
require "ginatra"
require "vegas"

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

4 entries across 4 versions & 1 rubygems

Version Path
ginatra-2.2.6 bin/ginatra-server
ginatra-2.2.5 bin/ginatra-server
ginatra-2.2.4 bin/ginatra-server
ginatra-2.2.3 bin/ginatra-server