linecook-gem 0.5.4 → 0.5.5
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/linecook/builder/lxc.rb +3 -1
- data/lib/linecook/util/downloader.rb +2 -1
- data/lib/linecook/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: cb95b96ba0c0d96148c7c168fbabf20cddf4f037
|
4
|
+
data.tar.gz: c4db4da5432af487298a3214a068e8d53babfbe5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e15e5a9b5bcfec5652828bd3aecd49debfc10d30e392416ccff74b897025a972386df5f37d03055b217a59fee0a1eb2c2e0a98758086fd7fabe149cd5d651af2
|
7
|
+
data.tar.gz: 18e5eee93b20e65ded5893aac312f2b8a84548111c5f92eb197753728795b42aa5b9823e7b7a14e407a45e93eb8a9f2a91f54bc43cdf00a3f5252c75615b9ccb
|
data/lib/linecook/builder/lxc.rb
CHANGED
@@ -199,7 +199,9 @@ eos
|
|
199
199
|
@source_path = Linecook::ImageManager.fetch(@source_image, profile: :public)
|
200
200
|
if @remote
|
201
201
|
dest = "#{File.basename(@source_path)}"
|
202
|
-
|
202
|
+
unless test("[ -f #{dest} ]") && capture("shasum #{dest}").split.first && `shasum #{@source_path}`.split.first
|
203
|
+
@remote.upload(@source_path, dest)
|
204
|
+
end
|
203
205
|
@image_path = dest
|
204
206
|
else
|
205
207
|
@image_path = @source_path
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'open-uri'
|
2
2
|
require 'fileutils'
|
3
|
+
require 'securerandom'
|
3
4
|
|
4
5
|
require 'zip'
|
5
6
|
require 'ruby-progressbar'
|
@@ -13,7 +14,7 @@ module Linecook
|
|
13
14
|
def self.download(url, path, encrypted: false)
|
14
15
|
acquire_lock(path)
|
15
16
|
FileUtils.mkdir_p(File.dirname(path))
|
16
|
-
cryptfile = "#{File.basename(path)}-encrypted"
|
17
|
+
cryptfile = "#{File.basename(path)}-encrypted-#{SecureRandom.hex(4)}"
|
17
18
|
destination = encrypted ? File.join('/tmp', cryptfile) : path
|
18
19
|
File.open(destination, 'w') do |f|
|
19
20
|
pbar = ProgressBar.create(title: File.basename(path), total: nil)
|
data/lib/linecook/version.rb
CHANGED