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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7a528a2f7b069decb399bc7be96696e6ae1da9fc
4
- data.tar.gz: 4fa3e0e2af8bc2deecd2c4f3a91571e413734ab9
3
+ metadata.gz: 6793a974d1c21ca4111d35748618561577092d74
4
+ data.tar.gz: 5bb5faf4e3725923161ff12c51cd00a3f1fb6a0e
5
5
  SHA512:
6
- metadata.gz: 637fe50741ceadf32460b53862b04183a93e48fd67580eb9c8a25c48488b073503f3605edbac5a0ff86875ee6369f4f3da802c8b022cbc1fe10d9e399471fbef
7
- data.tar.gz: 447ac7f6f349f3c7b5065ed5c41bdb95c9245391add55f97fb14e0dd9e97adcdd7314bf66c6ba393898107d025c6e2f346a9eed709a22c9cbc1883057fa96fa6
6
+ metadata.gz: a6e0208d5407448a2a9cfb5d3f008b089bb944527190902d559be35ab07c98365c6d5f0b1c4943a3dfa9379200147cb07193646dbcfed60f4fd27d957549275b
7
+ data.tar.gz: 08ff12425d51a5d4ea1c095a017d39e86d8f9decfffbc44c874804118a6cc5585d3337f60da54d9df15d1920dea5d089294138340b5d26885ee4e6eb77abf5aa
data/.gitignore CHANGED
@@ -6,4 +6,5 @@
6
6
  /doc/
7
7
  /pkg/
8
8
  /spec/reports/
9
- /tmp/
9
+ /tmp/*
10
+ !/tmp/.gitkeep
data/Rakefile CHANGED
@@ -3,6 +3,7 @@ require 'rake/testtask'
3
3
 
4
4
  Rake::TestTask.new do |t|
5
5
  t.libs << 'test'
6
+ t.test_files = FileList['test/*_test.rb']
6
7
  end
7
8
 
8
9
  desc "Run tests"
@@ -1,3 +1,3 @@
1
1
  module EmlToPdf
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -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 # TODO save output
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.0
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