@@ -11,21 +11,6 @@ var _ = require('lodash');
1111
1212var CSP_CSS_HEADER = '/* Include this file in your html if you are using the CSP mode. */\n\n' ;
1313
14- var PORT_MIN = 8000 ;
15- var PORT_MAX = 9999 ;
16- var TRAVIS_BUILD_NUMBER = parseInt ( process . env . TRAVIS_BUILD_NUMBER , 10 ) ;
17- var getRandomPorts = function ( ) {
18- if ( ! process . env . TRAVIS ) {
19- return [ 9876 , 9877 ] ;
20- }
21-
22- // Generate two numbers between PORT_MIN and PORT_MAX, based on TRAVIS_BUILD_NUMBER.
23- return [
24- PORT_MIN + ( TRAVIS_BUILD_NUMBER % ( PORT_MAX - PORT_MIN ) ) ,
25- PORT_MIN + ( ( TRAVIS_BUILD_NUMBER + 100 ) % ( PORT_MAX - PORT_MIN ) )
26- ] ;
27- } ;
28-
2914
3015module . exports = {
3116
@@ -312,32 +297,5 @@ module.exports = {
312297 }
313298 next ( ) ;
314299 } ;
315- } ,
316-
317- parallelTask : function ( args , options ) {
318- var task = {
319- grunt : true ,
320- args : args ,
321- stream : options && options . stream
322- } ;
323-
324- args . push ( '--port=' + this . sauceLabsAvailablePorts . pop ( ) ) ;
325-
326- if ( args . indexOf ( 'test:e2e' ) !== - 1 && grunt . option ( 'e2e-browsers' ) ) {
327- args . push ( '--browsers=' + grunt . option ( 'e2e-browsers' ) ) ;
328- } else if ( grunt . option ( 'browsers' ) ) {
329- args . push ( '--browsers=' + grunt . option ( 'browsers' ) ) ;
330- }
331-
332- if ( grunt . option ( 'reporters' ) ) {
333- args . push ( '--reporters=' + grunt . option ( 'reporters' ) ) ;
334- }
335-
336- return task ;
337- } ,
338-
339- // see http://saucelabs.com/docs/connect#localhost
340- sauceLabsAvailablePorts : [ 9000 , 9001 , 9080 , 9090 , 9876 ] ,
341- // pseudo-random port numbers for BrowserStack
342- availablePorts : getRandomPorts ( )
300+ }
343301} ;
0 commit comments