feat(docker-compose-client): send 'files' in options

This commit is contained in:
Sérgio Ramos 2017-07-15 04:37:05 +01:00 committed by Judit Greskovits
parent 6e5214fc07
commit 441d7398a8
1 changed files with 11 additions and 8 deletions

View File

@ -15,42 +15,45 @@ module.exports = class DockerComposeClient extends EventEmitter {
} }
_invoke(method, options, manifest, cb) { _invoke(method, options, manifest, cb) {
return this.client.invoke(method, options, manifest, cb); this.client.invoke(method, options, manifest, cb);
} }
close() { close() {
return this.client.close(); this.client.close();
} }
provision({ projectName, environment, manifest }, cb) { provision({ projectName, environment, manifest, files }, cb) {
return this._invoke('up', { this._invoke('up', {
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase
project_name: projectName, project_name: projectName,
files,
environment environment
}, manifest, cb); }, manifest, cb);
} }
scale({ projectName, services, environment, manifest }, cb) { scale({ projectName, services, environment, manifest, files }, cb) {
const options = { const options = {
environment, environment,
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase
project_name: projectName, project_name: projectName,
files,
services: Object.keys(services).map(name => ({ services: Object.keys(services).map(name => ({
name, name,
num: services[name] num: services[name]
})) }))
}; };
return this._invoke('scale', options, manifest, cb); this._invoke('scale', options, manifest, cb);
} }
config({ projectName, environment, manifest }, cb) { config({ projectName, environment, manifest, files }, cb) {
const options = { const options = {
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase
project_name: projectName, project_name: projectName,
files,
environment environment
}; };
return this._invoke('config', options, manifest, cb); this._invoke('config', options, manifest, cb);
} }
}; };