Fix mustache executable for Ruby 1.9.3 (rhbz#859025).
This commit is contained in:
parent
7c3d4fb792
commit
25bf87e871
26
mustache-0.99.4-fix-mustache-executable-for-ruby193.patch
Normal file
26
mustache-0.99.4-fix-mustache-executable-for-ruby193.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 2c7d84e44d4b204836ce81291a0173da014e7032 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick McNally <pat.mcnally@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
|
||||
|
||||
@ -20,11 +20,15 @@
|
||||
Summary: Framework-agnostic way to render logic-free views
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: 0.99.4
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?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@redhat.com> - 0.99.4-6
|
||||
- Fix mustache executable for Ruby 1.9.3 (rhbz#859025).
|
||||
|
||||
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99.4-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user