iguvium 0.8.1 → 0.8.2

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
  SHA256:
3
- metadata.gz: f3c9f4727d6069408bb795a4754c1b3f7098a997b7b6b47a9e114c4c04602f17
4
- data.tar.gz: f7490d4f57e2e845740713cddff88fd558070f7ab4481598bf08fc504c33802c
3
+ metadata.gz: b453936d07d4aea3f6eb682ba90f6c6642f83520b14462b8c46a254c6dc538f7
4
+ data.tar.gz: 27fc73360191edbb1185a073d6cf4b644455af682764ff8f2cdbaeb9a5b1b973
5
5
  SHA512:
6
- metadata.gz: b973456ea806aef36d4b8328ae2740f624e31bf169d4861d0c6e095133a2fe33e41780e11830c4f891b2d72204873e20225575130e59f5ab55fe6e496a9c0c45
7
- data.tar.gz: 218edd15c127f9d705759d1f32dbedbcd68615d1c4d77d4ca8e63b0d0d12801c759444cc4d4967c81e3cc4d88b4a90fb76792794d69b29a25395561bc78eaf0e
6
+ metadata.gz: de9c944ba0504a9c8bc4badcfe2bee974cc5244111999f0109939009fdbb9c167962a51a17e181763138b04909d01c1f2ccfff8a3317ebab1cd9bf1b6e26e9e6
7
+ data.tar.gz: 7edeb83865b934edd01d509d0024241f6dacf727394d2b72077ff9c0e02189fdae7f1b81fcca961602ab8d2bcf42fa3fb9657bf627ce1ccdd2b2649d01ee97bf
data/lib/iguvium.rb CHANGED
@@ -7,6 +7,7 @@ require 'matrix'
7
7
  require 'oily_png'
8
8
  require 'pdf-reader'
9
9
  require 'rbconfig'
10
+ require 'shellwords'
10
11
 
11
12
  require_relative 'iguvium/labeler'
12
13
  require_relative 'iguvium/cv'
data/lib/iguvium/image.rb CHANGED
@@ -15,10 +15,11 @@ module Iguvium
15
15
  #
16
16
  # @return [ChunkyPNG::Image]
17
17
  def self.read(path, pagenumber = 1, **opts)
18
+ puts path.shellescape
18
19
  rgb = path.gsub(/\.pdf$/, '.rgb')
19
20
  Iguvium.logger.info `#{opts[:gspath]} -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pnggray -dGraphicsAlphaBits=4 \
20
21
  -r72 -dFirstPage=#{pagenumber} -dLastPage=#{pagenumber} \
21
- -dFILTERTEXT #{'-dFILTERIMAGE' unless opts[:images]} -sOutputFile=#{rgb} #{path} 2>&1`
22
+ -dFILTERTEXT #{'-dFILTERIMAGE' unless opts[:images]} -sOutputFile=#{rgb.shellescape} #{path.shellescape} 2>&1`
22
23
 
23
24
  image = ChunkyPNG::Image.from_file(rgb)
24
25
  File.delete rgb
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Iguvium
4
- VERSION = '0.8.1'
4
+ VERSION = '0.8.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iguvium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dima Ermilov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-20 00:00:00.000000000 Z
11
+ date: 2018-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pdf-reader