rustic 0.4.0 → 0.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/.tool-versions +1 -1
- data/Gemfile +2 -0
- data/Gemfile.lock +95 -62
- data/examples/rustic.rb +9 -9
- data/lib/rustic/command_builder.rb +1 -1
- data/lib/rustic/version.rb +1 -1
- data/lib/rustic/wrapper.rb +2 -2
- data/rustic_script.rb +5 -5
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 30e838337c1ba5bf363393a9cbf6fc0f40ddab1785b3fb399e3d9d5dc560654c
|
|
4
|
+
data.tar.gz: 36d175e6c52b3c54d2963be3430483f1de91b63df7f61db3f17759f3cba2a2a4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3b66b1fd5f70a44162507001f41f2016260a98bfcc7ecc97c31451624837e39dd465ec2d9e34d503c99bbceb7be18734cdf171a21e95048153282a7992ed408b
|
|
7
|
+
data.tar.gz: b56904d7bb921a10c6600ff29b15687b16fa5b9809c79f774cedcc48ac1ee5dd4320700c1788a0a6726b8d84021d1764a561783984933082eaac990da3469554
|
data/.tool-versions
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
ruby 3.1
|
|
1
|
+
ruby 3.2.1
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rustic (0.
|
|
4
|
+
rustic (0.5.0)
|
|
5
5
|
async-process (~> 1.3)
|
|
6
6
|
ptools (~> 1.4)
|
|
7
7
|
zeitwerk (~> 2.5)
|
|
@@ -10,113 +10,146 @@ GEM
|
|
|
10
10
|
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
12
|
ast (2.4.2)
|
|
13
|
-
async (2.
|
|
14
|
-
console (~> 1.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
async-io (1.
|
|
13
|
+
async (2.12.1)
|
|
14
|
+
console (~> 1.25, >= 1.25.2)
|
|
15
|
+
fiber-annotation
|
|
16
|
+
io-event (~> 1.6, >= 1.6.5)
|
|
17
|
+
async-io (1.43.2)
|
|
18
18
|
async
|
|
19
19
|
async-process (1.3.1)
|
|
20
20
|
async
|
|
21
21
|
async-io
|
|
22
|
-
async-rspec (1.
|
|
22
|
+
async-rspec (1.17.0)
|
|
23
23
|
rspec (~> 3.0)
|
|
24
24
|
rspec-files (~> 1.0)
|
|
25
25
|
rspec-memory (~> 1.0)
|
|
26
|
+
aws-eventstream (1.3.0)
|
|
27
|
+
aws-partitions (1.949.0)
|
|
28
|
+
aws-sdk-core (3.200.0)
|
|
29
|
+
aws-eventstream (~> 1, >= 1.3.0)
|
|
30
|
+
aws-partitions (~> 1, >= 1.651.0)
|
|
31
|
+
aws-sigv4 (~> 1.8)
|
|
32
|
+
jmespath (~> 1, >= 1.6.1)
|
|
33
|
+
aws-sdk-kms (1.87.0)
|
|
34
|
+
aws-sdk-core (~> 3, >= 3.199.0)
|
|
35
|
+
aws-sigv4 (~> 1.1)
|
|
36
|
+
aws-sdk-s3 (1.155.0)
|
|
37
|
+
aws-sdk-core (~> 3, >= 3.199.0)
|
|
38
|
+
aws-sdk-kms (~> 1)
|
|
39
|
+
aws-sigv4 (~> 1.8)
|
|
40
|
+
aws-sigv4 (1.8.0)
|
|
41
|
+
aws-eventstream (~> 1, >= 1.0.2)
|
|
26
42
|
backport (1.2.0)
|
|
27
|
-
benchmark (0.
|
|
28
|
-
console (1.
|
|
29
|
-
fiber-
|
|
30
|
-
|
|
43
|
+
benchmark (0.3.0)
|
|
44
|
+
console (1.25.2)
|
|
45
|
+
fiber-annotation
|
|
46
|
+
fiber-local (~> 1.1)
|
|
47
|
+
json
|
|
48
|
+
diff-lcs (1.5.1)
|
|
31
49
|
docile (1.4.0)
|
|
32
50
|
e2mmap (0.1.0)
|
|
33
|
-
fiber-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
51
|
+
fiber-annotation (0.2.0)
|
|
52
|
+
fiber-local (1.1.0)
|
|
53
|
+
fiber-storage
|
|
54
|
+
fiber-storage (0.1.2)
|
|
55
|
+
io-event (1.6.5)
|
|
56
|
+
jaro_winkler (1.6.0)
|
|
57
|
+
jmespath (1.6.2)
|
|
58
|
+
json (2.7.2)
|
|
59
|
+
kramdown (2.4.0)
|
|
37
60
|
rexml
|
|
38
61
|
kramdown-parser-gfm (1.1.0)
|
|
39
62
|
kramdown (~> 2.0)
|
|
40
|
-
|
|
63
|
+
language_server-protocol (3.17.0.3)
|
|
64
|
+
nokogiri (1.16.6-x86_64-linux)
|
|
41
65
|
racc (~> 1.4)
|
|
42
|
-
|
|
43
|
-
|
|
66
|
+
ox (2.14.18)
|
|
67
|
+
parallel (1.25.1)
|
|
68
|
+
parser (3.3.3.0)
|
|
44
69
|
ast (~> 2.4.1)
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
70
|
+
racc
|
|
71
|
+
ptools (1.5.0)
|
|
72
|
+
racc (1.8.0)
|
|
73
|
+
rainbow (3.1.1)
|
|
74
|
+
rake (13.2.1)
|
|
75
|
+
rbs (2.8.4)
|
|
76
|
+
regexp_parser (2.9.2)
|
|
50
77
|
reverse_markdown (2.1.1)
|
|
51
78
|
nokogiri
|
|
52
|
-
rexml (3.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
rspec-
|
|
56
|
-
rspec-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
79
|
+
rexml (3.3.1)
|
|
80
|
+
strscan
|
|
81
|
+
rspec (3.13.0)
|
|
82
|
+
rspec-core (~> 3.13.0)
|
|
83
|
+
rspec-expectations (~> 3.13.0)
|
|
84
|
+
rspec-mocks (~> 3.13.0)
|
|
85
|
+
rspec-core (3.13.0)
|
|
86
|
+
rspec-support (~> 3.13.0)
|
|
87
|
+
rspec-expectations (3.13.1)
|
|
60
88
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
61
|
-
rspec-support (~> 3.
|
|
62
|
-
rspec-files (1.1.
|
|
89
|
+
rspec-support (~> 3.13.0)
|
|
90
|
+
rspec-files (1.1.3)
|
|
63
91
|
rspec (~> 3.0)
|
|
64
|
-
rspec-memory (1.0.
|
|
92
|
+
rspec-memory (1.0.4)
|
|
65
93
|
rspec (~> 3.0)
|
|
66
|
-
rspec-mocks (3.
|
|
94
|
+
rspec-mocks (3.13.1)
|
|
67
95
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
68
|
-
rspec-support (~> 3.
|
|
69
|
-
rspec-support (3.
|
|
70
|
-
rubocop (1.
|
|
96
|
+
rspec-support (~> 3.13.0)
|
|
97
|
+
rspec-support (3.13.1)
|
|
98
|
+
rubocop (1.64.1)
|
|
99
|
+
json (~> 2.3)
|
|
100
|
+
language_server-protocol (>= 3.17.0)
|
|
71
101
|
parallel (~> 1.10)
|
|
72
|
-
parser (>= 3.
|
|
102
|
+
parser (>= 3.3.0.2)
|
|
73
103
|
rainbow (>= 2.2.2, < 4.0)
|
|
74
104
|
regexp_parser (>= 1.8, < 3.0)
|
|
75
|
-
rexml
|
|
76
|
-
rubocop-ast (>= 1.
|
|
105
|
+
rexml (>= 3.2.5, < 4.0)
|
|
106
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
|
77
107
|
ruby-progressbar (~> 1.7)
|
|
78
|
-
unicode-display_width (>=
|
|
79
|
-
rubocop-ast (1.
|
|
80
|
-
parser (>= 3.
|
|
81
|
-
rubocop-performance (1.
|
|
82
|
-
rubocop (>= 1.
|
|
83
|
-
rubocop-ast (>=
|
|
84
|
-
rubocop-rspec (
|
|
85
|
-
rubocop (~> 1.
|
|
86
|
-
ruby-progressbar (1.
|
|
87
|
-
simplecov (0.
|
|
108
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
|
109
|
+
rubocop-ast (1.31.3)
|
|
110
|
+
parser (>= 3.3.1.0)
|
|
111
|
+
rubocop-performance (1.21.1)
|
|
112
|
+
rubocop (>= 1.48.1, < 2.0)
|
|
113
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
|
114
|
+
rubocop-rspec (3.0.1)
|
|
115
|
+
rubocop (~> 1.61)
|
|
116
|
+
ruby-progressbar (1.13.0)
|
|
117
|
+
simplecov (0.22.0)
|
|
88
118
|
docile (~> 1.1)
|
|
89
119
|
simplecov-html (~> 0.11)
|
|
90
120
|
simplecov_json_formatter (~> 0.1)
|
|
91
121
|
simplecov-html (0.12.3)
|
|
92
|
-
simplecov_json_formatter (0.1.
|
|
93
|
-
solargraph (0.
|
|
122
|
+
simplecov_json_formatter (0.1.4)
|
|
123
|
+
solargraph (0.50.0)
|
|
94
124
|
backport (~> 1.2)
|
|
95
125
|
benchmark
|
|
96
|
-
bundler (
|
|
126
|
+
bundler (~> 2.0)
|
|
97
127
|
diff-lcs (~> 1.4)
|
|
98
128
|
e2mmap
|
|
99
129
|
jaro_winkler (~> 1.5)
|
|
100
130
|
kramdown (~> 2.3)
|
|
101
131
|
kramdown-parser-gfm (~> 1.1)
|
|
102
132
|
parser (~> 3.0)
|
|
103
|
-
|
|
104
|
-
|
|
133
|
+
rbs (~> 2.0)
|
|
134
|
+
reverse_markdown (~> 2.0)
|
|
135
|
+
rubocop (~> 1.38)
|
|
105
136
|
thor (~> 1.0)
|
|
106
137
|
tilt (~> 2.0)
|
|
107
138
|
yard (~> 0.9, >= 0.9.24)
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
unicode-display_width (2.
|
|
112
|
-
yard (0.9.
|
|
113
|
-
zeitwerk (2.6.
|
|
139
|
+
strscan (3.1.0)
|
|
140
|
+
thor (1.3.1)
|
|
141
|
+
tilt (2.4.0)
|
|
142
|
+
unicode-display_width (2.5.0)
|
|
143
|
+
yard (0.9.36)
|
|
144
|
+
zeitwerk (2.6.16)
|
|
114
145
|
|
|
115
146
|
PLATFORMS
|
|
116
147
|
x86_64-linux
|
|
117
148
|
|
|
118
149
|
DEPENDENCIES
|
|
119
150
|
async-rspec
|
|
151
|
+
aws-sdk-s3
|
|
152
|
+
ox
|
|
120
153
|
rake (~> 13.0)
|
|
121
154
|
rspec (~> 3.0)
|
|
122
155
|
rubocop
|
data/examples/rustic.rb
CHANGED
|
@@ -9,18 +9,18 @@ Rustic.define do # rubocop:disable Metrics/BlockLength
|
|
|
9
9
|
password "password"
|
|
10
10
|
|
|
11
11
|
before do
|
|
12
|
-
logger.info(self, "BEFORE")
|
|
12
|
+
Console.logger.info(self, "BEFORE")
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
backup do
|
|
16
16
|
one_fs!
|
|
17
17
|
|
|
18
18
|
before do |exists|
|
|
19
|
-
logger.info(self, "BEFORE BACKUP #{exists}")
|
|
19
|
+
Console.logger.info(self, "BEFORE BACKUP #{exists}")
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
after do
|
|
23
|
-
logger.info(self, "AFTER BACKUP")
|
|
23
|
+
Console.logger.info(self, "AFTER BACKUP")
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
backup "lib"
|
|
@@ -29,21 +29,21 @@ Rustic.define do # rubocop:disable Metrics/BlockLength
|
|
|
29
29
|
|
|
30
30
|
check do
|
|
31
31
|
before do
|
|
32
|
-
logger.info(self, "BEFORE CHECK")
|
|
32
|
+
Console.logger.info(self, "BEFORE CHECK")
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
after do
|
|
36
|
-
logger.info(self, "AFTER CHECK")
|
|
36
|
+
Console.logger.info(self, "AFTER CHECK")
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
forget do
|
|
41
41
|
before do
|
|
42
|
-
logger.info(self, "BEFORE FORGET")
|
|
42
|
+
Console.logger.info(self, "BEFORE FORGET")
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
after do
|
|
46
|
-
logger.info(self, "AFTER FORGET")
|
|
46
|
+
Console.logger.info(self, "AFTER FORGET")
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
prune!
|
|
@@ -51,10 +51,10 @@ Rustic.define do # rubocop:disable Metrics/BlockLength
|
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
after do
|
|
54
|
-
logger.info(self, "AFTER")
|
|
54
|
+
Console.logger.info(self, "AFTER")
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
on_error do |error|
|
|
58
|
-
logger.warn(self, "ERROR:", error)
|
|
58
|
+
Console.logger.warn(self, "ERROR:", error)
|
|
59
59
|
end
|
|
60
60
|
end
|
|
@@ -25,7 +25,7 @@ class Rustic::CommandBuilder
|
|
|
25
25
|
|
|
26
26
|
private
|
|
27
27
|
|
|
28
|
-
def add_repository_path! = @args.
|
|
28
|
+
def add_repository_path! = @args.push("-r", @config.repository)
|
|
29
29
|
|
|
30
30
|
def add_password!
|
|
31
31
|
return @env_variables.merge!("RESTIC_PASSWORD" => @config.password) if @config.password
|
data/lib/rustic/version.rb
CHANGED
data/lib/rustic/wrapper.rb
CHANGED
|
@@ -8,11 +8,11 @@ class Rustic::Wrapper
|
|
|
8
8
|
|
|
9
9
|
def initialize(argv, env_variables = {})
|
|
10
10
|
@argv = argv
|
|
11
|
-
@env_variables = env_variables
|
|
11
|
+
@env_variables = env_variables.merge("RESTIC_PROGRESS_FPS" => "1", "TERM" => "dumb")
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
def run
|
|
15
|
-
logger.info(self, "Executing:", @argv)
|
|
15
|
+
Console.logger.info(self, "Executing:", @argv)
|
|
16
16
|
begin
|
|
17
17
|
status = Async::Process.spawn(@env_variables, *@argv)
|
|
18
18
|
rescue StandardError
|
data/rustic_script.rb
CHANGED
|
@@ -5,18 +5,18 @@ repository "tmp/repository"
|
|
|
5
5
|
password "password"
|
|
6
6
|
|
|
7
7
|
before do
|
|
8
|
-
logger.info(self, "BEFORE")
|
|
8
|
+
Console.logger.info(self, "BEFORE")
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
backup do
|
|
12
12
|
one_fs!
|
|
13
13
|
|
|
14
14
|
before do |exists|
|
|
15
|
-
logger.info(self, "BEFORE BACKUP #{exists}")
|
|
15
|
+
Console.logger.info(self, "BEFORE BACKUP #{exists}")
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
after do
|
|
19
|
-
logger.info(self, "AFTER BACKUP")
|
|
19
|
+
Console.logger.info(self, "AFTER BACKUP")
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
backup "lib"
|
|
@@ -24,9 +24,9 @@ backup do
|
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
after do
|
|
27
|
-
logger.info(self, "AFTER")
|
|
27
|
+
Console.logger.info(self, "AFTER")
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
on_error do |error|
|
|
31
|
-
logger.warn(self, "ERROR:", error)
|
|
31
|
+
Console.logger.warn(self, "ERROR:", error)
|
|
32
32
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rustic
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gleb Sinyavskiy
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-06-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: async-process
|
|
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
114
114
|
- !ruby/object:Gem::Version
|
|
115
115
|
version: '0'
|
|
116
116
|
requirements: []
|
|
117
|
-
rubygems_version: 3.
|
|
117
|
+
rubygems_version: 3.4.6
|
|
118
118
|
signing_key:
|
|
119
119
|
specification_version: 4
|
|
120
120
|
summary: DSL for the restic backup tool.
|