[nodejs-connect] Update to upstream release 2.14.1

Jamie Nguyen jamielinux at fedoraproject.org
Sat Mar 15 10:27:37 UTC 2014


commit 9b4e1fe4c408c51d4db6661eac27101bd53ff472
Author: Jamie Nguyen <j at jamielinux.com>
Date:   Sat Mar 15 10:27:24 2014 +0000

    Update to upstream release 2.14.1

 .gitignore                                         |    5 ++
 dl-tests.sh                                        |    8 ++-
 ...2.14.1-Update-should-and-fix-failing-test.patch |   39 ++++++++++
 nodejs-connect.spec                                |   76 +++++++++++--------
 sources                                            |    7 ++-
 5 files changed, 100 insertions(+), 35 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 1237687..6a2d267 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,8 @@
 /tests-2.7.10.tar.bz2
 /connect-2.8.5.tgz
 /tests-2.8.5.tar.bz2
+/connect-2.14.1.tgz
+/docs-2.14.1.tar.bz2
+/examples-2.14.1.tar.bz2
+/support-2.14.1.tar.bz2
+/tests-2.14.1.tar.bz2
diff --git a/dl-tests.sh b/dl-tests.sh
index abd2140..fc5e61d 100644
--- a/dl-tests.sh
+++ b/dl-tests.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-tag=2.8.5
+tag=2.14.1
 
 set -e
 
@@ -20,4 +20,10 @@ git clone git://github.com/senchalabs/connect.git
 cd connect
 git archive --prefix="test/" --format=tar tags/${tag}:test/ \
     | bzip2 > "$pwd"/tests-${tag}.tar.bz2
+git archive --prefix="support/" --format=tar tags/${tag}:support/ \
+    | bzip2 > "$pwd"/support-${tag}.tar.bz2
+git archive --prefix="docs/" --format=tar tags/${tag}:docs/ \
+    | bzip2 > "$pwd"/docs-${tag}.tar.bz2
+git archive --prefix="examples/" --format=tar tags/${tag}:examples/ \
+    | bzip2 > "$pwd"/examples-${tag}.tar.bz2
 popd
