%{?nodejs_find_provides_and_requires} %global enable_tests 0 Name: nodejs-fresh Version: 0.3.0 Release: 2%{?dist} Summary: HTTP response freshness testing for Node.js License: MIT Group: System Environment/Libraries URL: https://github.com/visionmedia/node-fresh Source0: http://registry.npmjs.org/fresh/-/fresh-%{version}.tgz # The test files are not included in the npm tarball. # Source1 is generated by running Source10, which pulls from the upstream # version control repository. Source1: tests-%{version}.tar.bz2 Source10: dl-tests.sh BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(mocha) BuildRequires: npm(should) %endif %description This Node.js module provides HTTP response freshness testing, checking the freshness of req and res headers. When the cache is "fresh" true is returned, otherwise false is returned to indicate that the cache is now stale. %prep %setup -q -n package %setup -q -T -D -a 1 -n package %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/fresh cp -pr package.json index.js \ %{buildroot}%{nodejs_sitelib}/fresh %nodejs_symlink_deps %if 0%{?enable_tests} %check %{nodejs_sitelib}/mocha/bin/mocha --reporter spec --require should %endif %files %doc HISTORY.md README.md %license LICENSE %{nodejs_sitelib}/fresh %changelog * Thu Oct 29 2015 Jared Smith - 0.3.0-2 - Temporarily disable tests to bootstrap new npm(send) * Thu Oct 08 2015 Jared Smith - 0.3.0-1 - Update to upstream 0.3.0 release * Wed Jun 17 2015 Fedora Release Engineering - 0.2.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 0.2.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sat Mar 08 2014 Jamie Nguyen - 0.2.2-1 - update to upstream release 0.2.2 * Mon Aug 26 2013 Jamie Nguyen - 0.2.0-1 - update to upstream release 0.2.0 * Sat Aug 03 2013 Fedora Release Engineering - 0.1.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Sun Jul 21 2013 Jamie Nguyen - 0.1.0-4 - restrict to compatible arches - enable tests * Wed Jun 19 2013 T.C. Hollingsworth - 0.1.0-3 - rebuild for missing npm(fresh) provides * Tue Feb 12 2013 Jamie Nguyen - 0.1.0-2 - document how to retrieve tests * Mon Feb 11 2013 Jamie Nguyen - 0.1.0-1 - initial package