diff --git a/.gitignore b/.gitignore index e69de29..5992148 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/resumer-0.0.0.tgz diff --git a/nodejs-resumer-concat-stream.patch b/nodejs-resumer-concat-stream.patch new file mode 100644 index 0000000..db4b7fe --- /dev/null +++ b/nodejs-resumer-concat-stream.patch @@ -0,0 +1,54 @@ +commit 161d30df8da2339418e1ee5ef1d9ad502ed5dcbb +Author: Tom Hughes +Date: Thu Jul 24 19:28:39 2014 +0100 + + Update to a more recent version of concat-stream + +diff --git a/package.json b/package.json +index 22c84b6..9445f20 100644 +--- a/package.json ++++ b/package.json +@@ -9,7 +9,7 @@ + "devDependencies": { + "tap": "~0.4.0", + "tape": "~1.0.2", +- "concat-stream": "~0.1.1" ++ "concat-stream": "~1.4.4" + }, + "scripts": { + "test": "tap test/*.js" +diff --git a/test/resume.js b/test/resume.js +index 1eaecac..c36a602 100644 +--- a/test/resume.js ++++ b/test/resume.js +@@ -6,7 +6,7 @@ test('implicit resume', function (t) { + t.plan(1); + + var s = createStream(); +- s.pipe(concat(function (err, body) { ++ s.pipe(concat(function (body) { + t.equal(body, 'beep boop\n'); + })); + }); +@@ -23,7 +23,7 @@ test('pause/resume', function (t) { + s.resume(); + }, 100); + +- s.pipe(concat(function (err, body) { ++ s.pipe(concat(function (body) { + t.equal(paused, false); + t.equal(body, 'beep boop\n'); + })); +diff --git a/test/through.js b/test/through.js +index ddcaf48..f9981fa 100644 +--- a/test/through.js ++++ b/test/through.js +@@ -11,7 +11,7 @@ test('through write/end', function (t) { + t.ok(true); + }); + +- s.pipe(concat(function (err, body) { ++ s.pipe(concat(function (body) { + t.equal(body, 'BEGIN\nRAWR\nEND\n'); + })); + diff --git a/nodejs-resumer.spec b/nodejs-resumer.spec new file mode 100644 index 0000000..a3a6d3b --- /dev/null +++ b/nodejs-resumer.spec @@ -0,0 +1,52 @@ +Name: nodejs-resumer +Version: 0.0.0 +Release: 1%{?dist} +Summary: A stream that starts paused and resumes on the next tick + +License: MIT +URL: https://github.com/substack/resumer +Source0: http://registry.npmjs.org/resumer/-/resumer-%{version}.tgz +# https://github.com/substack/resumer/pull/2 +Patch0: nodejs-resumer-concat-stream.patch +BuildArch: noarch +ExclusiveArch: %{nodejs_arches} noarch + +BuildRequires: nodejs-packaging + +BuildRequires: npm(tap) +BuildRequires: npm(tape) +BuildRequires: npm(concat-stream) +BuildRequires: npm(through) + +%description +A through stream that starts paused and resumes on the next tick. + + +%prep +%setup -q -n package +%patch0 -p1 +rm -rf node_modules + + +%build + + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/resumer +cp -pr package.json index.js %{buildroot}%{nodejs_sitelib}/resumer +%nodejs_symlink_deps + + +%check +%nodejs_symlink_deps --check +%tap test/*.js + + +%files +%doc LICENSE readme.markdown example +%{nodejs_sitelib}/resumer + + +%changelog +* Thu Jul 24 2014 Tom Hughes - 0.0.0-1 +- Initial build of 0.0.0 diff --git a/sources b/sources index e69de29..77fc7b7 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +2d70166211c9a865640454d5fe281e0b resumer-0.0.0.tgz