phantom_proxy 1.3.0 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 54b0f0d023b215fda611a4fa487a2e7610ad3b29
4
- data.tar.gz: 314bcd2a4a6551e9f741bb852dd57b108c87dd1e
3
+ metadata.gz: dd51c0e6b7b7b624070759913a14f094fec43a9c
4
+ data.tar.gz: 0c4fea61eefd285db91c29057d937532e34dabbe
5
5
  SHA512:
6
- metadata.gz: 4d98501212d94d5b96f304150b57c255a521af55855c63234d24faa11f5e2057b29196f97f485ae9aa652c7c96ac85d70ebc3f0e98997d1e1da8dcc70a144090
7
- data.tar.gz: 245b3c3b6e7ef879309824b3dff8537d22262bb68bfc9e4b93eedd0cbcfd882b89dc24128e3975cab8a12c1d1f3879dcfbbbaa247b59593922bfdf2bd0ddf128
6
+ metadata.gz: 6b9db1c9de242698bab6758a18c30bff9f3f34359adf5ac27745d3f5bba14ab77d69c77d96ee8ae3896cbac4ad10a6c34e1113bb4ad23b3d3a6ed9ec0587d2a8
7
+ data.tar.gz: 5c8e96f3e2d87646cb6719e1698ff24b4685b4df8dc953be01311f712b916a51c1a82a0e262ba69bcdd836e3529767c9c05292f65ecff99418da5749ef9aaf95
data/bin/phantom_proxy CHANGED
@@ -30,7 +30,7 @@ module PhantomProxy
30
30
  end
31
31
  end
32
32
  PhantomProxy.logger = Logger.new(options[:log_file]) if options[:log_file]
33
- PhantomProxy.hmac_key = options[:hmac_key] if options[:hmac_key]
33
+ PhantomProxy.hmac_key = options[:hmac_key] if options[:hmac_key] && options[:hmac_key] != "none"
34
34
  remaining
35
35
  end
36
36
  def self.run_phantom_proxy(args)
@@ -45,7 +45,7 @@ module PhantomProxy
45
45
 
46
46
  @dom = invokePhantomJS(PhantomProxy.script_path, [picture, loadFrames, "\""+url+"\"", url_args_.length, url_args])
47
47
 
48
- logger.info("Opened page: "+ /Open page: (.*?) END/.match(@dom)[1])
48
+ #logger.info("Opened page: "+ /Open page: (.*?) END/.match(@dom)[1])
49
49
 
50
50
  @ready = 503
51
51
  dom_text = "Failed to load page"
@@ -1,5 +1,6 @@
1
1
  module PhantomProxy
2
2
  class ProxyApi < AppRouterBase
3
+ get "/favicon.ico", :next_api
3
4
  get "/*path", :handle_proxy_request
4
5
  get "/", :handle_proxy_request
5
6
 
@@ -28,7 +29,11 @@ module PhantomProxy
28
29
  end
29
30
 
30
31
  def host
31
- env['SERVER_NAME']
32
+ if https?
33
+ env['SERVER_NAME']
34
+ else
35
+ env['HTTP_HOST']
36
+ end
32
37
  end
33
38
 
34
39
  def path
@@ -118,12 +118,12 @@ function main() {
118
118
  phantom.exit();
119
119
  }, function(page) {
120
120
  //page.customHeaders = {"Referer": "http://uk-amazon.icims.com/jobs/240290/account-representative---amazon-web-services---iberia/job"}
121
- // page.onResourceReceived = function (response) {
122
- // if (response.stage == "end" && response.url == address && response.status != 200)
123
- // {
124
- // console.log('URL_ERROR_CODE: '+response.status+'URL_ERROR_CODE_END');
125
- // }
126
- // };
121
+ page.onResourceReceived = function (response) {
122
+ if (response.stage == "end" && response.url == address && response.status != 200)
123
+ {
124
+ console.log('URL_ERROR_CODE: '+response.status+'URL_ERROR_CODE_END');
125
+ }
126
+ };
127
127
  });
128
128
  }
129
129
  }
@@ -1,3 +1,3 @@
1
1
  module PhantomProxy
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phantom_proxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Suddani
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-21 00:00:00.000000000 Z
11
+ date: 2014-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json