postdoc 0.2.2 → 0.2.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/postdoc.rb +3 -3
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a85e6b50205b46d1127b53214c2bad5e53aef5765081e17a1998eafb7c1bae4b
4
- data.tar.gz: 6d00e103be5c33ce38e20e0bfa3cf8939ee2a8824a9a13e32f15662fea31c0b6
3
+ metadata.gz: d21422293d756a0a95e7a697efcf2d35e9d8fc558124d8a665c05c5e3eef2e3d
4
+ data.tar.gz: bbfda4ff89ce4066f8ea2ea1da1190ce30c21990508db035c05aa733dc1e9014
5
5
  SHA512:
6
- metadata.gz: 416f6e0522cbd000347afb73c1e66fc7ad1b054db46d0bb4ae2a3b21dfc24720b8bbdd1eca7fbe7c13860815a3916aa30e1d7d009e1f2675aca5f8c599755f7d
7
- data.tar.gz: a5b397c41b09ddf29125eb3ddd4e967971abcabefcf3a7b57222888c827b783f6978fb14316d51170baf8c7c04b0e701c5054fdaac151438452b943552ebe5fc
6
+ metadata.gz: 32451b802853cbe1e0383ae26e7c264956cf136c0703c7e3cbdbd3ff4d5d8364db2c5647aa010d196c70b9759dfeff7668d0caff1750ee8e3600a688e13ad56b
7
+ data.tar.gz: 7ee471438ee718694588e0b1827e601e6a4b68b22685c937e76a97448d9fc64a50f3010d02fc0c0a50d0679da894290b9db77fffab9a39458c021c583d5abb57
@@ -2,7 +2,7 @@ require 'chrome_remote'
2
2
 
3
3
  module Postdoc
4
4
  ActionController::Renderers.add :pdf do |filename, options|
5
- render_from_string_to_pdf render_to_string(options), options
5
+ Postdoc.render_from_string render_to_string(options), options
6
6
  end
7
7
 
8
8
  def self.render_from_string(string, options)
@@ -38,8 +38,8 @@ module Postdoc
38
38
  marginTop: options[:margin_top] || 1,
39
39
  marginBottom: options[:margin_bottom] || 1,
40
40
  displayHeaderFooter: displayHeaderFooter,
41
- headerTemplate: options[:header_template],
42
- footerTemplate: options[:footer_template]
41
+ headerTemplate: options[:header_template] || '',
42
+ footerTemplate: options[:footer_template] || ''
43
43
  }
44
44
  result = Base64.decode64 response['data']
45
45
  ensure
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postdoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Groeneveld
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-11 00:00:00.000000000 Z
11
+ date: 2019-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails