module PhantomProxy
Constants
- VERSION
Public Class Methods
always_iframe=(obj)
click to toggle source
# File lib/phantom_proxy.rb, line 85 def self.always_iframe=(obj) @always_iframe=obj end
always_iframe?()
click to toggle source
# File lib/phantom_proxy.rb, line 81 def self.always_iframe? @always_iframe end
always_image=(obj)
click to toggle source
# File lib/phantom_proxy.rb, line 77 def self.always_image=(obj) @always_image=obj end
always_image?()
click to toggle source
# File lib/phantom_proxy.rb, line 73 def self.always_image? @always_image end
hmac_key()
click to toggle source
# File lib/phantom_proxy.rb, line 65 def self.hmac_key @hmac_key end
hmac_key=(obj)
click to toggle source
# File lib/phantom_proxy.rb, line 69 def self.hmac_key=(obj) @hmac_key=::HMAC::MD5.new obj end
logger()
click to toggle source
# File lib/phantom_proxy.rb, line 61 def self.logger Thread.current[:in_fiber_logger] ||= PhantomProxyLogger.new((@logger||Logger.new(STDOUT)),Logable.next_id) end
logger=(obj)
click to toggle source
# File lib/phantom_proxy.rb, line 57 def self.logger=(obj) @logger=obj end
phantomjs_bin()
click to toggle source
# File lib/phantom_proxy.rb, line 45 def self.phantomjs_bin "phantomjs" end
root()
click to toggle source
# File lib/phantom_proxy.rb, line 49 def self.root @root ||= Pathname.new(PHANTOMPROXY_ROOT) end
root_gem()
click to toggle source
# File lib/phantom_proxy.rb, line 53 def self.root_gem @root_gem ||= Pathname.new(PHANTOMPROXY_GEM_DIR) end
script_path()
click to toggle source
# File lib/phantom_proxy.rb, line 41 def self.script_path @script_path||=root_gem.join("lib/phantom_proxy/scripts/proxy.js").to_s end
threadpool_size()
click to toggle source
# File lib/phantom_proxy.rb, line 93 def self.threadpool_size @threadpool_size end
threadpool_size=(obj)
click to toggle source
# File lib/phantom_proxy.rb, line 89 def self.threadpool_size=(obj) @threadpool_size=obj.to_i end
wait_for(op = nil)
click to toggle source
# File lib/phantom_proxy.rb, line 97 def self.wait_for(op = nil) fiber = Fiber.current EM.defer(op, Proc.new {|result| fiber.resume result }) Fiber.yield end