Sha256: 11567dced25b0b6660190cc32d6957df153a00d0a2348bcf4dbab8150484f873

Contents?: true

Size: 525 Bytes

Versions: 1

Compression:

Stored size: 525 Bytes

Contents

#!/usr/bin/env ruby

require 'rbbt-util'
require 'rbbt/util/simpleopt'

options = SOPT.get "-e--environment*:-p--port*:-s--server*"

app = ARGV.shift

app_dir = Rbbt.etc.app_dir.exists? ? Path.setup(Rbbt.etc.app_dir.read.strip) : Rbbt.apps.find

app_dir = app_dir[app]

server = options[:server] || 'thin'

Misc.in_dir(app_dir) do
  `env RBBT_LOG=#{Log.severity} #{options.include?(:environment)? "env RACK_ENV=#{options[:environment]}" : ""} \
  #{server} start -p #{options[:port]} #{ARGV.collect{|a| "'#{a}'"} * " "}`
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rbbt-util-5.2.4 share/rbbt_commands/app/start