grover 0.11.1 → 0.11.2
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.
- checksums.yaml +4 -4
- data/lib/grover.rb +13 -4
- data/lib/grover/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49891589eac94bdb0602aefdeaf488bd7df1c40c69c75da1eee473016cb6eefc
|
4
|
+
data.tar.gz: 14b8fd25ee3eafaa76f5b5da6f0591c9cfe8af077ff042f6e2b804e1c12b7e70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e140285264c56edc46390938f72ff0cd402285a81040c011fac94a2b019753357b238b7a0bc869c0d1e3e741857f21bb5446b51de1fe5f920aba722f23ecb3bc
|
7
|
+
data.tar.gz: 6db55a620a3099e945d31fe0da78ca4d73396c2d2544e0985d836595f4d63620e9856388fa8525b328322125b820738a76931cd348d562974f3e0e1fa82c3b3c
|
data/lib/grover.rb
CHANGED
@@ -264,7 +264,8 @@ class Grover
|
|
264
264
|
Utils.deep_merge! combined, meta_options unless url_source?
|
265
265
|
|
266
266
|
fix_boolean_options! combined
|
267
|
-
|
267
|
+
fix_integer_options! combined
|
268
|
+
fix_float_options! combined
|
268
269
|
fix_array_options! combined
|
269
270
|
|
270
271
|
combined
|
@@ -304,10 +305,18 @@ class Grover
|
|
304
305
|
|
305
306
|
FALSE_VALUES = [nil, false, 0, '0', 'f', 'F', 'false', 'FALSE', 'off', 'OFF'].freeze
|
306
307
|
|
307
|
-
def
|
308
|
-
|
308
|
+
def fix_integer_options!(options)
|
309
|
+
['viewport.width', 'viewport.height'].each do |opt|
|
310
|
+
keys = opt.split('.')
|
311
|
+
Utils.deep_assign(options, keys, options.dig(*keys).to_i) if options.dig(*keys)
|
312
|
+
end
|
313
|
+
end
|
309
314
|
|
310
|
-
|
315
|
+
def fix_float_options!(options)
|
316
|
+
['viewport.device_scale_factor', 'scale'].each do |opt|
|
317
|
+
keys = opt.split('.')
|
318
|
+
Utils.deep_assign(options, keys, options.dig(*keys).to_f) if options.dig(*keys)
|
319
|
+
end
|
311
320
|
end
|
312
321
|
|
313
322
|
def fix_array_options!(options)
|
data/lib/grover/version.rb
CHANGED
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.11.
|
4
|
+
version: 0.11.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: 2020-
|
11
|
+
date: 2020-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: combine_pdf
|
@@ -198,7 +198,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
198
198
|
- !ruby/object:Gem::Version
|
199
199
|
version: '0'
|
200
200
|
requirements: []
|
201
|
-
|
201
|
+
rubyforge_project:
|
202
|
+
rubygems_version: 2.7.6.2
|
202
203
|
signing_key:
|
203
204
|
specification_version: 4
|
204
205
|
summary: A Ruby gem to transform HTML into PDF, PNG or JPEG by wrapping the NodeJS
|