Sha256: 7268d7f4b45d1366cba1a92aac83ee4bb6d28bc96cafc70e0023a9c60eeed372

Contents?: true

Size: 676 Bytes

Versions: 3

Compression:

Stored size: 676 Bytes

Contents

#!/usr/bin/env ruby

# Parse options
require 'optparse'

OPTIONS = {}
OptionParser.new do |opts|
  opts.banner = "Usage: tsadmin [options]"

  opts.on("-c", "--config [path]", "Port") do |config|
    OPTIONS[:config] = config
  end
  opts.on("--ip [ip]", "IP") do |ip|
    OPTIONS[:ip] = ip
  end
  opts.on("-p", "--port [port]", "Port") do |port|
    OPTIONS[:port] = port.to_i
  end
end.parse!

# Start TSAdmin
require File.expand_path('../../app', __FILE__)

Ramaze.start(
  :adapter => :webrick,
  :host    => OPTIONS[:ip] || APP_CONFIG['ip'] || nil,
  :port    => OPTIONS[:port] || APP_CONFIG['port'] || 7000,
  :file    => __FILE__,
  :root    => Ramaze.options.roots
)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ts-admin-0.2.5 bin/ts-admin
ts-admin-0.2.4 bin/ts-admin
ts-admin-0.2.3 bin/ts-admin