docker-compose 1.1.10 → 1.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/docker/compose/session.rb +10 -6
- data/lib/docker/compose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0e61fa6383431f78fd2581212993ca3c4335783
|
4
|
+
data.tar.gz: c3f8ac71fe92b0654f9690dbe0e89710e18c7331
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '029337621b9ab014925d56ad0706914e247639008742117ad9b3f333cc6b435c521670aecb2e7e0467e83fdb81970ecf72a6fad7941188d29f5d3bab90f682d6'
|
7
|
+
data.tar.gz: 22062e94d4e7d90db5b8c81edf16a52b8df628f1dd3a230e3db97d58614125c31efc1b9d4f043a0d2173e94c2374ecc89e4fbc1768168ca2997e878b80b79469
|
@@ -24,11 +24,15 @@ module Docker::Compose
|
|
24
24
|
# Project file; default is 'docker-compose.yml'
|
25
25
|
attr_reader :file
|
26
26
|
|
27
|
+
# Reference to the last executed command.
|
28
|
+
attr_reader :last_command
|
29
|
+
|
27
30
|
def initialize(shell = Backticks::Runner.new(buffered: [:stderr], interactive: true),
|
28
31
|
dir: Dir.pwd, file: 'docker-compose.yml')
|
29
32
|
@shell = shell
|
30
33
|
@dir = dir
|
31
34
|
@file = file
|
35
|
+
@last_command = nil
|
32
36
|
end
|
33
37
|
|
34
38
|
# Validate docker-compose file and return it as Hash
|
@@ -133,8 +137,8 @@ module Docker::Compose
|
|
133
137
|
# @param [Boolean] no_tty disable pseudo-tty allocation (see: -T flag)
|
134
138
|
# @param [String] user run as specified username or uid (see: -u flag)
|
135
139
|
# @raise [Error] if command fails
|
136
|
-
def run(service, *cmd, detached: false, no_deps: false, volumes: [], env: [], rm: false, no_tty: false, user: nil)
|
137
|
-
o = opts(d: [detached, false], no_deps: [no_deps, false], rm: [rm, false], T: [no_tty, false], u: [user, nil])
|
140
|
+
def run(service, *cmd, detached: false, no_deps: false, volumes: [], env: [], rm: false, no_tty: false, user: nil, service_ports: false)
|
141
|
+
o = opts(d: [detached, false], no_deps: [no_deps, false], rm: [rm, false], T: [no_tty, false], u: [user, nil], service_ports: [service_ports, false])
|
138
142
|
env_params = env.map { |v| { e: v } }
|
139
143
|
volume_params = volumes.map { |v| { v: v } }
|
140
144
|
run!('run', o, *env_params, *volume_params, service, cmd)
|
@@ -259,10 +263,10 @@ module Docker::Compose
|
|
259
263
|
end
|
260
264
|
|
261
265
|
@shell.chdir = dir
|
262
|
-
|
263
|
-
status =
|
264
|
-
out =
|
265
|
-
err =
|
266
|
+
@last_command = @shell.run('docker-compose', *file_args, *args).join
|
267
|
+
status = @last_command.status
|
268
|
+
out = @last_command.captured_output
|
269
|
+
err = @last_command.captured_error
|
266
270
|
status.success? || fail(Error.new(args.first, status, out+err))
|
267
271
|
out
|
268
272
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker-compose
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Spataro
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backticks
|