summaryrefslogtreecommitdiffstats
path: root/tasks
diff options
context:
space:
mode:
authorSauli Tähkäpää <sauli@vaadin.com>2015-11-26 15:00:58 +0200
committerSauli Tähkäpää <sauli@vaadin.com>2015-12-03 14:07:44 +0200
commit9604588bea487888d30bfd95862fbeb3a8911db1 (patch)
tree88cec0821fb6ad5d6772bc2ec9e7131af7ac165c /tasks
parentb84c43405341ecfe9b666d9acae233ca7bf7efef (diff)
downloadvaadin-core-9604588bea487888d30bfd95862fbeb3a8911db1.tar.gz
vaadin-core-9604588bea487888d30bfd95862fbeb3a8911db1.zip
Remove unused methods from common.js.
Diffstat (limited to 'tasks')
-rw-r--r--tasks/common.js74
1 files changed, 1 insertions, 73 deletions
diff --git a/tasks/common.js b/tasks/common.js
index 316d245..dd22520 100644
--- a/tasks/common.js
+++ b/tasks/common.js
@@ -1,21 +1,8 @@
var args = require('yargs').argv;
-var chalk = require('chalk');
-var wct = require('web-component-tester').test;
var _ = require('lodash');
var gutil = require('gulp-util');
var config = require('./config');
-function cleanDone(done) {
- return function(error) {
- if (error) {
- // Pretty error for gulp.
- error = new Error(chalk.red(error.message || error));
- error.showStack = false;
- }
- done(error);
- };
-}
-
function checkArguments(arguments) {
_.forEach(arguments, function(a) {
if(!args.hasOwnProperty(a)) {
@@ -24,23 +11,6 @@ function checkArguments(arguments) {
});
}
-function localAddress() {
- var ip, tun, ifaces = require('os').networkInterfaces();
- Object.keys(ifaces).forEach(function (ifname) {
- ifaces[ifname].forEach(function (iface) {
- if ('IPv4' == iface.family && !iface.internal) {
- if (!ip) ip = iface.address;
- if (/tun/.test(ifname)) tun = iface.address;
- }
- });
- });
- return tun || ip;
-}
-
-function test(options, done) {
- wct(options, cleanDone(done));
-}
-
function ssh(user, host, command, done) {
gutil.log('SSH: ' + host + ' -> ' + command);
require('node-ssh-exec')({
@@ -51,48 +21,6 @@ function ssh(user, host, command, done) {
}
module.exports = {
- localAddress: localAddress,
- test: test,
ssh: ssh,
- checkArguments: checkArguments,
-
- testSauce: function(suites, browsers, build, done) {
- test(
- {
- suites: suites,
- browserOptions: {
- name: localAddress() + ' / ' + new Date(),
- build: build
- },
-
- plugins: {
- //local: {
- // browsers: ['chrome']
- //},
- sauce: {
- username: args.sauceUsername,
- accessKey: args.sauceAccessKey,
- browsers: browsers
- },
- 'teamcity-reporter': args.teamcity
- },
- webserver: {
- hostname: localAddress()
- }
- }, done);
- },
-
- autoRevert: function(err, handler, done) {
- if(err) {
- gutil.log(err.toString());
- if(args.autoRevert) {
- handler();
- } else {
- gutil.log('No action. Use --auto-revert to revert changes.')
- done(err);
- }
- } else {
- done();
- }
- }
+ checkArguments: checkArguments
};