node_task 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/lib/node_task/index.js +28 -21
  3. data/lib/node_task/node_modules/ndjson/cli.js +23 -0
  4. data/lib/node_task/node_modules/ndjson/collaborators.md +7 -0
  5. data/lib/node_task/node_modules/ndjson/index.js +30 -0
  6. data/lib/node_task/node_modules/ndjson/node_modules/minimist/example/parse.js +2 -0
  7. data/lib/node_task/node_modules/ndjson/node_modules/minimist/index.js +236 -0
  8. data/lib/node_task/node_modules/ndjson/node_modules/minimist/package.json +71 -0
  9. data/lib/node_task/node_modules/ndjson/node_modules/minimist/readme.markdown +91 -0
  10. data/lib/node_task/node_modules/ndjson/node_modules/minimist/test/all_bool.js +32 -0
  11. data/lib/node_task/node_modules/ndjson/node_modules/minimist/test/bool.js +166 -0
  12. data/lib/node_task/node_modules/ndjson/node_modules/minimist/test/dash.js +31 -0
  13. data/lib/node_task/node_modules/ndjson/node_modules/minimist/test/default_bool.js +35 -0
  14. data/lib/node_task/node_modules/ndjson/node_modules/minimist/test/dotted.js +22 -0
  15. data/lib/node_task/node_modules/ndjson/node_modules/minimist/test/kv_short.js +16 -0
  16. data/lib/node_task/node_modules/ndjson/node_modules/minimist/test/long.js +31 -0
  17. data/lib/node_task/node_modules/ndjson/node_modules/minimist/test/num.js +36 -0
  18. data/lib/node_task/node_modules/ndjson/node_modules/minimist/test/parse.js +197 -0
  19. data/lib/node_task/node_modules/ndjson/node_modules/minimist/test/parse_modified.js +9 -0
  20. data/lib/node_task/node_modules/ndjson/node_modules/minimist/test/short.js +67 -0
  21. data/lib/node_task/node_modules/ndjson/node_modules/minimist/test/stop_early.js +15 -0
  22. data/lib/node_task/node_modules/ndjson/node_modules/minimist/test/unknown.js +102 -0
  23. data/lib/node_task/node_modules/ndjson/node_modules/minimist/test/whitespace.js +8 -0
  24. data/lib/node_task/node_modules/ndjson/node_modules/split2/README.md +74 -0
  25. data/lib/node_task/node_modules/ndjson/node_modules/split2/index.js +83 -0
  26. data/lib/node_task/node_modules/ndjson/node_modules/split2/package.json +55 -0
  27. data/lib/node_task/node_modules/ndjson/node_modules/split2/test.js +149 -0
  28. data/lib/node_task/node_modules/ndjson/node_modules/through2/README.md +132 -0
  29. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/README.md +15 -0
  30. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/duplex.js +1 -0
  31. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js +89 -0
  32. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js +46 -0
  33. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js +982 -0
  34. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js +210 -0
  35. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js +386 -0
  36. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/README.md +3 -0
  37. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/float.patch +604 -0
  38. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +107 -0
  39. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/package.json +53 -0
  40. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/node_modules/core-util-is/util.js +106 -0
  41. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/node_modules/inherits/README.md +42 -0
  42. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/node_modules/inherits/inherits.js +1 -0
  43. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/node_modules/inherits/inherits_browser.js +23 -0
  44. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/node_modules/inherits/package.json +50 -0
  45. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/node_modules/inherits/test.js +25 -0
  46. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/node_modules/isarray/README.md +54 -0
  47. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/node_modules/isarray/build/build.js +209 -0
  48. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/node_modules/isarray/component.json +19 -0
  49. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/node_modules/isarray/index.js +3 -0
  50. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/node_modules/isarray/package.json +53 -0
  51. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md +7 -0
  52. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js +221 -0
  53. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json +54 -0
  54. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/package.json +70 -0
  55. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/passthrough.js +1 -0
  56. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/readable.js +8 -0
  57. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/transform.js +1 -0
  58. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/readable-stream/writable.js +1 -0
  59. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/xtend/README.md +32 -0
  60. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/xtend/immutable.js +17 -0
  61. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/xtend/mutable.js +15 -0
  62. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/xtend/package.json +88 -0
  63. data/lib/node_task/node_modules/ndjson/node_modules/through2/node_modules/xtend/test.js +63 -0
  64. data/lib/node_task/node_modules/ndjson/node_modules/through2/package.json +65 -0
  65. data/lib/node_task/node_modules/ndjson/node_modules/through2/through2.js +96 -0
  66. data/lib/node_task/node_modules/ndjson/package.json +64 -0
  67. data/lib/node_task/node_modules/ndjson/readme.md +55 -0
  68. data/lib/node_task/node_modules/ndjson/test.js +73 -0
  69. data/lib/node_task/node_task.rb +6 -13
  70. data/lib/node_task/package.json +2 -3
  71. metadata +69 -3
