Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

%global enable_tests 0

Name:       nodejs-supertest
Version:    0.11.0
Release:    2%{?dist}
Summary:    A superagent driven library for testing HTTP servers
License:    MIT
Group:      System Environment/Libraries
URL:        https://github.com/visionmedia/supertest
Source0:    http://registry.npmjs.org/supertest/-/supertest-%{version}.tgz

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(express)
BuildRequires:  npm(methods)
BuildRequires:  npm(mocha)
BuildRequires:  npm(should)
BuildRequires:  npm(superagent)
%endif

%description
This module provides a high-level abstraction for testing HTTP servers,
while still allowing you to drop down to the lower-level API provided by
superagent.


%prep
%setup -q -n package

%nodejs_fixdep superagent '~0.17.0'


%build
#nothing to do


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

%nodejs_symlink_deps


%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
NODE_TLS_REJECT_UNAUTHORIZED=0 /usr/bin/mocha --require should --reporter spec
%endif


%files
%doc example.js History.md LICENSE Readme.md
%{nodejs_sitelib}/supertest


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

* Sun Apr 20 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.11.0-1
- update to upstream release 0.11.0

* Mon Mar 10 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.9.0-1
- initial package