Permalink
Browse files

Supporting grovers new --screwdriver config option

  • Loading branch information...
1 parent 24523b2 commit b3252d59847dde078e84b3edd78a24b9219cad79 @davglass davglass committed Dec 21, 2012
Showing with 15 additions and 6 deletions.
  1. +1 −0 lib/args.js
  2. +4 −5 lib/cmds/serve.js
  3. +9 −0 lib/cmds/test.js
  4. +1 −1 package.json
View
@@ -42,6 +42,7 @@ var nopt = require('nopt'),
help: Boolean,
yes: Boolean,
force: Boolean,
+ screwdriver: Boolean,
loglevel: [ 'silent', 'info', 'debug', 'warn' ],
lint: [ 'defaults', 'strict', 'preferred' ],
filter: [ 'raw', 'min', 'debug', 'coverage' ]
View
@@ -464,9 +464,8 @@ mods = {
serveCoverage: function(file, callback) {
log.debug('serving istanbul file: ' + file);
this.getEnding(function(ending) {
- var name = path.join('build', file.split('build')[1]);
- name = name.replace('-coverage', '');
- fs.readFile(file.replace('-coverage', ''), 'utf8', function(err, data) {
+ var name = file.replace('-coverage', '');
+ fs.readFile(name, 'utf8', function(err, data) {
var inst = new istanbul.Instrumenter({
embedSource: true
});
@@ -664,7 +663,7 @@ mods = {
paths.forEach(function(file) {
if (!served) {
- log.debug('checking: ' + file);
+ //log.debug('checking: ' + file);
if (util.exists(file)) {
served = true;
self.parseAndServe(file, res);
@@ -696,7 +695,7 @@ mods = {
paths.forEach(function(file) {
if (!served) {
- log.debug('checking: ' + file);
+ //log.debug('checking: ' + file);
if (util.exists(file)) {
served = true;
self.parseAndServe(file, res);
View
@@ -25,6 +25,10 @@ mods = {
if (options.parsed.port) {
portfinder.basePort = options.parsed.port;
}
+ if (this.options.parsed.screwdriver) {
+ this.options.parsed.istanbul = true;
+ this.coverage = true;
+ }
this.useYeti = options.parsed.yeti;
this.yetiHub = options.parsed.hub || 'http://hub.davglass.com:8080/';
@@ -455,6 +459,11 @@ mods = {
tests.unshift('--phantom-bin');
}
+ if (this.options.parsed.screwdriver) {
+ log.info('activating screwdriver support');
+ tests.unshift('--screwdriver');
+ }
+
if (this.coverage) {
log.info('turning on coverage support in grover');
tests.unshift('?filter=coverage');
View
@@ -7,7 +7,7 @@
"yogi": "./bin/yogi.js"
},
"dependencies": {
- "grover": "~0.1.7",
+ "grover": "~0.1.9",
"yuidocjs": "~0.3.31",
"selleck": "*",
"yuitest": "*",

0 comments on commit b3252d5

Please sign in to comment.