change include uri test to use non-https URI
This commit is contained in:
parent
ceeaf60583
commit
6354126026
19
asciidoctor-fix-include-uri.patch
Normal file
19
asciidoctor-fix-include-uri.patch
Normal file
@ -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
|
@ -9,6 +9,7 @@ Group: Development/Languages
|
|||||||
License: MIT
|
License: MIT
|
||||||
URL: http://github.com/asciidoctor/asciidoctor
|
URL: http://github.com/asciidoctor/asciidoctor
|
||||||
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
|
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||||
|
Patch0: asciidoctor-fix-include-uri.patch
|
||||||
%if 0%{?rhel} > 6 || 0%{?fedora} > 18
|
%if 0%{?rhel} > 6 || 0%{?fedora} > 18
|
||||||
Requires: ruby(release)
|
Requires: ruby(release)
|
||||||
BuildRequires: ruby(release)
|
BuildRequires: ruby(release)
|
||||||
@ -49,6 +50,7 @@ Documentation for %{name}
|
|||||||
gem unpack -V %{SOURCE0}
|
gem unpack -V %{SOURCE0}
|
||||||
%setup -q -D -T -n %{gem_name}-%{version}
|
%setup -q -D -T -n %{gem_name}-%{version}
|
||||||
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
gem build %{gem_name}.gemspec
|
gem build %{gem_name}.gemspec
|
||||||
|
Loading…
Reference in New Issue
Block a user