docker-rails 0.5.3 → 0.5.4

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: 676f2ab08aa5bab4eaa12cd439e73e5b24d05203
4
- data.tar.gz: 725d25ce15b195dd2cce0d487198754ab507da5c
3
+ metadata.gz: 4bea08b80bfee7c817a0d284f58c74cc0e61638e
4
+ data.tar.gz: f653e9e076dc95d265cb2c0ad6aefe2735f0bc2c
5
5
  SHA512:
6
- metadata.gz: dfd7b13048590fd015a9a1bfc2dd574a449007ebc2159f2af15628b04172a29684d418bf728454c40385eb35da1db491c7877328793bbe9209437ff5279a4462
7
- data.tar.gz: 22fbca62f1a72eca0cef0fe1aaa64e0de97e46de1b49ad518f0600c2a38815288f95fd0780dbbb19557de7249788c4dd595c4077d369aeda41d2b8a70d55436d
6
+ metadata.gz: 41d7d30694f656d154ab484fea66222188bd564516eb40fddbefc07dde15eed7971a600bdc6e0af5ce549b943cd15860ddef44c810b3c897e11ac7f9da54c595
7
+ data.tar.gz: 980a7d3cd628c9100ef9fd6b0a65fd834a0a4b1c221a7c40004a42ad233ebcd01870333e54d8e922baa96b1fe8864b8e3cad85733b19e6b7ad03a411d2838d54
@@ -247,8 +247,10 @@ module Docker
247
247
  puts '-----------------------------'
248
248
 
249
249
  list_images_cmd = 'docker images --filter dangling=true -q'
250
- output = exec list_images_cmd, true
251
- exec "#{list_images_cmd} | xargs docker rmi" if !output.nil? && output.length > 0
250
+ output = exec( list_images_cmd, true)
251
+
252
+ # if there are any dangling, let's clean them up.
253
+ exec("#{list_images_cmd} | xargs docker rmi", false, true) if !output.nil? && output.length > 0
252
254
  puts 'Done.'
253
255
  end
254
256
 
@@ -284,7 +286,7 @@ module Docker
284
286
 
285
287
  protected
286
288
 
287
- def exec(cmd, capture = false)
289
+ def exec(cmd, capture = false, ignore_errors = false)
288
290
  puts "Running `#{cmd}`" if verbose?
289
291
  if capture
290
292
  output = %x[#{cmd}]
@@ -292,13 +294,13 @@ module Docker
292
294
  system cmd
293
295
  end
294
296
 
295
- raise "Failed to execute: `#{cmd}`" unless $?.success?
297
+ (raise "Failed to execute: `#{cmd}`" unless $?.success?) unless ignore_errors
296
298
  output
297
299
  end
298
300
 
299
301
  # convenience to execute docker-compose with file and project params
300
302
  def exec_compose(cmd, capture = false, options = '')
301
- exec("docker-compose -f #{@compose_filename} -p #{@build} #{cmd} #{options}", capture)
303
+ exec("docker-compose -f #{@compose_filename} -p #{@project_name} #{cmd} #{options}", capture)
302
304
  end
303
305
 
304
306
  def get_container(service_name)
@@ -1,5 +1,5 @@
1
1
  module Docker
2
2
  module Rails
3
- VERSION = '0.5.3'
3
+ VERSION = '0.5.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docker-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Ross