rustic 0.3.3 → 0.5.0

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: 749ff9e10d60fb610892f8c1984fcc5badf605eb5ef7dbe954d71f70aaf6e335
4
- data.tar.gz: 0c499c7d0fd8536f464a8c9410099c9d0d9e587895f53fd50e8aff406dc20344
3
+ metadata.gz: 30e838337c1ba5bf363393a9cbf6fc0f40ddab1785b3fb399e3d9d5dc560654c
4
+ data.tar.gz: 36d175e6c52b3c54d2963be3430483f1de91b63df7f61db3f17759f3cba2a2a4
5
5
  SHA512:
6
- metadata.gz: 1d806e658a7aedb406195cf6eeb87579c891a2e4c71db159685a5bcfe8ad94375e9ecdb9dcf9d56c06ed1e2164376f565793e55854b1d222fdf0fd2ada5bdcae
7
- data.tar.gz: 1f592a8a4e737873ede871bc1877bf0da4f5959a8e384835f7412950456d6db38fb55ce691b71cd75a2f0a22144cc80730a873bbf77026db4b12bb1a990fef2a
6
+ metadata.gz: 3b66b1fd5f70a44162507001f41f2016260a98bfcc7ecc97c31451624837e39dd465ec2d9e34d503c99bbceb7be18734cdf171a21e95048153282a7992ed408b
7
+ data.tar.gz: b56904d7bb921a10c6600ff29b15687b16fa5b9809c79f774cedcc48ac1ee5dd4320700c1788a0a6726b8d84021d1764a561783984933082eaac990da3469554
data/.tool-versions CHANGED
@@ -1 +1 @@
1
- ruby 3.0.2
1
+ ruby 3.2.1
data/Gemfile CHANGED
@@ -5,6 +5,8 @@ source "https://rubygems.org"
5
5
  # Specify your gem's dependencies in rustic.gemspec
6
6
  gemspec
7
7
 
8
+ gem "aws-sdk-s3"
9
+ gem "ox"
8
10
  gem "rake", "~> 13.0"
9
11
 
10
12
  gem "rspec", "~> 3.0"
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rustic (0.3.3)
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 (1.30.3)
14
- console (~> 1.10)
15
- nio4r (~> 2.3)
16
- timers (~> 4.1)
17
- async-io (1.33.0)
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.16.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.2.0)
28
- console (1.15.3)
29
- fiber-local
30
- diff-lcs (1.4.4)
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-local (1.0.0)
34
- jaro_winkler (1.5.4)
35
- kramdown (2.3.1)
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)
36
60
  rexml
37
61
  kramdown-parser-gfm (1.1.0)
38
62
  kramdown (~> 2.0)
39
- nio4r (2.5.8)
40
- nokogiri (1.12.5-x86_64-linux)
63
+ language_server-protocol (3.17.0.3)
64
+ nokogiri (1.16.6-x86_64-linux)
41
65
  racc (~> 1.4)
42
- parallel (1.21.0)
43
- parser (3.0.2.0)
66
+ ox (2.14.18)
67
+ parallel (1.25.1)
68
+ parser (3.3.3.0)
44
69
  ast (~> 2.4.1)
45
- ptools (1.4.2)
46
- racc (1.6.0)
47
- rainbow (3.0.0)
48
- rake (13.0.6)
49
- regexp_parser (2.1.1)
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.2.5)
53
- rspec (3.10.0)
54
- rspec-core (~> 3.10.0)
55
- rspec-expectations (~> 3.10.0)
56
- rspec-mocks (~> 3.10.0)
57
- rspec-core (3.10.1)
58
- rspec-support (~> 3.10.0)
59
- rspec-expectations (3.10.1)
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.10.0)
62
- rspec-files (1.1.1)
89
+ rspec-support (~> 3.13.0)
90
+ rspec-files (1.1.3)
63
91
  rspec (~> 3.0)
64
- rspec-memory (1.0.2)
92
+ rspec-memory (1.0.4)
65
93
  rspec (~> 3.0)
66
- rspec-mocks (3.10.2)
94
+ rspec-mocks (3.13.1)
67
95
  diff-lcs (>= 1.2.0, < 2.0)
68
- rspec-support (~> 3.10.0)
69
- rspec-support (3.10.3)
70
- rubocop (1.23.0)
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.0.0.0)
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.12.0, < 2.0)
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 (>= 1.4.0, < 3.0)
79
- rubocop-ast (1.13.0)
80
- parser (>= 3.0.1.1)
81
- rubocop-performance (1.12.0)
82
- rubocop (>= 1.7.0, < 2.0)
83
- rubocop-ast (>= 0.4.0)
84
- rubocop-rspec (2.6.0)
85
- rubocop (~> 1.19)
86
- ruby-progressbar (1.11.0)
87
- simplecov (0.21.2)
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.3)
93
- solargraph (0.44.0)
122
+ simplecov_json_formatter (0.1.4)
123
+ solargraph (0.50.0)
94
124
  backport (~> 1.2)
95
125
  benchmark
96
- bundler (>= 1.17.2)
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
- reverse_markdown (>= 1.0.5, < 3)
104
- rubocop (>= 0.52)
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
- thor (1.1.0)
109
- tilt (2.0.10)
110
- timers (4.3.3)
111
- unicode-display_width (2.1.0)
112
- yard (0.9.26)
113
- zeitwerk (2.6.0)
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.concat(["-r", @config.repository])
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rustic
4
- VERSION = "0.3.3"
4
+ VERSION = "0.5.0"
5
5
  end
@@ -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.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.description = "DSL for the restic backup tool."
13
13
  spec.homepage = "https://github.com/zhulik/rustic"
14
14
  spec.license = "MIT"
15
- spec.required_ruby_version = [">= 3.0.0", "< 3.1"]
15
+ spec.required_ruby_version = [">= 3.0.0"] # rubocop:disable Gemspec/RequiredRubyVersion
16
16
 
17
17
  spec.metadata["homepage_uri"] = spec.homepage
18
18
  # spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
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.3.3
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: 2022-08-28 00:00:00.000000000 Z
11
+ date: 2024-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-process
@@ -108,16 +108,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: 3.0.0
111
- - - "<"
112
- - !ruby/object:Gem::Version
113
- version: '3.1'
114
111
  required_rubygems_version: !ruby/object:Gem::Requirement
115
112
  requirements:
116
113
  - - ">="
117
114
  - !ruby/object:Gem::Version
118
115
  version: '0'
119
116
  requirements: []
120
- rubygems_version: 3.2.22
117
+ rubygems_version: 3.4.6
121
118
  signing_key:
122
119
  specification_version: 4
123
120
  summary: DSL for the restic backup tool.