%global enable_tests 1
%global srcname title-case
Name: nodejs-%{srcname}
Version: 1.0.1
Release: 1%{?dist}
Summary: Title case a string
License: MIT
URL: https://github.com/blakeembrey/%{srcname}
Source0: http://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(upper-case)
BuildRequires: npm(sentence-case)
BuildRequires: npm(istanbul)
BuildRequires: npm(mocha)
%endif
%description
%{summary}.
%prep
%setup -q -n package
%build
#nothing to do
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname}
cp -pr package.json title-case.js %{buildroot}%{nodejs_sitelib}/%{srcname}
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
istanbul-js cover mocha -- -R spec
%endif
%files
%doc README.md LICENSE
%{nodejs_sitelib}/%{srcname}
%changelog
* Sun Nov 16 2014 Piotr Popieluch <piotr1212@gmail.com> - 1.0.1-1
- Initial package