Ok, very basic, needs refactoring Getting of Request and Access tokens (POST stylee)

works.
This commit is contained in:
ciaranj
2010-04-19 13:20:50 +01:00
parent d15500781e
commit 22402db273
20 changed files with 2956 additions and 632 deletions

39
spec/lib/jspec.shell.js Normal file
View File

@ -0,0 +1,39 @@
// JSpec - Shell - Copyright TJ Holowaychuk <tj@vision-media.ca> (MIT Licensed)
;(function(){
var _quit = quit
Shell = {
// --- Global
main: this,
// --- Commands
commands: {
quit: ['Terminate the shell', function(){ _quit() }],
exit: ['Terminate the shell', function(){ _quit() }],
p: ['Inspect an object', function(o){ return o.toSource() }]
},
/**
* Start the interactive shell.
*
* @api public
*/
start : function() {
for (var name in this.commands)
if (this.commands.hasOwnProperty(name))
this.commands[name][1].length ?
this.main[name] = this.commands[name][1] :
this.main.__defineGetter__(name, this.commands[name][1])
}
}
Shell.start()
})()