diff --git a/asciidoctor-fix-include-uri.patch b/asciidoctor-fix-include-uri.patch new file mode 100644 index 0000000..1573854 --- /dev/null +++ b/asciidoctor-fix-include-uri.patch @@ -0,0 +1,19 @@ +diff --git a/test/reader_test.rb b/test/reader_test.rb +index abc708a..6eb08ef 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) + end + + test 'inaccessible uri referenced by include macro does not crash processor' do diff --git a/rubygem-asciidoctor.spec b/rubygem-asciidoctor.spec index 9483fdf..f111c02 100644 --- a/rubygem-asciidoctor.spec +++ b/rubygem-asciidoctor.spec @@ -9,6 +9,7 @@ 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 %if 0%{?rhel} > 6 || 0%{?fedora} > 18 Requires: ruby(release) BuildRequires: ruby(release) @@ -49,6 +50,7 @@ Documentation for %{name} gem unpack -V %{SOURCE0} %setup -q -D -T -n %{gem_name}-%{version} gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec +%patch0 -p1 %build gem build %{gem_name}.gemspec