%global enable_tests 0
Name: nodejs-oauth
Version: 0.9.10
Release: 1%{?dist}
Summary: Library for interacting with OAuth 1.0, 1.0A, 2 and Echo
License: MIT
URL: https://github.com/ciaranj/node-oauth
Source0: http://registry.npmjs.org/oauth/-/oauth-%{version}.tgz
# Remove fallback to bundled SHA1 implementation
Patch0: nodejs-oauth-sha1.patch
BuildArch: noarch
BuildRequires: nodejs-devel
%if 0%{?enable_tests}
BuildRequires: npm(vows)
%endif
%description
Library for interacting with OAuth 1.0, 1.0A, 2 and Echo. Provides
simplified client access and allows for construction of more complex
APIs and OAuth providers.
%prep
%setup -q -n package
%patch0 -p1
rm -rf node_modules lib/sha1.js tests/sha1.js
%build
%if 0%{?enable_tests}
%check
ln -s %{nodejs_sitelib} .
%{nodejs_sitelib}/vows/bin/vows tests/* --spec
%endif
%install
mkdir -p %{buildroot}/%{nodejs_sitelib}/oauth
cp -pr package.json index.js lib %{buildroot}/%{nodejs_sitelib}/oauth
%nodejs_symlink_deps
%files
%doc LICENSE Readme.md examples
%{nodejs_sitelib}/oauth
%changelog
* Sun Mar 10 2013 Tom Hughes <tom@compton.nu> - 0.9.10-1
- Update to 0.9.10 upstream release
* Sun Mar 10 2013 Tom Hughes <tom@compton.nu> - 0.9.8-4
- Remove fallback to bundled SHA1 implementation
* Sat Mar 9 2013 Tom Hughes <tom@compton.nu> - 0.9.8-3
- Replace bundled sha1.js with a dependency on jshashes
- Remove BSD from license
* Sat Mar 2 2013 Tom Hughes <tom@compton.nu> - 0.9.8-2
- Link node_modules for tests
- Improve description
- Add BSD to license
* Sun Feb 10 2013 Tom Hughes <tom@compton.nu> - 0.9.8-1
- Initial build of 0.9.8