Update to Mustache 1.0.2.
This commit is contained in:
parent
749f8c2505
commit
6c3e7f4d25
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
/mustache-0.11.2.gem
|
||||
/mustache-0.99.4.gem
|
||||
/mustache-0.99.5.gem
|
||||
/mustache-1.0.2.gem
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
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
|
||||
|
||||
@ -1,45 +1,46 @@
|
||||
%global gem_name mustache
|
||||
|
||||
Summary: Framework-agnostic way to render logic-free views
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: 0.99.5
|
||||
Release: 3%{?dist}
|
||||
Version: 1.0.2
|
||||
Release: 1%{?dist}
|
||||
Summary: Mustache is a framework-agnostic way to render logic-free views
|
||||
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
|
||||
URL: https://github.com/mustache/mustache
|
||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||
BuildRequires: ruby(release)
|
||||
BuildRequires: rubygems-devel
|
||||
BuildRequires: ruby
|
||||
BuildRequires: rubygem(minitest) < 5
|
||||
BuildRequires: rubygem(minitest)
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
Think of Mustache as a replacement for your views.
|
||||
Instead of views consisting of ERB or HAML with random helpers
|
||||
and arbitrary logic, your views are broken into two parts:
|
||||
a Ruby class and an HTML template.
|
||||
Inspired by ctemplate, Mustache is a framework-agnostic way to render
|
||||
logic-free views.
|
||||
|
||||
As ctemplates says, "It emphasizes separating logic from presentation:
|
||||
it is impossible to embed application logic in this template
|
||||
language.
|
||||
|
||||
Think of Mustache as a replacement for your views. Instead of views
|
||||
consisting of ERB or HAML with random helpers and arbitrary logic,
|
||||
your views are broken into two parts: a Ruby class and an HTML
|
||||
template.
|
||||
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for %{name}
|
||||
Group: Documentation
|
||||
Requires:%{name} = %{version}-%{release}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
|
||||
%description doc
|
||||
Documentation for %{name}
|
||||
Documentation for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -c -T
|
||||
%gem_install -n %{SOURCE0}
|
||||
|
||||
pushd .%{gem_instdir}
|
||||
%patch0 -p1
|
||||
popd
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
@ -63,30 +64,38 @@ cp -a .%{gem_instdir}/man/mustache.1 %{buildroot}%{_mandir}/man1
|
||||
cp -a .%{gem_instdir}/man/*.html .
|
||||
|
||||
%check
|
||||
pushd %{buildroot}/%{gem_instdir}
|
||||
LANG=en_US.utf8 testrb -Ilib test/*_test.rb
|
||||
pushd .%{gem_instdir}
|
||||
# We are not interested in code quality that much.
|
||||
sed -r -i '/[Cc]ode[Cc]limate/ s/^/#/' test/helper.rb
|
||||
|
||||
# UTF8 environment has to be set.
|
||||
# https://github.com/mustache/mustache/issues/208
|
||||
LANG=en_US.utf8 ruby -Ilib -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
|
||||
popd
|
||||
|
||||
%files
|
||||
%dir %{gem_instdir}
|
||||
%doc *.html
|
||||
%{gem_libdir}
|
||||
%{gem_instdir}/bin
|
||||
%{_bindir}/mustache
|
||||
%doc %{gem_instdir}/README.md
|
||||
%doc %{gem_instdir}/LICENSE
|
||||
%exclude %{gem_cache}
|
||||
%{gem_spec}
|
||||
%{gem_instdir}/man
|
||||
%license %{gem_instdir}/LICENSE
|
||||
%{gem_instdir}/bin
|
||||
%{gem_libdir}
|
||||
%exclude %{gem_instdir}/man
|
||||
%doc %{_mandir}/man1/*
|
||||
%doc %{_mandir}/man5/*
|
||||
%exclude %{gem_cache}
|
||||
%{gem_spec}
|
||||
|
||||
%files doc
|
||||
%{gem_instdir}/Rakefile
|
||||
%doc %{gem_docdir}
|
||||
%doc %{gem_instdir}/README.md
|
||||
%{gem_instdir}/Rakefile
|
||||
%{gem_instdir}/test
|
||||
|
||||
%changelog
|
||||
* Thu Jun 25 2015 Vít Ondruch <vondruch@redhat.com> - 1.0.2-1
|
||||
- Update to Mustache 1.0.2.
|
||||
|
||||
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99.5-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user