Sha256: 2602f64b9dc3ea90cb497d60ff8c3c1b0dd785a27cb8c6eb2dcde81392f53d25

Contents?: true

Size: 1.2 KB

Versions: 9

Compression:

Stored size: 1.2 KB

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

$TESTING = false
$LOAD_PATH.unshift File.expand_path("#{File.dirname(__FILE__)}/../lib")
require 'belated'
require 'optparse'

OptionParser.new { |opts|
  opts.banner = 'Usage: belated [options]'

  opts.separator ''
  opts.separator 'Options:'

  opts.on('-r=RAILS', '--rails=RAILS', 'Load Rails or not, default true') do |rails|
    Belated.config.rails = rails == 'true'
  end

  opts.on('-r_path=PATH', '--rails_path=PATH', 'Path to Rails') do |path|
    Belated.config.rails_path = path
  end

  opts.on('-w=WORKERS', '--workers=WORKERS', 'Number of workers, default 1') do |workers|
    Belated.config.workers = workers.to_i
  end

  opts.on('-e=ENV', '--env=ENV', 'Environment, default development') do |env|
    Belated.config.env = env
  end

  opts.on('-c=CONNECT', '--connect=CONNECT', 'Start dRuby connection, default true, use for testing only') do |connect|
    Belated.config.connect = connect == 'true'
  end

  opts.on('-h=HOST', '--host=HOST', 'dRuby host') do |host|
    Belated.config.host = host
  end

  opts.on('-p=PORT', '--port=PORT', 'dRuby port') do |port|
    Belated.config.port = port
  end
}.parse!

instance = Belated.instance
instance.start

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
belated-0.9.0 bin/belated
belated-0.8.3 bin/belated
belated-0.8.2 bin/belated
belated-0.8.1 bin/belated
belated-0.8.0 bin/belated
belated-0.7.0 bin/belated
belated-0.6.7 bin/belated
belated-0.6.6 bin/belated
belated-0.6.5 bin/belated