[DRE-commits] [SCM] ruby-prawn.git branch, master, updated. upstream/1.0.0_rc1-44-g6e97afc

Cédric Boutillier cedric.boutillier at gmail.com
Thu Nov 24 23:12:00 UTC 2011


The following commit has been merged in the master branch:
commit 4b48c6b3ed5402067c08db2e8e0592661b96b77c
Author: Cédric Boutillier <cedric.boutillier at gmail.com>
Date:   Sun Nov 20 15:52:47 2011 +0100

    patch: disable tests using removed files

diff --git a/debian/patches/0500_disable_tests_using_removed_files.patch b/debian/patches/0500_disable_tests_using_removed_files.patch
new file mode 100644
index 0000000..bf82287
--- /dev/null
+++ b/debian/patches/0500_disable_tests_using_removed_files.patch
@@ -0,0 +1,114 @@
+--- a/spec/font_spec.rb
++++ b/spec/font_spec.rb
+@@ -95,7 +95,8 @@
+       :Courier, :Helvetica]
+   end
+ 
+-  it "should allow font familes to be defined in a single dfont" do
++  # spec disabled because Action Man.dfont is non free and cannot be distributed in Debian's package (Debian patch)
++  xit "should allow font familes to be defined in a single dfont" do
+     file = "#{Prawn::DATADIR}/fonts/Action Man.dfont"
+     @pdf.font_families["Action Man"] = {
+       :normal      => { :file => file, :font => "ActionMan" },
+@@ -283,7 +284,8 @@
+     @activa.compute_width_of("é", :size => 12).should == @activa.compute_width_of("e", :size => 12)
+   end
+   
+-  it "should calculate string width taking into account kerning pairs" do
++  # spec disabled since relies on numeric values for a particular font, which has been removed (Debian patch)
++  xit "should calculate string width taking into account kerning pairs" do
+     @activa.compute_width_of("To", :size => 12).should == 15.228
+     @activa.compute_width_of("To", :size => 12, :kerning => true).should == 12.996
+   end
+@@ -300,7 +302,8 @@
+     @activa.encode_text("Teχnology...").should == [[0, "Te"], [1, "!"], [0, "nology..."]]
+   end
+ 
+-  it "should encode text with kerning if requested" do
++  # spec disabled since relies on numeric values for a particular font, which has been removed (Debian patch)
++  xit "should encode text with kerning if requested" do
+     @activa.encode_text("To", :kerning => true).should == [[0, ["T", 186.0, "o"]]]
+     @activa.encode_text("To", :kerning => true).should == [[0, ["T", 186.0, "o"]]]
+     @activa.encode_text("Technology", :kerning => true).should == [[0, ["T", 186.0, "echnology"]]]
+@@ -308,7 +311,8 @@
+     @activa.encode_text("Teχnology...", :kerning => true).should == [[0, ["T", 186.0, "e"]], [1, "!"], [0, ["nology", 88.0, "..."]]]
+   end
+ 
+-  it "should use the ascender, descender, and cap height from the TTF verbatim" do
++  # spec disabled since relies on numeric values for a particular font, which has been removed (Debian patch)
++  xit "should use the ascender, descender, and cap height from the TTF verbatim" do
+     # These metrics are relative to the font's own bbox. They should not be
+     # scaled with font size.
+     ref = @pdf.ref!({})
+@@ -373,31 +377,37 @@
+     @file = "#{Prawn::DATADIR}/fonts/Action Man.dfont"
+   end
+ 
+-  it "should list all named fonts" do
++  # spec disabled because Action Man.dfont is non free and cannot be distributed in Debian's package (Debian patch)
++  xit "should list all named fonts" do
+     list = Prawn::Font::DFont.named_fonts(@file)
+     list.sort.should == %w(ActionMan ActionMan-Italic ActionMan-Bold ActionMan-BoldItalic).sort
+   end
+ 
+-  it "should count the number of fonts in the file" do
++  # spec disabled because Action Man.dfont is non free and cannot be distributed in Debian's package (Debian patch)
++  xit "should count the number of fonts in the file" do
+     Prawn::Font::DFont.font_count(@file).should == 4
+   end
+ 
+-  it "should default selected font to the first one if not specified" do
++  # spec disabled because Action Man.dfont is non free and cannot be distributed in Debian's package (Debian patch)
++  xit "should default selected font to the first one if not specified" do
+     font = @pdf.find_font(@file)
+     font.basename.should == "ActionMan"
+   end
+ 
+-  it "should allow font to be selected by index" do
++  # spec disabled because Action Man.dfont is non free and cannot be distributed in Debian's package (Debian patch)
++  xit "should allow font to be selected by index" do
+     font = @pdf.find_font(@file, :font => 2)
+     font.basename.should == "ActionMan-Italic"
+   end
+ 
+-  it "should allow font to be selected by name" do
++  # spec disabled because Action Man.dfont is non free and cannot be distributed in Debian's package (Debian patch)
++  xit "should allow font to be selected by name" do
+     font = @pdf.find_font(@file, :font => "ActionMan-BoldItalic")
+     font.basename.should == "ActionMan-BoldItalic"
+   end
+ 
+-  it "should cache font object based on selected font" do
++  # spec disabled because Action Man.dfont is non free and cannot be distributed in Debian's package (Debian patch)
++  xit "should cache font object based on selected font" do
+     f1 = @pdf.find_font(@file, :font => "ActionMan")
+     f2 = @pdf.find_font(@file, :font => "ActionMan-Bold")
+     assert_not_equal f1.object_id, f2.object_id
+--- a/spec/text_box_spec.rb
++++ b/spec/text_box_spec.rb
+@@ -627,12 +627,12 @@
+     @text_box = Prawn::Text::Box.new(@text, options)
+   end
+   describe "when using a TTF font" do
+-    it "unprinted text should be in UTF-8 encoding" do
++    xit "unprinted text should be in UTF-8 encoding" do
+       @pdf.font("Action Man")
+       remaining_text = @text_box.render
+       remaining_text.should == @text
+     end
+-    it "subsequent calls to Text::Box need not include the" +
++    xit "subsequent calls to Text::Box need not include the" +
+        " :skip_encoding => true option" do
+       @pdf.font("Action Man")
+       remaining_text = @text_box.render
+--- a/spec/jpg_spec.rb
++++ b/spec/jpg_spec.rb
+@@ -12,7 +12,7 @@
+     @filename = "#{Prawn::DATADIR}/images/pigs.jpg"
+     @img_data = File.open(@filename, "rb") { |f| f.read }
+   end
+-   
++
+   it "should read the basic attributes correctly" do
+     jpg = Prawn::Images::JPG.new(@img_data)
+     
diff --git a/debian/patches/series b/debian/patches/series
index 5fa1624..d8f1533 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
 0210_change_spec_data_to_datadir_pdfs.patch
 0300_fix_paths.patch
 0400_use_system_fonts.patch
+0500_disable_tests_using_removed_files.patch
diff --git a/debian/ruby-test-files.yaml b/debian/ruby-test-files.yaml
index dfcd0ac..4b9f538 100644
--- a/debian/ruby-test-files.yaml
+++ b/debian/ruby-test-files.yaml
@@ -1,7 +1,7 @@
 --- 
 - spec/text_spec.rb
 - spec/snapshot_spec.rb
-- spec/png_spec.rb
+#- spec/png_spec.rb
 - spec/pdf_object_spec.rb
 - spec/object_store_spec.rb
 - spec/transparency_spec.rb
@@ -12,7 +12,7 @@
 - spec/stamp_spec.rb
 - spec/graphics_spec.rb
 - spec/text_with_inline_formatting_spec.rb
-- spec/jpg_spec.rb
+#- spec/jpg_spec.rb
 - spec/stroke_styles_spec.rb
 - spec/annotations_spec.rb
 - spec/text_rendering_mode_spec.rb
@@ -36,3 +36,5 @@
 - spec/table_spec.rb
 - spec/outline_spec.rb
 - spec/text_spacing_spec.rb
+# images have been removed or modified due to unclear licensing
+# specs using them have been temporarily disabled

-- 
ruby-prawn.git



More information about the Pkg-ruby-extras-commits mailing list