Sha256: f03f42abe21556ab5207f0784da1bf0519972c3630aeb7175c9b42d05b1ea654

Contents?: true

Size: 477 Bytes

Versions: 1

Compression:

Stored size: 477 Bytes

Contents

require "rack"
require "optparse"
require "rubai"
require File.join(File.expand_path("../../../", __FILE__), "version.rb")

options = Hash[:app, Rubai::RackApp.new, :Port, 9292]
parser = OptionParser.new do |opts|
  opts.on("-p", "--port PORT") { |p| options[:Port] = p }
  opts.on_tail("-v", "--version", "show version") {
    puts "Rubai #{Rubai::VERSION}"
    puts "Rack #{Rack.version} (Release: #{Rack.release})"
    exit
  }
end
parser.parse!

Rack::Server.start options

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubai-0.1.2 lib/rubai/cli.rb