Skip to content

Commit

Permalink
chore(grunt): remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtajina committed Dec 6, 2014
1 parent f380cd2 commit e2d1969
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 52 deletions.
8 changes: 0 additions & 8 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@ module.exports = function(grunt) {
benchmarksPath: 'benchmarks'
}
},
parallel: {
travis: {
tasks: [
util.parallelTask(['test:unit', 'test:promises-aplus', 'tests:docs'], {stream: true}),
util.parallelTask(['test:e2e'])
]
}
},

connect: {
devserver: {
Expand Down
44 changes: 1 addition & 43 deletions lib/grunt/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,6 @@ var _ = require('lodash');

var CSP_CSS_HEADER = '/* Include this file in your html if you are using the CSP mode. */\n\n';

var PORT_MIN = 8000;
var PORT_MAX = 9999;
var TRAVIS_BUILD_NUMBER = parseInt(process.env.TRAVIS_BUILD_NUMBER, 10);
var getRandomPorts = function() {
if (!process.env.TRAVIS) {
return [9876, 9877];
}

// Generate two numbers between PORT_MIN and PORT_MAX, based on TRAVIS_BUILD_NUMBER.
return [
PORT_MIN + (TRAVIS_BUILD_NUMBER % (PORT_MAX - PORT_MIN)),
PORT_MIN + ((TRAVIS_BUILD_NUMBER + 100) % (PORT_MAX - PORT_MIN))
];
};


module.exports = {

Expand Down Expand Up @@ -312,32 +297,5 @@ module.exports = {
}
next();
};
},

parallelTask: function(args, options) {
var task = {
grunt: true,
args: args,
stream: options && options.stream
};

args.push('--port=' + this.sauceLabsAvailablePorts.pop());

if (args.indexOf('test:e2e') !== -1 && grunt.option('e2e-browsers')) {
args.push('--browsers=' + grunt.option('e2e-browsers'));
} else if (grunt.option('browsers')) {
args.push('--browsers=' + grunt.option('browsers'));
}

if (grunt.option('reporters')) {
args.push('--reporters=' + grunt.option('reporters'));
}

return task;
},

// see http://saucelabs.com/docs/connect#localhost
sauceLabsAvailablePorts: [9000, 9001, 9080, 9090, 9876],
// pseudo-random port numbers for BrowserStack
availablePorts: getRandomPorts()
}
};
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"grunt-jasmine-node": "git://github.com/vojtajina/grunt-jasmine-node.git#fix-grunt-exit-code",
"grunt-jscs": "~0.7.1",
"grunt-merge-conflict": "~0.0.1",
"grunt-parallel": "~0.3.1",
"grunt-shell": "~1.1.1",
"gulp": "~3.8.0",
"gulp-concat": "^2.4.1",
Expand Down

0 comments on commit e2d1969

Please sign in to comment.