[nodejs-type-detect] Initial import of nodejs-type-detect

Tom Hughes tomh at fedoraproject.org
Mon Feb 24 14:28:39 UTC 2014


commit f14fd9d30a694085b41e09a77b594717f69af307
Author: Tom Hughes <tom at compton.nu>
Date:   Mon Feb 24 14:29:21 2014 +0000

    Initial import of nodejs-type-detect

 .gitignore              |    2 +
 nodejs-type-detect.spec |   54 +++++++++++++++++++++++++++++++++++++++++++++++
 sources                 |    2 +
 type-detect-dl-tests.sh |   23 ++++++++++++++++++++
 4 files changed, 81 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..5fdcde1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/type-detect-0.1.2.tgz
+/type-detect-tests-0.1.2.tar.bz2
diff --git a/nodejs-type-detect.spec b/nodejs-type-detect.spec
new file mode 100644
index 0000000..24f2f9b
--- /dev/null
+++ b/nodejs-type-detect.spec
@@ -0,0 +1,54 @@
+Name:           nodejs-type-detect
+Version:        0.1.2
+Release:        1%{?dist}
+Summary:        Improved typeof detection for Node.js and the browser
+
+License:        MIT
+URL:            https://github.com/chaijs/type-detect
+Source0:        http://registry.npmjs.org/type-detect/-/type-detect-%{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:        type-detect-tests-%{version}.tar.bz2
+Source10:       type-detect-dl-tests.sh
+BuildArch:      noarch
+ExclusiveArch:  %{nodejs_arches} noarch
+
+BuildRequires:  nodejs-packaging
+
+BuildRequires:  npm(mocha)
+BuildRequires:  npm(simple-assert)
+
+%description
+Improved typeof detection for Node.js and the browser.
+
+
+%prep
+%setup -q -n package
+%setup -T -D -a 1 -q -n package
+rm -rf node_modules
+
+
+%build
+
+
+%install
+mkdir -p %{buildroot}%{nodejs_sitelib}/type-detect
+cp -pr package.json index.js lib %{buildroot}%{nodejs_sitelib}/type-detect
+%nodejs_symlink_deps
+
+
+%check
+%nodejs_symlink_deps --check
+%{nodejs_sitelib}/mocha/bin/mocha --require test/bootstrap --reporter spec test/*.js
+
+
+%files
+%doc README.md History.md 
+%{nodejs_sitelib}/type-detect
+
+
+
+%changelog
+* Fri Jan 31 2014 Tom Hughes <tom at compton.nu> - 0.1.2-1
+- Initial build of 0.1.2
diff --git a/sources b/sources
index e69de29..a6b73a0 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+10e412d67ef0587fa50b3f39e4774acb  type-detect-0.1.2.tgz
+450f8c903310c77cc75027742b3c6e68  type-detect-tests-0.1.2.tar.bz2
diff --git a/type-detect-dl-tests.sh b/type-detect-dl-tests.sh
new file mode 100755
index 0000000..15792f9
--- /dev/null
+++ b/type-detect-dl-tests.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+tag=0.1.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/type-detect.git
+cd type-detect
+git archive --prefix="test/" --format=tar tags/${tag}:test/ \
+    | bzip2 > "$pwd"/type-detect-tests-${tag}.tar.bz2
+popd


More information about the scm-commits mailing list