Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Commit

Permalink
Remove lodash dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
rbbydotdev authored and exdx committed Feb 11, 2019
1 parent bba72db commit a38efb7
Show file tree
Hide file tree
Showing 35 changed files with 404 additions and 530 deletions.
3 changes: 1 addition & 2 deletions lib/jobs/artifactsDestroy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

var method = require('./../method');
var projectConfig = require('./../projectConfig');
var assign = require('lodash.assign');

/**
* @memberof jobs
Expand Down Expand Up @@ -38,7 +37,7 @@ function artifactsDestroy(params, cb) {
return method(artifactsDestroy, params, cb);
}

assign(artifactsDestroy, {
Object.assign(artifactsDestroy, {
auth: true,
group: 'jobs',
name: 'artifactsDestroy',
Expand Down
3 changes: 1 addition & 2 deletions lib/jobs/artifactsGet.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

var method = require('./../method');
var projectConfig = require('./../projectConfig');
var assign = require('lodash.assign');
var AWS = require('aws-sdk');
var fs = require('fs');
var path = require('path');
Expand Down Expand Up @@ -216,7 +215,7 @@ function artifactsGet(params, cb) {
});
}

assign(artifactsGet, {
Object.assign(artifactsGet, {
auth: true,
group: 'jobs',
name: 'artifactsGet',
Expand Down
3 changes: 1 addition & 2 deletions lib/jobs/artifactsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

var method = require('./../method');
var projectConfig = require('./../projectConfig');
var assign = require('lodash.assign');

/**
* @memberof jobs
Expand Down Expand Up @@ -69,7 +68,7 @@ function artifactsList(params, cb) {
});
}

assign(artifactsList, {
Object.assign(artifactsList, {
auth: true,
group: 'jobs',
name: 'artifactsList',
Expand Down
3 changes: 1 addition & 2 deletions lib/jobs/clone.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

var method = require('./../method');
var projectConfig = require('./../projectConfig');
var assign = require('lodash.assign');

/**
* @memberof jobs
Expand Down Expand Up @@ -66,7 +65,7 @@ function clone(params, cb) {
});
}

assign(clone, {
Object.assign(clone, {
auth: true,
group: 'jobs',
name: 'clone',
Expand Down
5 changes: 2 additions & 3 deletions lib/jobs/create.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

var method = require('./../method');
var assign = require('lodash.assign');
var path = require('path');
var mkdirp = require('mkdirp');
var async = require('async');
Expand Down Expand Up @@ -502,7 +501,7 @@ function create(params, cb) {
// if link pass in workspaceFileName param for jobs service to download it when running the job
if (params.workspace.startsWith('https://') || params.workspace.startsWith('git+https://')) params.workspaceFileName = params.workspace;

// don't try to upload it; we normally attempt to upload anything in the workspace param specified in assign() below
// don't try to upload it; we normally attempt to upload anything in the workspace param specified in Object.assign() below
delete params.workspace;
return method(create, params, function _methodCb(err, res) {
if (err) return cb(err);
Expand All @@ -518,7 +517,7 @@ function getFilesizeInBytes(filename) {
return fileSizeInBytes;
}

assign(create, {
Object.assign(create, {
auth: true,
group: 'jobs',
name: 'create',
Expand Down
3 changes: 1 addition & 2 deletions lib/jobs/destroy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

var method = require('./../method');
var projectConfig = require('./../projectConfig');
var assign = require('lodash.assign');

/**
* @memberof jobs
Expand Down Expand Up @@ -39,7 +38,7 @@ function destroy(params, cb) {
});
}

assign(destroy, {
Object.assign(destroy, {
auth: true,
group: 'jobs',
name: 'destroy',
Expand Down
3 changes: 1 addition & 2 deletions lib/jobs/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

var method = require('./../method');
var projectConfig = require('./../projectConfig');
var assign = require('lodash.assign');
var path = require('path');
var Table = require('table');

Expand Down Expand Up @@ -145,7 +144,7 @@ function list(params, cb) {
});
}

assign(list, {
Object.assign(list, {
auth: true,
group: 'jobs',
name: 'list',
Expand Down
3 changes: 1 addition & 2 deletions lib/jobs/logs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

var method = require('./../method');
var projectConfig = require('./../projectConfig');
var assign = require('lodash.assign');

/**
* @memberof jobs
Expand Down Expand Up @@ -132,7 +131,7 @@ function logs(params, cb) {
}


assign(logs, {
Object.assign(logs, {
auth: true,
group: 'jobs',
name: 'logs',
Expand Down
3 changes: 1 addition & 2 deletions lib/jobs/machineTypes.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

var method = require('./../method');
var assign = require('lodash.assign');

/**
* @memberof jobs
Expand Down Expand Up @@ -66,7 +65,7 @@ function machineTypes(params, cb) {
return method(machineTypes, params, cb);
}

assign(machineTypes, {
Object.assign(machineTypes, {
auth: true,
group: 'jobs',
name: 'machineTypes',
Expand Down
3 changes: 1 addition & 2 deletions lib/jobs/show.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

var method = require('./../method');
var projectConfig = require('./../projectConfig');
var assign = require('lodash.assign');

/**
* @memberof jobs
Expand Down Expand Up @@ -64,7 +63,7 @@ function show(params, cb) {
return method(show, params, cb);
}

assign(show, {
Object.assign(show, {
auth: true,
group: 'jobs',
name: 'show',
Expand Down
3 changes: 1 addition & 2 deletions lib/jobs/stop.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

var method = require('./../method');
var projectConfig = require('./../projectConfig');
var assign = require('lodash.assign');

/**
* @memberof jobs
Expand Down Expand Up @@ -33,7 +32,7 @@ function stop(params, cb) {
return method(stop, params, cb);
}

assign(stop, {
Object.assign(stop, {
auth: true,
group: 'jobs',
name: 'stop',
Expand Down
3 changes: 1 addition & 2 deletions lib/jobs/waitfor.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

var method = require('./../method');
var projectConfig = require('./../projectConfig');
var assign = require('lodash.assign');

/**
* @memberof jobs
Expand Down Expand Up @@ -115,7 +114,7 @@ function waitfor(params, cb) {
});
}

assign(waitfor, {
Object.assign(waitfor, {
auth: true,
group: 'jobs',
name: 'waitfor',
Expand Down
5 changes: 2 additions & 3 deletions lib/login/user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

var method = require('./../method');
var assign = require('lodash.assign');
var userConfig = require('./../userConfig');

/**
Expand Down Expand Up @@ -54,7 +53,7 @@ function user(params, cb) {
});
}

assign(user, {
Object.assign(user, {
auth: true,
group: 'login',
name: 'user',
Expand All @@ -64,4 +63,4 @@ assign(user, {
returns: {},
});

module.exports = user;
module.exports = user;
3 changes: 1 addition & 2 deletions lib/machines/availability.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

var method = require('./../method');
var assign = require('lodash.assign');

/**
* @memberof machines
Expand Down Expand Up @@ -40,7 +39,7 @@ function availability(params, cb) {
return method(availability, params, cb);
}

assign(availability, {
Object.assign(availability, {
auth: true,
group: 'machines',
name: 'availability',
Expand Down
3 changes: 1 addition & 2 deletions lib/machines/create.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

var method = require('./../method');
var assign = require('lodash.assign');

/**
* @memberof machines
Expand Down Expand Up @@ -123,7 +122,7 @@ function create(params, cb) {
return method(create, params, cb);
}

assign(create, {
Object.assign(create, {
auth: true,
group: 'machines',
name: 'create',
Expand Down
3 changes: 1 addition & 2 deletions lib/machines/destroy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

var method = require('./../method');
var assign = require('lodash.assign');

/**
* @memberof machines
Expand Down Expand Up @@ -36,7 +35,7 @@ function destroy(params, cb) {
return method(destroy, params, cb);
}

assign(destroy, {
Object.assign(destroy, {
auth: true,
group: 'machines',
name: 'destroy',
Expand Down
3 changes: 1 addition & 2 deletions lib/machines/list.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

var method = require('./../method');
var assign = require('lodash.assign');

/**
* @memberof machines
Expand Down Expand Up @@ -88,7 +87,7 @@ function list(params, cb) {
return method(list, params, cb);
}

assign(list, {
Object.assign(list, {
auth: true,
group: 'machines',
name: 'list',
Expand Down
3 changes: 1 addition & 2 deletions lib/machines/restart.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

var method = require('./../method');
var assign = require('lodash.assign');

/**
* @memberof machines
Expand Down Expand Up @@ -32,7 +31,7 @@ function restart(params, cb) {
return method(restart, params, cb);
}

assign(restart, {
Object.assign(restart, {
auth: true,
group: 'machines',
name: 'restart',
Expand Down
3 changes: 1 addition & 2 deletions lib/machines/show.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

var method = require('./../method');
var assign = require('lodash.assign');

/**
* @memberof machines
Expand Down Expand Up @@ -109,7 +108,7 @@ function show(params, cb) {
return method(show, params, cb);
}

assign(show, {
Object.assign(show, {
auth: true,
group: 'machines',
name: 'show',
Expand Down
3 changes: 1 addition & 2 deletions lib/machines/start.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

var method = require('./../method');
var assign = require('lodash.assign');

/**
* @memberof machines
Expand Down Expand Up @@ -32,7 +31,7 @@ function start(params, cb) {
return method(start, params, cb);
}

assign(start, {
Object.assign(start, {
auth: true,
group: 'machines',
name: 'start',
Expand Down
3 changes: 1 addition & 2 deletions lib/machines/stop.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

var method = require('./../method');
var assign = require('lodash.assign');

/**
* @memberof machines
Expand Down Expand Up @@ -33,7 +32,7 @@ function stop(params, cb) {
return method(stop, params, cb);
}

assign(stop, {
Object.assign(stop, {
auth: true,
group: 'machines',
name: 'stop',
Expand Down
3 changes: 1 addition & 2 deletions lib/machines/update.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

var method = require('./../method');
var assign = require('lodash.assign');

/**
* @memberof machines
Expand Down Expand Up @@ -50,7 +49,7 @@ function update(params, cb) {
return method(update, params, cb);
}

assign(update, {
Object.assign(update, {
auth: true,
group: 'machines',
name: 'update',
Expand Down
Loading

0 comments on commit a38efb7

Please sign in to comment.