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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb93cb726412ee4fe63d98785a8ca806d719bbd8
4
- data.tar.gz: 4aaffbc9c273d60be1ea5d17662647be07a0b6fe
3
+ metadata.gz: e0e61fa6383431f78fd2581212993ca3c4335783
4
+ data.tar.gz: c3f8ac71fe92b0654f9690dbe0e89710e18c7331
5
5
  SHA512:
6
- metadata.gz: a0c816f8753a9d62abba91abe4ed358b4702b7bfdbede8c6025ad6752aa51829887c6b616111e7eac0d279ea0f2fe228e19fb2456a6b1555271492ad5aa48626
7
- data.tar.gz: fec6a8d2b260ced3635d3b3faa61cee28b91b2f3c770ca7018479dcab7759a9acb0f1eb9c789dc1b71b0fa0a05089e709f189213363b2397c31d84cd9c9f953b
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
- cmd = @shell.run('docker-compose', *file_args, *args).join
263
- status = cmd.status
264
- out = cmd.captured_output
265
- err = cmd.captured_error
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
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  module Docker
3
3
  module Compose
4
- VERSION = '1.1.10'
4
+ VERSION = '1.1.11'
5
5
  end
6
6
  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.10
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: 2018-11-08 00:00:00.000000000 Z
11
+ date: 2019-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backticks