# tape-it is not packaged yet
%global enable_tests 0
%global module_name nano
Name: nodejs-%{module_name}
Version: 6.0.2
Release: 1%{?dist}
Summary: Minimalistic couchdb driver for Node.js
License: ASL 2.0
URL: http://github.com/dscape/nano
Source0: http://registry.npmjs.org/%{module_name}/-/%{module_name}-%{version}.tgz
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(tape)
BuildRequires: npm(traceback)
%endif
%description
minimalistic couchdb driver for node.js
nano features:
* minimalistic - there is only a minimum of abstraction between you and couchdb
* pipes - proxy requests from couchdb directly to your end user
* errors - errors are proxied directly from couchdb: if you know couchdb you
already know nano.
%prep
%setup -q -n package
rm -rf node_modules
%nodejs_fixdep debug ~0.x
%nodejs_fixdep request ~2.x
%nodejs_fixdep underscore ~1.x
%build
# nothing to build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{module_name}
cp -pr package.json lib %{buildroot}%{nodejs_sitelib}/%{module_name}
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
istanbul-js check-coverage --statements 100 --functions 100 --lines 100 --branches 100
tape tests/*/*/*.js
DEBUG=* NOCK_OFF=true istanbul-js cover tape tests/*/*/*.js
%endif
%files
%doc README.md LICENSE.md examples
%{nodejs_sitelib}/%{module_name}
%changelog
* Mon Dec 08 2014 Parag Nemade <pnemade AT redhat DOT com> - 6.0.2-1
- Initial packaging