@@ -0,0 +1,89 @@
1
+ // Copyright Joyent, Inc. and other Node contributors.
2
+ //
3
+ // Permission is hereby granted, free of charge, to any person obtaining a
4
+ // copy of this software and associated documentation files (the
5
+ // "Software"), to deal in the Software without restriction, including
6
+ // without limitation the rights to use, copy, modify, merge, publish,
7
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
8
+ // persons to whom the Software is furnished to do so, subject to the
9
+ // following conditions:
10
+ //
11
+ // The above copyright notice and this permission notice shall be included
12
+ // in all copies or substantial portions of the Software.
13
+ //
14
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
17
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
19
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
22
+ // a duplex stream is just a stream that is both readable and writable.
23
+ // Since JS doesn't have multiple prototypal inheritance, this class
24
+ // prototypally inherits from Readable, and then parasitically from
25
+ // Writable.
26
+
27
+ module.exports = Duplex;
28
+
29
+ /*<replacement>*/
30
+ var objectKeys = Object.keys || function (obj) {
31
+ var keys = [];
32
+ for (var key in obj) keys.push(key);
33
+ return keys;
34
+ }
35
+ /*</replacement>*/
36
+
37
+
38
+ /*<replacement>*/
39
+ var util = require('core-util-is');
40
+ util.inherits = require('inherits');
41
+ /*</replacement>*/
42
+
43
+ var Readable = require('./_stream_readable');
44
+ var Writable = require('./_stream_writable');
45
+
46
+ util.inherits(Duplex, Readable);
47
+
48
+ forEach(objectKeys(Writable.prototype), function(method) {
49
+ if (!Duplex.prototype[method])
50
+ Duplex.prototype[method] = Writable.prototype[method];
51
+ });
52
+
53
+ function Duplex(options) {
54
+ if (!(this instanceof Duplex))
55
+ return new Duplex(options);
56
+
57
+ Readable.call(this, options);
58
+ Writable.call(this, options);
59
+
60
+ if (options && options.readable === false)
61
+ this.readable = false;
62
+
63
+ if (options && options.writable === false)
64
+ this.writable = false;
65
+
66
+ this.allowHalfOpen = true;
67
+ if (options && options.allowHalfOpen === false)
68
+ this.allowHalfOpen = false;
69
+
70
+ this.once('end', onend);
71
+ }
72
+
73
+ // the no-half-open enforcer
74
+ function onend() {
75
+ // if we allow half-open state, or if the writable side ended,
76
+ // then we're ok.
77
+ if (this.allowHalfOpen || this._writableState.ended)
78
+ return;
79
+
80
+ // no more data can be written.
81
+ // But allow more writes to happen in this tick.
82
+ process.nextTick(this.end.bind(this));
83
+ }
84
+
85
+ function forEach (xs, f) {
86
+ for (var i = 0, l = xs.length; i < l; i++) {
87
+ f(xs[i], i);
88
+ }
89
+ }
@@ -0,0 +1,46 @@
1
+ // Copyright Joyent, Inc. and other Node contributors.
2
+ //
3
+ // Permission is hereby granted, free of charge, to any person obtaining a
4
+ // copy of this software and associated documentation files (the
5
+ // "Software"), to deal in the Software without restriction, including
6
+ // without limitation the rights to use, copy, modify, merge, publish,
7
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
8
+ // persons to whom the Software is furnished to do so, subject to the
9
+ // following conditions:
10
+ //
11
+ // The above copyright notice and this permission notice shall be included
12
+ // in all copies or substantial portions of the Software.
13
+ //
14
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
17
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
19
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
22
+ // a passthrough stream.
23
+ // basically just the most minimal sort of Transform stream.
24
+ // Every written chunk gets output as-is.
25
+
26
+ module.exports = PassThrough;
27
+
28
+ var Transform = require('./_stream_transform');
29
+
30
+ /*<replacement>*/
31
+ var util = require('core-util-is');
32
+ util.inherits = require('inherits');
33
+ /*</replacement>*/
34
+
35
+ util.inherits(PassThrough, Transform);
36
+
37
+ function PassThrough(options) {
38
+ if (!(this instanceof PassThrough))
39
+ return new PassThrough(options);
40
+
41
+ Transform.call(this, options);
42
+ }
43
+
44
+ PassThrough.prototype._transform = function(chunk, encoding, cb) {
45
+ cb(null, chunk);
46
+ };