%{?nodejs_find_provides_and_requires} # Pass outside mock, getting ECONNREFUSED inside mock. %global enable_tests 1 Name: nodejs-send Version: 0.13.0 Release: 2%{?dist} Summary: Better streaming static file server with Range and conditional-GET support License: MIT Group: System Environment/Libraries URL: https://github.com/visionmedia/send Source0: http://registry.npmjs.org/send/-/send-%{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 # fix directory traversal vulnerability (RHBZ#1146063) #Patch1: nodejs-send-root-traversal.patch BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging BuildRequires: npm(destroy) %if 0%{?enable_tests} BuildRequires: npm(after) BuildRequires: npm(debug) BuildRequires: npm(escape-html) BuildRequires: npm(etag) BuildRequires: npm(fresh) BuildRequires: npm(mime) BuildRequires: npm(mocha) BuildRequires: npm(range-parser) BuildRequires: npm(should) BuildRequires: npm(supertest) %endif %description Send is Connect's static() extracted for generalized use, a streaming static file server supporting partial responses (Ranges), conditional-GET negotiation, high test coverage, and granular events which may be leveraged to take appropriate actions in your application or framework. %prep %setup -q -n package %setup -q -T -D -a 1 -n package #%patch1 -p1 %nodejs_fixdep debug %nodejs_fixdep range-parser '~1.0' %nodejs_fixdep depd '~1.1' %nodejs_fixdep escape-html '~1.0.3' %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/send cp -pr package.json index.js \ %{buildroot}%{nodejs_sitelib}/send %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/mocha --require should --reporter spec %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %doc HISTORY.md README.md %license LICENSE %{nodejs_sitelib}/send %changelog * Thu Oct 29 2015 Jared Smith - 0.13.0-2 - Relax requirement on npm(debug) * Thu Oct 08 2015 Jared Smith - 0.13.0-1 - Update to 0.13.0 release * Wed Jun 17 2015 Fedora Release Engineering - 0.3.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Wed Sep 24 2014 T.C. Hollingsworth - 0.3.0-4 - really apply the patch * Wed Sep 24 2014 T.C. Hollingsworth - 0.3.0-3 - fix directory traversal vulnerability (RHBZ#1146063) * Sat Jun 07 2014 Fedora Release Engineering - 0.3.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Fri Apr 25 2014 Jamie Nguyen - 0.3.0-1 - update to upstream release 0.3.0 * Sat Mar 08 2014 Jamie Nguyen - 0.2.0-1 - update to upstream release 0.2.0 * Mon Aug 26 2013 Jamie Nguyen - 0.1.4-1 - update to upstream release 0.1.4 - add ExclusiveArch logic * Sat Aug 03 2013 Fedora Release Engineering - 0.1.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Fri Jul 05 2013 Jamie Nguyen - 0.1.2-1 - update to upstream release 0.1.2 - restrict to compatible arches * Sun Feb 24 2013 Jamie Nguyen - 0.1.0-3 - download tests from upstream separately - fix %%check - add necessary BuildRequires for the tests in %%check * Wed Feb 13 2013 Jamie Nguyen - 0.1.0-2 - make use of %%nodejs_fixdep * Mon Feb 11 2013 Jamie Nguyen - 0.1.0-1 - initial package