cf91d01
%global enable_tests 1
cf91d01
cf91d01
Name:           nodejs-agentkeepalive
15750c7
Version:        0.2.2
0a52ca6
Release:        2%{?dist}
cf91d01
Summary:        Missing keep-alive http.Agent
cf91d01
cf91d01
License:        MIT
cf91d01
URL:            https://github.com/TBEDP/agentkeepalive
cf91d01
Source0:        http://registry.npmjs.org/agentkeepalive/-/agentkeepalive-%{version}.tgz
468f916
# The test files are not included in the npm tarball.
468f916
# Source1 is generated using Source10, which pulls from the upstream
468f916
# version control repository.
468f916
Source1:        agentkeepalive-tests-%{version}.tar.bz2
468f916
Source10:       agentkeepalive-dl-tests.sh
468f916
Source20:       nodejs-agentkeepalive-ssl.conf
cf91d01
BuildArch:      noarch
468f916
ExclusiveArch:  %{nodejs_arches} noarch
cf91d01
468f916
BuildRequires:  nodejs-packaging
cf91d01
cf91d01
%if 0%{?enable_tests}
d0e418b
BuildRequires:  openssl
cf91d01
BuildRequires:  npm(mocha)
cf91d01
BuildRequires:  npm(should)
cf91d01
BuildRequires:  npm(pedding)
cf91d01
%endif
cf91d01
cf91d01
%description
cf91d01
The nodejs's missing keep alive http.Agent. Support HTTP and HTTPS.
cf91d01
cf91d01
cf91d01
%prep
cf91d01
%setup -q -n package
468f916
%setup -T -D -a 1 -q -n package
cf91d01
rm -rf node_modules
cf91d01
cf91d01
cf91d01
%build
cf91d01
cf91d01
cf91d01
%install
cf91d01
mkdir -p %{buildroot}/%{nodejs_sitelib}/agentkeepalive
cf91d01
cp -pr package.json index.js lib %{buildroot}/%{nodejs_sitelib}/agentkeepalive
cf91d01
%nodejs_symlink_deps
cf91d01
cf91d01
cf91d01
%if 0%{?enable_tests}
cf91d01
%check
468f916
%nodejs_symlink_deps --check
cf91d01
pushd test/fixtures
468f916
OPENSSL_CONF=%{SOURCE20} sh genkey.sh
cf91d01
popd
cf91d01
NODE_TLS_REJECT_UNAUTHORIZED=0 %{nodejs_sitelib}/mocha/bin/mocha -R spec -t 10000
cf91d01
%endif
cf91d01
cf91d01
cf91d01
%files
468f916
%doc README.md History.md AUTHORS example
cf91d01
%{nodejs_sitelib}/agentkeepalive
cf91d01
cf91d01
cf91d01
%changelog
0a52ca6
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.2-2
0a52ca6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
0a52ca6
15750c7
* Tue Nov 19 2013 Tom Hughes <tom@compton.nu> - 0.2.2-1
15750c7
- Update to 0.2.2 upstream release
15750c7
468f916
* Fri Nov  8 2013 Tom Hughes <tom@compton.nu> - 0.2.0-1
468f916
- Update to 0.2.0 upstream release
468f916
- Update to latest nodejs packaging standards
468f916
a88f37b
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.5-3
a88f37b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
a88f37b
cf91d01
* Sun May 26 2013 Tom Hughes <tom@compton.nu> - 0.1.5-2
468f916
- Fix rpmlint warnings
cf91d01
cf91d01
* Mon Feb 25 2013 Tom Hughes <tom@compton.nu> - 0.1.5-1
cf91d01
- Initial build of 0.1.5