tarsnap_pruner 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/tarsnap_pruner/scheduler.rb +2 -2
- data/lib/tarsnap_pruner/version.rb +1 -1
- metadata +13 -25
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3c90acbb14d7f7540292a0eae232b36c1bea975e
|
4
|
+
data.tar.gz: 69310031a58f96f3c91cd1ce8db507df57934e3d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 30e41819ddc878e8073ccac5577d212065f49a5f33699ce7d9229e9b1849050a6fcafd790802eea126ef92cd1a565e5add5241f7a0d9e1ab8beda34dc56cfd60
|
7
|
+
data.tar.gz: 0e39751b7983a7882e0994feb6dc62a239fb2f7e4653802bc37906ecbf9fd5f44f2d229ad2c307453c8c4a51091899641bb8dd2352552ad2fd8ff566dc04c491
|
@@ -3,7 +3,7 @@ module TarsnapPruner
|
|
3
3
|
class Scheduler
|
4
4
|
|
5
5
|
def initialize(archives, daily_boundary=182, weekly_boundary=730)
|
6
|
-
@archives = archives
|
6
|
+
@archives = archives.sort_by(&:date)
|
7
7
|
@daily_boundary = daily_boundary
|
8
8
|
@weekly_boundary = weekly_boundary
|
9
9
|
end
|
@@ -29,7 +29,7 @@ module TarsnapPruner
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def weeklies_to_keep
|
32
|
-
weeklies.group_by { |a| a.date.cweek }.values.map(&:last)
|
32
|
+
weeklies.group_by { |a| "#{a.date.year}-#{a.date.cweek}" }.values.map(&:last)
|
33
33
|
end
|
34
34
|
|
35
35
|
def weeklies_to_prune
|
metadata
CHANGED
@@ -1,36 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tarsnap_pruner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Scott Woods
|
9
8
|
autorequire:
|
10
9
|
bindir: exe
|
11
10
|
cert_chain: []
|
12
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-31 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: dotenv
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: bundler
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ~>
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rake
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ~>
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ~>
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -62,33 +55,29 @@ dependencies:
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: rspec
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - '>='
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - '>='
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '0'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: timecop
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - '>='
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: '0'
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - '>='
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: '0'
|
94
83
|
description: The Tarsnap backup service charges based on storage and bandwith. This
|
@@ -124,26 +113,25 @@ files:
|
|
124
113
|
homepage: https://github.com/westarete/tarsnap_pruner
|
125
114
|
licenses:
|
126
115
|
- MIT
|
116
|
+
metadata: {}
|
127
117
|
post_install_message:
|
128
118
|
rdoc_options: []
|
129
119
|
require_paths:
|
130
120
|
- lib
|
131
121
|
required_ruby_version: !ruby/object:Gem::Requirement
|
132
|
-
none: false
|
133
122
|
requirements:
|
134
|
-
- -
|
123
|
+
- - '>='
|
135
124
|
- !ruby/object:Gem::Version
|
136
125
|
version: '0'
|
137
126
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
|
-
none: false
|
139
127
|
requirements:
|
140
|
-
- -
|
128
|
+
- - '>='
|
141
129
|
- !ruby/object:Gem::Version
|
142
130
|
version: '0'
|
143
131
|
requirements: []
|
144
132
|
rubyforge_project:
|
145
|
-
rubygems_version:
|
133
|
+
rubygems_version: 2.0.14
|
146
134
|
signing_key:
|
147
|
-
specification_version:
|
135
|
+
specification_version: 4
|
148
136
|
summary: A method of deleting old tarsnap backups.
|
149
137
|
test_files: []
|