rghost 0.8.7.6 → 0.8.7.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rghost/ruby_ghost_config.rb +9 -8
- data/lib/rghost/ruby_ghost_engine.rb +1 -1
- metadata +27 -44
@@ -1,5 +1,4 @@
|
|
1
1
|
require "rghost/ps_object"
|
2
|
-
require 'iconv'
|
3
2
|
require 'rghost/font_map'
|
4
3
|
|
5
4
|
#Rghost setup with Ghostscript.
|
@@ -70,19 +69,20 @@ module RGhost::Config
|
|
70
69
|
:default_params=> %w(gs -dNOPAUSE -dBATCH -dQUIET -dNOPAGEPROMPT),
|
71
70
|
:stack_elements => 5000,
|
72
71
|
:font_encoding => :IsoLatin,
|
73
|
-
:charset_convert =>
|
74
|
-
|
72
|
+
:charset_convert => begin
|
73
|
+
if RUBY_VERSION =~ /^1.9/
|
74
|
+
lambda { |text| text.encode('ISO-8859-1', 'UTF-8') }
|
75
|
+
else
|
76
|
+
require 'iconv'
|
77
|
+
lambda { |text| Iconv::iconv('latin1','utf-8', text).join }
|
78
|
+
end
|
79
|
+
end,
|
75
80
|
:external_encoding => nil,
|
76
81
|
:fontsize => 8,
|
77
82
|
:unit => RGhost::Units::Cm
|
78
83
|
}
|
79
84
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
85
|
def self.config_platform #:nodoc:
|
85
|
-
|
86
86
|
const= 'PLATFORM'
|
87
87
|
const = "RUBY_"+const if RUBY_VERSION =~ /^1.9/
|
88
88
|
GS[:path]=case Object.const_get(const)
|
@@ -94,6 +94,7 @@ module RGhost::Config
|
|
94
94
|
not_found_msg="\nGhostscript not found in your environment.\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"
|
95
95
|
raise not_found_msg unless (File.exists? GS[:path])
|
96
96
|
end
|
97
|
+
|
97
98
|
#Test if your environment is ready to works. If yes the page below will show.
|
98
99
|
#
|
99
100
|
#link:images/is_ok.png
|
@@ -33,7 +33,7 @@ class RGhost::Engine
|
|
33
33
|
file_err="#{tmp_filename}.rgerr"
|
34
34
|
|
35
35
|
multipage=@options[:multipage]
|
36
|
-
file_out.gsub!(
|
36
|
+
file_out.gsub!(/^(.*)\./,'\1_%04d.') if multipage
|
37
37
|
|
38
38
|
params=RGhost::Config::GS[:default_params].dup #default parameters gs engine
|
39
39
|
params << @document.additional_params.join(" ") unless @options[:convert]
|
metadata
CHANGED
@@ -1,34 +1,24 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rghost
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.8.7.7
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 8
|
9
|
-
- 7
|
10
|
-
- 6
|
11
|
-
version: 0.8.7.6
|
12
6
|
platform: ruby
|
13
|
-
authors:
|
7
|
+
authors:
|
14
8
|
- Shairon Toledo
|
15
9
|
autorequire:
|
16
10
|
bindir: bin
|
17
11
|
cert_chain: []
|
18
|
-
|
19
|
-
date: 2011-06-07 00:00:00 -03:00
|
20
|
-
default_executable:
|
12
|
+
date: 2012-04-19 00:00:00.000000000 Z
|
21
13
|
dependencies: []
|
22
|
-
|
23
|
-
|
14
|
+
description: Ruby Ghostscript Engine is a document creation and conversion API, support(PDF,PS,GIF,TIF,PNG,JPG...).
|
15
|
+
It uses the GhostScript framework for the format conversion, utilizes EPS templates
|
16
|
+
and is optimized to work with larger documents.
|
24
17
|
email: shairon.toledo@gmail.com
|
25
18
|
executables: []
|
26
|
-
|
27
19
|
extensions: []
|
28
|
-
|
29
20
|
extra_rdoc_files: []
|
30
|
-
|
31
|
-
files:
|
21
|
+
files:
|
32
22
|
- lib/rghost/border.rb
|
33
23
|
- lib/rghost/callback.rb
|
34
24
|
- lib/rghost/circle.rb
|
@@ -160,39 +150,32 @@ files:
|
|
160
150
|
- lib/rghost/vertical_line.rb
|
161
151
|
- lib/rghost/virtual_pages.rb
|
162
152
|
- lib/rghost.rb
|
163
|
-
has_rdoc: true
|
164
153
|
homepage: http://rghost.rubyforge.org
|
165
154
|
licenses: []
|
166
|
-
|
167
155
|
post_install_message:
|
168
156
|
rdoc_options: []
|
169
|
-
|
170
|
-
require_paths:
|
157
|
+
require_paths:
|
171
158
|
- lib
|
172
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
159
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
173
160
|
none: false
|
174
|
-
requirements:
|
175
|
-
- -
|
176
|
-
- !ruby/object:Gem::Version
|
177
|
-
|
178
|
-
|
179
|
-
- 0
|
180
|
-
version: "0"
|
181
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
|
+
requirements:
|
162
|
+
- - ! '>='
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '0'
|
165
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
182
166
|
none: false
|
183
|
-
requirements:
|
184
|
-
- -
|
185
|
-
- !ruby/object:Gem::Version
|
186
|
-
|
187
|
-
segments:
|
188
|
-
- 0
|
189
|
-
version: "0"
|
167
|
+
requirements:
|
168
|
+
- - ! '>='
|
169
|
+
- !ruby/object:Gem::Version
|
170
|
+
version: '0'
|
190
171
|
requirements: []
|
191
|
-
|
192
|
-
|
193
|
-
|
172
|
+
rubyforge_project: Ruby Ghostscript Engine is a document creation and conversion API,
|
173
|
+
support(PDF,PS,GIF,TIF,PNG,JPG...). It uses the GhostScript framework for the format
|
174
|
+
conversion, utilizes EPS templates and is optimized to work with larger documents.
|
175
|
+
rubygems_version: 1.8.17
|
194
176
|
signing_key:
|
195
177
|
specification_version: 3
|
196
|
-
summary: Ruby Ghostscript Engine is a document creation and conversion API, support(PDF,PS,GIF,TIF,PNG,JPG...).
|
178
|
+
summary: Ruby Ghostscript Engine is a document creation and conversion API, support(PDF,PS,GIF,TIF,PNG,JPG...).
|
179
|
+
It uses the GhostScript framework for the format conversion, utilizes EPS templates
|
180
|
+
and is optimized to work with larger documents.
|
197
181
|
test_files: []
|
198
|
-
|