capistrano-net_storage-s3 0.2.2 → 0.2.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11baad0eae823de991032cd305a6597ddd036123
|
4
|
+
data.tar.gz: dde25b45ccb04d1e58c9f229932f2793eec14cdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e50a343312b487b385b3509340052f872ea24e816701a1f655d714a1e1329756b87f58004398fc74234794d22aa827edb2f04dda2d1c6aa2633f22af90137d5
|
7
|
+
data.tar.gz: 90d9be1b33d181110b6382e1514fcab95a182092809d28126330d9182769b98d27e1f15de7e63449521a016d953c6fe397aa8e75bd2fa388e72a9a7a68874d8e
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -40,6 +40,7 @@ Set Capistrano variables by `set name, value`.
|
|
40
40
|
`:net_storage_s3_aws_config_file` | `ENV['AWS_CONFIG_FILE']` | AWS Config File
|
41
41
|
`:net_storage_s3_bucket` | `nil` | S3 bucket name
|
42
42
|
`:net_storage_s3_archives_directory` | `nil` | Directory for application archives in S3 bucket
|
43
|
+
`:net_storage_s3_keep_releases` | `:keep_releases` | Number to keep archives in S3
|
43
44
|
`:net_storage_s3_max_retry` | `3` | Max retry times for S3 operations
|
44
45
|
|
45
46
|
See also
|
@@ -54,7 +54,7 @@ class Capistrano::NetStorage::S3::Broker::AwsCLI < Capistrano::NetStorage::S3::B
|
|
54
54
|
|
55
55
|
objects = JSON.parse(output)['Contents']
|
56
56
|
sorted = objects.sort_by { |obj| Time.parse(obj['LastModified']) }
|
57
|
-
|
57
|
+
c.s3_keep_releases.times do
|
58
58
|
break if sorted.empty?
|
59
59
|
sorted.pop
|
60
60
|
end
|
@@ -122,5 +122,11 @@ class Capistrano::NetStorage::S3
|
|
122
122
|
def max_retry
|
123
123
|
@max_retry ||= fetch(:net_storage_s3_max_retry, 3)
|
124
124
|
end
|
125
|
+
|
126
|
+
# Number to keep archives on S3
|
127
|
+
# @return [Fixnum]
|
128
|
+
def s3_keep_releases
|
129
|
+
@s3_keep_releases ||= fetch(:net_storage_s3_keep_releases, fetch(:keep_releases, 5))
|
130
|
+
end
|
125
131
|
end
|
126
132
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-net_storage-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- progrhyme
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano-net_storage
|