[nodejs-chai] Initial import of nodejs-chai

Tom Hughes tomh at fedoraproject.org
Sun Aug 18 20:19:39 UTC 2013


commit 8a711eae258b2e1539596c3bc2ebd4cb0e6f10e1
Author: Tom Hughes <tom at compton.nu>
Date:   Sun Aug 18 21:19:20 2013 +0100

    Initial import of nodejs-chai

 .gitignore       |    2 +
 chai-dl-tests.sh |   23 ++++++++++++++++++++
 nodejs-chai.spec |   60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources          |    2 +
 4 files changed, 87 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..d27261e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/chai-1.7.2.tgz
+/chai-tests-1.7.2.tar.bz2
diff --git a/chai-dl-tests.sh b/chai-dl-tests.sh
new file mode 100755
index 0000000..9daf49a
--- /dev/null
+++ b/chai-dl-tests.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+tag=1.7.2
+
+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 git://github.com/chaijs/chai.git
+cd chai
+git archive --prefix="test/" --format=tar tags/${tag}:test/ \
+    | bzip2 > "$pwd"/chai-tests-${tag}.tar.bz2
+popd
diff --git a/nodejs-chai.spec b/nodejs-chai.spec
new file mode 100644
index 0000000..f44d08f
--- /dev/null
+++ b/nodejs-chai.spec
@@ -0,0 +1,60 @@
+%global enable_tests 1
+
+Name:           nodejs-chai
+Version:        1.7.2
+Release:        1%{?dist}
+Summary:        BDD/TDD assertion library for Node.js and the browser
+
+License:        MIT
+URL:            http://chaijs.com
+Source0:        http://registry.npmjs.org/chai/-/chai-%{version}.tgz
+# The test files are not included in the npm tarball.
+# Source1 is generated using Source10, which pulls from the upstream
+# version control repository.
+Source1:        chai-tests-%{version}.tar.bz2
+Source10:       chai-dl-tests.sh
+BuildArch:      noarch
+ExclusiveArch:  %{nodejs_arches} noarch
+
+BuildRequires:  nodejs-packaging
+
+%if 0%{?enable_tests}
+BuildRequires:  npm(mocha)
+BuildRequires:  npm(assertion-error)
+%endif
+
+%description
+Chai is a BDD / TDD assertion library for node and the browser that
+can be delightfully paired with any JavaScript testing framework.
+
+
+%prep
+%setup -q -n package
+%setup -T -D -a 1 -q -n package
+rm -rf node_modules
+
+
+%build
+
+
+%install
+mkdir -p %{buildroot}/%{nodejs_sitelib}/chai
+cp -r package.json index.js chai.js lib %{buildroot}/%{nodejs_sitelib}/chai
+%nodejs_symlink_deps
+
+
+%if 0%{?enable_tests}
+%check
+%nodejs_symlink_deps --check
+%{nodejs_sitelib}/mocha/bin/mocha --require ./test/bootstrap --reporter dot --ui tdd test/*.js
+%endif
+
+
+%files
+%doc README.md History.md ReleaseNotes.md
+%{nodejs_sitelib}/chai
+
+
+%changelog
+* Sat Aug 17 2013 Tom Hughes <tom at compton.nu> - 1.7.2-1
+- Initial build of 1.7.2
diff --git a/sources b/sources
index e69de29..681d931 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+35f357704cdd5475c83e2171318ad29e  chai-1.7.2.tgz
+c18aa659528c6b5a8266c712b389f4e1  chai-tests-1.7.2.tar.bz2


More information about the scm-commits mailing list