diff --git a/changelog.md b/changelog.md index 223607c..9e52565 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,11 @@ #Changelog +## v1.6.0 2015-Mar-27 +* Setup + * tuxfile.js is default recipe filename +* Dependency + * Update *gulp-load-plugins* to v0.9 + * Update *request* to v2.54 + ## v1.5.2 2015-Mar-17 * Dependency * Update *serve-index* to v1.6.3 to avoid XSS security advisory diff --git a/index.js b/index.js index 759247d..e0dd66c 100644 --- a/index.js +++ b/index.js @@ -18,18 +18,22 @@ // load files try { - pkg = require(packagePath); + recipe = require(path.join(appRoot.path, "tuxfile.js")); } catch (e) { - throw new ReferenceError("Missing package.json in your project root: " + packagePath); - } - if (pkg.tuxharness === undefined) { - throw new ReferenceError(missingRecipe); - } - recipePath = path.join(appRoot.path, pkg.tuxharness); - try { - recipe = require(recipePath); - } catch (e) { - throw new ReferenceError(missingRecipe + ": " + recipePath); + try { + pkg = require(packagePath); + } catch (e) { + throw new ReferenceError("Missing package.json in your project root: " + packagePath); + } + if (pkg.tuxharness === undefined) { + throw new ReferenceError(missingRecipe); + } + recipePath = path.join(appRoot.path, pkg.tuxharness); + try { + recipe = require(recipePath); + } catch (e) { + throw new ReferenceError(missingRecipe + ": " + recipePath); + } } serverPort = recipe.register && recipe.register.port || 4000; diff --git a/package.json b/package.json index 32e0e46..c4118ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tuxharness", - "version": "1.5.2", + "version": "1.6.0", "description": "Test User eXperience Harness", "main": "index.js", "scripts": { @@ -52,11 +52,11 @@ "gulp-develop-server": "0.4.x", "gulp-expect-file": "0.0.x", "gulp-jshint": "1.9.x", - "gulp-load-plugins": "0.8.x", + "gulp-load-plugins": "0.9.x", "gulp-mocha": "2.0.x", "jade": "1.9.x", "jshint-stylish": "1.0.x", - "request": "2.53.x" + "request": "2.54.x" }, "engines": { "node": "0.10", diff --git a/readme.md b/readme.md index b8c4e11..2603d10 100644 --- a/readme.md +++ b/readme.md @@ -54,9 +54,9 @@ Build a stand-alone test harness with dynamic data to quickly prototype and isol ## JSON browser extentions * Firefox [JSONView](https://addons.mozilla.org/en-US/firefox/addon/jsonview/) * Chrome [JSONView](https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc) +* Safari [safari-json-formatter](/~https://github.com/rfletcher/safari-json-formatter) ## Roadmap -1. Set tuxfile.js in project route as fallback 1. Allow remote recipes * Views and data too 1. Host demo