linecook-gem 0.5.4 → 0.5.5

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: 7815ff8ae111c025249cb8daa3a2414309a701ae
4
- data.tar.gz: 1e03637093ea8c3b20b4689ad716a3d1b9096428
3
+ metadata.gz: cb95b96ba0c0d96148c7c168fbabf20cddf4f037
4
+ data.tar.gz: c4db4da5432af487298a3214a068e8d53babfbe5
5
5
  SHA512:
6
- metadata.gz: 6f954ea3315ba81315895d9a85842b4241adb71dc943c9576228bb03c62bb3e7147e797417a545b54f8bfda864f1663bec75f3236856327ffd0d94a4c057efa5
7
- data.tar.gz: c9ce12f80e0e5a3c25d8cf1fd2903d1197873e9d409b9410393e96f079a7a09c6d907b1bc5d6605d05ee2f65689332df3548d3b247b6e2061dd7b505c49bd7aa
6
+ metadata.gz: e15e5a9b5bcfec5652828bd3aecd49debfc10d30e392416ccff74b897025a972386df5f37d03055b217a59fee0a1eb2c2e0a98758086fd7fabe149cd5d651af2
7
+ data.tar.gz: 18e5eee93b20e65ded5893aac312f2b8a84548111c5f92eb197753728795b42aa5b9823e7b7a14e407a45e93eb8a9f2a91f54bc43cdf00a3f5252c75615b9ccb
@@ -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
- @remote.upload(@source_path, dest) unless test("[ -f #{dest} ]")
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)
@@ -1,3 +1,3 @@
1
1
  module Linecook
2
- VERSION = '0.5.4'
2
+ VERSION = '0.5.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linecook-gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dale Hamel