wolfe 1.3.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +67 -9
- data/README.md +48 -13
- data/lib/wolfe/cleanup.rb +26 -23
- data/lib/wolfe/timespan_from_configuration.rb +2 -2
- data/lib/wolfe/version.rb +1 -1
- metadata +15 -80
- data/.gitignore +0 -9
- data/.travis.yml +0 -4
- data/CODE_OF_CONDUCT.md +0 -13
- data/Gemfile +0 -4
- data/Rakefile +0 -10
- data/bin/console +0 -14
- data/bin/setup +0 -7
- data/wolfe.gemspec +0 -31
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 171a5d7ed988e17a5ae3b69b59a07a9b3353b9fe93788ff024d6cf4b2cb7cb1b
|
|
4
|
+
data.tar.gz: ade0cf8dc0ab067c2f107267f72542d80cee2a9ce10d5ff806fd99047fc2db3b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1b23e1cccee20da649433c10b3c8e794c4aac15303de0ad65b09e2791bd199619debe7def00ed0602dbed05f1a1645984b4f8934a584d5fb8089207aa65326da
|
|
7
|
+
data.tar.gz: 8465b9ee1ac8c0c7e2ac5600c86e9a422053425750f720d5caed591a51b328f03b48fed9a8769f9b2583481c4d636560d48b6b4a7d4fe75af5e9bc55fe00c9f9
|
data/CHANGELOG.md
CHANGED
|
@@ -1,33 +1,91 @@
|
|
|
1
|
+
## 1.5.0 (2026-11-10)
|
|
2
|
+
|
|
3
|
+
Versions 1.3.2–1.4.0 were never published to RubyGems; this is the first release since 1.3.1.
|
|
4
|
+
|
|
5
|
+
Fixes:
|
|
6
|
+
|
|
7
|
+
- Filenames with a suffix after the date (e.g. `.tar.gz`, `.age`) are now cleaned up correctly. Previously, with `one_per_month_timespan: 0.months`, such files were never deleted.
|
|
8
|
+
- Digits elsewhere in the backup path (e.g. `app2-docker`) no longer affect the parsed backup date.
|
|
9
|
+
- The month at the edge of the monthly timespan now keeps its latest backup. Previously it lost all of its backups.
|
|
10
|
+
- The 5-year lookback is computed on each run instead of once at load time.
|
|
11
|
+
- Configuration validation and timespan parsing now accept the same units: days, weeks, months, years. `2.weeks` used to pass validation and then fail; `hours` is no longer accepted. Timespans with extra content on another line are rejected.
|
|
12
|
+
|
|
13
|
+
Changes:
|
|
14
|
+
|
|
15
|
+
- Requires Ruby 3.3 or newer; tested on Ruby 3.3, 3.4 and 4.0.
|
|
16
|
+
- Requires ActiveSupport 8.0 or newer and Thor 1.3 or newer.
|
|
17
|
+
- With monthly retention enabled, cleanup keeps one more backup than before (the edge month's latest).
|
|
18
|
+
- The published gem now includes only `lib/`, `exe/`, README, changelog and license.
|
|
19
|
+
|
|
20
|
+
## 1.4.0 (2022-03-10)
|
|
21
|
+
|
|
22
|
+
Changes:
|
|
23
|
+
|
|
24
|
+
- Update ruby to 3.1.1
|
|
25
|
+
|
|
26
|
+
## 1.3.5 (2021-06-25)
|
|
27
|
+
|
|
28
|
+
Changes:
|
|
29
|
+
|
|
30
|
+
- Remove Codeship references
|
|
31
|
+
|
|
32
|
+
## 1.3.4 (2021-06-16)
|
|
33
|
+
|
|
34
|
+
Changes:
|
|
35
|
+
|
|
36
|
+
- Bump Ruby to version `2.7.3`
|
|
37
|
+
- Add `Timecop` gem for testing
|
|
38
|
+
- Fix cleanup test
|
|
39
|
+
- CircleCI migration
|
|
40
|
+
|
|
41
|
+
## 1.3.3 (2020-12-01)
|
|
42
|
+
|
|
43
|
+
Changes:
|
|
44
|
+
|
|
45
|
+
- Create '.ruby-version' file and set Ruby to version '2.6.6'
|
|
46
|
+
|
|
47
|
+
## 1.3.2 (2020-07-07)
|
|
48
|
+
|
|
49
|
+
Changes:
|
|
50
|
+
|
|
51
|
+
- Gemspec: make sure we use `>= 12.3.3` version for `rake` gem dev dependency
|
|
52
|
+
|
|
53
|
+
## 1.3.1 (2019-03-04)
|
|
54
|
+
|
|
55
|
+
Changes:
|
|
56
|
+
|
|
57
|
+
- add guard in `delete_without_keeping_one` method, which checks if backup file for the next day exists before checking its size
|
|
58
|
+
|
|
1
59
|
## 1.3.0 (2019-03-04)
|
|
2
60
|
|
|
3
61
|
Changes:
|
|
4
62
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
63
|
+
- get date from file a more cleaner way
|
|
64
|
+
- fix a broken test
|
|
65
|
+
- update bundler
|
|
8
66
|
|
|
9
67
|
## 1.2.0 (2018-09-05)
|
|
10
68
|
|
|
11
69
|
Changes:
|
|
12
70
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
71
|
+
- modify gem not to clean backups if the last backup is empty
|
|
72
|
+
- modify gem to have the option of not keeping one backup
|
|
73
|
+
- improve readability
|
|
16
74
|
|
|
17
75
|
## 1.1.1 (2015-10-16)
|
|
18
76
|
|
|
19
77
|
Changes:
|
|
20
78
|
|
|
21
|
-
|
|
79
|
+
- FIX: Copyright holder is Lomographische AG, not Martin Sereinig. Updated notice in License.
|
|
22
80
|
|
|
23
81
|
## 1.1.0 (2015-10-08)
|
|
24
82
|
|
|
25
83
|
Changes:
|
|
26
84
|
|
|
27
|
-
|
|
85
|
+
- BUGFIX: The one backup kept per timespan was dependent on the cleaning of the other intervals. Now the one backup left alone is always the backup of the last day in the timespan.
|
|
28
86
|
|
|
29
87
|
## 1.0.0 (2015-10-08)
|
|
30
88
|
|
|
31
89
|
Changes:
|
|
32
90
|
|
|
33
|
-
|
|
91
|
+
- Version 1.0. yay! 🎉
|
data/README.md
CHANGED
|
@@ -1,32 +1,40 @@
|
|
|
1
|
-
[
|
|
1
|
+
[](https://dl.circleci.com/status-badge/redirect/gh/lomography/wolfe/tree/master)
|
|
2
2
|
|
|
3
3
|
# Wolfe
|
|
4
4
|
|
|
5
|
-
Wolfe
|
|
5
|
+
Wolfe cleans up database (and other) backups that encode year, month, day and hour in their filename. It reads that date to decide whether a file should be removed, and can be configured to keep daily and monthly backups for given timespans.
|
|
6
6
|
|
|
7
|
-
Original code was written by [@michaelem](https://github.com/michaelem), tests and gemification by [@srecnig](https://github.com/srecnig). In case you're wondering, the name wolfe is a [reference](
|
|
7
|
+
Original code was written by [@michaelem](https://github.com/michaelem), tests and gemification by [@srecnig](https://github.com/srecnig). In case you're wondering, the name wolfe is a [reference](https://www.imdb.com/title/tt0110912/quotes/?item=qt0447112).
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
|
|
11
|
+
Ruby 3.3 or newer.
|
|
8
12
|
|
|
9
13
|
## Installation
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
Add wolfe to your application's `Gemfile`, or install it directly:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
gem install wolfe
|
|
19
|
+
```
|
|
12
20
|
|
|
13
21
|
## Usage
|
|
14
22
|
|
|
15
|
-
Call wolfe from the command line
|
|
23
|
+
Call wolfe from the command line with a rules file as its only argument:
|
|
16
24
|
|
|
17
25
|
```bash
|
|
18
26
|
wolfe cleanup rules.yml
|
|
19
27
|
```
|
|
20
28
|
|
|
21
|
-
Or call
|
|
29
|
+
Or call it from Ruby, if you've added it to your `Gemfile`:
|
|
22
30
|
|
|
23
31
|
```ruby
|
|
24
32
|
Wolfe.run_cleanup "/path/to/rules.yml"
|
|
25
33
|
```
|
|
26
34
|
|
|
27
|
-
## Rules
|
|
35
|
+
## Rules file
|
|
28
36
|
|
|
29
|
-
The
|
|
37
|
+
The rules file describes where backups are stored, how the date is encoded in the filename, and how many backups to keep per timespan.
|
|
30
38
|
|
|
31
39
|
```yaml
|
|
32
40
|
---
|
|
@@ -37,15 +45,42 @@ backup_name:
|
|
|
37
45
|
one_per_month_timespan: 1.year
|
|
38
46
|
```
|
|
39
47
|
|
|
40
|
-
|
|
48
|
+
- `filename` must contain `%{year}`, `%{month}`, `%{day}` and `%{hour}`, in the form `YYYY-MM-DD-HH`. Anything before or after the date is matched literally, so suffixes like `.tar.gz` or `.age` work.
|
|
49
|
+
- Timespans use [Active Support's duration helpers](https://guides.rubyonrails.org/active_support_core_extensions.html#time): `<number>.<unit>`, where the unit is `day`, `week`, `month` or `year` (singular or plural). No spaces or Ruby code.
|
|
50
|
+
|
|
51
|
+
## How backups are kept
|
|
52
|
+
|
|
53
|
+
With the example above:
|
|
54
|
+
|
|
55
|
+
- **Daily:** every backup from the last 15 days is kept.
|
|
56
|
+
- **Monthly:** for each month within the last year, the latest backup of that month is kept.
|
|
57
|
+
- **Yearly:** for each year before that, the latest backup of that year is kept.
|
|
58
|
+
|
|
59
|
+
Set `one_per_month_timespan` to `0.months` to keep only the daily backups. A backup older than the daily timespan is then removed once a backup exists for the next day at the same hour, so this works best with one backup per day at a fixed time. Backups taken at irregular hours, or followed by a missing day, are kept.
|
|
60
|
+
|
|
61
|
+
Two safety rules apply:
|
|
41
62
|
|
|
42
|
-
|
|
63
|
+
- If the latest backup in a month is empty (0 bytes), wolfe deletes nothing from that month, so a failed backup can't cause the last good ones to be removed.
|
|
64
|
+
- Backups older than 5 years are not looked at, and are never removed.
|
|
65
|
+
|
|
66
|
+
## Development
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
bundle install
|
|
70
|
+
bundle exec rake test
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Or with Docker:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
docker build -t wolfe .
|
|
77
|
+
docker run --rm wolfe
|
|
78
|
+
```
|
|
43
79
|
|
|
44
80
|
## Contributing
|
|
45
81
|
|
|
46
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/lomography/wolfe. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
|
82
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/lomography/wolfe. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](https://www.contributor-covenant.org) code of conduct.
|
|
47
83
|
|
|
48
84
|
## License
|
|
49
85
|
|
|
50
|
-
The gem is available as open source under the terms of the [MIT License](
|
|
51
|
-
|
|
86
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/lib/wolfe/cleanup.rb
CHANGED
|
@@ -7,7 +7,7 @@ module Wolfe
|
|
|
7
7
|
class Cleanup
|
|
8
8
|
attr_accessor :configuration
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
DATE_REGEX = /(\d{4})-(\d{2})-(\d{2})-(\d{2})/
|
|
11
11
|
|
|
12
12
|
def initialize(configuration)
|
|
13
13
|
@configuration = configuration
|
|
@@ -45,21 +45,26 @@ module Wolfe
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
def timespan_regex
|
|
48
|
-
|
|
48
|
+
units = TimespanFromConfiguration::SUPPORTED_TIME_UNITS.map { |unit| "#{unit.chomp('s')}s?" }.join("|")
|
|
49
|
+
/\A\d+\.(#{units})\z/
|
|
49
50
|
end
|
|
50
51
|
|
|
51
52
|
#
|
|
52
53
|
# cleanup
|
|
53
54
|
#
|
|
54
55
|
|
|
56
|
+
def backup_first_cutoff_date
|
|
57
|
+
Date.today - 5.years
|
|
58
|
+
end
|
|
59
|
+
|
|
55
60
|
def cleanup(config)
|
|
56
61
|
daily_date = Date.today - TimespanFromConfiguration.new(config['one_per_day_timespan']).timespan
|
|
57
62
|
monthly_date = calculate_monthly_date(config['one_per_month_timespan'])
|
|
58
63
|
keep_one = TimespanFromConfiguration.new(config['one_per_month_timespan']).keep_one_backup?
|
|
59
64
|
|
|
60
65
|
if File.directory?(config['path'])
|
|
61
|
-
clean_monthly(monthly_date, daily_date, config, keep_one)
|
|
62
66
|
clean_yearly(monthly_date, config, keep_one) if keep_one
|
|
67
|
+
clean_monthly(monthly_date, daily_date, config, keep_one)
|
|
63
68
|
else
|
|
64
69
|
puts "Path '#{config['path']}' is not a directory."
|
|
65
70
|
end
|
|
@@ -69,7 +74,7 @@ module Wolfe
|
|
|
69
74
|
timespan = TimespanFromConfiguration.new(one_per_month_timespan).timespan
|
|
70
75
|
|
|
71
76
|
if Date.today - timespan == Date.today
|
|
72
|
-
|
|
77
|
+
backup_first_cutoff_date
|
|
73
78
|
else
|
|
74
79
|
Date.today - timespan
|
|
75
80
|
end
|
|
@@ -82,7 +87,7 @@ module Wolfe
|
|
|
82
87
|
end
|
|
83
88
|
|
|
84
89
|
def clean_yearly(monthly_date, config, keep_one)
|
|
85
|
-
|
|
90
|
+
backup_first_cutoff_date.upto(monthly_date) do |date|
|
|
86
91
|
delete_yearly(config['path'], config['filename'], date, keep_one)
|
|
87
92
|
end
|
|
88
93
|
end
|
|
@@ -97,7 +102,7 @@ module Wolfe
|
|
|
97
102
|
day: date.strftime('%d'),
|
|
98
103
|
hour: '*' }
|
|
99
104
|
|
|
100
|
-
select_file_for_deletion(keep_one, path, filename_day,
|
|
105
|
+
select_file_for_deletion(keep_one, path, filename_day, filename_month)
|
|
101
106
|
end
|
|
102
107
|
|
|
103
108
|
def delete_yearly(path, filename, date, keep_one)
|
|
@@ -110,15 +115,16 @@ module Wolfe
|
|
|
110
115
|
day: date.strftime('%d'),
|
|
111
116
|
hour: '*' }
|
|
112
117
|
|
|
113
|
-
select_file_for_deletion(keep_one, path, filename_day,
|
|
118
|
+
select_file_for_deletion(keep_one, path, filename_day, filename_year)
|
|
114
119
|
end
|
|
115
120
|
|
|
116
|
-
def select_file_for_deletion(keep_one, path, filename_day,
|
|
121
|
+
def select_file_for_deletion(keep_one, path, filename_day, keep_filename)
|
|
122
|
+
delete_path = full_path(path, filename_day)
|
|
123
|
+
|
|
117
124
|
if keep_one
|
|
118
|
-
select_file(full_path(path,
|
|
119
|
-
select_file(full_path(path, filename_year), delete_path: full_path(path, filename_day)) if filename_year
|
|
125
|
+
select_file(full_path(path, keep_filename), delete_path: delete_path)
|
|
120
126
|
else
|
|
121
|
-
select_file(delete_path:
|
|
127
|
+
select_file(delete_path: delete_path)
|
|
122
128
|
end
|
|
123
129
|
end
|
|
124
130
|
|
|
@@ -145,9 +151,8 @@ module Wolfe
|
|
|
145
151
|
end
|
|
146
152
|
|
|
147
153
|
def delete_without_keeping_one(file)
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
end
|
|
154
|
+
next_file = Dir.glob(next_file_path(file)).last
|
|
155
|
+
delete(file) if next_file.present? && File.size(next_file) > 0
|
|
151
156
|
end
|
|
152
157
|
|
|
153
158
|
def delete(file)
|
|
@@ -156,21 +161,19 @@ module Wolfe
|
|
|
156
161
|
end
|
|
157
162
|
|
|
158
163
|
def month_path(file)
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
file_splitted[-1] = "*"
|
|
162
|
-
file_splitted.join('-')
|
|
164
|
+
dir, base = File.split(file)
|
|
165
|
+
File.join(dir, base.sub(/(\d{4}-\d{2})-\d{2}-\d{2}/, '\1-*-*'))
|
|
163
166
|
end
|
|
164
167
|
|
|
165
168
|
def date_from_file(file)
|
|
166
|
-
file.
|
|
169
|
+
year, month, day = File.basename(file).match(DATE_REGEX).captures
|
|
170
|
+
Date.new(year.to_i, month.to_i, day.to_i)
|
|
167
171
|
end
|
|
168
172
|
|
|
169
173
|
def next_file_path(file_path)
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
next_file
|
|
174
|
+
dir, base = File.split(file_path)
|
|
175
|
+
next_date = date_from_file(file_path).next.to_s
|
|
176
|
+
File.join(dir, base.sub(/\d{4}-\d{2}-\d{2}(?=-\d{2})/, next_date))
|
|
174
177
|
end
|
|
175
178
|
end
|
|
176
179
|
end
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
module Wolfe
|
|
2
2
|
class TimespanFromConfiguration
|
|
3
|
-
SUPPORTED_TIME_UNITS = %w(
|
|
3
|
+
SUPPORTED_TIME_UNITS = %w(days weeks months years).freeze
|
|
4
4
|
|
|
5
5
|
def initialize(config)
|
|
6
6
|
config = split_duration_and_unit(config)
|
|
7
7
|
|
|
8
8
|
@duration = Integer(config['duration'])
|
|
9
9
|
@unit = config['unit']
|
|
10
|
-
@unit =
|
|
10
|
+
@unit = "#{@unit}s".to_sym unless @unit.to_s.end_with?('s')
|
|
11
11
|
|
|
12
12
|
raise ArgumentError.new("Invalid time unit #{config['unit'].inspect}, expected one of #{SUPPORTED_TIME_UNITS.join(', ')}") unless supported_time_unit?
|
|
13
13
|
end
|
data/lib/wolfe/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,100 +1,43 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wolfe
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Emhofer
|
|
8
8
|
- Martin Sereinig
|
|
9
|
-
autorequire:
|
|
10
9
|
bindir: exe
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
|
-
- !ruby/object:Gem::Dependency
|
|
15
|
-
name: thor
|
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
|
17
|
-
requirements:
|
|
18
|
-
- - ">="
|
|
19
|
-
- !ruby/object:Gem::Version
|
|
20
|
-
version: '0'
|
|
21
|
-
type: :runtime
|
|
22
|
-
prerelease: false
|
|
23
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
24
|
-
requirements:
|
|
25
|
-
- - ">="
|
|
26
|
-
- !ruby/object:Gem::Version
|
|
27
|
-
version: '0'
|
|
28
13
|
- !ruby/object:Gem::Dependency
|
|
29
14
|
name: activesupport
|
|
30
15
|
requirement: !ruby/object:Gem::Requirement
|
|
31
16
|
requirements:
|
|
32
17
|
- - ">="
|
|
33
18
|
- !ruby/object:Gem::Version
|
|
34
|
-
version: '0'
|
|
19
|
+
version: '8.0'
|
|
35
20
|
type: :runtime
|
|
36
21
|
prerelease: false
|
|
37
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
23
|
requirements:
|
|
39
24
|
- - ">="
|
|
40
25
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: '0'
|
|
42
|
-
- !ruby/object:Gem::Dependency
|
|
43
|
-
name: bundler
|
|
44
|
-
requirement: !ruby/object:Gem::Requirement
|
|
45
|
-
requirements:
|
|
46
|
-
- - ">="
|
|
47
|
-
- !ruby/object:Gem::Version
|
|
48
|
-
version: '0'
|
|
49
|
-
type: :development
|
|
50
|
-
prerelease: false
|
|
51
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
52
|
-
requirements:
|
|
53
|
-
- - ">="
|
|
54
|
-
- !ruby/object:Gem::Version
|
|
55
|
-
version: '0'
|
|
26
|
+
version: '8.0'
|
|
56
27
|
- !ruby/object:Gem::Dependency
|
|
57
|
-
name:
|
|
58
|
-
requirement: !ruby/object:Gem::Requirement
|
|
59
|
-
requirements:
|
|
60
|
-
- - "~>"
|
|
61
|
-
- !ruby/object:Gem::Version
|
|
62
|
-
version: '10.0'
|
|
63
|
-
type: :development
|
|
64
|
-
prerelease: false
|
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
66
|
-
requirements:
|
|
67
|
-
- - "~>"
|
|
68
|
-
- !ruby/object:Gem::Version
|
|
69
|
-
version: '10.0'
|
|
70
|
-
- !ruby/object:Gem::Dependency
|
|
71
|
-
name: minitest
|
|
72
|
-
requirement: !ruby/object:Gem::Requirement
|
|
73
|
-
requirements:
|
|
74
|
-
- - ">="
|
|
75
|
-
- !ruby/object:Gem::Version
|
|
76
|
-
version: '0'
|
|
77
|
-
type: :development
|
|
78
|
-
prerelease: false
|
|
79
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
80
|
-
requirements:
|
|
81
|
-
- - ">="
|
|
82
|
-
- !ruby/object:Gem::Version
|
|
83
|
-
version: '0'
|
|
84
|
-
- !ruby/object:Gem::Dependency
|
|
85
|
-
name: byebug
|
|
28
|
+
name: thor
|
|
86
29
|
requirement: !ruby/object:Gem::Requirement
|
|
87
30
|
requirements:
|
|
88
31
|
- - ">="
|
|
89
32
|
- !ruby/object:Gem::Version
|
|
90
|
-
version: '
|
|
91
|
-
type: :
|
|
33
|
+
version: '1.3'
|
|
34
|
+
type: :runtime
|
|
92
35
|
prerelease: false
|
|
93
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
94
37
|
requirements:
|
|
95
38
|
- - ">="
|
|
96
39
|
- !ruby/object:Gem::Version
|
|
97
|
-
version: '
|
|
40
|
+
version: '1.3'
|
|
98
41
|
description: Often backup files have year, month, date and hour encoded in their filename.
|
|
99
42
|
Wolfe uses this information to clean up such files and can be configured to keep
|
|
100
43
|
daily/monthly backups for a certain timespans. It will always keep one backup per
|
|
@@ -106,28 +49,22 @@ executables:
|
|
|
106
49
|
extensions: []
|
|
107
50
|
extra_rdoc_files: []
|
|
108
51
|
files:
|
|
109
|
-
- ".gitignore"
|
|
110
|
-
- ".travis.yml"
|
|
111
52
|
- CHANGELOG.md
|
|
112
|
-
- CODE_OF_CONDUCT.md
|
|
113
|
-
- Gemfile
|
|
114
53
|
- LICENSE.txt
|
|
115
54
|
- README.md
|
|
116
|
-
- Rakefile
|
|
117
|
-
- bin/console
|
|
118
|
-
- bin/setup
|
|
119
55
|
- exe/wolfe
|
|
120
56
|
- lib/wolfe.rb
|
|
121
57
|
- lib/wolfe/cleanup.rb
|
|
122
58
|
- lib/wolfe/cli.rb
|
|
123
59
|
- lib/wolfe/timespan_from_configuration.rb
|
|
124
60
|
- lib/wolfe/version.rb
|
|
125
|
-
|
|
126
|
-
homepage: http://github.com/lomography/wolfe
|
|
61
|
+
homepage: https://github.com/lomography/wolfe
|
|
127
62
|
licenses:
|
|
128
63
|
- MIT
|
|
129
|
-
metadata:
|
|
130
|
-
|
|
64
|
+
metadata:
|
|
65
|
+
source_code_uri: https://github.com/lomography/wolfe
|
|
66
|
+
changelog_uri: https://github.com/lomography/wolfe/blob/master/CHANGELOG.md
|
|
67
|
+
rubygems_mfa_required: 'true'
|
|
131
68
|
rdoc_options: []
|
|
132
69
|
require_paths:
|
|
133
70
|
- lib
|
|
@@ -135,16 +72,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
135
72
|
requirements:
|
|
136
73
|
- - ">="
|
|
137
74
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: '
|
|
75
|
+
version: '3.3'
|
|
139
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
77
|
requirements:
|
|
141
78
|
- - ">="
|
|
142
79
|
- !ruby/object:Gem::Version
|
|
143
80
|
version: '0'
|
|
144
81
|
requirements: []
|
|
145
|
-
|
|
146
|
-
rubygems_version: 2.7.6
|
|
147
|
-
signing_key:
|
|
82
|
+
rubygems_version: 4.0.10
|
|
148
83
|
specification_version: 4
|
|
149
84
|
summary: Cleanup (backup) files by date.
|
|
150
85
|
test_files: []
|
data/.gitignore
DELETED
data/.travis.yml
DELETED
data/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Contributor Code of Conduct
|
|
2
|
-
|
|
3
|
-
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
|
4
|
-
|
|
5
|
-
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
|
|
6
|
-
|
|
7
|
-
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
|
8
|
-
|
|
9
|
-
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
|
10
|
-
|
|
11
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
|
12
|
-
|
|
13
|
-
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
DELETED
data/Rakefile
DELETED
data/bin/console
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
require "bundler/setup"
|
|
4
|
-
require "wolfe"
|
|
5
|
-
|
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
-
|
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
-
# require "pry"
|
|
11
|
-
# Pry.start
|
|
12
|
-
|
|
13
|
-
require "irb"
|
|
14
|
-
IRB.start
|
data/bin/setup
DELETED
data/wolfe.gemspec
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
-
require 'wolfe/version'
|
|
5
|
-
|
|
6
|
-
Gem::Specification.new do |spec|
|
|
7
|
-
spec.name = "wolfe"
|
|
8
|
-
spec.version = Wolfe::VERSION
|
|
9
|
-
spec.authors = ["Michael Emhofer", "Martin Sereinig"]
|
|
10
|
-
spec.email = ["dev@lomography.com"]
|
|
11
|
-
|
|
12
|
-
spec.summary = %q{Cleanup (backup) files by date.}
|
|
13
|
-
spec.description = "Often backup files have year, month, date and hour encoded in their filename. " \
|
|
14
|
-
"Wolfe uses this information to clean up such files and can be configured to " \
|
|
15
|
-
"keep daily/monthly backups for a certain timespans. It will always keep one backup per year."
|
|
16
|
-
spec.homepage = "http://github.com/lomography/wolfe"
|
|
17
|
-
spec.license = "MIT"
|
|
18
|
-
|
|
19
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
20
|
-
spec.bindir = "exe"
|
|
21
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
22
|
-
spec.require_paths = ["lib"]
|
|
23
|
-
|
|
24
|
-
spec.add_dependency "thor"
|
|
25
|
-
spec.add_dependency "activesupport"
|
|
26
|
-
|
|
27
|
-
spec.add_development_dependency "bundler"
|
|
28
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
|
29
|
-
spec.add_development_dependency "minitest"
|
|
30
|
-
spec.add_development_dependency "byebug"
|
|
31
|
-
end
|