Blob Blame History Raw
# network tests not working in koji
%global enable_tests 0
%global module_name timed-out

Name:           nodejs-%{module_name}
Version:        4.0.1
Release:        2%{?dist}
Summary:        Timeout HTTP/HTTPS requests

License:        MIT
URL:            https://github.com/floatdrop/timed-out
Source0:        https://github.com/floatdrop/timed-out/archive/v%{version}.tar.gz
BuildArch:      noarch
ExclusiveArch:  %{nodejs_arches} noarch

BuildRequires:  nodejs-packaging

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

%description
Timeout HTTP/HTTPS requests. Emit Error object with code property
equal ETIMEDOUT or ESOCKETTIMEDOUT when ClientRequest is hanged.

%prep
%autosetup -n %{module_name}-%{version}
rm -rf node_modules

%build
# nothing to build

%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{module_name}
cp -pr package.json *.js %{buildroot}%{nodejs_sitelib}/%{module_name}
%nodejs_symlink_deps

%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")'
mocha
%endif

%files
%doc readme.md license
%{nodejs_sitelib}/%{module_name}

%changelog
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Fri Jan 27 2017 Parag Nemade <pnemade AT redhat DOT com> - 4.0.1-1
- Update to 4.0.1

* Fri Dec 30 2016 Parag Nemade <pnemade AT redhat DOT com> - 4.0.0-1
- Update to 4.0.0

* Thu Dec 29 2016 Parag Nemade <pnemade AT redhat DOT com> - 3.1.2-1
- Update to 3.1.2

* Thu Dec 15 2016 Parag Nemade <pnemade AT redhat DOT com> - 3.1.0-1
- Update to 3.1.0

* Mon Sep 19 2016 Parag Nemade <pnemade AT redhat DOT com> - 3.0.0-1
- Update to 3.0.0

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sun Dec 07 2014 Parag Nemade <pnemade AT redhat DOT com> - 2.0.0-2
- Add test.js from upstream and enable tests

* Thu Dec 04 2014 Parag Nemade <pnemade AT redhat DOT com> - 2.0.0-1
- Initial packaging