docker-compose 0.8.2 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/docker/compose/session.rb +18 -4
- data/lib/docker/compose/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c51cca1e956fb10053ec9e9ca6a810657e9c844a
|
4
|
+
data.tar.gz: b0898dd2a86a78d3ce62d5135bc1a4b127089c9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
184
|
-
|
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',
|
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
|