docker-compose 0.8.2 → 0.8.3

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: 271dd09495d2ee4e8873e3685a35e3bb688bce31
4
- data.tar.gz: 336036810f25e18054577dc67f32bf0c98b26f32
3
+ metadata.gz: c51cca1e956fb10053ec9e9ca6a810657e9c844a
4
+ data.tar.gz: b0898dd2a86a78d3ce62d5135bc1a4b127089c9c
5
5
  SHA512:
6
- metadata.gz: 77626e85c8c1968e24e5c2a064b2fa46c52cd4d328bd833b61a58f069f39ae958f322d7533995d08d4bc682f51a51056bcbe610992b8a1e326b8e450de04bc8c
7
- data.tar.gz: 5d6a6d2d48ea7b43d74060581d90fc5a893622fc07f12b45e24934f7701adf17da9cb86636cc41968ddd6179078f16e21c3a78ffe1c2d68289cc0d59ca4c8a86
6
+ metadata.gz: f96c63004deea50b616d99809f254344a2a343cb52ea43de92b419a1924535cda350940df9e3773164ba3d89e40318cf19ac115abd606a48b010932f03270cba
7
+ data.tar.gz: f4c98b09109c375b528cb2bb6c2724c9b1a35bdeef9940ca6dc3438ed9eaca4da9fbe76695524bc1976ce36078ec6ac8b86b953839fd4f40b861e46caed6c1b3
@@ -81,6 +81,12 @@ module Docker::Compose
81
81
  run!('down')
82
82
  end
83
83
 
84
+ # Pull images of services
85
+ # @param [Array] services list of String service names to pull
86
+ def pull(*services)
87
+ run!('pull', *services)
88
+ end
89
+
84
90
  def rm(*services, force:false, volumes:false)
85
91
  run!('rm', { f: force, v: volumes }, services)
86
92
  end
@@ -180,12 +186,20 @@ module Docker::Compose
180
186
  # @return [String] output of the command
181
187
  # @raise [Error] if command fails
182
188
  def run!(*args)
183
- project_opts = {
184
- file: @file
185
- }
189
+ file_args = case @file
190
+ when 'docker-compose.yml'
191
+ []
192
+ when Array
193
+ # backticks sugar can't handle array values; build a list of hashes
194
+ # IMPORTANT: preserve the order of the files so overrides work correctly
195
+ file_args = @file.map{ |filepath| {:file => filepath} }
196
+ else
197
+ # a single String (or Pathname, etc); use normal sugar to add it
198
+ [{file: @file.to_s}]
199
+ end
186
200
 
187
201
  Dir.chdir(@dir) do
188
- cmd = @shell.run('docker-compose', project_opts, *args).join
202
+ cmd = @shell.run('docker-compose', *file_args, *args).join
189
203
  status = cmd.status
190
204
  out = cmd.captured_output
191
205
  err = cmd.captured_error
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  module Docker
3
3
  module Compose
4
- VERSION = '0.8.2'
4
+ VERSION = '0.8.3'
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docker-compose
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Spataro