dockly 1.4.8 → 1.4.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -58,7 +58,7 @@ class Dockly::BuildCache::Base
58
58
  file_path = File.join(tmp_dir,file_name)
59
59
 
60
60
  FileUtils.mkdir_p(File.dirname(file_path))
61
- file = unless File.exist?(file_path)
61
+ unless File.exist?(file_path)
62
62
  debug 'Pulling build cache from s3'
63
63
  object = connection.get_object(s3_bucket, file_name)
64
64
  debug 'Pulled build cache from s3'
@@ -70,8 +70,6 @@ class Dockly::BuildCache::Base
70
70
  info 'Build cache already exists locally'
71
71
  File.open(file_path, 'rb')
72
72
  end
73
-
74
- file
75
73
  rescue Excon::Errors::NotFound
76
74
  nil
77
75
  end
@@ -73,6 +73,8 @@ class Dockly::BuildCache::Docker < Dockly::BuildCache::Base
73
73
  container = image.run(["/bin/bash", "-lc", "cd #{command_directory} && #{command}"])
74
74
  container.attach { |source,chunk| resp += chunk }
75
75
  status = container.wait['StatusCode']
76
+ debug "`#{command}` returned the following output:"
77
+ debug resp.strip
76
78
  debug "`#{command}` exited with status #{status}, resulting container id: #{container.id}"
77
79
  [status, resp.strip, container]
78
80
  end
data/lib/dockly/docker.rb CHANGED
@@ -173,7 +173,7 @@ class Dockly::Docker
173
173
  if registry.nil?
174
174
  ensure_present! :build_dir
175
175
  info "Exporting the image with id #{image.id} to file #{File.expand_path(tar_path)}"
176
- container = ::Docker::Container.create('Image' => image.id, 'Cmd' => %w[true])
176
+ container = image.run('true')
177
177
  info "created the container: #{container.id}"
178
178
  Zlib::GzipWriter.open(tar_path) do |file|
179
179
  container.export do |chunk, remaining, total|
@@ -1,3 +1,3 @@
1
1
  module Dockly
2
- VERSION = '1.4.8'
2
+ VERSION = '1.4.9'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dockly
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.8
4
+ version: 1.4.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-03-04 00:00:00.000000000 Z
12
+ date: 2014-03-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: clamp