pdflatex 0.1.1 → 0.1.3

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: a6c0bacfbdb2424739d7728077779c8f9e2e6c9b
4
- data.tar.gz: 48b509fa0a9d77c1c4ab2b1eed7f0a8a9250570d
3
+ metadata.gz: 6c71006d185a5f9de04c445828b374b1d8c6c993
4
+ data.tar.gz: 7d2d344ad8715f440332ac1804020d9d75cd92b9
5
5
  SHA512:
6
- metadata.gz: d94e6b91f7da0d192a648db075d56f2611425934d48002fa7faf0bcb24e5d0ef6184ad34805f4ff853431486b5d2d558df2ce67106ac90000ca560efa6701009
7
- data.tar.gz: af47cba36e8bbc3a7bb71fe5d30d261b665e8078e6965ccaefb48122660e5c68734ffab7e9eb3b752a9c353e757b96126c3ec15e02b80df3da5b78a2df74d837
6
+ metadata.gz: 7ee25ec4902ac2304547a5278d3ebe7dce5801a6ec1b0b128c46ff3ed9b642abc0518665e941f3c10e79fc07b5d5a5dc19e99a1359cd4fde504c249c0554dbc2
7
+ data.tar.gz: 4258ed45790bfe5b8ea55100e5f0797dd043eae96210aa49c951fb4dcc6540846d99b56e02591e0ea4946120378c0f226a60d3483cc7aea7dbd917418c774e4f
@@ -8,19 +8,22 @@ module Pdflatex
8
8
  path_to_latex_file = File.expand_path(latex_file)
9
9
  expanded_output_path = File.expand_path(output_path)
10
10
 
11
- `docker run --rm -v #{path_to_latex_file}:/home/latex/compile.tex -v #{expanded_output_path}:/home/latex/out swissdrg/pdflatex`
11
+ output = `docker run --rm -v #{path_to_latex_file}:/home/latex/compile.tex -v #{expanded_output_path}:/home/latex/out swissdrg/pdflatex`
12
12
 
13
- # remove auxilary files
14
- %w(aux fdb_latexmk fls log).each do |ext|
15
- Dir.glob(File.join(expanded_output_path, "*.#{ext}")).each { |file| File.delete(file) }
16
- end
13
+ if $?.success?
14
+ # remove auxilary files
15
+ %w(aux fdb_latexmk fls log).each do |ext|
16
+ Dir.glob(File.join(expanded_output_path, "*.#{ext}")).each { |file| File.delete(file) }
17
+ end
18
+
19
+ # rename pdf back to original file name
20
+ orig_file_name = File.basename(path_to_latex_file, '.*')
21
+ pdf_file = File.join(expanded_output_path, 'compile.pdf')
17
22
 
18
- # rename pdf back to original file name
19
- orig_file_name = File.basename(path_to_latex_file, '.*')
20
- pdf_file = File.join(expanded_output_path, 'compile.pdf')
23
+ File.rename(pdf_file, File.join(expanded_output_path, "#{orig_file_name}.pdf"))
24
+ end
21
25
 
22
- File.rename(pdf_file, File.join(expanded_output_path, "#{orig_file_name}.pdf"))
23
- true
26
+ output
24
27
  end
25
28
 
26
29
  end
@@ -1,3 +1,3 @@
1
1
  module Pdflatex
2
- VERSION = "0.1.1".freeze
2
+ VERSION = "0.1.3".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdflatex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Urs Gerber