From de11d158aa6ee53b8d1ab7374872ba1af04bbd89 Mon Sep 17 00:00:00 2001 From: Rob Cresswell Date: Wed, 10 Jun 2015 12:44:30 +0100 Subject: [PATCH] JSCS Cleanup - karma.conf JSCS cleanup for: - openstack_dashboard/karma.conf.js - horizon/karma.conf.js Change-Id: I0c74187c86404b8b332eba6d1f7820f292bfa788 Partially-Implements: blueprint jscs-cleanup --- horizon/karma.conf.js | 18 +++++++++--------- openstack_dashboard/karma.conf.js | 17 +++++++++-------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/horizon/karma.conf.js b/horizon/karma.conf.js index 8cef1246e9..fabc3a4d58 100644 --- a/horizon/karma.conf.js +++ b/horizon/karma.conf.js @@ -1,23 +1,24 @@ +'use strict'; var fs = require('fs'); var path = require('path'); -module.exports = function(config){ +module.exports = function(config) { var xstaticPath; - var base_paths = [ + var basePaths = [ './.venv', './.tox/py27' ] - for( var i = 0; i < base_paths.length; i++) { - var base_path = path.resolve(base_paths[i]); + for (var i = 0; i < basePaths.length; i++) { + var basePath = path.resolve(basePaths[i]); - if( fs.existsSync(base_path) ) { - xstaticPath = base_path + '/lib/python2.7/site-packages/xstatic/pkg/'; + if (fs.existsSync(basePath)) { + xstaticPath = basePath + '/lib/python2.7/site-packages/xstatic/pkg/'; break; } } - if( !xstaticPath) { + if (!xstaticPath) { console.error("xStatic libraries not found, please set up venv"); process.exit(1); } @@ -63,7 +64,6 @@ module.exports = function(config){ xstaticPath + 'spin/data/spin.js', xstaticPath + 'spin/data/spin.jquery.js', - // from jasmine_tests.py; only those that are deps for others 'horizon/js/horizon.js', 'horizon/js/angular/hz.api.module.js', @@ -91,7 +91,7 @@ module.exports = function(config){ xstaticPath + 'magic_search/data/magic_search.js', // TESTS - '**/*.spec.js', + '**/*.spec.js' ], autoWatch : true, diff --git a/openstack_dashboard/karma.conf.js b/openstack_dashboard/karma.conf.js index 005b6aaa22..16d7c28cf2 100644 --- a/openstack_dashboard/karma.conf.js +++ b/openstack_dashboard/karma.conf.js @@ -1,23 +1,24 @@ +'use strict'; var fs = require('fs'); var path = require('path'); -module.exports = function(config){ +module.exports = function(config) { var xstaticPath; - var base_paths = [ + var basePaths = [ './.venv', './.tox/py27' ] - for( var i = 0; i < base_paths.length; i++) { - var base_path = path.resolve(base_paths[i]); + for (var i = 0; i < basePaths.length; i++) { + var basePath = path.resolve(basePaths[i]); - if( fs.existsSync(base_path) ) { - xstaticPath = base_path + '/lib/python2.7/site-packages/xstatic/pkg/'; + if (fs.existsSync(basePath)) { + xstaticPath = basePath + '/lib/python2.7/site-packages/xstatic/pkg/'; break; } } - if( !xstaticPath) { + if (!xstaticPath) { console.error("xStatic libraries not found, please set up venv"); process.exit(1); } @@ -71,7 +72,7 @@ module.exports = function(config){ "dashboard/**/*.js", // Templates. - './**/*.html', + './**/*.html' ], autoWatch : true,