Sha256: 751810329837f90048373eed09196678b067017a3e03d97a2a6bc3bc4ed9000c
Contents?: true
Size: 809 Bytes
Versions: 2
Compression:
Stored size: 809 Bytes
Contents
#!/usr/bin/env ruby require 'thin' require 'fileutils' require 'timeout' require 'stringio' require 'time' require 'forwardable' require 'rack' require 'daemons' module PhantomJSProxy CONFIG = File.expand_path(File.dirname(__FILE__))+"/../lib/phantom_proxy/config.ru" end require 'phantom_proxy' # Become a daemon options = { :app_name => "phantom_proxy", :backtrace => true, :ontop => true, :log_output => true } #Daemons.daemonize(options) phantom = false ARGV.each { |arg| phantom = true if /-self/.match(arg) } if !phantom startoptions = ["start", "-R", PhantomJSProxy::CONFIG, "-P", "/tmp/pids/phantom_proxy.pid", "--tag", "phantom_proxy"]+ARGV Thin::Runner.new(startoptions).run! else Thin::Server.start(PhantomJSProxy::PhantomJSServer.new, ARGV[0], ARGV[1], ARGV[2]) end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
phantom_proxy-1.1.0 | bin/phantom_proxy |
phantom_proxy-1.0.0 | bin/phantom_proxy |