pdf-rendering-srv-ruby 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/lib/pdf_rendering_srv/base.rb +48 -30
- data/lib/pdf_rendering_srv/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dff035b56c29a941c0adba86bcb6ad3c0ea6719fc841c1a5803e6db247552fd9
|
4
|
+
data.tar.gz: ccea6573976c3b56a600ea058a7d59ee0e6d98fc102b333fc93478dbb7af2ae5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e809ee3f3c8f75318b5b8a718f37d2eed8e49dd382f053a56b7135af49e109322638770b44e9d078337efcfa01c23891f9f70ad2ed7f28c564e975415e8b3986
|
7
|
+
data.tar.gz: f051799b47b318aa1d63e65c8ae16d3386b294a6fc71067559b35e531eb50851be62c8a02713ea2d22d6089654257fcaefeb20495a5fcbe9632a974edb5dd3ca
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -6,53 +6,71 @@ module PdfRenderingSrv
|
|
6
6
|
include Dry.Types()
|
7
7
|
end
|
8
8
|
|
9
|
+
transform_keys(&:to_sym)
|
10
|
+
|
9
11
|
attribute :pdf_rendering_srv_url, Types::String.optional.default(PdfRenderingSrv.configuration.pdf_rendering_srv_url.freeze)
|
10
12
|
|
11
13
|
attribute :format, Types::Coercible::Symbol.enum(*%i[html pdf png jpg jpeg]).optional.default(:pdf)
|
12
|
-
attribute :jpeg_quality, Types::Coercible::Integer.optional.default(90)
|
14
|
+
attribute? :jpeg_quality, Types::Coercible::Integer.optional.default(90)
|
13
15
|
|
14
16
|
# @see https://github.com/alvarcarto/url-to-pdf-api#get-apirender
|
15
17
|
|
16
|
-
attribute :emulate_screen_media, Types::Bool.optional
|
17
|
-
attribute :scroll_page, Types::Bool.optional
|
18
|
-
attribute :wait_for, Types::Coercible::String.optional
|
18
|
+
attribute? :emulate_screen_media, Types::Bool.optional
|
19
|
+
attribute? :scroll_page, Types::Bool.optional
|
20
|
+
attribute? :wait_for, Types::Coercible::String.optional
|
19
21
|
|
20
22
|
attribute? :viewport do
|
21
|
-
attribute :width, Types::Coercible::Integer.optional
|
22
|
-
attribute :height, Types::Coercible::Integer.optional
|
23
|
-
attribute :device_scale_factor, Types::Coercible::Integer.optional.default(2)
|
24
|
-
attribute :is_mobile, Types::Bool.optional
|
25
|
-
attribute :has_touch, Types::Bool.optional
|
26
|
-
attribute :is_landscape, Types::Bool.optional
|
23
|
+
attribute? :width, Types::Coercible::Integer.optional
|
24
|
+
attribute? :height, Types::Coercible::Integer.optional
|
25
|
+
attribute? :device_scale_factor, Types::Coercible::Integer.optional.default(2)
|
26
|
+
attribute? :is_mobile, Types::Bool.optional
|
27
|
+
attribute? :has_touch, Types::Bool.optional
|
28
|
+
attribute? :is_landscape, Types::Bool.optional
|
29
|
+
end
|
30
|
+
|
31
|
+
attribute? :cookies, Types::Array do
|
32
|
+
attribute :name, Types::String
|
33
|
+
attribute :value, Types::String
|
34
|
+
attribute? :url, Types::String.optional
|
35
|
+
attribute? :domain, Types::String.optional
|
36
|
+
attribute? :path, Types::String.optional
|
37
|
+
attribute? :expires, Types::Coercible::Integer.optional
|
38
|
+
attribute? :http_only, Types::Bool.optional
|
39
|
+
attribute? :secure, Types::Bool.optional
|
40
|
+
attribute? :same_site, Types::String.optional
|
27
41
|
end
|
28
42
|
|
29
43
|
attribute? :goto do
|
30
|
-
attribute :wait_until, Types::Coercible::String.enum(*%w[load networkidle0 networkidle2]).optional
|
31
|
-
attribute :network_idle_timeout, Types::Integer.optional
|
44
|
+
attribute? :wait_until, Types::Coercible::String.enum(*%w[load networkidle0 networkidle2]).optional
|
45
|
+
attribute? :network_idle_timeout, Types::Integer.optional
|
32
46
|
end
|
33
47
|
|
34
48
|
attribute? :pdf do
|
35
|
-
attribute :scale, Types::Coercible::Float.optional
|
36
|
-
attribute :print_background, Types::Bool.optional
|
37
|
-
attribute :landscape, Types::Bool.optional
|
38
|
-
attribute :page_ranges, Types::Coercible::String.optional
|
39
|
-
attribute :format, Types::Coercible::String.optional
|
40
|
-
attribute :width, Types::Coercible::String.optional
|
41
|
-
attribute :height, Types::Coercible::String.optional
|
42
|
-
attribute :
|
43
|
-
|
44
|
-
|
45
|
-
|
49
|
+
attribute? :scale, Types::Coercible::Float.optional
|
50
|
+
attribute? :print_background, Types::Bool.optional
|
51
|
+
attribute? :landscape, Types::Bool.optional
|
52
|
+
attribute? :page_ranges, Types::Coercible::String.optional
|
53
|
+
attribute? :format, Types::Coercible::String.optional
|
54
|
+
attribute? :width, Types::Coercible::String.optional
|
55
|
+
attribute? :height, Types::Coercible::String.optional
|
56
|
+
attribute? :margin do
|
57
|
+
attribute? :top, Types::Coercible::String.optional
|
58
|
+
attribute? :right, Types::Coercible::String.optional
|
59
|
+
attribute? :bottom, Types::Coercible::String.optional
|
60
|
+
attribute? :left, Types::Coercible::String.optional
|
61
|
+
end
|
46
62
|
end
|
47
63
|
|
48
64
|
attribute? :screenshot do
|
49
|
-
attribute :full_page, Types::Bool.optional
|
50
|
-
attribute :omit_background, Types::Bool.optional
|
51
|
-
attribute :
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
65
|
+
attribute? :full_page, Types::Bool.optional
|
66
|
+
attribute? :omit_background, Types::Bool.optional
|
67
|
+
attribute? :clip do
|
68
|
+
attribute? :x, Types::Coercible::Integer.optional
|
69
|
+
attribute? :y, Types::Coercible::Integer.optional
|
70
|
+
attribute? :width, Types::Coercible::Integer.optional
|
71
|
+
attribute? :height, Types::Coercible::Integer.optional
|
72
|
+
end
|
73
|
+
attribute? :selector, Types::Coercible::String.optional
|
56
74
|
end
|
57
75
|
|
58
76
|
def self.call(*args)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdf-rendering-srv-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Celizna
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-struct
|