From c05c0100aa0018c42121ccdfd20d0abc4f9fbf2d Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Sun, 22 Sep 2013 18:24:49 -0600 Subject: [PATCH] remove test for including content from a URI --- ... asciidoctor-remove-include-uri-test.patch | 29 ++++++++++--------- rubygem-asciidoctor.spec | 4 ++- 2 files changed, 19 insertions(+), 14 deletions(-) rename asciidoctor-fix-include-uri.patch => asciidoctor-remove-include-uri-test.patch (54%) diff --git a/asciidoctor-fix-include-uri.patch b/asciidoctor-remove-include-uri-test.patch similarity index 54% rename from asciidoctor-fix-include-uri.patch rename to asciidoctor-remove-include-uri-test.patch index 1573854..bf76cdd 100644 --- a/asciidoctor-fix-include-uri.patch +++ b/asciidoctor-remove-include-uri-test.patch @@ -1,19 +1,22 @@ diff --git a/test/reader_test.rb b/test/reader_test.rb -index abc708a..6eb08ef 100644 +index abc708a..5750437 100644 --- a/test/reader_test.rb +++ b/test/reader_test.rb -@@ -502,12 +502,12 @@ include::fixtures/no-such-file.ad[] - test 'include macro can retrieve data from uri' do - input = <<-EOS - .... --include::https://raw.github.com/asciidoctor/asciidoctor/master/LICENSE[] -+include::http://asciidoctor.org/humans.txt[] - .... - EOS - - output = render_embedded_string input, :safe => :safe, :attributes => {'allow-uri-read' => ''} -- assert_match(/MIT/, output) -+ assert_match(/Asciidoctor/, output) +@@ -499,17 +499,6 @@ include::fixtures/no-such-file.ad[] + end end +- test 'include macro can retrieve data from uri' do +- input = <<-EOS +-.... +-include::https://raw.github.com/asciidoctor/asciidoctor/master/LICENSE[] +-.... +- EOS +- +- output = render_embedded_string input, :safe => :safe, :attributes => {'allow-uri-read' => ''} +- assert_match(/MIT/, output) +- end +- test 'inaccessible uri referenced by include macro does not crash processor' do + input = <<-EOS + .... diff --git a/rubygem-asciidoctor.spec b/rubygem-asciidoctor.spec index f111c02..0b095c3 100644 --- a/rubygem-asciidoctor.spec +++ b/rubygem-asciidoctor.spec @@ -9,7 +9,9 @@ Group: Development/Languages License: MIT URL: http://github.com/asciidoctor/asciidoctor Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem -Patch0: asciidoctor-fix-include-uri.patch +# Patch0: disable the test for including content from a URI +# since it does not work when the network is unavailable +Patch0: asciidoctor-remove-include-uri-test.patch %if 0%{?rhel} > 6 || 0%{?fedora} > 18 Requires: ruby(release) BuildRequires: ruby(release)