[rubygem-slim] Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 Update to slim 1.3.8

Vít Ondruch vondruch at fedoraproject.org
Wed Apr 17 07:35:33 UTC 2013


commit 476c0de2f2630cc5400526785f8c20aaeff15058
Author: Vít Ondruch <vondruch at redhat.com>
Date:   Wed Apr 17 09:27:32 2013 +0200

    Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
    Update to slim 1.3.8

 .gitignore                                  |    1 +
 fix-broken-markdown-test.patch              |   20 ---------
 rubygem-slim-1.3.8-markdown-tests-fix.patch |   59 +++++++++++++++++++++++++++
 rubygem-slim.spec                           |   31 +++++++++-----
 sources                                     |    2 +-
 5 files changed, 80 insertions(+), 33 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 7059ccb..b91017d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /slim-1.2.2.gem
+/slim-1.3.8.gem
diff --git a/rubygem-slim-1.3.8-markdown-tests-fix.patch b/rubygem-slim-1.3.8-markdown-tests-fix.patch
new file mode 100644
index 0000000..f24aeb0
--- /dev/null
+++ b/rubygem-slim-1.3.8-markdown-tests-fix.patch
@@ -0,0 +1,59 @@
+diff --git a/test/core/test_embedded_engines.rb b/test/core/test_embedded_engines.rb
+index 1471e50..4ef0065 100644
+--- a/test/core/test_embedded_engines.rb
++++ b/test/core/test_embedded_engines.rb
+@@ -76,13 +76,22 @@ markdown:
+   * one
+   * two
+ }
+-    assert_html "<h1 id=\"header\">Header</h1>\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n  <li>one</li>\n  <li>two</li>\n</ul>\n", source
+-
+-    Slim::EmbeddedEngine.with_options(:markdown => {:auto_ids => false}) do
+-      assert_html "<h1>Header</h1>\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n  <li>one</li>\n  <li>two</li>\n</ul>\n", source
++    if !Gem::Specification::find_all_by_name('redcarpet').empty?
++      # redcarpet
++      assert_html "<h1>Header</h1>\n\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n<li>one</li>\n<li>two</li>\n</ul>\n", source
++    elsif !Gem::Specification::find_all_by_name('rdiscount').empty?
++      # rdiscount
++      assert_html "<h1>Header</h1>\n\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n<li>one</li>\n<li>two</li>\n</ul>\n\n", source
++    else
++      # kramdown, :auto_ids by default
++      assert_html "<h1 id=\"header\">Header</h1>\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n  <li>one</li>\n  <li>two</li>\n</ul>\n", source
++
++      Slim::Embedded.with_options(:markdown => {:auto_ids => false}) do
++        assert_html "<h1>Header</h1>\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n  <li>one</li>\n  <li>two</li>\n</ul>\n", source
++      end
++
++      assert_html "<h1 id=\"header\">Header</h1>\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n  <li>one</li>\n  <li>two</li>\n</ul>\n", source
+     end
+-
+-    assert_html "<h1 id=\"header\">Header</h1>\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n  <li>one</li>\n  <li>two</li>\n</ul>\n", source
+   end
+ 
+   def test_render_with_creole
+diff --git a/test/translator/test_translator.rb b/test/translator/test_translator.rb
+index 3922b8f..679e2e7 100644
+--- a/test/translator/test_translator.rb
++++ b/test/translator/test_translator.rb
+@@ -26,8 +26,19 @@ markdown:
+   * one
+   * two
+ }
+-    assert_html "<h1 id=\"header\">Header</h1>\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n  <li>one</li>\n  <li>two</li>\n</ul>\n", source, :tr_mode => :dynamic
+-    assert_html "<h1 id=\"header\">Header</h1>\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n  <li>one</li>\n  <li>two</li>\n</ul>\n", source, :tr_mode => :static
++    if !Gem::Specification::find_all_by_name('redcarpet').empty?
++      # redcarpet
++      assert_html "<h1>Header</h1>\n\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n<li>one</li>\n<li>two</li>\n</ul>\n", source, :tr_mode => :dynamic
++      assert_html "<h1>Header</h1>\n\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n<li>one</li>\n<li>two</li>\n</ul>\n", source, :tr_mode => :static
++    elsif !Gem::Specification::find_all_by_name('rdiscount').empty?
++      # rdiscount
++      assert_html "<h1>Header</h1>\n\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n<li>one</li>\n<li>two</li>\n</ul>\n\n", source, :tr_mode => :dynamic
++      assert_html "<h1>Header</h1>\n\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n<li>one</li>\n<li>two</li>\n</ul>\n\n", source, :tr_mode => :static
++    else
++      # kramdown
++      assert_html "<h1 id=\"header\">Header</h1>\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n  <li>one</li>\n  <li>two</li>\n</ul>\n", source, :tr_mode => :dynamic
++      assert_html "<h1 id=\"header\">Header</h1>\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n  <li>one</li>\n  <li>two</li>\n</ul>\n", source, :tr_mode => :static
++    end
+   end
+ 
+   def test_no_translation_of_attrs
diff --git a/rubygem-slim.spec b/rubygem-slim.spec
index e75c83b..7542589 100644
--- a/rubygem-slim.spec
+++ b/rubygem-slim.spec
@@ -1,30 +1,32 @@
 # Generated from slim-1.2.2.gem by gem2rpm -*- rpm-spec -*-
 %global gem_name slim
