[Pkg-javascript-commits] [node-finished] 02/02: initial debian commit

Leo Iannacone l3on-guest at moszumanska.debian.org
Sat Jul 5 17:43:24 UTC 2014


This is an automated email from the git hooks/post-receive script.

l3on-guest pushed a commit to branch master
in repository node-finished.

commit d0ea488f2b9bd6c4768e5a24409691ee34c3fa19
Author: Leo Iannacone <l3on at ubuntu.com>
Date:   Sat Jul 5 19:42:51 2014 +0200

    initial debian commit
---
 debian/changelog                                 |   6 +
 debian/compat                                    |   1 +
 debian/control                                   |  28 +++
 debian/copyright                                 |  38 ++++
 debian/docs                                      |   1 +
 debian/install                                   |   2 +
 debian/patches/0001-bundle_ee-first_module.patch | 210 +++++++++++++++++++++++
 debian/patches/series                            |   1 +
 debian/rules                                     |  16 ++
 debian/source/format                             |   1 +
 debian/tests/control                             |   2 +
 debian/tests/require                             |   3 +
 debian/watch                                     |   5 +
 13 files changed, 314 insertions(+)

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..a00a30d
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,6 @@
+node-finished (1.2.2-1) UNRELEASED; urgency=low
+
+  * Initial release (Closes: #753850)
+
+ -- Leo Iannacone <l3on at ubuntu.com>  Sat, 05 Jul 2014 19:08:53 +0200
+
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+8
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..c3948bd
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,28 @@
+Source: node-finished
+Section: web
+Priority: extra
+Maintainer: Debian Javascript Maintainers <pkg-javascript-devel at lists.alioth.debian.org>
+Uploaders: Leo Iannacone <l3on at ubuntu.com>
+Build-Depends:
+ debhelper (>= 8)
+ , dh-buildinfo
+ , nodejs
+ , node-mocha
+ , node-should
+Standards-Version: 3.9.5
+Homepage: https://github.com/expressjs/finished
+Vcs-Git: git://anonscm.debian.org/pkg-javascript/node-finished.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-javascript/node-finished.git
+XS-Testsuite: autopkgtest
+
+Package: node-finished
+Architecture: all
+Depends:
+ ${misc:Depends}
+ , nodejs
+Description: execute callback on request finished - Node.js module
+ This module helps in execute a callback function when a request
+ closes, finishes, or returns errors. It is useful to safe destroy
+ any object and stream used while serving the request.
+ .
+ Node.js is an event-based server-side JavaScript engine.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..91a743e
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,38 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: finished
+Upstream-Contact: https://github.com/expressjs/finished/issues
+Source: https://github.com/expressjs/finished
+
+Files: *
+Copyright: 2013 Jonathan Ong <me at jongleberry.com>
+License: Expat
+
+Files: node_modules/ee-first/*
+Copyright: 2014 Jonathan Ong <me at jongleberry.com>
+License: Expat
+
+Files: debian/*
+Copyright: 2014 Leo Iannacone <l3on at ubuntu.com>
+License: Expat
+
+License: Expat
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation files
+ (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge,
+ publish, distribute, sublicense, and/or sell copies of the Software,
+ and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..b43bf86
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+README.md
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..fc2fd03
--- /dev/null
+++ b/debian/install
@@ -0,0 +1,2 @@
+package.json usr/lib/nodejs/finished/
+index.js usr/lib/nodejs/finished/
diff --git a/debian/patches/0001-bundle_ee-first_module.patch b/debian/patches/0001-bundle_ee-first_module.patch
new file mode 100644
index 0000000..d16d85a
--- /dev/null
+++ b/debian/patches/0001-bundle_ee-first_module.patch
@@ -0,0 +1,210 @@
+Description: Bundle ee-first module with this package:
+  + module ee-first is used right now only by finished
+  + they come from the same author
+Auhtor: Leo Iannacone <l3on at ubuntu.com>
+Forwarded: not-needed
+
+---
+ node_modules/ee-first/.npmignore   |    2 +
+ node_modules/ee-first/LICENSE      |   22 +++++++++++++
+ node_modules/ee-first/README.md    |    5 +++
+ node_modules/ee-first/index.js     |   60 +++++++++++++++++++++++++++++++++++++
+ node_modules/ee-first/package.json |   28 +++++++++++++++++
+ node_modules/ee-first/test.js      |   60 +++++++++++++++++++++++++++++++++++++
+ 6 files changed, 177 insertions(+)
+
+--- /dev/null
++++ b/node_modules/ee-first/.npmignore
+@@ -0,0 +1,2 @@
++.DS_Store*
++node_modules
+--- /dev/null
++++ b/node_modules/ee-first/LICENSE
+@@ -0,0 +1,22 @@
++
++The MIT License (MIT)
++
++Copyright (c) 2014 Jonathan Ong me at jongleberry.com
++
++Permission is hereby granted, free of charge, to any person obtaining a copy
++of this software and associated documentation files (the "Software"), to deal
++in the Software without restriction, including without limitation the rights
++to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++copies of the Software, and to permit persons to whom the Software is
++furnished to do so, subject to the following conditions:
++
++The above copyright notice and this permission notice shall be included in
++all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++THE SOFTWARE.
+--- /dev/null
++++ b/node_modules/ee-first/README.md
+@@ -0,0 +1,5 @@
++
++# EE First
++
++Get the first event in a set of event emitters and event pairs,
++then clean up after itself.
+--- /dev/null
++++ b/node_modules/ee-first/index.js
+@@ -0,0 +1,60 @@
++
++module.exports = function first(stuff, done) {
++  if (!Array.isArray(stuff))
++    throw new TypeError('arg must be an array of [ee, events...] arrays')
++
++  var cleanups = []
++
++  for (var i = 0; i < stuff.length; i++) {
++    var arr = stuff[i]
++
++    if (!Array.isArray(arr) || arr.length < 2)
++      throw new TypeError('each array member must be [ee, events...]')
++
++    var ee = arr[0]
++
++    for (var j = 1; j < arr.length; j++) {
++      var event = arr[j]
++      var fn = listener(event, cleanup)
++
++      // listen to the event
++      ee.on(event, fn)
++      // push this listener to the list of cleanups
++      cleanups.push({
++        ee: ee,
++        event: event,
++        fn: fn,
++      })
++    }
++  }
++
++  return function (fn) {
++    done = fn
++  }
++
++  function cleanup() {
++    var x
++    for (var i = 0; i < cleanups.length; i++) {
++      x = cleanups[i]
++      x.ee.removeListener(x.event, x.fn)
++    }
++    done.apply(null, arguments)
++  }
++}
++
++function listener(event, done) {
++  return function onevent(arg1) {
++    var args = new Array(arguments.length)
++    var ee = this
++    var err = event === 'error'
++      ? arg1
++      : null
++
++    // copy args to prevent arguments escaping scope
++    for (var i = 0; i < args.length; i++) {
++      args[i] = arguments[i]
++    }
++
++    done(err, ee, event, args)
++  }
++}
+--- /dev/null
++++ b/node_modules/ee-first/package.json
+@@ -0,0 +1,28 @@
++{
++  "name": "ee-first",
++  "description": "return the first event in a set of ee/event pairs",
++  "version": "1.0.3",
++  "author": {
++    "name": "Jonathan Ong",
++    "email": "me at jongleberry.com",
++    "url": "http://jongleberry.com"
++  },
++  "license": "MIT",
++  "repository": {
++    "type": "git",
++    "url": "git://github.com/jonathanong/ee-first"
++  },
++  "devDependencies": {
++    "mocha": "1"
++  },
++  "scripts": {
++    "test": "mocha --reporter spec"
++  },
++  "readme": "\n# EE First\n\nGet the first event in a set of event emitters and event pairs,\nthen clean up after itself.\n",
++  "readmeFilename": "README.md",
++  "bugs": {
++    "url": "https://github.com/jonathanong/ee-first/issues"
++  },
++  "_id": "ee-first at 1.0.3",
++  "_from": "ee-first at 1.0.3"
++}
+--- /dev/null
++++ b/node_modules/ee-first/test.js
+@@ -0,0 +1,60 @@
++
++var EventEmitter = require('events').EventEmitter
++var assert = require('assert')
++
++var first = require('./')
++
++describe('first', function () {
++  var ee1 = new EventEmitter()
++  var ee2 = new EventEmitter()
++  var ee3 = new EventEmitter()
++
++  it('should emit the first event', function (done) {
++    first([
++      [ee1, 'a', 'b', 'c'],
++      [ee2, 'a', 'b', 'c'],
++      [ee3, 'a', 'b', 'c'],
++    ], function (err, ee, event, args) {
++      assert.ifError(err)
++      assert.equal(ee, ee2)
++      assert.equal(event, 'b')
++      assert.deepEqual(args, [1, 2, 3])
++      done()
++    })
++
++    ee2.emit('b', 1, 2, 3)
++  })
++
++  it('it should return an error if event === error', function (done) {
++    first([
++      [ee1, 'error', 'b', 'c'],
++      [ee2, 'error', 'b', 'c'],
++      [ee3, 'error', 'b', 'c'],
++    ], function (err, ee, event, args) {
++      assert.equal(err.message, 'boom')
++      assert.equal(ee, ee3)
++      assert.equal(event, 'error')
++      done()
++    })
++
++    ee3.emit('error', new Error('boom'))
++  })
++
++  it('should cleanup after itself', function (done) {
++    first([
++      [ee1, 'a', 'b', 'c'],
++      [ee2, 'a', 'b', 'c'],
++      [ee3, 'a', 'b', 'c'],
++    ], function (err, ee, event, args) {
++      assert.ifError(err)
++      ;[ee1, ee2, ee3].forEach(function (ee) {
++        ['a', 'b', 'c'].forEach(function (event) {
++          assert(!ee.listeners(event).length)
++        })
++      })
++      done()
++    })
++
++    ee1.emit('a')
++  })
++})
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..77a0b90
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-bundle_ee-first_module.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..ea06919
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,16 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+%:
+	dh $@
+
+override_dh_auto_test:
+	mocha -C --reporter spec test/
+
+override_dh_installchangelogs:
+	dh_installchangelogs -k HISTORY.md
+
+
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..fa3d7c2
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: require
+Depends: node-finished
diff --git a/debian/tests/require b/debian/tests/require
new file mode 100644
index 0000000..96a2381
--- /dev/null
+++ b/debian/tests/require
@@ -0,0 +1,3 @@
+#!/bin/sh
+set -e
+nodejs -e "require('finished');"
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..ea5eba7
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,5 @@
+version=3
+opts=\
+dversionmangle=s/\+(debian|dfsg|ds|deb)(\.\d+)?$//,\
+filenamemangle=s/.*\/v?([\d\.-]+)\.tar\.gz/node-finished-$1.tar.gz/ \
+ https://github.com/expressjs/finished/tags .*/archive/v?([\d\.]+).tar.gz

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-finished.git



More information about the Pkg-javascript-commits mailing list