Sha256: 562b687d8e66c946989008cc40b264b845c47badf442e7f476762d20de5fa786

Contents?: true

Size: 1.06 KB

Versions: 2

Compression:

Stored size: 1.06 KB

Contents

#!/usr/bin/env ruby
require 'rubygems'
require 'thin'
require 'gaptool-server/app.rb'

# Hijack the thin module to set default options to run in the right place
module Thin
  class GaptoolRunner < Thin::Runner
    def initialize(argv)
      @argv = argv

      # Default options values
      @options = {
        :chdir                => File.expand_path('..', File.dirname(__FILE__)),
        :environment          => ENV['RACK_ENV'] || 'development',
        :address              => '0.0.0.0',
        :port                 => Server::DEFAULT_PORT,
        :timeout              => Server::DEFAULT_TIMEOUT,
        :log                  => 'log/thin.log',
        :pid                  => 'tmp/pids/thin.pid',
        :max_conns            => Server::DEFAULT_MAXIMUM_CONNECTIONS,
        :max_persistent_conns => Server::DEFAULT_MAXIMUM_PERSISTENT_CONNECTIONS,
        :require              => [],
        :wait                 => Controllers::Cluster::DEFAULT_WAIT_TIME
      }

      parse!
    end
  end
end

# Run with thin, with thin args
Thin::GaptoolRunner.new(ARGV).run!

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gaptool-server-0.1.1 bin/gaptool-server
gaptool-server-0.1.0 bin/gaptool-server