capistrano-s3_archive 1.0.0 → 1.0.1

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
  SHA256:
3
- metadata.gz: af4eb25b90c60b6a5ef6f072ff01024706128c1924e051424191f3d1f535ff50
4
- data.tar.gz: 523ba94440f350ae342fd2b73b45f0d9b593cbf7e9d3935c4e239c100649d03b
3
+ metadata.gz: a20a72d912509e3ebdaaa307d277eac7aabecb6f813f693f79587dae5fda30e0
4
+ data.tar.gz: 4cd09c4d098e33453b067290710e638c555df182c612cc33461e68fe3076c759
5
5
  SHA512:
6
- metadata.gz: cfe3e1ac51a0dac8ef600e2a313feb4e3a665120c3ee1df0e46292e6e455c8ea428e50cdec7c8d5437c9bdc699259bbd5cc232b909cc4e0a4d5bec02cdda2a80
7
- data.tar.gz: 7c2bb15d6493e9e2f82704c5d0e544679f27ea69c920501b81f5e1701d9a4b7c88dec4180a096b192675decf6bdde70fe7e20ce74f996281f2bb4c0c8fdc0dcd
6
+ metadata.gz: c124c5c0b74ced2381d7503dbfda2a32b6fd6a945e8fa8b24b54ea33a503d1d41a787c6ca8c473c4f570e64009547165f669b9bc780f3890d12efa3802bd8268
7
+ data.tar.gz: 0eb0a0b8e880c83021392e53204cdfb39b7a9be55e238569d42323cae31e3ac8e888a950677f5f50b246837a52a437fa52d7bfad28cdcf91c11a4f27bf5de140
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module S3Archive
3
- VERSION = "1.0.0".freeze
3
+ VERSION = "1.0.1".freeze
4
4
  end
5
5
  end
@@ -11,7 +11,6 @@ module Capistrano
11
11
  end
12
12
 
13
13
  def download
14
- tmp_file = "#{target_file}.part"
15
14
  etag_file = File.join(download_dir, ".#{archive_object.key_basename}.etag")
16
15
  if backend.test("[ -f #{target_file} -a -f #{etag_file} ]") &&
17
16
  backend.capture(:cat, etag_file) == archive_object.etag
@@ -19,8 +18,8 @@ module Capistrano
19
18
  else
20
19
  backend.info "Download s3://#{archive_object.bucket}/#{archive_object.key} to #{target_file}"
21
20
  backend.execute(:mkdir, "-p", download_dir)
22
- backend.execute(:aws, *['s3api', 'get-object', "--bucket #{archive_object.bucket}", "--key #{archive_object.key}", archive_object.version_id ? "--version-id #{archive_object.version_id}" : nil, tmp_file].compact)
23
- backend.execute(:mv, tmp_file, target_file)
21
+ backend.execute(:aws, *['s3api', 'get-object', "--bucket #{archive_object.bucket}", "--key #{archive_object.key}", archive_object.version_id ? "--version-id #{archive_object.version_id}" : nil, target_file].compact)
22
+
24
23
  backend.execute(:echo, "-n", "'#{archive_object.etag}'", "|tee", etag_file)
25
24
  end
26
25
  end
@@ -36,7 +35,7 @@ module Capistrano
36
35
  end
37
36
 
38
37
  def target_file
39
- basename = [archive_object.key_basename, archive_object.version_id].join('?')
38
+ basename = [archive_object.key_basename, archive_object.version_id].join('__')
40
39
  File.join(download_dir, basename)
41
40
  end
42
41
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-s3_archive
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takuto Komazaki