From d01a35c8a656a2974efd5d2cda44926989fc2209 Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Jun 09 2013 05:54:56 +0000 Subject: disable coderay tests for el6 --- diff --git a/asciidoctor-disable-coderay-tests.patch b/asciidoctor-disable-coderay-tests.patch new file mode 100644 index 0000000..e93db14 --- /dev/null +++ b/asciidoctor-disable-coderay-tests.patch @@ -0,0 +1,21 @@ +# disables the CodeRay tests since the library is not available in el6 +diff --git a/test/blocks_test.rb b/test/blocks_test.rb +index a98a9fe..6ff1388 100644 +--- a/test/blocks_test.rb ++++ b/test/blocks_test.rb +@@ -1426,6 +1426,7 @@ alert("Hello, World!") + assert_css '.listingblock pre code.javascript', output, 1 + end + ++=begin + test 'should highlight source if source-highlighter attribute is coderay' do + input = <<-EOS + :source-highlighter: coderay +@@ -1458,6 +1459,7 @@ html = CodeRay.scan("puts 'Hello, world!'", :ruby).div(:line_numbers => :table) + assert_xpath '//pre[@class="CodeRay"]/code[@class="ruby language-ruby"]//span[@style = "color:#036;font-weight:bold"][text() = "CodeRay"]', output, 1 + assert_no_match(/\.CodeRay \{/, output) + end ++=end + + test 'should include remote highlight.js assets if source-highlighter attribute is highlightjs' do + input = <<-EOS diff --git a/rubygem-asciidoctor.spec b/rubygem-asciidoctor.spec index 09da33f..2d2fe58 100644 --- a/rubygem-asciidoctor.spec +++ b/rubygem-asciidoctor.spec @@ -13,11 +13,12 @@ Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem # pending, is not packaged in Fedora and since the statement is merely a task # note, it's safe to disable it's usage for the purpose of packaging. Patch0: asciidoctor-disable-use-of-pending.patch +# Patch1: disables CodeRay tests since the library is not available in el6 +Patch1: asciidoctor-disable-coderay-tests.patch Requires: ruby(abi) = 1.8 BuildRequires: ruby(abi) = 1.8 Requires: ruby(rubygems) BuildRequires: ruby(rubygems) -BuildRequires: rubygem(coderay) BuildRequires: rubygem(erubis) BuildRequires: rubygem(minitest) BuildRequires: rubygem(nokogiri) @@ -44,6 +45,7 @@ gem unpack -V %{SOURCE0} %setup -q -D -T -n %{gem_name}-%{version} gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec %patch0 -p1 +%patch1 -p1 %build gem build %{gem_name}.gemspec