capistrano-s3_archive 1.0.1 → 1.0.3

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: a20a72d912509e3ebdaaa307d277eac7aabecb6f813f693f79587dae5fda30e0
4
- data.tar.gz: 4cd09c4d098e33453b067290710e638c555df182c612cc33461e68fe3076c759
3
+ metadata.gz: 98207150dd4b36e1db121d13d8e65600a56ab69fdc76ee00d3631a9c5b375006
4
+ data.tar.gz: 1244b8a8ddd17d92b57f7b8e5bdba416ebc6a78e03806c307f44b6bd958f2bec
5
5
  SHA512:
6
- metadata.gz: c124c5c0b74ced2381d7503dbfda2a32b6fd6a945e8fa8b24b54ea33a503d1d41a787c6ca8c473c4f570e64009547165f669b9bc780f3890d12efa3802bd8268
7
- data.tar.gz: 0eb0a0b8e880c83021392e53204cdfb39b7a9be55e238569d42323cae31e3ac8e888a950677f5f50b246837a52a437fa52d7bfad28cdcf91c11a4f27bf5de140
6
+ metadata.gz: c0949eb72ab4e3d67e27ce1dc399c3cd0813652943fe371d4713f460a696d28af4256f2d3cc9a9df28987c0a14fb132a816ee08bb3db0ac331e9f7867d1243ff
7
+ data.tar.gz: f5ad8fbc697b9e5cdb3be45610c86b1cfb0dad8dc7faf7abd5f02f93ac3f4cfa3cf4d8951293dc990c165bde8f9bcdf892421ce390be3c0efe18007c13ba1a13
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module S3Archive
3
- VERSION = "1.0.1".freeze
3
+ VERSION = "1.0.3".freeze
4
4
  end
5
5
  end
@@ -47,11 +47,13 @@ module Capistrano
47
47
  end
48
48
 
49
49
  def cleanup(keep: 0)
50
- downloaded_files = Dir.glob(download_dir).sort_by(&File.method(:mtime))
50
+ downloaded_files = Dir.glob(File.join(download_dir, '*')).sort_by(&File.method(:mtime))
51
51
  return if downloaded_files.count <= keep
52
52
 
53
- to_be_removes = (downloaded_files - downloaded_files.last(keep)).flat_map { |f| [f, ".#{f}.etag"] }
54
- remove(to_be_removes, force: true)
53
+ remove_keys = (downloaded_files - downloaded_files.last(keep)).map { |f| File.basename(f, '.*') }.flat_map { |f| ["#{f}*", ".#{f}*"] }
54
+ to_be_removes = Dir.glob(remove_keys, base: download_dir).map { |f| File.join(download_dir, f) }
55
+
56
+ remove(to_be_removes, force: true, verbose: true)
55
57
  end
56
58
 
57
59
  def target_file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-s3_archive
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takuto Komazaki
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-08 00:00:00.000000000 Z
11
+ date: 2023-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3
@@ -146,7 +146,6 @@ files:
146
146
  - example/config/deploy.rb
147
147
  - example/config/deploy/localtest.rb
148
148
  - example/config/deploy/production.rb
149
- - example/config/deploy/staging.rb
150
149
  - img/s3_archive-direct.png
151
150
  - img/s3_archive-repo-branch.png
152
151
  - img/s3_archive-rsync.png
@@ -163,7 +162,7 @@ files:
163
162
  homepage: https://github.com/komazarari/capistrano-s3_archive
164
163
  licenses: []
165
164
  metadata: {}
166
- post_install_message:
165
+ post_install_message:
167
166
  rdoc_options: []
168
167
  require_paths:
169
168
  - lib
@@ -178,8 +177,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
177
  - !ruby/object:Gem::Version
179
178
  version: '0'
180
179
  requirements: []
181
- rubygems_version: 3.0.3
182
- signing_key:
180
+ rubygems_version: 3.3.26
181
+ signing_key:
183
182
  specification_version: 4
184
183
  summary: Capistrano deployment from an archive on Amazon S3.
185
184
  test_files: []
@@ -1,65 +0,0 @@
1
- server 'koma-bionic.dev-inf.gree-dev.net', roles: [:app]
2
-
3
- set :deploy_to, '/var/tmp/testmyapp'
4
-
5
- # server-based syntax
6
- # ======================
7
- # Defines a single server with a list of roles and multiple properties.
8
- # You can define all roles on a single server, or split them:
9
-
10
- # server "example.com", user: "deploy", roles: %w{app db web}, my_property: :my_value
11
- # server "example.com", user: "deploy", roles: %w{app web}, other_property: :other_value
12
- # server "db.example.com", user: "deploy", roles: %w{db}
13
-
14
-
15
-
16
- # role-based syntax
17
- # ==================
18
-
19
- # Defines a role with one or multiple servers. The primary server in each
20
- # group is considered to be the first unless any hosts have the primary
21
- # property set. Specify the username and a domain or IP for the server.
22
- # Don't use `:all`, it's a meta role.
23
-
24
- # role :app, %w{deploy@example.com}, my_property: :my_value
25
- # role :web, %w{user1@primary.com user2@additional.com}, other_property: :other_value
26
- # role :db, %w{deploy@example.com}
27
-
28
-
29
-
30
- # Configuration
31
- # =============
32
- # You can set any configuration variable like in config/deploy.rb
33
- # These variables are then only loaded and set in this stage.
34
- # For available Capistrano configuration variables see the documentation page.
35
- # http://capistranorb.com/documentation/getting-started/configuration/
36
- # Feel free to add new variables to customise your setup.
37
-
38
-
39
-
40
- # Custom SSH Options
41
- # ==================
42
- # You may pass any option but keep in mind that net/ssh understands a
43
- # limited set of options, consult the Net::SSH documentation.
44
- # http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start
45
- #
46
- # Global options
47
- # --------------
48
- # set :ssh_options, {
49
- # keys: %w(/home/rlisowski/.ssh/id_rsa),
50
- # forward_agent: false,
51
- # auth_methods: %w(password)
52
- # }
53
- #
54
- # The server-based syntax can be used to override options:
55
- # ------------------------------------
56
- # server "example.com",
57
- # user: "user_name",
58
- # roles: %w{web app},
59
- # ssh_options: {
60
- # user: "user_name", # overrides user setting above
61
- # keys: %w(/home/user_name/.ssh/id_rsa),
62
- # forward_agent: false,
63
- # auth_methods: %w(publickey password)
64
- # # password: "please use keys"
65
- # }