Sha256: 081946e5fa760fa84839f889266b8865409993372af31eea1bc0fd45bd773adf

Contents?: true

Size: 887 Bytes

Versions: 1

Compression:

Stored size: 887 Bytes

Contents

#!/usr/bin/env ruby

require 'fake_sqs'
require 'fake_sqs/web_interface'
require 'optparse'

app = FakeSQS::WebInterface

parser = OptionParser.new do |o|

  o.on "-p", "--port PORT", Integer, "Port to use (default: 4567)" do |port|
    app.set :port, port
  end

  o.on "-o", "--bind HOST", "Host to bind to (default: 0.0.0.0)" do |bind|
    app.set :bind, bind
  end

  o.on "-s", "--server SERVER", ['thin', 'mongrel', 'webrick'], "Server to use: thin, mongrel or webrick" do |server|
    app.set :server, server
  end

  o.on "-v", "--verbose", "Shows input parameters and output XML" do
    require 'fake_sqs/show_output'
    app.use FakeSQS::ShowOutput
  end

  o.on_tail "--version", "Shows the version" do
    puts "fake_sqs version #{FakeSQS::VERSION}"
    exit
  end

  o.on_tail "-h", "--help", "Shows this help page" do
    puts o
    exit
  end

end

parser.parse!
app.run!

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fake_sqs-0.0.2 bin/fake_sqs