Sha256: f564f0430a3988de857aad10aaf711b8661d84c95bdb529810dfe2e1c45623f2

Contents?: true

Size: 805 Bytes

Versions: 5

Compression:

Stored size: 805 Bytes

Contents

#!/usr/bin/env ruby

$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
begin
  require 'vegas'
rescue LoadError
  require 'rubygems'
  require 'vegas'
end  
require 'soulmate/server'


Vegas::Runner.new(Soulmate::Server, 'soulmate-web', {
  :before_run => lambda {|v|
    # path = (ENV['RESQUECONFIG'] || v.args.first)
    # load path.to_s.strip if path
  }
}) do |runner, opts, app|
  opts.on("-r", "--redis [HOST:PORT]", "Redis connection string") do |host|
    runner.logger.info "Using Redis connection string '#{host}'"
    Soulmate.redis = host
  end
  opts.on("-s", "--stop-words [FILE]", "Path to file containing a list of stop words") do |fn|
    File.open(fn) do |file|
      Soulmate.stop_words = file.readlines.map{ |l| l.strip }.reject{ |w| w.empty? }
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
soulmate-1.1.0 bin/soulmate-web
soulmate-1.0.0 bin/soulmate-web
soulmate-0.1.3 bin/soulmate-web
soulmate-0.1.2 bin/soulmate-web
soulmate-0.1.1 bin/soulmate-web