diff --git a/nodejs-connect-2.14.1-Update-should-and-fix-failing-test.patch b/nodejs-connect-2.14.1-Update-should-and-fix-failing-test.patch
new file mode 100644
index 0000000..52bd564
--- /dev/null
+++ b/nodejs-connect-2.14.1-Update-should-and-fix-failing-test.patch
@@ -0,0 +1,39 @@
+From 01d3d1b72858d7736aa05b738031d386f89ecf73 Mon Sep 17 00:00:00 2001
+From: Jamie Nguyen <j at jamielinux.com>
+Date: Mon, 10 Mar 2014 12:11:17 +0000
+Subject: [PATCH] Update should and fix failing test
+
+---
+ package.json         | 2 +-
+ test/errorHandler.js | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/package.json b/package.json
+index 8e76e34..9b27a20 100644
+--- a/package.json
++++ b/package.json
+@@ -36,7 +36,7 @@
+     "multiparty": "2.2.0"
+   },
+   "devDependencies": {
+-    "should": ">= 2.0.2 < 3",
++    "should": "~3.1.3",
+     "mocha": ">= 1.13.0 < 2",
+     "jade": ">= 0.35.0 < 1",
+     "dox": ">= 0.4.4 < 1"
+diff --git a/test/errorHandler.js b/test/errorHandler.js
+index 3f6f56f..a0bf13e 100644
+--- a/test/errorHandler.js
++++ b/test/errorHandler.js
+@@ -48,7 +48,7 @@ describe('connect.errorHandler()', function () {
+         .get('/')
+         .end(function (res) {
+             res.headers['content-type'].should.startWith('text/html');
+-            res.body.should.contain('<title>');
++            res.body.should.containEql('<title>');
+             done();
+         });
+     });
+-- 
+1.8.5.3
+
diff --git a/nodejs-connect.spec b/nodejs-connect.spec
index aa60c04..6f3b7a1 100644
--- a/nodejs-connect.spec
+++ b/nodejs-connect.spec
@@ -3,19 +3,26 @@
 %global enable_tests 0
 
 Name:       nodejs-connect
-Version:    2.8.5
-Release:    2%{?dist}
+Version:    2.14.1
+Release:    1%{?dist}
 Summary:    High performance middleware framework for Node.js
 License:    MIT
 Group:      System Environment/Libraries
 URL:        https://github.com/senchalabs/connect
 Source0:    http://registry.npmjs.org/connect/-/connect-%{version}.tgz
-# The test files are not included in the npm tarball.
-# Source1 is generated by running Source10, which pulls from the upstream
-# version control repository.
+# The test/, support/, docs/ and examples/ folders are not included in the
+# npm tarball. Sources 1 to 4 are generated by running Source10, which pulls
+# from the upstream version control repository.
 Source1:    tests-%{version}.tar.bz2
+Source2:    support-%{version}.tar.bz2
+Source3:    docs-%{version}.tar.bz2
+Source4:    examples-%{version}.tar.bz2
 Source10:   dl-tests.sh
 
+# Update should and fix failing test.
+# https://github.com/senchalabs/connect/pull/1022
+Patch0:     %{name}-2.14.1-Update-should-and-fix-failing-test.patch
+
 BuildArch:  noarch
 %if 0%{?fedora} >= 19
 ExclusiveArch: %{nodejs_arches} noarch
@@ -26,20 +33,31 @@ ExclusiveArch: %{ix86} x86_64 %{arm} noarch
 BuildRequires:  nodejs-packaging
 
 %if 0%{?enable_tests}
-BuildRequires:  npm(buffer-crc32)
+BuildRequires:  mocha
+BuildRequires:  npm(basic-auth-connect)
 BuildRequires:  npm(bytes)
-BuildRequires:  npm(cookie)
+BuildRequires:  npm(cookie-parser)
 BuildRequires:  npm(cookie-signature)
+BuildRequires:  npm(compression)
+BuildRequires:  npm(connect-timeout)
+BuildRequires:  npm(csurf)
 BuildRequires:  npm(debug)
-BuildRequires:  npm(formidable)
+BuildRequires:  npm(errorhandler)
+BuildRequires:  npm(express-session)
 BuildRequires:  npm(fresh)
-BuildRequires:  npm(methods)
-BuildRequires:  npm(mocha)
+BuildRequires:  npm(jade)
+BuildRequires:  npm(method-override)
+BuildRequires:  npm(morgan)
+BuildRequires:  npm(multiparty)
 BuildRequires:  npm(pause)
 BuildRequires:  npm(qs)
-BuildRequires:  npm(send)
+BuildRequires:  npm(raw-body)
+BuildRequires:  npm(response-time)
+BuildRequires:  npm(serve-index)
+BuildRequires:  npm(serve-static)
 BuildRequires:  npm(should)
-BuildRequires:  npm(uid2)
+BuildRequires:  npm(static-favicon)
+BuildRequires:  npm(vhost)
 %endif
 
 %description
@@ -52,10 +70,13 @@ session support, cookie parser, and more.
 
 %prep
 %setup -q -n package
-%setup -T -D -a 1 -q -n package
-%nodejs_fixdep bytes '~0.2.0'
-%nodejs_fixdep uid2 '~0.0.2'
-%nodejs_fixdep qs '~0.6.5'
+%setup -q -T -D -a 1 -n package
+%setup -q -T -D -a 2 -n package
+%setup -q -T -D -a 3 -n package
+%setup -q -T -D -a 4 -n package
+%patch0 -p1
+
+%nodejs_fixdep multiparty '~3.2.3'
 
 
 %build
@@ -65,15 +86,8 @@ session support, cookie parser, and more.
 %install
 mkdir -p %{buildroot}%{nodejs_sitelib}/connect
 
-# These non-javascript sources should be in %%{_datadir}.
-mkdir -p %{buildroot}%{_datadir}/%{name}
-cp -pr lib/public %{buildroot}%{_datadir}/%{name}
-rm -rf lib/public
-
 cp -pr package.json index.js lib/ \
     %{buildroot}%{nodejs_sitelib}/connect
-ln -sf %{_datadir}/%{name}/public \
-    %{buildroot}%{nodejs_sitelib}/connect/lib/public
 
 %nodejs_symlink_deps
 
@@ -82,24 +96,22 @@ ln -sf %{_datadir}/%{name}/public \
 %check
 %nodejs_symlink_deps --check
 
-# Some of the tests require these to be present.
-mkdir docs
-ln -sf %{buildroot}%{_datadir}/%{name}/public lib/public
-
 NODE_ENV=test %{nodejs_sitelib}/mocha/bin/mocha \
-    --reporter dot --timeout 600 test/*.js
+    --reporter dot --timeout 600 test/*.js --bail
 %endif
 
 
 %files
-%doc LICENSE Readme.md
+%doc LICENSE Readme.md docs/ examples/
 %{nodejs_sitelib}/connect
-%{_datadir}/%{name}
 
 
 %changelog
-* Mon Mar 10 2014 Jamie Nguyen <jamielinux at fedoraproject.org> - 2.8.5-2
-- update dependency on npm(qs)
+* Mon Mar 10 2014 Jamie Nguyen <jamielinux at fedoraproject.org> - 2.14.1-1
+- update to upstream release 2.14.1
+
+* Mon Feb 24 2014 Jamie Nguyen <jamielinux at fedoraproject.org> - 2.13.0-1
+- update to upstream release 2.13.0
 
 * Mon Aug 26 2013 Jamie Nguyen <jamielinux at fedoraproject.org> - 2.8.5-1
 - update to upstream release 2.8.5
diff --git a/sources b/sources
index e063929..c980ecc 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,5 @@
-f510b099b7d00f09d887387a1fdb5e3a  connect-2.8.5.tgz
-9ad0dfb1afe87cfef9716690bed4bef5  tests-2.8.5.tar.bz2
+246042692afd36655605ea3eb16b4ac1  connect-2.14.1.tgz
+b77d489dda336355981cc27c6e8d3c85  docs-2.14.1.tar.bz2
+dfc82b583df041e9a0406d697cb4e2d5  examples-2.14.1.tar.bz2
+284eb2a2bb5825d6f05554009cdc4adb  support-2.14.1.tar.bz2
+1a6ddbf4031aaee03052d2519eeac533  tests-2.14.1.tar.bz2


More information about the scm-commits mailing list