Blob Blame History Raw
# tape-it is not packaged yet
%global enable_tests 0
%global module_name nano

Name:           nodejs-%{module_name}
Version:        6.2.0
Release:        3%{?dist}
Summary:        Minimalistic couchdb driver for Node.js

License:        ASL 2.0
URL:            https://github.com/dscape/nano
Source0:        https://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

%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 examples
%license LICENSE.md
%{nodejs_sitelib}/%{module_name}

%changelog
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

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

* Wed Jan 20 2016 Parag Nemade <pnemade AT redhat DOT com> - 6.2.0-1
- Update to 6.2.0

* Tue Nov 24 2015 Tom Hughes <tom@compton.nu> - 6.1.5-1
- Update to 6.1.5 upstream release

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

* Mon Dec 08 2014 Parag Nemade <pnemade AT redhat DOT com> - 6.0.2-1
- Initial packaging