grover 0.5.1 → 0.5.2

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: 2ec8a1908f15407ef3d24ab28a2e211bee743b06
4
- data.tar.gz: 96e00c18f6ebb1835e768807a6d9275aec88a95f
3
+ metadata.gz: 23be6a01f9d60e6aaa3e1c224a855b7424f40db5
4
+ data.tar.gz: 0f7e8fdeb229de987444e8e4756c8a3e09349202
5
5
  SHA512:
6
- metadata.gz: 62002773ddebdff4bcf9dcc0bc6a4fde4d68c5922e1ce14c5fb07704f815462fbf04b737a34402de2a240feb79d3eff816eb8d0e2e60ebe04f8b0e0a81259a21
7
- data.tar.gz: 7016d579dcba337bf2beb558883ca0fec597e9d1b06f7dedecfd86fe63c6572be82a34cc9926a8dace39ab150f725f0a43c7f37f17ad4ab2bec2c3ccabc9bfee
6
+ metadata.gz: 59a8240257511c3fb8afc32b6cf2842f99fd7454b48ad700c4fbc355bb81bc85db40ddb45765653d38df018a94997f1e7b7b35e213b4ca4ccf21d31ca960640e
7
+ data.tar.gz: 88a776f44751fc3ff49503acb98f08582d0519a472fbe36ea255aff97fce81b590302a47834a4811dc92bdc798c023c060b5e86e0eb8358db376d1198d8704ee
data/lib/grover.rb CHANGED
@@ -30,6 +30,10 @@ class Grover
30
30
  try {
31
31
  browser = await puppeteer.launch(#{launch_params});
32
32
  const page = await browser.newPage();
33
+
34
+ const cache = options.cache; delete options.cache;
35
+ await page.setCacheEnabled(cache);
36
+
33
37
  if (url.match(/^http/i)) {
34
38
  await page.goto(url, { waitUntil: 'networkidle2' });
35
39
  } else {
@@ -6,7 +6,9 @@ class Grover
6
6
  attr_accessor :options, :meta_tag_prefix
7
7
 
8
8
  def initialize
9
- @options = {}
9
+ @options = {
10
+ cache: false
11
+ }
10
12
  @meta_tag_prefix = 'grover-'
11
13
  end
12
14
  end
@@ -59,7 +59,7 @@ class Grover
59
59
  body = body.join if body.is_a?(Array)
60
60
 
61
61
  body = HTMLPreprocessor.process body, root_url, protocol
62
- Grover.new(body, display_url: request_url)
62
+ Grover.new(body, display_url: request_url, cache: false)
63
63
  end
64
64
 
65
65
  def add_cover_content(grover)
@@ -1,3 +1,3 @@
1
1
  class Grover
2
- VERSION = '0.5.1'.freeze
2
+ VERSION = '0.5.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grover
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Bromwich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-15 00:00:00.000000000 Z
11
+ date: 2018-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: combine_pdf