Update to Mustache 1.1.1.
Resolves: rhbz#1321203 Resolves: rhbz#1800018
This commit is contained in:
parent
0f90a4df8e
commit
74f12a3608
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@
|
||||
/mustache-0.99.4.gem
|
||||
/mustache-0.99.5.gem
|
||||
/mustache-1.0.2.gem
|
||||
/mustache-1.1.1.gem
|
||||
|
||||
36
rubygem-mustache-1.1.1-Fix-test-race-condition.patch
Normal file
36
rubygem-mustache-1.1.1-Fix-test-race-condition.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From 407c6a5db6c1f1cfb40bd6113f07f067d07885a4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
|
||||
Date: Mon, 27 Apr 2020 11:16:17 +0200
|
||||
Subject: [PATCH] Fix test race condition.
|
||||
|
||||
The test suite randomly fails with errors such as:
|
||||
|
||||
~~~
|
||||
1) Failure:
|
||||
AutoloadingTest#test_autoload_lowercase [/builddir/build/BUILD/mustache-1.1.1/usr/share/gems/gems/mustache-1.1.1/test/autoloading_test.rb:17]:
|
||||
Expected: Comments
|
||||
Actual: nil
|
||||
~~~
|
||||
|
||||
This happens when `test_namespaced*` test cases are executed earlier
|
||||
than the remaining test cases, because they are defining
|
||||
`view_namespace` but not cleaning up afterwards.
|
||||
---
|
||||
test/autoloading_test.rb | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/test/autoloading_test.rb b/test/autoloading_test.rb
|
||||
index 0a7ad762..77eb3557 100644
|
||||
--- a/test/autoloading_test.rb
|
||||
+++ b/test/autoloading_test.rb
|
||||
@@ -7,6 +7,10 @@ def setup
|
||||
Mustache.view_path = File.dirname(__FILE__) + '/fixtures'
|
||||
end
|
||||
|
||||
+ def teardown
|
||||
+ Mustache.remove_instance_variable(:@view_namespace) if Mustache.instance_variable_defined?(:@view_namespace)
|
||||
+ end
|
||||
+
|
||||
def test_autoload
|
||||
klass = Mustache.view_class(:Comments)
|
||||
assert_equal Comments, klass
|
||||
@ -1,12 +1,15 @@
|
||||
%global gem_name mustache
|
||||
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: 1.0.2
|
||||
Release: 10%{?dist}
|
||||
Version: 1.1.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Mustache is a framework-agnostic way to render logic-free views
|
||||
License: MIT
|
||||
URL: https://github.com/mustache/mustache
|
||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||
# Fix test race condition.
|
||||
# https://github.com/mustache/mustache/pull/258
|
||||
Patch0: rubygem-mustache-1.1.1-Fix-test-race-condition.patch
|
||||
BuildRequires: ruby(release)
|
||||
BuildRequires: rubygems-devel
|
||||
BuildRequires: ruby
|
||||
@ -36,16 +39,24 @@ BuildArch: noarch
|
||||
Documentation for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -c -T
|
||||
%gem_install -n %{SOURCE0}
|
||||
%setup -q -n %{gem_name}-%{version}
|
||||
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
# Create the gem as gem install only works on a gem file
|
||||
gem build ../%{gem_name}-%{version}.gemspec
|
||||
|
||||
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
|
||||
# by default, so that we can move it into the buildroot in %%install
|
||||
%gem_install
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{gem_dir}
|
||||
cp -a .%{gem_dir}/* \
|
||||
%{buildroot}%{gem_dir}/
|
||||
|
||||
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
cp -a .%{_bindir}/* \
|
||||
%{buildroot}%{_bindir}/
|
||||
@ -63,8 +74,8 @@ cp -a .%{gem_instdir}/man/*.html .
|
||||
|
||||
%check
|
||||
pushd .%{gem_instdir}
|
||||
# We are not interested in code quality that much.
|
||||
sed -r -i '/[Cc]ode[Cc]limate/ s/^/#/' test/helper.rb
|
||||
# Code coverage is not really interesting for Fedora.
|
||||
sed -i '/simplecov/,/^end$/ s/^/#/' test/helper.rb
|
||||
|
||||
# UTF8 environment has to be set.
|
||||
# https://github.com/mustache/mustache/issues/208
|
||||
@ -91,6 +102,11 @@ popd
|
||||
%{gem_instdir}/test
|
||||
|
||||
%changelog
|
||||
* Mon Apr 27 2020 Vít Ondruch <vondruch@redhat.com> - 1.1.1-1
|
||||
- Update to Mustache 1.1.1.
|
||||
Resolves: rhbz#1321203
|
||||
Resolves: rhbz#1800018
|
||||
|
||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user