Sha256: cf68a1b53a1d3c4d4887fface44d272187d3f4065a2d458a9dc099e57b235054

Contents?: true

Size: 529 Bytes

Versions: 1

Compression:

Stored size: 529 Bytes

Contents

#!/usr/bin/env ruby

require "rubygems"
require "#{File.realpath(File.dirname(__FILE__))}/../lib/rails-server"

args = {}
ARGV.each do |arg|
  if match = arg.match(/^(.+?)=(.+)$/)
    args[match[1]] = match[2]
  else
    raise "Invalid argument: '#{arg}'."
  end
end

rails_s = RailsServer.new
rails_s.env = args["env"] ? args["env"] : "production"
rails_s.dir = args["dir"] if args["dir"]
rails_s.verbose = (args["verbose"] == "true") ? true : false

if args["mode"] == "ensure"
  rails_s.run_ensure
else
  rails_s.run_loop
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails-server-0.0.0 bin/rails-server