1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
Description: redefine BASEDIR and DATADIR
Author: Cédric Boutillier <boutil@debian.org>
Last-Update: 2019-01-07
--- a/lib/prawn.rb
+++ b/lib/prawn.rb
@@ -17,7 +17,9 @@
#
#
BASEDIR = File.expand_path(File.join(dir, '..'))
- DATADIR = File.expand_path(File.join(dir, '..', 'data'))
+ # Definition of a data directory that may be not in BASEDIR/data (Debian patch)
+ # /usr/lib/ruby/vendor_ruby/prawn -> /usr/share/ruby-prawn/
+ DATADIR = File.expand_path(File.join(dir, '..', '..', '..', 'share', 'ruby-prawn'))
FLOAT_PRECISION = 1.0e-9
--- a/spec/prawn/images/png_spec.rb
+++ b/spec/prawn/images/png_spec.rb
@@ -11,7 +11,7 @@
describe Prawn::Images::PNG do
describe 'When making a pdf file with png images' do
- image_dir = "#{Prawn::BASEDIR}/data/images"
+ image_dir = "#{Prawn::DATADIR}/images"
images = [
['Type 0', "#{image_dir}/web-links.png"],
['Type 0 with transparency', "#{image_dir}/ruport_type0.png"],
|