pdfgen 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 +4 -4
- data/VERSION +1 -1
- data/lib/pdfgen.rb +2 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2b31c30f68e868e766a5dce43b1a6b985dc9513
|
4
|
+
data.tar.gz: 8346bbe9d9cf548962e258af8b576d8f44dc03e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9213a73b14322c244572a0ff40daa606b47702714c6c0a59f8531410138d4d953fe47e1b36ec4516c8f561ab1f71ec6164040f4e669cff48260ffad90ae8cab
|
7
|
+
data.tar.gz: cbc262d33c7a48bff0f2e2788387abbce14e2f71514c06998f02908731a0da1b575fc3882e862bd51079116cb87cb7ba68471a2dd26e87c4100f82d04b90cc5a
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/lib/pdfgen.rb
CHANGED
@@ -13,7 +13,7 @@ class Pdfgen
|
|
13
13
|
@html = html
|
14
14
|
@viewport_options = nil
|
15
15
|
@emulate_media = nil
|
16
|
-
@launch_options =
|
16
|
+
@launch_options = Hash.new
|
17
17
|
end
|
18
18
|
|
19
19
|
def set_viewport(viewport_options)
|
@@ -32,10 +32,9 @@ class Pdfgen
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def to_pdf(opts = {})
|
35
|
-
stdin_options = { pdf_options: opts, current_path: Dir.pwd }
|
35
|
+
stdin_options = { pdf_options: opts, current_path: Dir.pwd, launch_options: @launch_options }
|
36
36
|
stdin_options = stdin_options.merge(viewport_options: @viewport_options) if @viewport_options
|
37
37
|
stdin_options = stdin_options.merge(emulate_media: @emulate_media) if @emulate_media
|
38
|
-
stdin_options = stdin_options.merge(launch_options: @launch_options) if @launch_options
|
39
38
|
file = Tempfile.new('input_html')
|
40
39
|
file.write(@html)
|
41
40
|
file.close
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdfgen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Fox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|