rghost 0.9.7 → 0.9.8

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: 4a13b5e2e99e0b48b7beec30296c2e578f23991bf3de4b2ac0cd87afe87fac10
4
- data.tar.gz: 65db7916b2a0dc94383fdefbc8c6555fe40e0f38f4f983c8b8afd1d6c6497b50
3
+ metadata.gz: 19399799fab0577cd7192fd7c08c030acc1cbce6a237d81158555b1bc71b3a8a
4
+ data.tar.gz: a8e7c939a8f5cd63d5a62096711bc4d947ec6deea1d9d0d6d4275d75f08ee0e1
5
5
  SHA512:
6
- metadata.gz: bb42950761acc59d41f8cfc6e0e65528c1ff020d1fc871283fe8300594495056b25241caf4200b2c22ff5144966a1ad1b0188efc913b7b5432be8ffddbaa9aa1
7
- data.tar.gz: b6c37359954906b8486680fce4222c1ee3baeaac8349549c0b0d9e94dd52fc2c078d5b741538ffd68a3445906cd28543f066059222e3c2c3ffa5114a979c034f
6
+ metadata.gz: '092afe79c88d1a74538ed47f4894297f153ed45ad9f90c2f744776cab6c717bd30d69cbf7eb94e41122becd93d495f74fb06d78a7bbcc2a606aba014d41f4490'
7
+ data.tar.gz: 851f4c27ac2cc91577d7bda43ceea0af49524f0dfb8941db3d6d97a27d9558c03c00db8cf5c4f7bed528939415e7353f95a3e5b425b3ea3012d160f18c1fcf8b
@@ -8,8 +8,8 @@ class RGhost::GSAlone #:nodoc:
8
8
 
9
9
  def run
10
10
  cmd=@params.join(" ")
11
- #puts File.exists?(RGhost::Config::GS[:path].to_s)
12
- unless File.exists?(RGhost::Config::GS[:path].to_s)
11
+ #puts File.exist?(RGhost::Config::GS[:path].to_s)
12
+ unless File.exist?(RGhost::Config::GS[:path].to_s)
13
13
  RGhost::Config.config_platform
14
14
  end
15
15
  r=system(RGhost::Config::GS[:path]+cmd)
@@ -85,7 +85,7 @@ module RGhost::Config
85
85
  else ''
86
86
  end
87
87
  not_found_msg="\nGhostscript not found in your system environment (#{RbConfig::CONFIG['host_os']}).\nInstall it and set the variable RGhost::Config::GS[:path] with the executable.\nExample: RGhost::Config::GS[:path]='/path/to/my/gs' #unix-style\n RGhost::Config::GS[:path]=\"C:\\\\gs\\\\bin\\\\gswin32c.exe\" #windows-style\n"
88
- raise not_found_msg unless (File.exists? GS[:path])
88
+ raise not_found_msg unless (File.exist? GS[:path])
89
89
  end
90
90
 
91
91
  #Test if your environment is ready to works. If yes the page below will show.
@@ -52,9 +52,11 @@ class RGhost::Engine
52
52
  params << "-sstdout=#{shellescape(file_err)}"
53
53
  params << "-sOutputFile=#{shellescape(file_out)}"
54
54
  params << @options[:raw] if @options[:raw]
55
+
56
+
55
57
  case @document
56
58
  when RGhost::Document
57
- file_in = shellescape("#{tmp_filename}.rgin")
59
+ file_in="#{tmp_filename}.rgin"
58
60
  params.concat @document.gs_paper
59
61
  mode=external_encoding.nil? ? 'w' : "w:#{external_encoding}"
60
62
  fi=File.open(file_in,mode)
@@ -64,14 +66,12 @@ class RGhost::Engine
64
66
  file_in=@document.path
65
67
  #@delete_input=false unless @options[:debug]
66
68
  when String
67
- file_in = shellescape(@document)
68
- when Array
69
- file_in = @document.map{|d| shellescape(d) }.join(' ')
69
+ file_in=@document
70
70
  else
71
71
  raise RuntimeError.new("Cannot convert #{@document.class}. Supported classes are RGhost::Document or File or String.")
72
72
  end
73
73
 
74
- params << file_in
74
+ params << shellescape(file_in)
75
75
 
76
76
  if RGhost::Config::GS[:mode] == :gslib
77
77
  require "rghost/rgengine"
@@ -84,7 +84,7 @@ class RGhost::Engine
84
84
  end
85
85
 
86
86
  if @error # if error
87
- @errors=File.open(file_err).readlines if File.exists?(file_err)
87
+ @errors=File.open(file_err).readlines if File.exist?(file_err)
88
88
  raise RGhost::RenderException.new(@errors.join(" ")) if RGhost::Config::GS[:raise_on_error]
89
89
  else
90
90
  if multipage
@@ -1,8 +1,8 @@
1
1
  module RGhost::VERSION #:nodoc:
2
2
  MAJOR = 0
3
- MINOR = 9
3
+ MINOR = 8
4
4
  TINY = 7
5
5
  DATE=1244286414
6
6
  STRING = [MAJOR, MINOR, TINY].join('.')
7
-
7
+
8
8
  end
data/lib/rghost.rb CHANGED
@@ -12,8 +12,7 @@ require 'rghost/variable'
12
12
  require 'rghost/ps_facade'
13
13
  require 'rghost/function'
14
14
  require 'rghost/document'
15
- require 'rghost/merge_pdfs'
16
- require 'rghost/grid/grid'
15
+ require 'rghost/grid/grid'
17
16
  RGhost::Config::GS[:PATH]="/opt/local/bin/gs"
18
17
 
19
18
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rghost
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.7
4
+ version: 0.9.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shairon Toledo
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-11 00:00:00.000000000 Z
11
+ date: 2023-01-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby Ghostscript Engine is a document creation and conversion API, support(PDF,PS,GIF,TIF,PNG,JPG...).
14
14
  It uses the GhostScript framework for the format conversion, utilizes EPS templates
@@ -61,7 +61,6 @@ files:
61
61
  - lib/rghost/line.rb
62
62
  - lib/rghost/line_width.rb
63
63
  - lib/rghost/load.rb
64
- - lib/rghost/merge_pdfs.rb
65
64
  - lib/rghost/newpath.rb
66
65
  - lib/rghost/paper.rb
67
66
  - lib/rghost/parse_text.rb
@@ -152,7 +151,7 @@ files:
152
151
  homepage: http://rghost.rubyforge.org
153
152
  licenses: []
154
153
  metadata: {}
155
- post_install_message:
154
+ post_install_message:
156
155
  rdoc_options: []
157
156
  require_paths:
158
157
  - lib
@@ -167,8 +166,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
166
  - !ruby/object:Gem::Version
168
167
  version: '0'
169
168
  requirements: []
170
- rubygems_version: 3.0.4
171
- signing_key:
169
+ rubygems_version: 3.2.32
170
+ signing_key:
172
171
  specification_version: 4
173
172
  summary: Ruby Ghostscript Engine is a document creation and conversion API, support(PDF,PS,GIF,TIF,PNG,JPG...).
174
173
  test_files: []
@@ -1,12 +0,0 @@
1
- class RGhost::MergePdfs
2
- attr_reader :error, :errors
3
- DEFAULT_OPTIONS = { :convert => true }
4
-
5
- def self.merge(pdfs, options={})
6
- rge = RGhost::Engine.new(pdfs,DEFAULT_OPTIONS.merge(options))
7
- out = rge.render(:pdf)
8
- @error = rge.error
9
- @errors = rge.errors
10
- out
11
- end
12
- end