%{?nodejs_find_provides_and_requires} %global enable_tests 0 Name: nodejs-cookie-parser Version: 1.4.0 Release: 1%{?dist} Summary: A Node.js module for cookie parsing with signatures License: MIT Group: System Environment/Libraries URL: https://github.com/expressjs/cookie-parser Source0: http://registry.npmjs.org/cookie-parser/-/cookie-parser-%{version}.tgz # 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: mocha BuildRequires: npm(connect) BuildRequires: npm(supertest) %endif %description Parse Cookie header and populate req.cookies with an object keyed by the cookie names. Optionally you may enabled signed cookie support by passing a secret string, which assigns req.secret so it may be used by other middleware. %prep %setup -q -n package # setup the tests %setup -q -T -D -a 1 -n package %nodejs_fixdep cookie '^0.2.3' %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/cookie-parser cp -pr package.json index.js \ %{buildroot}%{nodejs_sitelib}/cookie-parser %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check /usr/bin/mocha --ui bdd --reporter list -- test/*.js %endif %files %doc LICENSE README.md %{nodejs_sitelib}/cookie-parser %changelog * Wed Nov 04 2015 Jared Smith - 1.4.0-1 - Update to upstream 1.4.0 release * Wed Jun 17 2015 Fedora Release Engineering - 1.0.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 1.0.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Wed Mar 12 2014 Jamie Nguyen - 1.0.1-4 - upstream have merged the pull request, so now use upstream's copy of the LICENSE * Wed Mar 12 2014 Jamie Nguyen - 1.0.1-3 - fix inclusion of LICENSE * Wed Mar 12 2014 Jamie Nguyen - 1.0.1-2 - add copy of the MIT license * Sat Mar 08 2014 Jamie Nguyen - 1.0.1-1 - initial package