Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' of git://github.com/280north/narwhal
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Penwell committed Mar 1, 2010
2 parents f898151 + a93fdfe commit 573620b
Show file tree
Hide file tree
Showing 5 changed files with 176 additions and 100 deletions.
171 changes: 103 additions & 68 deletions catalog-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,26 @@
"lib": [
"lib"
],
"lean": [
"lib",
"engines"
],
"descriptorUrl": "http://github.com/tlrobinson/narwhal/raw/master/package.json",
"packageUrl": "http://github.com/tlrobinson/narwhal/zipball/master",
"lean": {
"include": [
"engines/default/**/*",
"engines/rhino/bootstrap.js",
"engines/rhino/lib/**/*",
"engines/rhino/package.json",
"lib/**/*",
"narwhal.js",
"package.json"
]
},
"descriptorUrl": "http://github.com/280north/narwhal/raw/master/package.json",
"packageUrl": "http://github.com/280north/narwhal/zipball/master",
"packageArchive": "zip",
"source": {
"type": "github",
"user": "tlrobinson",
"user": "280north",
"packageName": "narwhal",
"descriptorUrl": "http://github.com/tlrobinson/narwhal/raw/master/package.json",
"url": "http://github.com/tlrobinson/narwhal/zipball/master",
"descriptorUrl": "http://github.com/280north/narwhal/raw/master/package.json",
"url": "http://github.com/280north/narwhal/zipball/master",
"archive": "zip"
},
"dependencies": []
Expand Down Expand Up @@ -127,15 +134,15 @@
"1",
"1"
],
"descriptorUrl": "http://github.com/tlrobinson/narwhal-jsc/raw/master/package.json",
"packageUrl": "http://github.com/tlrobinson/narwhal-jsc/zipball/master",
"descriptorUrl": "http://github.com/280north/narwhal-jsc/raw/master/package.json",
"packageUrl": "http://github.com/280north/narwhal-jsc/zipball/master",
"packageArchive": "zip",
"source": {
"type": "github",
"user": "tlrobinson",
"user": "280north",
"packageName": "narwhal-jsc",
"descriptorUrl": "http://github.com/tlrobinson/narwhal-jsc/raw/master/package.json",
"url": "http://github.com/tlrobinson/narwhal-jsc/zipball/master",
"descriptorUrl": "http://github.com/280north/narwhal-jsc/raw/master/package.json",
"url": "http://github.com/280north/narwhal-jsc/zipball/master",
"archive": "zip"
},
"contributors": [
Expand Down Expand Up @@ -265,6 +272,12 @@
{
"type": "MPL"
},
{
"type": "GPL 2.0"
},
{
"type": "LGPL 2.1"
},
{
"type": "MIT"
}
Expand Down Expand Up @@ -426,15 +439,15 @@
"1",
"2"
],
"descriptorUrl": "http://github.com/tlrobinson/jack/raw/master/package.json",
"packageUrl": "http://github.com/tlrobinson/jack/zipball/master",
"descriptorUrl": "http://github.com/280north/jack/raw/master/package.json",
"packageUrl": "http://github.com/280north/jack/zipball/master",
"packageArchive": "zip",
"source": {
"type": "github",
"user": "tlrobinson",
"user": "280north",
"packageName": "jack",
"descriptorUrl": "http://github.com/tlrobinson/jack/raw/master/package.json",
"url": "http://github.com/tlrobinson/jack/zipball/master",
"descriptorUrl": "http://github.com/280north/jack/raw/master/package.json",
"url": "http://github.com/280north/jack/zipball/master",
"archive": "zip"
}
},
Expand All @@ -451,8 +464,7 @@
},
"email": "george.moschovitis@gmail.com",
"dependencies": [
"jack",
"template"
"jack"
],
"contributors": [
{
Expand Down Expand Up @@ -619,15 +631,15 @@
"dom",
"xmlhttprequest"
],
"descriptorUrl": "http://github.com/tlrobinson/browserjs/raw/master/package.json",
"packageUrl": "http://github.com/tlrobinson/browserjs/zipball/master",
"descriptorUrl": "http://github.com/280north/browserjs/raw/master/package.json",
"packageUrl": "http://github.com/280north/browserjs/zipball/master",
"packageArchive": "zip",
"source": {
"type": "github",
"user": "tlrobinson",
"user": "280north",
"packageName": "browserjs",
"descriptorUrl": "http://github.com/tlrobinson/browserjs/raw/master/package.json",
"url": "http://github.com/tlrobinson/browserjs/zipball/master",
"descriptorUrl": "http://github.com/280north/browserjs/raw/master/package.json",
"url": "http://github.com/280north/browserjs/zipball/master",
"archive": "zip"
},
"contributors": [
Expand Down Expand Up @@ -995,40 +1007,57 @@
},
"jsdocs": {
"name": "jsdocs",
"description": "Tool for generating template-formatted, multi-page HTML (or XML, JSON, or any other text-based) documentation from commented JavaScript source code.",
"description": "JavaScript documentation generator. Tool for generating template-formatted, multi-page HTML (or XML, JSON, or any other text-based) documentation from commented JavaScript source code.",
"version": [
"0",
"1",
"0"
],
"keywords": [
"jsdoc",
"documentation"
],
"author": {
"name": "Irakli Gozalishvili",
"url": "http://rfobic.wordpress.com/"
},
"email": "rfobic@gmail.com",
"lib": [
"lib"
"maintainers": [
{
"name": "Irakli Gozalishvili",
"email": "rfobic@gmail.com",
"web": "http://rfobic.wordpress.com/"
}
],
"lean": [
"lib",
"engines"
"contributors": [
{
"name": "Irakli Gozalishvili",
"email": "rfobic@gmail.com"
}
],
"version": {
"label": "0.1",
"numeric": [
0,
1
],
"status": "development"
"bugs": {
"web": "http://github.com/Gozala/jsdocs/issues/"
},
"license": [
"MPL 1.1",
"GPL 2.0",
"LGPL 2.1"
"licenses": [
{
"type": "MIT"
}
],
"dependencies": [
"syntax-stroop",
"seethrough"
"repositories": [
{
"type": "git",
"url": "git://github.com/Gozala/jsdocs.git"
}
],
"os": [
"linux",
"macos",
"win"
],
"cpu": [
"x86",
"ppc",
"x86_64"
],
"directories": {
"lib": "lib",
"bin": "bin"
},
"descriptorUrl": "http://github.com/Gozala/jsdocs/raw/master/package.json",
"packageUrl": "http://github.com/Gozala/jsdocs/zipball/master",
"packageArchive": "zip",
Expand All @@ -1040,12 +1069,7 @@
"url": "http://github.com/Gozala/jsdocs/zipball/master",
"archive": "zip"
},
"contributors": [
{
"name": "Irakli Gozalishvili",
"url": "http://rfobic.wordpress.com/"
}
]
"dependencies": []
},
"syntax-stroop": {
"name": "syntax-stroop",
Expand Down Expand Up @@ -1610,7 +1634,7 @@
"email": "sergi.mansilla@gmail.com"
},
"jars": [
"jars/mongo-0.11.jar"
"mongo-1.2.jar"
],
"email": "sergi.mansilla@gmail.com",
"dependencies": [],
Expand Down Expand Up @@ -1845,9 +1869,7 @@
"ojunit": {
"name": "ojunit",
"dependencies": [
"narwhal",
"objective-j",
"cappuccino"
"narwhal"
],
"author": {
"name": "Tom Robinson",
Expand All @@ -1863,6 +1885,15 @@
},
{
"name": "Martin Hacker"
},
{
"name": "Derek Hammer"
},
{
"name": "Francisco Tolmasky"
},
{
"name": "Andrew Burkhalter"
}
],
"description": "A simple Objective-J unit test framework.",
Expand All @@ -1875,6 +1906,11 @@
"objj-frameworks": [
"Framework"
],
"version": [
"0",
"1",
"0"
],
"descriptorUrl": "http://github.com/280north/ojunit/raw/master/package.json",
"packageUrl": "http://github.com/280north/ojunit/zipball/master",
"packageArchive": "zip",
Expand All @@ -1885,8 +1921,7 @@
"descriptorUrl": "http://github.com/280north/ojunit/raw/master/package.json",
"url": "http://github.com/280north/ojunit/zipball/master",
"archive": "zip"
},
"version": []
}
},
"qxoo": {
"name": "qxoo",
Expand Down Expand Up @@ -2558,8 +2593,7 @@
],
"version": [
"0",
"0",
"1"
"2"
],
"descriptorUrl": "http://github.com/280north/commonjs-shrinksafe/raw/master/package.json",
"packageUrl": "http://github.com/280north/commonjs-shrinksafe/zipball/master",
Expand All @@ -2581,15 +2615,16 @@
"description": "Haml ported to server-side Javascript. This is a traditional server-side templating language.",
"keywords": [
"haml",
"template"
"template",
"nodejs"
],
"author": {
"name": "Tim Caswell"
},
"version": [
"0",
"0",
"1"
"1",
"2"
],
"descriptorUrl": "http://github.com/creationix/haml-js/raw/master/package.json",
"packageUrl": "http://github.com/creationix/haml-js/zipball/master",
Expand Down
8 changes: 7 additions & 1 deletion engines/rhino/lib/uuid.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@

// Kris Zyp
// Tom Robinson

exports.randomUUID = function(){
return String(java.util.UUID.randomUUID())
require("narwhal").deprecated("randomUUID is deprecated in favor of uuid");
return String(java.util.UUID.randomUUID());
};

// compatible with Narwhal's main UUID module
exports.uuid = function(){
return String(java.util.UUID.randomUUID()).toUpperCase();
};
15 changes: 9 additions & 6 deletions lib/args.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ exports.Parser.prototype.check = function () {

// TODO break this into sub-functions
// TODO wrap with a try catch and print the progress through the arguments
exports.Parser.prototype.parse = function (args, options, noCommand) {
exports.Parser.prototype.parse = function (args, options, noCommand, allowInterleaved) {
var self = this;

this.check();
Expand Down Expand Up @@ -375,6 +375,8 @@ exports.Parser.prototype.parse = function (args, options, noCommand) {
options[option.getName()] = option._def;
});

var interleavedArgs = [];

// walk args
ARGS: while (args.length) {
var arg = args.shift();
Expand Down Expand Up @@ -464,15 +466,16 @@ exports.Parser.prototype.parse = function (args, options, noCommand) {
}

} else {
// TODO permit options interleaved with arguments,
// with associated actions, for any of positional
// args, variadic args, and accumulated args
args.unshift(arg);
break;
interleavedArgs.push(arg);
if (!allowInterleaved)
break;
}

}

// add the interleaved arguments back in
args.unshift.apply(args, interleavedArgs)

if (util.len(this._commands)) {
if (args.length) {
if (util.has(this._commands, args[0])) {
Expand Down
Loading

0 comments on commit 573620b

Please sign in to comment.