glebtv-screencap 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 42c1b0b32bb21e7623208132803aef2abce0cc84
4
- data.tar.gz: 9ca52b0e7b9d04038189d72aa0835ac6ae229181
3
+ metadata.gz: 026ee88afd7c9aa3f936b2a6f489398021dbd6c4
4
+ data.tar.gz: f3c4ef13cc5e8febc63b36012fb92397a85b68c3
5
5
  SHA512:
6
- metadata.gz: 3d3609ca2b229fea2ae01121847307aa6ef547944d0c8f00606d76717e764b813ab76e7898ee13b37a2c58653e37df7597e4d1ec04cbbd4850ab97286ee88295
7
- data.tar.gz: 3360dc40bb2f322e7f52691bd3fd9fc081a9b9972665fc811b8ed85bdb06c050d98c11a1f05360199720ada0097265dda7964284312d1fdd906dd20990663144
6
+ metadata.gz: a9b5aef9947d92557faa3e415999b4fef4ad13232e1c9e0544e047901c898483760b77a510cc2a530368582eb55e48ec1edf8c57583f1af2f2366280b05baa0c
7
+ data.tar.gz: 99aa3930f4b872923ad363fd07a1f0db0d41e10b3fb469580ee50c4c1f94faa7d629657ab2ea17a8d2f0d5e8f6c284202f0997bb57c9c58791cd527b8fd1dbcd
@@ -1 +1 @@
1
- 2.1.3
1
+ 2.1.6
@@ -10,8 +10,9 @@ module Screencap
10
10
  #puts RASTERIZE.to_s, params
11
11
  cookies = Rails.root.join("tmp", "cookies.txt")
12
12
  params.push "--cookies-file=#{cookies.to_s}"
13
+ params.push "--ssl-protocol=any"
13
14
  result = Phantomjs.run(RASTERIZE.to_s, *params)
14
- #p result
15
+ # puts result
15
16
  raise Screencap::Error, "Could not load URL #{url}" if result.match /Unable to load/
16
17
  end
17
18
 
@@ -36,8 +36,15 @@ page.onConsoleMessage = function (msg) {
36
36
  console.log("from page: " + msg);
37
37
  };
38
38
 
39
+ page.onResourceRequested = function(requestData, networkRequest) {
40
+ if (requestData.url.match(/socket\.io/i)) {
41
+ console.log('Break polling to: %s', requestData.url);
42
+ networkRequest.abort()
43
+ }
44
+ };
45
+
39
46
  page.open(args.url, function (status) {
40
- console.log(status, args);
47
+ console.log(status, JSON.stringify(args, undefined, 4));
41
48
  if(status !== 'success') {
42
49
  console.log('Unable to load:' + args.url);
43
50
  phantom.exit();
@@ -1,3 +1,3 @@
1
1
  module Screencap
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glebtv-screencap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebtv
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-11-19 00:00:00.000000000 Z
13
+ date: 2015-07-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  version: '0'
115
115
  requirements: []
116
116
  rubyforge_project:
117
- rubygems_version: 2.2.2
117
+ rubygems_version: 2.4.5
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: uses Phantom.js to grab pages, or parts of pages. Simple API.