[rubygem-mustache/f17] Fix mustache executable for Ruby 1.9.3 (rhbz#859025).
Vít Ondruch
vondruch at fedoraproject.org
Thu Sep 20 14:44:45 UTC 2012
commit 68357cd000f22fb13dced7a29588bc2d059fe7c7
Author: Vít Ondruch <vondruch at redhat.com>
Date: Thu Sep 20 16:36:34 2012 +0200
Fix mustache executable for Ruby 1.9.3 (rhbz#859025).
....99.4-fix-mustache-executable-for-ruby193.patch | 26 ++++++++++++++++++++
rubygem-mustache.spec | 13 +++++++++-
2 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/mustache-0.99.4-fix-mustache-executable-for-ruby193.patch b/mustache-0.99.4-fix-mustache-executable-for-ruby193.patch
new file mode 100644
index 0000000..994da86
--- /dev/null
+++ b/mustache-0.99.4-fix-mustache-executable-for-ruby193.patch
@@ -0,0 +1,26 @@
+From 2c7d84e44d4b204836ce81291a0173da014e7032 Mon Sep 17 00:00:00 2001
+From: Patrick McNally <pat.mcnally at gmail.com>
+Date: Mon, 14 Nov 2011 13:52:42 -0600
+Subject: [PATCH] YAML::each_document has gone away in ruby 1.9.3, replaced
+ call with load_stream
+
+---
+ bin/mustache | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bin/mustache b/bin/mustache
+index 6a9b141..8a364f2 100755
+--- a/bin/mustache
++++ b/bin/mustache
+@@ -73,7 +73,7 @@ class Mustache
+ yaml = $2.strip
+ template = doc.sub($1, '')
+
+- YAML.each_document(yaml) do |data|
++ YAML.load_stream(yaml).each do |data|
+ puts Mustache.render(template, data)
+ end
+ else
+--
+1.7.10
+
diff --git a/rubygem-mustache.spec b/rubygem-mustache.spec
index 0873271..93f3019 100644
--- a/rubygem-mustache.spec
+++ b/rubygem-mustache.spec
@@ -20,11 +20,15 @@
Summary: Framework-agnostic way to render logic-free views
Name: rubygem-%{gem_name}
Version: 0.99.4
-Release: 4%{?dist}
+Release: 5%{?dist}
Group: Development/Languages
License: MIT
URL: http://github.com/defunkt/mustache
Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem
+# Executable fails with Ruby 1.9.3.
+# https://bugzilla.redhat.com/show_bug.cgi?id=859025
+# https://github.com/defunkt/mustache/pull/116
+Patch0: mustache-0.99.4-fix-mustache-executable-for-ruby193.patch
Requires: ruby(abi) = %{rubyabi}
Requires: ruby(rubygems)
Requires: ruby
@@ -60,6 +64,10 @@ gem install --local --install-dir .%{gem_dir} \
--bindir .%{_bindir} \
--force %{SOURCE0}
+pushd .%{gem_instdir}
+%patch0 -p1
+popd
+
%build
%install
@@ -108,6 +116,9 @@ popd
%{gem_instdir}/test
%changelog
+* Thu Sep 20 2012 Vít Ondruch <vondruch at redhat.com> - 0.99.4-5
+- Fix mustache executable for Ruby 1.9.3 (rhbz#859025).
+
* Tue Apr 17 2012 Vít Ondruch <vondruch at redhat.com> - 0.99.4-4
- Compatibility fixes with older Fedoras and RHELs.
- Add missing .gemspec.
More information about the scm-commits
mailing list