%{?nodejs_find_provides_and_requires} %global enable_tests 0 Name: nodejs-raw-body Version: 2.2.0 Release: 1%{?dist} Summary: Get and validate the raw body of a readable stream License: MIT URL: https://github.com/stream-utils/raw-body Source0: http://registry.npmjs.org/raw-body/-/raw-body-%{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(bytes) BuildRequires: npm(iconv-lite) BuildRequires: npm(unpipe) BuildRequires: npm(bluebird) BuildRequires: npm(istanbul) Buildrequires: npm(mocha) BuildRequires: npm(readable-stream) BuildRequires: npm(through2) # not packaged # BuildRequires: npm(eslint) # BuildRequires: npm(eslint-config-standard) # BuildRequires: npm(eslint-plugin-markdown) # BuildRequires: npm(eslint-plugin-promise) # BuildRequires: npm(eslint-plugin-standard) %endif %description This module gets the entire buffer of a stream either as a buffer or a string. It validates the stream's length against an expected length and maximum limit. It is ideal for parsing request bodies. %prep %setup -q -n package %setup -q -T -D -a 1 -n package %nodejs_fixdep bytes --caret %nodejs_fixdep iconv-lite --caret %nodejs_fixdep unpipe --caret %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/raw-body cp -pr package.json index.js \ %{buildroot}%{nodejs_sitelib}/raw-body %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check mocha --trace-deprecation --reporter spec --bail --check-leaks test/ istanbul cover usr/bin/mocha -- --trace-deprecation --reporter dot --check-leaks test/ istanbul cover usr/bin/mocha --report lcovonly -- --trace-deprecation --reporter spec --check-leaks test/ %endif %files %doc README.md %{nodejs_sitelib}/raw-body %changelog * Mon Feb 13 2017 Zuzana Svetlikova - 2.2.0-1 - Update * Fri Feb 10 2017 Fedora Release Engineering - 1.1.4-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Thu Feb 04 2016 Fedora Release Engineering - 1.1.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Wed Jun 17 2015 Fedora Release Engineering - 1.1.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 1.1.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun Apr 20 2014 Jamie Nguyen - 1.1.4-1 - update to upstream release 1.1.4 * Mon Mar 10 2014 Jamie Nguyen - 1.1.3-1 - initial package