Add spec-directory command line option

Esse commit está contido em:
Matt Colyer
2013-10-02 12:17:42 -07:00
commit 62b7599bea
3 arquivos alterados com 7 adições e 5 exclusões
+2 -2
Ver Arquivo
@@ -9,7 +9,7 @@ if [ ! -d $ATOM_PATH ]; then
exit 1
fi
while getopts ":whvft-:" opt; do
while getopts ":whvftr-:" opt; do
case "$opt" in
-)
case "${OPTARG}" in
@@ -24,7 +24,7 @@ while getopts ":whvft-:" opt; do
w)
WAIT=1
;;
h|v|f|t)
h|v|f|t|r)
EXPECT_OUTPUT=1
;;
esac
+2 -2
Ver Arquivo
@@ -51,7 +51,7 @@ class AtomApplication
resourcePath: null
version: null
constructor: ({@resourcePath, pathsToOpen, urlsToOpen, @version, test, pidToKillWhenClosed, devMode, newWindow}) ->
constructor: ({@resourcePath, pathsToOpen, urlsToOpen, @version, test, pidToKillWhenClosed, devMode, newWindow, specDirectory}) ->
global.atomApplication = this
@pidsToOpenWindows = {}
@@ -67,7 +67,7 @@ class AtomApplication
@checkForUpdates()
if test
@runSpecs({exitWhenDone: true, @resourcePath})
@runSpecs({exitWhenDone: true, @resourcePath, specDirectory})
else if pathsToOpen.length > 0
@openPaths({pathsToOpen, pidToKillWhenClosed, newWindow, devMode})
else if urlsToOpen.length > 0
+3 -1
Ver Arquivo
@@ -82,6 +82,7 @@ parseCommandLine = ->
options.alias('v', 'version').boolean('v').describe('v', 'Print the version.')
options.alias('f', 'foreground').boolean('f').describe('f', 'Keep the browser process in the foreground.')
options.alias('w', 'wait').boolean('w').describe('w', 'Wait for window to be closed before returning.')
options.alias('s', 'spec-directory').string('s').describe('s', 'Sets the directory to load specs from, useful for packages.')
args = options.argv
if args.h
@@ -97,6 +98,7 @@ parseCommandLine = ->
pathsToOpen = args._
pathsToOpen = [executedFrom] if executedFrom and pathsToOpen.length is 0
test = args['test']
specDirectory = args['spec-directory']
newWindow = args['new-window']
pidToKillWhenClosed = args['pid'] if args['wait']
@@ -112,4 +114,4 @@ parseCommandLine = ->
devMode = false
resourcePath = path.dirname(__dirname)
{resourcePath, pathsToOpen, executedFrom, test, version, pidToKillWhenClosed, devMode, newWindow}
{resourcePath, pathsToOpen, executedFrom, test, version, pidToKillWhenClosed, devMode, newWindow, specDirectory}