[DRE-commits] [ruby-prawn] 02/05: Refresh patches
Cédric Boutillier
boutil at moszumanska.debian.org
Fri Jul 24 20:15:27 UTC 2015
This is an automated email from the git hooks/post-receive script.
boutil pushed a commit to branch master
in repository ruby-prawn.
commit 9403c90ed0ce2eee8df33ffbc4063067c4bec3c4
Author: Cédric Boutillier <boutil at debian.org>
Date: Fri Jul 24 20:24:22 2015 +0200
Refresh patches
---
.../0200_replace_BASEDIR_data_by_DATADIR.patch | 22 ++---
debian/patches/0300_fix_paths.patch | 8 +-
debian/patches/0400_use_system_fonts.patch | 104 ++++++++++-----------
debian/patches/0405_use_system_fonts_manual.patch | 16 ++--
.../0500_disable_tests_using_removed_files.patch | 81 ++++++++--------
...00_enable_manual_to_be_built_reproducibly.patch | 40 ++++----
6 files changed, 135 insertions(+), 136 deletions(-)
diff --git a/debian/patches/0200_replace_BASEDIR_data_by_DATADIR.patch b/debian/patches/0200_replace_BASEDIR_data_by_DATADIR.patch
index 7d6d267..438d9c4 100644
--- a/debian/patches/0200_replace_BASEDIR_data_by_DATADIR.patch
+++ b/debian/patches/0200_replace_BASEDIR_data_by_DATADIR.patch
@@ -1,6 +1,6 @@
Description: redefine BASEDIR and DATADIR
Author: Cédric Boutillier <boutil at debian.org>
-Last-Update: 2014-09-28
+Last-Update: 2015-07-24
--- a/lib/prawn.rb
+++ b/lib/prawn.rb
@@ -21,16 +21,16 @@ Last-Update: 2014-09-28
require_relative "../../lib/prawn"
images = [
-- ["Type 0", "#{Prawn::BASEDIR}/data/images/web-links.png"],
-- ["Type 2", "#{Prawn::BASEDIR}/data/images/ruport.png"],
-- ["Type 3", "#{Prawn::BASEDIR}/data/images/indexed_color.png"],
-- ["Type 4", "#{Prawn::BASEDIR}/data/images/page_white_text.png"],
-- ["Type 6", "#{Prawn::BASEDIR}/data/images/dice.png"],
-+ ["Type 0", "#{Prawn::DATADIR}/images/web-links.png"],
-+ ["Type 2", "#{Prawn::DATADIR}/images/ruport.png"],
-+ ["Type 3", "#{Prawn::DATADIR}/images/indexed_color.png"],
-+ ["Type 4", "#{Prawn::DATADIR}/images/page_white_text.png"],
-+ ["Type 6", "#{Prawn::DATADIR}/images/dice.png"],
+- ["Type 0", "#{Prawn::BASEDIR}/data/images/web-links.png"],
+- ["Type 2", "#{Prawn::BASEDIR}/data/images/ruport.png"],
+- ["Type 3", "#{Prawn::BASEDIR}/data/images/indexed_color.png"],
+- ["Type 4", "#{Prawn::BASEDIR}/data/images/page_white_text.png"],
+- ["Type 6", "#{Prawn::BASEDIR}/data/images/dice.png"]
++ ["Type 0", "#{Prawn::DATADIR}/images/web-links.png"],
++ ["Type 2", "#{Prawn::DATADIR}/images/ruport.png"],
++ ["Type 3", "#{Prawn::DATADIR}/images/indexed_color.png"],
++ ["Type 4", "#{Prawn::DATADIR}/images/page_white_text.png"],
++ ["Type 6", "#{Prawn::DATADIR}/images/dice.png"]
]
Prawn::Document.generate("png_types.pdf", :page_size => "A5") do
diff --git a/debian/patches/0300_fix_paths.patch b/debian/patches/0300_fix_paths.patch
index ba1c619..5482499 100644
--- a/debian/patches/0300_fix_paths.patch
+++ b/debian/patches/0300_fix_paths.patch
@@ -1,10 +1,10 @@
Description: fix fonts path to use only prawn's fonts directory
Author: Cédric Boutillier <boutil at debian.org>
-Last-Update: 2015-04-29
+Last-Update: 2015-07-24
--- a/lib/prawn/font/afm.rb
+++ b/lib/prawn/font/afm.rb
-@@ -34,9 +34,7 @@
+@@ -33,9 +33,7 @@
@metrics_path ||= m.split(':')
else
@metrics_path ||= [
@@ -12,6 +12,6 @@ Last-Update: 2015-04-29
- "/usr/local/lib/afm",
- "/usr/openwin/lib/fonts/afm",
+ # use Prawn's font directories (Debian patch)
- Prawn::DATADIR+'/fonts']
+ Prawn::DATADIR + '/fonts'
+ ]
end
- end
diff --git a/debian/patches/0400_use_system_fonts.patch b/debian/patches/0400_use_system_fonts.patch
index 6aa0b0d..888bd34 100644
--- a/debian/patches/0400_use_system_fonts.patch
+++ b/debian/patches/0400_use_system_fonts.patch
@@ -3,7 +3,7 @@ Description: use system fonts when possible
available in Debian. These copies have been removed from the Debian source
package, and system fonts are used instead.
Author: Cédric Boutillier <boutil at debian.org>
-Last-Update: 2015-04-29
+Last-Update: 2015-07-25
--- a/spec/line_wrap_spec.rb
+++ b/spec/line_wrap_spec.rb
@@ -27,7 +27,7 @@ Last-Update: 2015-04-29
string = @line_wrap.wrap_line(:arranger => @arranger,
@@ -116,7 +116,7 @@
expected.force_encoding(Encoding::UTF_8)
- string.should == expected
+ expect(string).to eq(expected)
- @pdf.font("#{Prawn::DATADIR}/fonts/DejaVuSans.ttf")
+ @pdf.font("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf")
@@ -36,7 +36,7 @@ Last-Update: 2015-04-29
string = "hello#{Prawn::Text::SHY}world"
@@ -154,7 +154,7 @@
- it "should not display soft hyphens except at the end of a line " +
+ it "should not display soft hyphens except at the end of a line " \
"for more than one element in format_array", :issue => 347 do
- @pdf.font("#{Prawn::DATADIR}/fonts/DejaVuSans.ttf")
+ @pdf.font("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf")
@@ -45,7 +45,7 @@ Last-Update: 2015-04-29
string1 = @pdf.font.normalize_encoding("hello#{Prawn::Text::SHY}world ")
@@ -184,7 +184,7 @@
:document => @pdf)
- string.should == "hello"
+ expect(string).to eq("hello")
- @pdf.font("#{Prawn::DATADIR}/fonts/DejaVuSans.ttf")
+ @pdf.font("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf")
@@ -54,7 +54,7 @@ Last-Update: 2015-04-29
@@ -223,7 +223,7 @@
expected.force_encoding(Encoding::UTF_8)
- string.should == expected
+ expect(string).to eq(expected)
- @pdf.font("#{Prawn::DATADIR}/fonts/DejaVuSans.ttf")
+ @pdf.font("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf")
@@ -63,7 +63,7 @@ Last-Update: 2015-04-29
string = "hello#{Prawn::Text::SHY}-"
--- a/spec/text_spec.rb
+++ b/spec/text_spec.rb
-@@ -257,7 +257,7 @@
+@@ -253,7 +253,7 @@
end
it "should_not raise_error an exception when providing Pathname instance as font" do
@@ -72,7 +72,7 @@ Last-Update: 2015-04-29
end
it "should correctly render a utf-8 string when using a built-in font" do
-@@ -271,7 +271,7 @@
+@@ -267,7 +267,7 @@
it "should correctly render a utf-8 string when using a TTF font" do
str = "©" # copyright symbol
@@ -81,16 +81,16 @@ Last-Update: 2015-04-29
@pdf.text str
# grab the text from the rendered PDF and ensure it matches
-@@ -282,7 +282,7 @@
- it "subsets mixed low-ASCII and non-ASCII characters when they can be " +
- "subsetted together" do
+@@ -277,7 +277,7 @@
+
+ it "subsets mixed low-ASCII and non-ASCII characters when they can be subsetted together" do
str = "It’s super effective!"
- @pdf.font "#{Prawn::DATADIR}/fonts/DejaVuSans.ttf"
+ @pdf.font "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"
@pdf.text str
text = PDF::Inspector::Text.analyze(@pdf.render)
-@@ -322,7 +322,7 @@
+@@ -316,7 +316,7 @@
it "should_not raise_error an exception when a shift-jis string is rendered" do
datafile = "#{Prawn::DATADIR}/shift_jis_text.txt"
sjis_str = File.open(datafile, "r:shift_jis") { |f| f.gets }
@@ -99,15 +99,15 @@ Last-Update: 2015-04-29
# Expect that the call to text will not raise an encoding error
@pdf.text(sjis_str)
-@@ -526,7 +526,7 @@
-
+@@ -517,7 +517,7 @@
+ end
def add_unicode_fonts(pdf)
- dejavu = "#{::Prawn::BASEDIR}/data/fonts/DejaVuSans.ttf"
+ dejavu = "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"
- pdf.font_families.update("dejavu" => {
- :normal => dejavu,
- :italic => dejavu,
+ pdf.font_families.update(
+ "dejavu" => {
+ :normal => dejavu,
--- a/spec/text_spacing_spec.rb
+++ b/spec/text_spacing_spec.rb
@@ -42,7 +42,7 @@
@@ -130,7 +130,7 @@ Last-Update: 2015-04-29
@pdf.font_families["Kai"] = {
:normal => { :file => file, :font => "Kai" }
-@@ -87,7 +87,7 @@
+@@ -89,7 +89,7 @@
"a Chinese font and set of Chinese glyphs not in the current font" do
it "should change the font to the Chinese font for the Chinese glyphs" do
create_pdf
@@ -139,7 +139,7 @@ Last-Update: 2015-04-29
@pdf.font_families["Kai"] = {
:normal => { :file => file, :font => "Kai" }
}
-@@ -115,7 +115,7 @@
+@@ -117,7 +117,7 @@
"an AFM font and Win-Ansi glyph not in the current Chinese font" do
it "should change the font to the AFM font for the Win-Ansi glyph" do
create_pdf
@@ -148,7 +148,7 @@ Last-Update: 2015-04-29
@pdf.font_families["Kai"] = {
:normal => { :file => file, :font => "Kai" }
}
-@@ -144,7 +144,7 @@
+@@ -146,7 +146,7 @@
"level font" do
it "should use the fragment level font except for glyphs not in that font" do
create_pdf
@@ -157,7 +157,7 @@ Last-Update: 2015-04-29
@pdf.font_families["Kai"] = {
:normal => { :file => file, :font => "Kai" }
}
-@@ -177,7 +177,7 @@
+@@ -179,7 +179,7 @@
describe "Text::Formatted::Box" do
before(:each) do
create_pdf
@@ -167,33 +167,33 @@ Last-Update: 2015-04-29
:normal => { :file => file, :font => "Kai" }
}
@@ -244,7 +244,7 @@
+ describe "Text::Formatted::Box with :fallback_fonts option " \
"with glyphs not in the primary or the fallback fonts" do
-
it "should raise an exception" do
-- file = "#{Prawn::DATADIR}/fonts/gkai00mp.ttf"
-+ file = "/usr/share/fonts/truetype/arphic-gkai00mp/gkai00mp.ttf"
+- file = "#{Prawn::DATADIR}/fonts/gkai00mp.ttf"
++ file = "/usr/share/fonts/truetype/arphic-gkai00mp/gkai00mp.ttf"
create_pdf
formatted_text = [{ :text => "hello world. 世界你好。" }]
--- a/spec/font_spec.rb
+++ b/spec/font_spec.rb
-@@ -50,7 +50,7 @@
+@@ -46,7 +46,7 @@
it "should exclude newlines" do
create_pdf
# Use a TTF font that has a non-zero width for \n
- @pdf.font("#{Prawn::DATADIR}/fonts/gkai00mp.ttf")
+ @pdf.font("/usr/share/fonts/truetype/arphic-gkai00mp/gkai00mp.ttf")
- @pdf.width_of("\nhello world\n").should ==
+ expect(@pdf.width_of("\nhello world\n")).to eq(
@pdf.width_of("hello world")
-@@ -85,8 +85,8 @@
+@@ -82,8 +82,8 @@
@pdf.font_families.update(
'DejaVu Sans' => {
- :normal => "#{Prawn::DATADIR}/fonts/DejaVuSans.ttf",
-- :bold => "#{Prawn::DATADIR}/fonts/DejaVuSans-Bold.ttf",
+- :bold => "#{Prawn::DATADIR}/fonts/DejaVuSans-Bold.ttf"
+ :normal => "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf",
-+ :bold => "/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf",
++ :bold => "/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf"
}
)
@pdf.font("DejaVu Sans") {
@@ -201,8 +201,8 @@ Last-Update: 2015-04-29
end
it "should accept Pathname objects for font files" do
-- file = Pathname.new( "#{Prawn::DATADIR}/fonts/DejaVuSans.ttf" )
-+ file = Pathname.new( "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf" )
+- file = Pathname.new("#{Prawn::DATADIR}/fonts/DejaVuSans.ttf")
++ file = Pathname.new("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf")
@pdf.font_families["DejaVu Sans"] = {
:normal => file
}
@@ -215,27 +215,27 @@ Last-Update: 2015-04-29
@pdf.font_families["DejaVu Sans"] = {
normal: Prawn::Font.load(@pdf, io)
}
-@@ -341,15 +341,15 @@
+@@ -344,15 +344,15 @@
end
it "should return true when present in a TTF font" do
- font = @pdf.find_font("#{Prawn::DATADIR}/fonts/DejaVuSans.ttf")
+ font = @pdf.find_font("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf")
- font.glyph_present?("H").should be_true
+ expect(font.glyph_present?("H")).to be_true
end
it "should return false when absent in a TTF font" do
- font = @pdf.find_font("#{Prawn::DATADIR}/fonts/DejaVuSans.ttf")
+ font = @pdf.find_font("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf")
- font.glyph_present?("再").should be_false
+ expect(font.glyph_present?("再")).to be_false
- font = @pdf.find_font("#{Prawn::DATADIR}/fonts/gkai00mp.ttf")
+ font = @pdf.find_font("/usr/share/fonts/truetype/arphic-gkai00mp/gkai00mp.ttf")
- font.glyph_present?("€").should be_false
+ expect(font.glyph_present?("€")).to be_false
end
end
-@@ -358,7 +358,7 @@
-
+@@ -360,7 +360,7 @@
+ describe "TTF fonts" do
before do
create_pdf
- @font = @pdf.find_font "#{Prawn::DATADIR}/fonts/DejaVuSans.ttf"
@@ -243,14 +243,14 @@ Last-Update: 2015-04-29
end
it "should calculate string width taking into account accented characters" do
-@@ -462,7 +462,7 @@
+@@ -463,7 +463,7 @@
describe "#character_count(text)" do
it "should work on TTF fonts" do
create_pdf
- @pdf.font("#{Prawn::DATADIR}/fonts/gkai00mp.ttf")
+ @pdf.font("/usr/share/fonts/truetype/arphic-gkai00mp/gkai00mp.ttf")
- @pdf.font.character_count("こんにちは世界").should == 7
- @pdf.font.character_count("Hello, world!").should == 13
+ expect(@pdf.font.character_count("こんにちは世界")).to eq(7)
+ expect(@pdf.font.character_count("Hello, world!")).to eq(13)
end
--- a/spec/text_box_spec.rb
+++ b/spec/text_box_spec.rb
@@ -263,7 +263,7 @@ Last-Update: 2015-04-29
@pdf.text "写个小"
end
text = PDF::Inspector::Text.analyze(@pdf.render)
-@@ -813,7 +813,7 @@
+@@ -811,7 +811,7 @@
:height => 162.0,
:document => @pdf
}
@@ -272,20 +272,9 @@ Last-Update: 2015-04-29
@options[:overflow] = :truncate
text_box = Prawn::Text::Box.new(@text, @options)
text_box.render
---- a/spec/document_spec.rb
-+++ b/spec/document_spec.rb
-@@ -260,7 +260,7 @@
- doc_uncompressed = Prawn::Document.new
- doc_compressed = Prawn::Document.new(:compress => true)
- [doc_compressed, doc_uncompressed].each do |pdf|
-- pdf.font "#{Prawn::DATADIR}/fonts/gkai00mp.ttf"
-+ pdf.font "/usr/share/fonts/truetype/arphic-gkai00mp/gkai00mp.ttf"
- pdf.text "更可怕的是,同质化竞争对手可以按照URL中后面这个ID来遍历" * 10
- end
-
--- a/spec/text_at_spec.rb
+++ b/spec/text_at_spec.rb
-@@ -136,7 +136,7 @@
+@@ -135,7 +135,7 @@
it "should not raise an exception when a shift-jis string is rendered" do
datafile = "#{Prawn::DATADIR}/shift_jis_text.txt"
sjis_str = File.open(datafile, "r:shift_jis") { |f| f.gets }
@@ -294,3 +283,14 @@ Last-Update: 2015-04-29
@pdf.draw_text(sjis_str, :at => [0, 0])
end
+--- a/spec/document_spec.rb
++++ b/spec/document_spec.rb
+@@ -251,7 +251,7 @@
+ doc_uncompressed = Prawn::Document.new
+ doc_compressed = Prawn::Document.new(:compress => true)
+ [doc_compressed, doc_uncompressed].each do |pdf|
+- pdf.font "#{Prawn::DATADIR}/fonts/gkai00mp.ttf"
++ pdf.font "/usr/share/fonts/truetype/arphic-gkai00mp/gkai00mp.ttf"
+ pdf.text "更可怕的是,同质化竞争对手可以按照URL中后面这个ID来遍历" * 10
+ end
+
diff --git a/debian/patches/0405_use_system_fonts_manual.patch b/debian/patches/0405_use_system_fonts_manual.patch
index dd7c34b..78cbd53 100644
--- a/debian/patches/0405_use_system_fonts_manual.patch
+++ b/debian/patches/0405_use_system_fonts_manual.patch
@@ -3,7 +3,7 @@ Description: use system fonts when possible
These copies have been removed from the Debian source package, and system
fonts are used instead.
Author: Cédric Boutillier <boutil at debian.org>
-Last-Update: 2015-04-29
+Last-Update: 2015-07-24
--- a/manual/text/single_usage.rb
+++ b/manual/text/single_usage.rb
@@ -40,15 +40,15 @@ Last-Update: 2015-04-29
move_down 20
--- a/manual/text/registering_families.rb
+++ b/manual/text/registering_families.rb
-@@ -15,7 +15,7 @@
- Prawn::ManualBuilder::Example.generate(filename) do
+@@ -16,7 +16,7 @@
# Registering a single TTF font
- font_families.update("DejaVu Sans" => {
-- :normal => "#{Prawn::DATADIR}/fonts/DejaVuSans.ttf"
-+ :normal => "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"
- })
+ font_families.update(
+ "DejaVu Sans" => {
+- :normal => "#{Prawn::DATADIR}/fonts/DejaVuSans.ttf"
++ :normal => "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"
+ }
+ )
- font("DejaVu Sans") do
--- a/manual/text/utf8.rb
+++ b/manual/text/utf8.rb
@@ -21,7 +21,7 @@
diff --git a/debian/patches/0500_disable_tests_using_removed_files.patch b/debian/patches/0500_disable_tests_using_removed_files.patch
index 33ed13b..ecba64a 100644
--- a/debian/patches/0500_disable_tests_using_removed_files.patch
+++ b/debian/patches/0500_disable_tests_using_removed_files.patch
@@ -3,30 +3,29 @@ Description: disable some specs after removal of some files from the source pack
non-free fonts. These are disabled because they cannot be run since these
files have been removed from the Debian source package.
Author: Cédric Boutillier <boutil at debian.org>
-Last-Update: 2015-04-29
+Last-Update: 2015-07-24
--- a/spec/images_spec.rb
+++ b/spec/images_spec.rb
-@@ -69,21 +69,24 @@
+@@ -68,21 +68,23 @@
end
it "should raise_error an UnsupportedImageType if passed a BMP" do
-+ pending "spec disabled since tru256.bmp removed from source package (Debian patch)"
++ pending "spec disabled since tru256.bmp removed from source package (Debian patch)
filename = "#{Prawn::DATADIR}/images/tru256.bmp"
- lambda { @pdf.image filename, :at => [100,100] }.should raise_error(Prawn::Errors::UnsupportedImageType)
+ expect { @pdf.image filename, :at => [100, 100] }.to raise_error(Prawn::Errors::UnsupportedImageType)
end
it "should raise_error an UnsupportedImageType if passed an interlaced PNG" do
+ pending "spec disabled since dice_interlaced.png removed from source package (Debian patch)"
filename = "#{Prawn::DATADIR}/images/dice_interlaced.png"
- lambda { @pdf.image filename, :at => [100,100] }.should raise_error(Prawn::Errors::UnsupportedImageType)
+ expect { @pdf.image filename, :at => [100, 100] }.to raise_error(Prawn::Errors::UnsupportedImageType)
end
- it "should bump PDF version to 1.5 or greater on embedding 16-bit PNGs" do
+ xit "should bump PDF version to 1.5 or greater on embedding 16-bit PNGs" do
-+ pending "spec disabled since 16bit.png removed from source package (Debian patch)"
@pdf.image "#{Prawn::DATADIR}/images/16bit.png"
- @pdf.state.version.should >= 1.5
+ expect(@pdf.state.version).to be >= 1.5
end
- it "should embed 16-bit alpha channels for 16-bit PNGs" do
@@ -36,7 +35,7 @@ Last-Update: 2015-04-29
output = @pdf.render
--- a/spec/png_spec.rb
+++ b/spec/png_spec.rb
-@@ -17,7 +17,7 @@
+@@ -16,7 +16,7 @@
@img_data = File.binread(@filename)
end
@@ -44,26 +43,26 @@ Last-Update: 2015-04-29
+ xit "should read the attributes from the header chunk correctly" do
png = Prawn::Images::PNG.new(@img_data)
- png.width.should == 21
-@@ -29,7 +29,7 @@
- png.interlace_method.should == 0
+ expect(png.width).to eq(21)
+@@ -28,7 +28,7 @@
+ expect(png.interlace_method).to eq(0)
end
- it "should read the image data chunk correctly" do
+ xit "should read the image data chunk correctly" do
png = Prawn::Images::PNG.new(@img_data)
data = Zlib::Inflate.inflate(File.binread(@data_filename))
- png.img_data.should == data
-@@ -47,7 +47,7 @@
+ expect(png.img_data).to eq(data)
+@@ -45,7 +45,7 @@
# that indicates the color that should be interpreted as transparent.
#
# http://www.w3.org/TR/PNG/#11tRNS
- it "should read the tRNS chunk correctly" do
+ xit "should read the tRNS chunk correctly" do
png = Prawn::Images::PNG.new(@img_data)
- png.transparency[:grayscale].should == 255
+ expect(png.transparency[:grayscale]).to eq(255)
end
-@@ -61,7 +61,7 @@
+@@ -58,7 +58,7 @@
@img_data = File.binread(@filename)
end
@@ -71,26 +70,26 @@ Last-Update: 2015-04-29
+ xit "should read the attributes from the header chunk correctly" do
png = Prawn::Images::PNG.new(@img_data)
- png.width.should == 258
-@@ -73,7 +73,7 @@
- png.interlace_method.should == 0
+ expect(png.width).to eq(258)
+@@ -70,7 +70,7 @@
+ expect(png.interlace_method).to eq(0)
end
- it "should read the image data chunk correctly" do
+ xit "should read the image data chunk correctly" do
png = Prawn::Images::PNG.new(@img_data)
data = Zlib::Inflate.inflate(File.binread(@data_filename))
- png.img_data.should == data
-@@ -92,7 +92,7 @@
+ expect(png.img_data).to eq(data)
+@@ -88,7 +88,7 @@
# case it's green.
#
# http://www.w3.org/TR/PNG/#11tRNS
- it "should read the tRNS chunk correctly" do
+ xit "should read the tRNS chunk correctly" do
png = Prawn::Images::PNG.new(@img_data)
- png.transparency[:rgb].should == [0, 255, 0]
+ expect(png.transparency[:rgb]).to eq([0, 255, 0])
end
-@@ -116,7 +116,7 @@
+@@ -109,7 +109,7 @@
@img_data = File.binread(@filename)
end
@@ -98,17 +97,17 @@ Last-Update: 2015-04-29
+ xit "should read the attributes from the header chunk correctly" do
png = Prawn::Images::PNG.new(@img_data)
- png.width.should == 150
-@@ -128,7 +128,7 @@
- png.interlace_method.should == 0
+ expect(png.width).to eq(150)
+@@ -121,7 +121,7 @@
+ expect(png.interlace_method).to eq(0)
end
- it "should read the image data chunk correctly" do
+ xit "should read the image data chunk correctly" do
png = Prawn::Images::PNG.new(@img_data)
data = Zlib::Inflate.inflate(File.binread(@data_filename))
- png.img_data.should == data
-@@ -144,7 +144,7 @@
+ expect(png.img_data).to eq(data)
+@@ -136,7 +136,7 @@
@img_data = File.binread(@filename)
end
@@ -116,9 +115,9 @@ Last-Update: 2015-04-29
+ xit "should read the attributes from the header chunk correctly" do
png = Prawn::Images::PNG.new(@img_data)
- png.width.should == 16
-@@ -156,14 +156,14 @@
- png.interlace_method.should == 0
+ expect(png.width).to eq(16)
+@@ -148,14 +148,14 @@
+ expect(png.interlace_method).to eq(0)
end
- it "should correctly return the raw image data (with no alpha channel) from the image data chunk" do
@@ -126,7 +125,7 @@ Last-Update: 2015-04-29
png = Prawn::Images::PNG.new(@img_data)
png.split_alpha_channel!
data = File.binread(@color_data_filename)
- png.img_data.should == data
+ expect(png.img_data).to eq(data)
end
- it "should correctly extract the alpha channel data from the image data chunk" do
@@ -134,7 +133,7 @@ Last-Update: 2015-04-29
png = Prawn::Images::PNG.new(@img_data)
png.split_alpha_channel!
data = File.binread(@alpha_data_filename)
-@@ -180,7 +180,7 @@
+@@ -171,7 +171,7 @@
@img_data = File.binread(@filename)
end
@@ -142,9 +141,9 @@ Last-Update: 2015-04-29
+ xit "should read the attributes from the header chunk correctly" do
png = Prawn::Images::PNG.new(@img_data)
- png.width.should == 320
-@@ -192,14 +192,14 @@
- png.interlace_method.should == 0
+ expect(png.width).to eq(320)
+@@ -183,14 +183,14 @@
+ expect(png.interlace_method).to eq(0)
end
- it "should correctly return the raw image data (with no alpha channel) from the image data chunk" do
@@ -152,7 +151,7 @@ Last-Update: 2015-04-29
png = Prawn::Images::PNG.new(@img_data)
png.split_alpha_channel!
data = File.binread(@color_data_filename)
- png.img_data.should == data
+ expect(png.img_data).to eq(data)
end
- it "should correctly extract the alpha channel data from the image data chunk" do
@@ -160,7 +159,7 @@ Last-Update: 2015-04-29
png = Prawn::Images::PNG.new(@img_data)
png.split_alpha_channel!
data = File.binread(@alpha_data_filename)
-@@ -217,7 +217,7 @@
+@@ -207,7 +207,7 @@
@img_data = File.binread(@filename)
end
@@ -168,9 +167,9 @@ Last-Update: 2015-04-29
+ xit "should read the attributes from the header chunk correctly" do
png = Prawn::Images::PNG.new(@img_data)
- png.width.should == 32
-@@ -229,14 +229,14 @@
- png.interlace_method.should == 0
+ expect(png.width).to eq(32)
+@@ -219,14 +219,14 @@
+ expect(png.interlace_method).to eq(0)
end
- it "should correctly return the raw image data (with no alpha channel) from the image data chunk" do
@@ -178,7 +177,7 @@ Last-Update: 2015-04-29
png = Prawn::Images::PNG.new(@img_data)
png.split_alpha_channel!
data = File.binread(@color_data_filename)
- png.img_data.should == data
+ expect(png.img_data).to eq(data)
end
- it "should correctly extract the alpha channel data from the image data chunk" do
diff --git a/debian/patches/0800_enable_manual_to_be_built_reproducibly.patch b/debian/patches/0800_enable_manual_to_be_built_reproducibly.patch
index fc0e137..13aef5c 100644
--- a/debian/patches/0800_enable_manual_to_be_built_reproducibly.patch
+++ b/debian/patches/0800_enable_manual_to_be_built_reproducibly.patch
@@ -7,12 +7,12 @@ Description: Enable manual to be built reproducibly
the Git index is available, the date of the last commit will be used.
Author: Jérémy Bobbio <lunar at debian.org>
Forwarded: https://github.com/prawnpdf/prawn/pull/844
-Last-Update: 2015-04-29
+Last-Update: 2015-07-24
--- a/manual/cover.rb
+++ b/manual/cover.rb
@@ -23,14 +23,17 @@
- :size => 60}
+ :size => 60 }
], :at => [170, cursor - 160])
+ last_update = Time.at(ENV['BUILD_EPOCH'].to_i) if ENV['BUILD_EPOCH']
@@ -25,27 +25,27 @@ Last-Update: 2015-04-29
+ last_update ||= Time.now
end
-- formatted_text_box([ {:text => "Last Update: #{Time.now.strftime("%Y-%m-%d")}\n"+
-+ formatted_text_box([ {:text => "Last Update: #{last_update.utc.strftime('%Y-%m-%d')}\n"+
- "Prawn Version: #{Prawn::VERSION}\n"+
- git_commit,
- :size => 12}
+- formatted_text_box([ { :text => "Last Update: #{Time.now.strftime("%Y-%m-%d")}\n" +
++ formatted_text_box([ { :text => "Last Update: #{last_update.utc.strftime("%Y-%m-%d")}\n" +
+ "Prawn Version: #{Prawn::VERSION}\n" +
+ git_commit,
+ :size => 12 }
--- a/manual/document_and_page_options/metadata.rb
+++ b/manual/document_and_page_options/metadata.rb
-@@ -7,6 +7,7 @@
+@@ -6,6 +6,7 @@
+ #
require File.expand_path(File.join(File.dirname(__FILE__),
%w[.. example_helper]))
-
+creation_date = ENV['BUILD_EPOCH'] ? Time.at(ENV['BUILD_EPOCH'].to_i) : Time.now
- Prawn::Document.generate("metadata.pdf",
- :info => {
- :Title => "My title",
-@@ -15,7 +16,7 @@
- :Keywords => "test metadata ruby pdf dry",
- :Creator => "ACME Soft App",
- :Producer => "Prawn",
-- :CreationDate => Time.now
-+ :CreationDate => creation_date.utc
- }) do
- text "This is a test of setting metadata properties via the info option."
+ info = {
+ :Title => "My title",
+@@ -14,7 +15,7 @@
+ :Keywords => "test metadata ruby pdf dry",
+ :Creator => "ACME Soft App",
+ :Producer => "Prawn",
+- :CreationDate => Time.now
++ :CreationDate => creation_date.utc
+ }
+
+ Prawn::Document.generate("metadata.pdf", :info => info) do
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-prawn.git
More information about the Pkg-ruby-extras-commits
mailing list