docsplit 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/docsplit.gemspec +1 -1
- data/lib/docsplit.rb +2 -2
- metadata +2 -2
data/docsplit.gemspec
CHANGED
data/lib/docsplit.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# The Docsplit module delegates to the Java PDF extractors.
|
2
2
|
module Docsplit
|
3
3
|
|
4
|
-
VERSION = '0.6.
|
4
|
+
VERSION = '0.6.2' # Keep in sync with gemspec.
|
5
5
|
|
6
6
|
ROOT = File.expand_path(File.dirname(__FILE__) + '/..')
|
7
7
|
|
@@ -68,7 +68,7 @@ module Docsplit
|
|
68
68
|
basename = File.basename(doc, ext)
|
69
69
|
escaped_doc, escaped_out, escaped_basename = [doc, out, basename].map(&ESCAPE)
|
70
70
|
|
71
|
-
if GM_FORMATS.include?(`file -b --mime #{doc}`.strip.split(/[:;]\s+/)[0])
|
71
|
+
if GM_FORMATS.include?(`file -b --mime #{ESCAPE[doc]]}`.strip.split(/[:;]\s+/)[0])
|
72
72
|
`gm convert #{escaped_doc} #{escaped_out}/#{escaped_basename}.pdf`
|
73
73
|
else
|
74
74
|
options = "-jar #{ROOT}/vendor/jodconverter/jodconverter-core-3.0-beta-4.jar -r #{ROOT}/vendor/conf/document-formats.js"
|