Blob Blame History Raw
%global enable_tests 1

Name:           nodejs-agentkeepalive
Version:        0.2.2
Release:        2%{?dist}
Summary:        Missing keep-alive http.Agent

License:        MIT
URL:            https://github.com/TBEDP/agentkeepalive
Source0:        http://registry.npmjs.org/agentkeepalive/-/agentkeepalive-%{version}.tgz
# The test files are not included in the npm tarball.
# Source1 is generated using Source10, which pulls from the upstream
# version control repository.
Source1:        agentkeepalive-tests-%{version}.tar.bz2
Source10:       agentkeepalive-dl-tests.sh
Source20:       nodejs-agentkeepalive-ssl.conf
BuildArch:      noarch
ExclusiveArch:  %{nodejs_arches} noarch

BuildRequires:  nodejs-packaging

%if 0%{?enable_tests}
BuildRequires:  openssl
BuildRequires:  npm(mocha)
BuildRequires:  npm(should)
BuildRequires:  npm(pedding)
%endif

%description
The nodejs's missing keep alive http.Agent. Support HTTP and HTTPS.


%prep
%setup -q -n package
%setup -T -D -a 1 -q -n package
rm -rf node_modules


%build


%install
mkdir -p %{buildroot}/%{nodejs_sitelib}/agentkeepalive
cp -pr package.json index.js lib %{buildroot}/%{nodejs_sitelib}/agentkeepalive
%nodejs_symlink_deps


%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
pushd test/fixtures
OPENSSL_CONF=%{SOURCE20} sh genkey.sh
popd
NODE_TLS_REJECT_UNAUTHORIZED=0 %{nodejs_sitelib}/mocha/bin/mocha -R spec -t 10000
%endif


%files
%doc README.md History.md AUTHORS example
%{nodejs_sitelib}/agentkeepalive


%changelog
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Tue Nov 19 2013 Tom Hughes <tom@compton.nu> - 0.2.2-1
- Update to 0.2.2 upstream release

* Fri Nov  8 2013 Tom Hughes <tom@compton.nu> - 0.2.0-1
- Update to 0.2.0 upstream release
- Update to latest nodejs packaging standards

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Sun May 26 2013 Tom Hughes <tom@compton.nu> - 0.1.5-2
- Fix rpmlint warnings

* Mon Feb 25 2013 Tom Hughes <tom@compton.nu> - 0.1.5-1
- Initial build of 0.1.5