-%global rubyabi 1.9.1
 
 Summary: Slim is a template language
 Name: rubygem-%{gem_name}
-Version: 1.2.2
-Release: 9%{?dist}
+Version: 1.3.8
+Release: 1%{?dist}
 Group: Development/Languages
 License: MIT
 URL: http://slim-lang.com/
 Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
-Patch0: fix-broken-markdown-test.patch
-Requires: ruby(abi) = %{rubyabi}
+# Test against redcarpet, not kramdown
+# https://github.com/slim-template/slim/pull/381
+Patch0: rubygem-slim-1.3.8-markdown-tests-fix.patch
+Requires: ruby(release)
 Requires: ruby(rubygems)
 Requires: ruby
 Requires: rubygem(temple) => 0.4.0
 Requires: rubygem(temple) < 0.5
 Requires: rubygem(tilt) => 1.3.3
 Requires: rubygem(tilt) < 1.4
-BuildRequires: ruby(abi) = %{rubyabi}
+BuildRequires: ruby(release)
 BuildRequires: rubygems-devel
 BuildRequires: ruby
 BuildRequires: rubygem-temple
 BuildRequires: rubygem-minitest
 BuildRequires: rubygem(tilt) < 1.4
 BuildRequires: rubygem(sass)
+BuildRequires: rubygem(asciidoctor)
 BuildRequires: rubygem(redcarpet)
 BuildRequires: rubygem(builder)
 BuildRequires: rubygem(rails)
@@ -54,11 +56,8 @@ gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
 %patch0 -p1
 
 %build
-mkdir -p .%{gem_dir}
 gem build %{gem_name}.gemspec
-gem install --local --install-dir .%{gem_dir} \
-            --bindir .%{_bindir} \
-            --force %{gem_name}-%{version}.gem
+%gem_install
 
 %install
 mkdir -p %{buildroot}%{gem_dir}
@@ -71,16 +70,20 @@ cp -a .%{_bindir}/* \
         %{buildroot}%{_bindir}/
 
 find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
-rm %{buildroot}%{gem_instdir}/.gemtest
 rm %{buildroot}%{gem_instdir}/.gitignore
 rm %{buildroot}%{gem_instdir}/.travis.yml
 rm %{buildroot}%{gem_instdir}/.yardopts
+rm %{buildroot}%{gem_instdir}/kill-travis.sh
 grep -rl /usr/bin/env %{buildroot}%{gem_instdir}/benchmarks  | xargs chmod a+x
 
 %check
 pushd ./%{gem_instdir}
 testrb -Ilib test/rails/
-testrb -Ilib test/slim/ | grep "216 tests, 236 assertions, 0 failures, 2 errors, 0 skips"
+# wikicloth and creole are missing in Fedora
+testrb -Ilib:test/core test/core/test_*.rb | grep "236 tests, 265 assertions, 0 failures, 2 errors, 0 skips"
+testrb -Ilib:test/core test/logic_less/test_*.rb
+testrb -Ilib:test/core test/translator/test_*.rb
+testrb -Ilib:test/literate test/literate/run.rb
 popd
 
 %files
@@ -103,6 +106,10 @@ popd
 %{gem_instdir}/benchmarks/
 
 %changelog
+* Mon Apr 15 2013 Josef Stribny <jstribny at redhat.com> - 1.3.8-1
+- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
+- Update to slim 1.3.8
+
 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.2.2-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 
diff --git a/sources b/sources
index a93b3cc..b1e26fd 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-c220a90dc7245eb0308a188906de7eb0  slim-1.2.2.gem
+ac81b058d8a73bc5a8d81bbf3350a46a  slim-1.3.8.gem


More information about the scm-commits mailing list