html2pdf-rails 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +52 -52
- data/lib/html2pdf/rails/rendering.rb +4 -4
- data/lib/html2pdf/rails/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd4efa601a6172a9280fd4348c33c24a2bc2f9af4e3ddcbfcc5e563d949dd6ac
|
4
|
+
data.tar.gz: 728b7376604073203dc6a545bcdb99a2133bb52e77cc4c419b18e567a4925642
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a263cc651ad79ea756351e0aef44d6f2ece5c1e1d0577a5470fbba7217a2b45f2528fb2ecc5b962fae71952bc81067cf9e8905b55d1bdbac2b5f3ecc0c0f957d
|
7
|
+
data.tar.gz: d5becc033f6225ab5953f87b60cbae17a2c92259675ccd74930537536776e74f713e76145d8bdb27e96a839b1eafd412198952cf3d4600d7ec8b9c79673daeb5
|
data/Gemfile.lock
CHANGED
@@ -1,102 +1,102 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
html2pdf-rails (0.1.
|
4
|
+
html2pdf-rails (0.1.1)
|
5
5
|
rails (>= 5.2.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
actioncable (5.2.
|
11
|
-
actionpack (= 5.2.
|
10
|
+
actioncable (5.2.3)
|
11
|
+
actionpack (= 5.2.3)
|
12
12
|
nio4r (~> 2.0)
|
13
13
|
websocket-driver (>= 0.6.1)
|
14
|
-
actionmailer (5.2.
|
15
|
-
actionpack (= 5.2.
|
16
|
-
actionview (= 5.2.
|
17
|
-
activejob (= 5.2.
|
14
|
+
actionmailer (5.2.3)
|
15
|
+
actionpack (= 5.2.3)
|
16
|
+
actionview (= 5.2.3)
|
17
|
+
activejob (= 5.2.3)
|
18
18
|
mail (~> 2.5, >= 2.5.4)
|
19
19
|
rails-dom-testing (~> 2.0)
|
20
|
-
actionpack (5.2.
|
21
|
-
actionview (= 5.2.
|
22
|
-
activesupport (= 5.2.
|
20
|
+
actionpack (5.2.3)
|
21
|
+
actionview (= 5.2.3)
|
22
|
+
activesupport (= 5.2.3)
|
23
23
|
rack (~> 2.0)
|
24
24
|
rack-test (>= 0.6.3)
|
25
25
|
rails-dom-testing (~> 2.0)
|
26
26
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
27
|
-
actionview (5.2.
|
28
|
-
activesupport (= 5.2.
|
27
|
+
actionview (5.2.3)
|
28
|
+
activesupport (= 5.2.3)
|
29
29
|
builder (~> 3.1)
|
30
30
|
erubi (~> 1.4)
|
31
31
|
rails-dom-testing (~> 2.0)
|
32
32
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
33
|
-
activejob (5.2.
|
34
|
-
activesupport (= 5.2.
|
33
|
+
activejob (5.2.3)
|
34
|
+
activesupport (= 5.2.3)
|
35
35
|
globalid (>= 0.3.6)
|
36
|
-
activemodel (5.2.
|
37
|
-
activesupport (= 5.2.
|
38
|
-
activerecord (5.2.
|
39
|
-
activemodel (= 5.2.
|
40
|
-
activesupport (= 5.2.
|
36
|
+
activemodel (5.2.3)
|
37
|
+
activesupport (= 5.2.3)
|
38
|
+
activerecord (5.2.3)
|
39
|
+
activemodel (= 5.2.3)
|
40
|
+
activesupport (= 5.2.3)
|
41
41
|
arel (>= 9.0)
|
42
|
-
activestorage (5.2.
|
43
|
-
actionpack (= 5.2.
|
44
|
-
activerecord (= 5.2.
|
42
|
+
activestorage (5.2.3)
|
43
|
+
actionpack (= 5.2.3)
|
44
|
+
activerecord (= 5.2.3)
|
45
45
|
marcel (~> 0.3.1)
|
46
|
-
activesupport (5.2.
|
46
|
+
activesupport (5.2.3)
|
47
47
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
48
48
|
i18n (>= 0.7, < 2)
|
49
49
|
minitest (~> 5.1)
|
50
50
|
tzinfo (~> 1.1)
|
51
51
|
arel (9.0.0)
|
52
52
|
builder (3.2.3)
|
53
|
-
concurrent-ruby (1.
|
53
|
+
concurrent-ruby (1.1.5)
|
54
54
|
crass (1.0.4)
|
55
55
|
diff-lcs (1.3)
|
56
|
-
erubi (1.
|
57
|
-
globalid (0.4.
|
56
|
+
erubi (1.8.0)
|
57
|
+
globalid (0.4.2)
|
58
58
|
activesupport (>= 4.2.0)
|
59
|
-
i18n (1.
|
59
|
+
i18n (1.6.0)
|
60
60
|
concurrent-ruby (~> 1.0)
|
61
|
-
loofah (2.2.
|
61
|
+
loofah (2.2.3)
|
62
62
|
crass (~> 1.0.2)
|
63
63
|
nokogiri (>= 1.5.9)
|
64
64
|
mail (2.7.1)
|
65
65
|
mini_mime (>= 0.1.1)
|
66
66
|
marcel (0.3.3)
|
67
67
|
mimemagic (~> 0.3.2)
|
68
|
-
method_source (0.9.
|
69
|
-
mimemagic (0.3.
|
68
|
+
method_source (0.9.2)
|
69
|
+
mimemagic (0.3.3)
|
70
70
|
mini_mime (1.0.1)
|
71
|
-
mini_portile2 (2.
|
71
|
+
mini_portile2 (2.4.0)
|
72
72
|
minitest (5.11.3)
|
73
73
|
nio4r (2.3.1)
|
74
|
-
nokogiri (1.
|
75
|
-
mini_portile2 (~> 2.
|
76
|
-
rack (2.0.
|
74
|
+
nokogiri (1.10.3)
|
75
|
+
mini_portile2 (~> 2.4.0)
|
76
|
+
rack (2.0.7)
|
77
77
|
rack-test (1.1.0)
|
78
78
|
rack (>= 1.0, < 3)
|
79
|
-
rails (5.2.
|
80
|
-
actioncable (= 5.2.
|
81
|
-
actionmailer (= 5.2.
|
82
|
-
actionpack (= 5.2.
|
83
|
-
actionview (= 5.2.
|
84
|
-
activejob (= 5.2.
|
85
|
-
activemodel (= 5.2.
|
86
|
-
activerecord (= 5.2.
|
87
|
-
activestorage (= 5.2.
|
88
|
-
activesupport (= 5.2.
|
79
|
+
rails (5.2.3)
|
80
|
+
actioncable (= 5.2.3)
|
81
|
+
actionmailer (= 5.2.3)
|
82
|
+
actionpack (= 5.2.3)
|
83
|
+
actionview (= 5.2.3)
|
84
|
+
activejob (= 5.2.3)
|
85
|
+
activemodel (= 5.2.3)
|
86
|
+
activerecord (= 5.2.3)
|
87
|
+
activestorage (= 5.2.3)
|
88
|
+
activesupport (= 5.2.3)
|
89
89
|
bundler (>= 1.3.0)
|
90
|
-
railties (= 5.2.
|
90
|
+
railties (= 5.2.3)
|
91
91
|
sprockets-rails (>= 2.0.0)
|
92
92
|
rails-dom-testing (2.0.3)
|
93
93
|
activesupport (>= 4.2.0)
|
94
94
|
nokogiri (>= 1.6)
|
95
95
|
rails-html-sanitizer (1.0.4)
|
96
96
|
loofah (~> 2.2, >= 2.2.2)
|
97
|
-
railties (5.2.
|
98
|
-
actionpack (= 5.2.
|
99
|
-
activesupport (= 5.2.
|
97
|
+
railties (5.2.3)
|
98
|
+
actionpack (= 5.2.3)
|
99
|
+
activesupport (= 5.2.3)
|
100
100
|
method_source
|
101
101
|
rake (>= 0.8.7)
|
102
102
|
thor (>= 0.19.0, < 2.0)
|
@@ -121,13 +121,13 @@ GEM
|
|
121
121
|
actionpack (>= 4.0)
|
122
122
|
activesupport (>= 4.0)
|
123
123
|
sprockets (>= 3.0.0)
|
124
|
-
thor (0.20.
|
124
|
+
thor (0.20.3)
|
125
125
|
thread_safe (0.3.6)
|
126
126
|
tzinfo (1.2.5)
|
127
127
|
thread_safe (~> 0.1)
|
128
|
-
websocket-driver (0.7.
|
128
|
+
websocket-driver (0.7.1)
|
129
129
|
websocket-extensions (>= 0.1.0)
|
130
|
-
websocket-extensions (0.1.
|
130
|
+
websocket-extensions (0.1.4)
|
131
131
|
|
132
132
|
PLATFORMS
|
133
133
|
ruby
|
@@ -139,4 +139,4 @@ DEPENDENCIES
|
|
139
139
|
rspec (~> 3.0)
|
140
140
|
|
141
141
|
BUNDLED WITH
|
142
|
-
1.
|
142
|
+
1.17.2
|
@@ -6,12 +6,12 @@ module Html2Pdf
|
|
6
6
|
module Rails
|
7
7
|
module Rendering
|
8
8
|
def render_to_pdf(options)
|
9
|
-
|
9
|
+
_html2pdf_make_and_send_pdf(options.delete(:pdf), options)
|
10
10
|
end
|
11
11
|
|
12
12
|
private
|
13
13
|
|
14
|
-
def
|
14
|
+
def _html2pdf_make_and_send_pdf(pdf_name, options = {})
|
15
15
|
options[:layout] ||= false
|
16
16
|
options[:template] ||= File.join(controller_path, action_name)
|
17
17
|
options[:disposition] ||= 'inline'
|
@@ -21,12 +21,12 @@ module Html2Pdf
|
|
21
21
|
render_opts = options.slice(:template, :layout, :formats, :handlers)
|
22
22
|
render(render_opts.merge({ content_type: 'text/html' }))
|
23
23
|
else
|
24
|
-
pdf_content =
|
24
|
+
pdf_content = _html2pdf_make_pdf(options)
|
25
25
|
send_data(pdf_content, filename: pdf_name + '.pdf', type: 'application/pdf', disposition: options[:disposition])
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
def
|
29
|
+
def _html2pdf_make_pdf(options = {})
|
30
30
|
render_opts = options.slice(:template, :layout, :formats, :handlers)
|
31
31
|
html = render_to_string(render_opts)
|
32
32
|
Client.post(html, options[:pdf_options]).body
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: html2pdf-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- aki77
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -111,8 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
111
|
- !ruby/object:Gem::Version
|
112
112
|
version: '0'
|
113
113
|
requirements: []
|
114
|
-
|
115
|
-
rubygems_version: 2.7.6
|
114
|
+
rubygems_version: 3.0.3
|
116
115
|
signing_key:
|
117
116
|
specification_version: 4
|
118
117
|
summary: PDF generator (from HTML) gem for Ruby on Rails
|