[rubygem-tilt/f17] Fixes RDoc >= 3.10 compatibility.
Vít Ondruch
vondruch at fedoraproject.org
Mon Apr 15 14:33:34 UTC 2013
commit 49122f1df2bfd186fa960483c601e79ea9874349
Author: Vít Ondruch <vondruch at redhat.com>
Date: Mon Jul 23 15:31:20 2012 +0200
Fixes RDoc >= 3.10 compatibility.
rubygem-tilt.spec | 18 +++++-
...ecs-to-RDoc-3.10-which-outputs-header-ids.patch | 31 +++++++++
...utoloads-everything-so-you-_have_-to-requ.patch | 69 ++++++++++++++++++++
3 files changed, 116 insertions(+), 2 deletions(-)
---
diff --git a/rubygem-tilt.spec b/rubygem-tilt.spec
index a4c9db4..1f59a10 100644
--- a/rubygem-tilt.spec
+++ b/rubygem-tilt.spec
@@ -6,11 +6,17 @@
Summary: Generic interface to multiple Ruby template engines
Name: rubygem-%{gem_name}
Version: 1.3.3
-Release: 3%{?dist}
+Release: 4%{?dist}
Group: Development/Languages
License: MIT
URL: http://github.com/rtomayko/%{gem_name}
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
+# Fixes RDoc >= 3.10 compatibility.
+# https://github.com/rtomayko/tilt/commit/ecdf14893b40cc1bc21aaedca9578d36d264f89e
+Patch0: tilt-1.3.3-rdoc-3.10-autoloads-everything-so-you-_have_-to-requ.patch
+# https://github.com/rtomayko/tilt/commit/ff097e8722056dfef6ac4523d406bdbca6eae87d
+Patch1: tilt-1.3.3-adjusted-specs-to-RDoc-3.10-which-outputs-header-ids.patch
+
Requires: ruby(abi) = %{rubyabi}
Requires: ruby(rubygems)
Requires: ruby
@@ -55,6 +61,11 @@ gem install --local --install-dir .%{gem_dir} \
--bindir .%{_bindir} \
--force %{SOURCE0}
+pushd .%{gem_instdir}
+%patch0 -p1
+%patch1 -p1
+popd
+
%build
%install
@@ -98,6 +109,9 @@ popd
%changelog
+* Mon Apr 15 2013 Vít Ondruch <vondruch at redhat.com> - 1.3.3-4
+- Fixes RDoc >= 3.10 compatibility.
+
* Fri Feb 03 2012 Bohuslav Kabrda <bkabrda at redhat.com> - 1.3.3-3
- Allowed running the tests.
@@ -122,7 +136,7 @@ popd
* Thu Feb 10 2011 Vít Ondruch <vondruch at redhat.com> - 1.2.2-2
- Test moved to doc subpackage
-- %{gem_name} macro used whenever possible.
+- %%{gem_name} macro used whenever possible.
* Mon Feb 07 2011 Vít Ondruch <vondruch at redhat.com> - 1.2.2-1
- Initial package
diff --git a/tilt-1.3.3-adjusted-specs-to-RDoc-3.10-which-outputs-header-ids.patch b/tilt-1.3.3-adjusted-specs-to-RDoc-3.10-which-outputs-header-ids.patch
new file mode 100644
index 0000000..5f7bbf0
--- /dev/null
+++ b/tilt-1.3.3-adjusted-specs-to-RDoc-3.10-which-outputs-header-ids.patch
@@ -0,0 +1,31 @@
+From ff097e8722056dfef6ac4523d406bdbca6eae87d Mon Sep 17 00:00:00 2001
+From: HannesG <hag at informatik.uni-kiel.de>
+Date: Sun, 8 Jan 2012 21:15:26 +0100
+Subject: [PATCH] adjusted specs to RDoc >= 3.10 ( which outputs header ids )
+
+---
+ test/tilt_rdoctemplate_test.rb | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/test/tilt_rdoctemplate_test.rb b/test/tilt_rdoctemplate_test.rb
+index 309a048..33d8e20 100644
+--- a/test/tilt_rdoctemplate_test.rb
++++ b/test/tilt_rdoctemplate_test.rb
+@@ -12,12 +12,12 @@ begin
+
+ test "preparing and evaluating the template with #render" do
+ template = Tilt::RDocTemplate.new { |t| "= Hello World!" }
+- assert_equal "<h1>Hello World!</h1>", template.render.strip
++ assert_equal "<h1 id=\"label-Hello+World%21\">Hello World!</h1>", template.render.strip
+ end
+
+ test "can be rendered more than once" do
+ template = Tilt::RDocTemplate.new { |t| "= Hello World!" }
+- 3.times { assert_equal "<h1>Hello World!</h1>", template.render.strip }
++ 3.times { assert_equal "<h1 id=\"label-Hello+World%21\">Hello World!</h1>", template.render.strip }
+ end
+ end
+ rescue LoadError => boom
+--
+1.7.10.4
+
diff --git a/tilt-1.3.3-rdoc-3.10-autoloads-everything-so-you-_have_-to-requ.patch b/tilt-1.3.3-rdoc-3.10-autoloads-everything-so-you-_have_-to-requ.patch
new file mode 100644
index 0000000..3d30d66
--- /dev/null
+++ b/tilt-1.3.3-rdoc-3.10-autoloads-everything-so-you-_have_-to-requ.patch
@@ -0,0 +1,69 @@
+From ecdf14893b40cc1bc21aaedca9578d36d264f89e Mon Sep 17 00:00:00 2001
+From: Tim Felgentreff <timfelgentreff at gmail.com>
+Date: Mon, 10 Oct 2011 18:50:29 -0700
+Subject: [PATCH] rdoc 3.10 autoloads everything, so you _have_ to require
+ 'rdoc' directly. leave other requires for backwards compat
+
+---
+ TEMPLATES.md | 6 +++---
+ lib/tilt/rdoc.rb | 7 ++++---
+ test/tilt_rdoctemplate_test.rb | 1 +
+ 3 files changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/TEMPLATES.md b/TEMPLATES.md
+index 929fc01..f931415 100644
+--- a/TEMPLATES.md
++++ b/TEMPLATES.md
+@@ -407,9 +407,9 @@ library.
+
+ ### Usage
+
+-__NOTE:__ It's suggested that your program `require 'rdoc/markup'` and
+-`require 'rdoc/markup/to_html'` at load time when using this template
+-engine in a threaded environment.
++__NOTE:__ It's suggested that your program `require 'rdoc'`,
++`require 'rdoc/markup'`, and `require 'rdoc/markup/to_html'` at load time
++when using this template engine in a threaded environment.
+
+ ### See also
+
+diff --git a/lib/tilt/rdoc.rb b/lib/tilt/rdoc.rb
+index cbec4d1..33450e5 100644
+--- a/lib/tilt/rdoc.rb
++++ b/lib/tilt/rdoc.rb
+@@ -4,9 +4,9 @@ module Tilt
+ # RDoc template. See:
+ # http://rdoc.rubyforge.org/
+ #
+- # It's suggested that your program require 'rdoc/markup' and
+- # 'rdoc/markup/to_html' at load time when using this template
+- # engine.
++ # It's suggested that your program `require 'rdoc/markup'` and
++ # `require 'rdoc/markup/to_html'` at load time when using this template
++ # engine in a threaded environment.
+ class RDocTemplate < Template
+ self.default_mime_type = 'text/html'
+
+@@ -15,6 +15,7 @@ module Tilt
+ end
+
+ def initialize_engine
++ require_template_library 'rdoc'
+ require_template_library 'rdoc/markup'
+ require_template_library 'rdoc/markup/to_html'
+ end
+diff --git a/test/tilt_rdoctemplate_test.rb b/test/tilt_rdoctemplate_test.rb
+index 49d6a09..309a048 100644
+--- a/test/tilt_rdoctemplate_test.rb
++++ b/test/tilt_rdoctemplate_test.rb
+@@ -2,6 +2,7 @@ require 'contest'
+ require 'tilt'
+
+ begin
++ require 'rdoc'
+ require 'rdoc/markup'
+ require 'rdoc/markup/to_html'
+ class RDocTemplateTest < Test::Unit::TestCase
+--
+1.7.10.4
+
More information about the scm-commits
mailing list