From 6c3e7f4d253c5f4bf49005f647be274ea332539f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 25 Jun 2015 13:50:28 +0200 Subject: [PATCH] Update to Mustache 1.0.2. --- .gitignore | 1 + ...-fix-mustache-executable-for-ruby193.patch | 26 ------- rubygem-mustache.spec | 69 +++++++++++-------- sources | 2 +- 4 files changed, 41 insertions(+), 57 deletions(-) delete mode 100644 mustache-0.99.4-fix-mustache-executable-for-ruby193.patch diff --git a/.gitignore b/.gitignore index ae81314..5cc3b4c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /mustache-0.11.2.gem /mustache-0.99.4.gem /mustache-0.99.5.gem +/mustache-1.0.2.gem diff --git a/mustache-0.99.4-fix-mustache-executable-for-ruby193.patch b/mustache-0.99.4-fix-mustache-executable-for-ruby193.patch deleted file mode 100644 index 994da86..0000000 --- a/mustache-0.99.4-fix-mustache-executable-for-ruby193.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 2c7d84e44d4b204836ce81291a0173da014e7032 Mon Sep 17 00:00:00 2001 -From: Patrick McNally -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 9a1c4b0..43b4299 100644 --- a/rubygem-mustache.spec +++ b/rubygem-mustache.spec @@ -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 - 1.0.2-1 +- Update to Mustache 1.0.2. + * Thu Jun 18 2015 Fedora Release Engineering - 0.99.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index dd8a9eb..bd7467c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fa5bb8c782febd55b2f4f47809b40acf mustache-0.99.5.gem +74f451ce0995fb2143a46a8d418886a5 mustache-1.0.2.gem