'use strict';

var gulp = require('gulp');

var protractor = require('gulp-protractor');

module.exports = function(options) {
  /* jshint ignore:start */
  gulp.task('e2e:webdriver_update', protractor.webdriver_update);
  /* jshint ignore:end */

  gulp.task('e2e:protractor', ['e2e:webdriver_update'], function() {
    return gulp.src(options.e2eSpecFiles)
               .pipe(protractor.protractor({
                 configFile: 'e2e/conf.js',
                 args: ['--baseUrl', 'http://127.0.0.1:3000']
               }));
  });

  gulp.task('e2e', ['e2e:protractor']);
  gulp.task('e2e:dev', ['e2e:protractor'], function() {
    gulp.watch(options.e2eSpecFiles, ['e2e:protractor']);
  });
};

@@ -120,16 +120,247 @@
 ions) %7B%0A
+  function protractorTask(url) %7B%0A    return gulp.src(options.e2eSpecFiles)%0A               .pipe(protractor.protractor(%7B%0A                 configFile: 'e2e/conf.js',%0A                 args: %5B'--baseUrl', url%5D%0A               %7D));%0A  %7D%0A%0A
   /* jsh
@@ -499,16 +499,20 @@
 otractor
+:dev
 ', %5B'e2e
@@ -560,60 +560,73 @@
 urn 
-gulp.src(options.e2eSpecFiles)%0A               .pipe(
+protractorTask('http://127.0.0.1:3000');%0A  %7D);%0A%0A  gulp.task('e2e:
 prot
@@ -635,145 +635,106 @@
 ctor
-.protractor(%7B%0A                 configFile: 'e2e/conf.js',%0A                 args: %5B'--baseUrl', 'http://127.0.0.1:3000'%5D%0A               %7D)
+:production', %5B'e2e:webdriver_update'%5D, function() %7B%0A    return protractorTask('http://ec2pric.es'
 );%0A 
@@ -770,24 +770,28 @@
 e:protractor
+:dev
 '%5D);%0A  gulp.
@@ -822,16 +822,20 @@
 otractor
+:dev
 '%5D, func

Add a e2e:protractor:production task to run the tests in production