e432491
%{?nodejs_find_provides_and_requires}
e432491
e432491
%global enable_tests 0
e432491
e432491
Name:       nodejs-q
3c55d18
Version:    1.0.1
3c55d18
Release:    1%{?dist}
e432491
Summary:    A tool for making and composing asynchronous promises in JavaScript
e432491
# q.js appears to contain both MIT and ASL 2.0 licensed code
e432491
License:    MIT and ASL 2.0
e432491
Group:      System Environment/Libraries
e432491
URL:        https://github.com/kriskowal/q
e432491
Source0:    http://registry.npmjs.org/q/-/q-%{version}.tgz
e432491
# Source1 is generated by running Source10, which pulls from the upstream
e432491
# revision control repository.
e432491
Source1:    tests-v%{version}.tar.bz2
e432491
Source10:   dl-tests.sh
b8086a2
e432491
BuildArch:  noarch
b8086a2
%if 0%{?fedora} >= 19
b8086a2
ExclusiveArch: %{nodejs_arches} noarch
b8086a2
%else
b8086a2
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
b8086a2
%endif
e432491
b8086a2
BuildRequires:  nodejs-packaging
e432491
e432491
%if 0%{?enable_tests}
e432491
BuildRequires:  npm(jasmine-node)
3c55d18
# Not yet packaged for Fedora.
3c55d18
# BuildRequires:  npm(promises-aplus-tests)
e432491
%endif
e432491
e432491
%description
e432491
Q is a tool for making and composing asynchronous promises in JavaScript.
e432491
e432491
If a function cannot return a value or throw an exception without blocking,
e432491
it can return a promise instead. A promise is an object that represents the
e432491
return value or the thrown exception that the function may eventually provide.
e432491
A promise can also be used as a proxy for a remote object to overcome latency.
e432491
e432491
Q can exchange promises with jQuery, Dojo, When.js, WinJS, and more.
e432491
Additionally, there are many libraries that produce and consume Q promises for
e432491
everything from file system/database access or RPC to templating.
e432491
e432491
e432491
%prep
e432491
%setup -q -n package
e432491
%setup -q -D -T -a 1 -n package
e432491
e432491
e432491
%build
e432491
#nothing to do
e432491
e432491
e432491
%install
e432491
mkdir -p %{buildroot}%{nodejs_sitelib}/q
e432491
cp -pr package.json q.js queue.js \
e432491
    %{buildroot}%{nodejs_sitelib}/q
e432491
e432491
%nodejs_symlink_deps
e432491
e432491
e432491
%if 0%{?enable_tests}
e432491
%check
3c55d18
%nodejs_symlink_deps --check
3c55d18
# /usr/bin/npm install promises-aplus-tests@1.x
e432491
%{nodejs_sitelib}/jasmine-node/bin/jasmine-node spec
3c55d18
./node_modules/promises-aplus-tests/lib/cli.js \
e432491
    spec/aplus-adapter
e432491
%endif
e432491
e432491
%files
e432491
%doc CONTRIBUTING.md LICENSE README.md
e432491
%{nodejs_sitelib}/q
e432491
e432491
e432491
%changelog
3c55d18
* Mon Nov 03 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.0.1-1
3c55d18
- update to upstream release 1.0.1
3c55d18
a3abefd
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-3
a3abefd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
a3abefd
b8086a2
* Sun Jul 28 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.9.6-2
b8086a2
- restrict to compatible arches
b8086a2
e432491
* Fri Jun 21 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.9.6-1
e432491
- update to upstream release 0.9.6
e432491
- add %%check and related BR
e432491
e432491
* Sun May 26 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.9.4-1
e432491
- update to upstream release 0.9.4
e432491
- upstream have now included a copy of the MIT license
e432491
e432491
* Fri Feb 22 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.8.12-2
e432491
- add a copy of the MIT license from upstream while waiting for the next release
e432491
e432491
* Wed Feb 13 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.8.12-1
e432491
- initial package