[nodejs-chai-passport-strategy] Initial import of nodejs-chai-passport-strategy

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


commit fc67535d1d49f2247ded0115f1525bd2d8e2f88c
Author: Tom Hughes <tom at compton.nu>
Date:   Sun Aug 18 21:26:54 2013 +0100

    Initial import of nodejs-chai-passport-strategy

 .gitignore                         |    2 +
 chai-passport-strategy-dl-tests.sh |   23 ++++++++++++++
 nodejs-chai-passport-strategy.spec |   59 ++++++++++++++++++++++++++++++++++++
 sources                            |    2 +
 4 files changed, 86 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..4852c16 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/chai-passport-strategy-0.1.0.tgz
+/chai-passport-strategy-tests-v0.1.0.tar.bz2
diff --git a/chai-passport-strategy-dl-tests.sh b/chai-passport-strategy-dl-tests.sh
new file mode 100755
index 0000000..4b8226b
--- /dev/null
+++ b/chai-passport-strategy-dl-tests.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+tag=v0.1.0
+
+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/jaredhanson/chai-passport-strategy.git
+cd chai-passport-strategy
+git archive --prefix="test/" --format=tar tags/${tag}:test/ \
+    | bzip2 > "$pwd"/chai-passport-strategy-tests-${tag}.tar.bz2
+popd
diff --git a/nodejs-chai-passport-strategy.spec b/nodejs-chai-passport-strategy.spec
new file mode 100644
index 0000000..d2e1fb1
--- /dev/null
+++ b/nodejs-chai-passport-strategy.spec
@@ -0,0 +1,59 @@
+%global enable_tests 1
+
+Name:           nodejs-chai-passport-strategy
+Version:        0.1.0
+Release:        1%{?dist}
+Summary:        Helpers for testing Passport strategies with Chai
+
+License:        MIT
+URL:            https://github.com/jaredhanson/chai-passport-strategy
+Source0:        http://registry.npmjs.org/chai-passport-strategy/-/chai-passport-strategy-%{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-passport-strategy-tests-v%{version}.tar.bz2
+Source10:       chai-passport-strategy-dl-tests.sh
+BuildArch:      noarch
+ExclusiveArch:  %{nodejs_arches} noarch
+
+BuildRequires:  nodejs-packaging
+
+%if 0%{?enable_tests}
+BuildRequires:  npm(mocha)
+BuildRequires:  npm(chai)
+%endif
+
+%description
+Helpers for testing Passport strategies with the Chai assertion library.
+
+
+%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-passport-strategy
+cp -pr package.json lib %{buildroot}/%{nodejs_sitelib}/chai-passport-strategy
+%nodejs_symlink_deps
+
+
+%if 0%{?enable_tests}
+%check
+%nodejs_symlink_deps --check
+%{nodejs_sitelib}/mocha/bin/mocha --reporter spec --require test/bootstrap/node test/*.test.js
+%endif
+
+
+%files
+%doc LICENSE README.md
+%{nodejs_sitelib}/chai-passport-strategy
+
+
+%changelog
+* Sun Aug 18 2013 Tom Hughes <tom at compton.nu> - 0.1.0-1
+- Initial build of 0.1.0
diff --git a/sources b/sources
index e69de29..0580af8 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+476fe656dd93017edcff415c4809c773  chai-passport-strategy-0.1.0.tgz
+96d7838429c51bbc26e5438182f47d60  chai-passport-strategy-tests-v0.1.0.tar.bz2


More information about the scm-commits mailing list