[nodejs-async] Update to upstream release 0.2.9

Jamie Nguyen jamielinux at fedoraproject.org
Tue May 28 12:47:14 UTC 2013


commit f56a49b0b1baccad4c8f596b6f7ed03b0e66f9b5
Author: Jamie Nguyen <j at jamielinux.com>
Date:   Tue May 28 13:47:04 2013 +0100

    Update to upstream release 0.2.9

 .gitignore        |    2 ++
 dl-tests.sh       |   23 +++++++++++++++++++++++
 nodejs-async.spec |   25 ++++++++++++++++++++-----
 sources           |    3 ++-
 4 files changed, 47 insertions(+), 6 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 7408424..da303e1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,5 @@
 /async-0.2.5.tgz
 /async-0.2.6.tgz
 /async-0.2.8.tgz
+/async-0.2.9.tgz
+/tests-v0.2.5.tar.bz2
diff --git a/dl-tests.sh b/dl-tests.sh
new file mode 100755
index 0000000..0720366
--- /dev/null
+++ b/dl-tests.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+tag=v0.2.5
+
+set -e
+
+tmp=$(mktemp -d)
+
+trap cleanup EXIT
+cleanup() {
+    set +e
+    [ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp"
+}
+
+unset CDPATH
+pwd=$(pwd)
+
+pushd "$tmp"
+git clone https://github.com/caolan/async.git
+cd async
+git archive --prefix="test/" --format=tar tags/${tag}:test/ \
+    | bzip2 > "$pwd"/tests-${tag}.tar.bz2
+popd
diff --git a/nodejs-async.spec b/nodejs-async.spec
index 1b7422b..3c49f19 100644
--- a/nodejs-async.spec
+++ b/nodejs-async.spec
@@ -1,7 +1,9 @@
 %{?nodejs_find_provides_and_requires}
 
+%global enable_tests 0
+
 Name:           nodejs-async
-Version:        0.2.8
+Version:        0.2.9
 Release:        1%{?dist}
 Summary:        Higher-order functions and common patterns for asynchronous code
 BuildArch:      noarch
@@ -10,10 +12,18 @@ Group:          System Environment/Libraries
 License:        MIT
 URL:            http://github.com/caolan/async/
 Source0:        http://registry.npmjs.org/async/-/async-%{version}.tgz
+# Source1 is generated by running Source10, which pulls from the upstream
+# revision control repository.
+Source1:        tests-v0.2.5.tar.bz2
+Source10:       dl-tests.sh
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  nodejs-devel
 
+%if 0%{?enable_tests}
+BuildRequires:  npm(nodeunit)
+%endif
+
 %description
 Async is a utility module which provides straight-forward, powerful functions
 for working with asynchronous JavaScript. Although originally designed for
@@ -27,6 +37,7 @@ callback as the last argument of your async function.
 
 %prep
 %setup -q -n package
+%setup -q -T -D -a 1 -n package
 
 %build
 #nothing to do
@@ -36,10 +47,10 @@ rm -rf %buildroot
 mkdir -p %{buildroot}%{nodejs_sitelib}/async
 cp -pr package.json lib %{buildroot}%{nodejs_sitelib}/async
 
-#has commands for testing in Makefile and package.json but no actual tests??
-#also requires nodeunit which isn't packaged yet
-#%%check
-#make test
+%if 0%{?enable_tests}
+%check
+%{nodejs_sitelib}/nodeunit/bin/nodeunit test/test-async.js
+%endif
 
 %clean
 rm -rf %buildroot
@@ -50,6 +61,10 @@ rm -rf %buildroot
 %doc README.md LICENSE
 
 %changelog
+* Tue May 28 2013 Jamie Nguyen <jamielinux at fedoraproject.org> - 0.2.9-1
+- update to upstream release 0.2.9
+- add %%check
+
 * Sat May 25 2013 Jamie Nguyen <jamielinux at fedoraproject.org> - 0.2.8-1
 - update to upstream release 0.2.8
 
diff --git a/sources b/sources
index 7c89cfd..07c6f43 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
-438aaa71c645bfc1454b45e8b5b98173  async-0.2.8.tgz
+895ac62ba7c61086cffdd50ab03c0447  async-0.2.9.tgz
+a889209204ffb70d21aef8bf40490144  tests-v0.2.5.tar.bz2


More information about the scm-commits mailing list