postdoc 0.3.8 → 0.3.9

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
  SHA256:
3
- metadata.gz: 54aee40fdabd27f1565648b9f80a992a1799214472a7639019ca4385f5d2bd38
4
- data.tar.gz: 8d4870650fd4c27a6ebad35af0995a345c70b8edb77fef36c4a1a8d1cc41a82e
3
+ metadata.gz: c8805f0d630a0bb6aacb1370839faec84c781d556c0f2f21a62f82cfb0127513
4
+ data.tar.gz: b0767fa2999a50cab5aa58204e4c43c16e38c0ee941c1389660c35cf6062fb15
5
5
  SHA512:
6
- metadata.gz: 8edd792288b47e25ee4c1b76bc7ee80c5533aca499751f0d119acf1b978b0cbf80e7dc10cb2f4eb51db0d86241cb88440c78ff8a07e7604d0ddf67f688870281
7
- data.tar.gz: 2f83ad865f53d224044d1a9dd6a1abe758bbfe778ec4fccd9cb59904a2653e565b26e1650c05e29eb0242233f01de130e96e6a36a6d478acb27dea825986ac7c
6
+ metadata.gz: 9dbb3519424aef59b75c1951599be4a91e1b9fc722c5ef75e0dd9197cd58f8f455f0db5cc0e0bcfe9efb076c8797fc8fab48d6d745cd91a5b31bf7ea97c26769
7
+ data.tar.gz: 8c33f0a51a2127c1289095c6e43031e7fa988b410da1c94aa14d7caa1b33185398553000ef5e2ca4836a7cdcc77be5339aa9a71f2f70991f36228050df190870
data/lib/postdoc.rb CHANGED
@@ -20,6 +20,9 @@ module Postdoc
20
20
  .print_pdf_from_html(html_file.path,
21
21
  settings: print_settings)
22
22
  ensure
23
+ if server.client.client.present?
24
+ server.client.client.send_cmd 'Browser.close'
25
+ end
23
26
  server.kill
24
27
  html_file.cleanup
25
28
  end
@@ -41,6 +44,9 @@ module Postdoc
41
44
  server = ChromeProcess.new
42
45
  batch.result(server.client)
43
46
  ensure
47
+ if server.client.client.present?
48
+ server.client.client.send_cmd 'Browser.close'
49
+ end
44
50
  server.kill
45
51
  batch.cleanup
46
52
  end
@@ -23,8 +23,6 @@ module Postdoc
23
23
  client.wait_for 'Page.loadEventFired'
24
24
 
25
25
  response = client.send_cmd 'Page.printToPDF', settings.to_cmd
26
-
27
- client.send_cmd 'Browser.close'
28
26
 
29
27
  Base64.decode64 response['data']
30
28
  end
@@ -35,8 +33,6 @@ module Postdoc
35
33
  client.wait_for 'Page.loadEventFired'
36
34
  response = client.send_cmd 'Page.printToPDF', settings.to_cmd
37
35
 
38
- client.send_cmd 'Browser.close'
39
-
40
36
  Base64.decode64 response['data']
41
37
  end
42
38
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postdoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Groeneveld