eml_to_pdf 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/Rakefile +1 -0
- data/lib/eml_to_pdf/version.rb +1 -1
- data/lib/eml_to_pdf/wkhtmltopdf.rb +7 -1
- data/tmp/.gitkeep +0 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6793a974d1c21ca4111d35748618561577092d74
|
4
|
+
data.tar.gz: 5bb5faf4e3725923161ff12c51cd00a3f1fb6a0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6e0208d5407448a2a9cfb5d3f008b089bb944527190902d559be35ab07c98365c6d5f0b1c4943a3dfa9379200147cb07193646dbcfed60f4fd27d957549275b
|
7
|
+
data.tar.gz: 08ff12425d51a5d4ea1c095a017d39e86d8f9decfffbc44c874804118a6cc5585d3337f60da54d9df15d1920dea5d089294138340b5d26885ee4e6eb77abf5aa
|
data/.gitignore
CHANGED
data/Rakefile
CHANGED
data/lib/eml_to_pdf/version.rb
CHANGED
@@ -1,10 +1,16 @@
|
|
1
1
|
module EmlToPdf
|
2
2
|
class Wkhtmltopdf
|
3
|
+
class ConversionError < StandardError; end
|
4
|
+
|
3
5
|
def self.convert(input, output_path)
|
4
6
|
IO.popen("wkhtmltopdf --encoding utf-8 --footer-center [page] --footer-spacing 2.5 - #{output_path} 2>&1", "r+") do |pipe|
|
5
7
|
pipe.puts(input)
|
6
8
|
pipe.close_write
|
7
|
-
pipe.readlines
|
9
|
+
output = pipe.readlines.join
|
10
|
+
pipe.close
|
11
|
+
unless $?.success?
|
12
|
+
raise ConversionError, output
|
13
|
+
end
|
8
14
|
end
|
9
15
|
end
|
10
16
|
end
|
data/tmp/.gitkeep
ADDED
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eml_to_pdf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yves Siegrist
|
@@ -138,6 +138,7 @@ files:
|
|
138
138
|
- lib/eml_to_pdf/templates/style.html
|
139
139
|
- lib/eml_to_pdf/version.rb
|
140
140
|
- lib/eml_to_pdf/wkhtmltopdf.rb
|
141
|
+
- tmp/.gitkeep
|
141
142
|
homepage: https://github.com/Elektron1c97/eml_to_pdf
|
142
143
|
licenses:
|
143
144
|
- MIT
|