outback 1.0.2 → 1.1.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
- SHA1:
3
- metadata.gz: f2a87a0171b3d8506d69d5d8b0611916a7bccd8a
4
- data.tar.gz: d86ec7bddb738e5b9574073e06aae4ffa65b25c8
2
+ SHA256:
3
+ metadata.gz: 4503e45304f0be857fab9999cddf991b4a3823668951f0ee476eb94c80abd420
4
+ data.tar.gz: 49451b535df2adcf44c66089101de73cd38fd9d4494cda5503db130bca36674e
5
5
  SHA512:
6
- metadata.gz: f252a3dab0597a9578c62c94ae4a9b739068c7090d357861ec534db8ae83f2327b6b5eead6cdc7e45e14f3fd502397cb6747d1ac7f900aba4692087d8004921d
7
- data.tar.gz: 3e5a5ef024af75c835dbb4fae15f6b9e0d193c2e4865223beac15a33f83bef2b1c5345ff8a2795fc6b81634594d447ec294aedb04ae7a2b05dd2dd835140dd47
6
+ metadata.gz: b88bc0e63f3145bf2d84e032c725e01de590f3d8560de0cb4d60b064895c81aa63827614f729b95d86c89282b106dbcb76afe6f7a9281fbaaef6449ecb937a37
7
+ data.tar.gz: 1dd915c8b1bf994bd7f78de43f834f4b3b1424da88636c788de8708fb30ca8b9ad05827dbd236e7070013e00484cd61d18ef0301186f870ffa0529f991ed9fed
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ *1.1.0 (July 8, 2024)*
2
+
3
+ * Support Ruby 3
4
+ * Do not fail on store or purge
5
+
1
6
  *1.0.2 (September 20, 2016)*
2
7
 
3
8
  * Add SCP target
@@ -39,11 +39,24 @@ module Outback
39
39
  end
40
40
 
41
41
  def store_archives(archives)
42
- targets.each { |target| target.put(archives) }
42
+ targets.each do |target|
43
+ begin
44
+ target.put(archives)
45
+ rescue => e
46
+ logger.info "Error while storing to #{target}: #{e.inspect}"
47
+ 0
48
+ end
49
+ end
43
50
  end
44
51
 
45
52
  def purge_targets
46
- targets.each { |target| target.purge! }
53
+ targets.each do |target|
54
+ begin
55
+ target.purge!
56
+ rescue => e
57
+ logger.info "Error while purging #{target}: #{e.inspect}"
58
+ end
59
+ end
47
60
  end
48
61
 
49
62
  end
@@ -10,8 +10,9 @@ module Outback
10
10
  end
11
11
 
12
12
  def purge!
13
- purged_archives = connect { purge_archives }
14
- logger.info "Purged #{purged_archives.size} archives (#{purged_archives.sum(&:size)} bytes) from #{self}"
13
+ if purged_archives = connect { purge_archives }
14
+ logger.info "Purged #{purged_archives.size} archives (#{purged_archives.sum(&:size)} bytes) from #{self}"
15
+ end
15
16
  end
16
17
 
17
18
  private
@@ -33,7 +34,7 @@ module Outback
33
34
  end
34
35
 
35
36
  def archives
36
- list_all_archives.select(&it.match?(backup_name))
37
+ list_all_archives.select(&_it.match?(backup_name))
37
38
  end
38
39
 
39
40
  def purge_archives
@@ -1,3 +1,3 @@
1
1
  module Outback
2
- VERSION = '1.0.2'
2
+ VERSION = '1.1.0'
3
3
  end
@@ -1,9 +1,12 @@
1
1
  module Kernel
2
2
  protected
3
- def it() It.new end
4
- alias its it
3
+
4
+ def its() It.new end
5
+ alias _its its
6
+ alias _it its
7
+ alias it its # RUBY34: deprecated method
5
8
  end
6
-
9
+
7
10
  class It < BasicObject
8
11
 
9
12
  undef_method(*(instance_methods - [:__id__, :__send__]))
@@ -12,14 +15,14 @@ class It < BasicObject
12
15
  @methods = []
13
16
  end
14
17
 
15
- def method_missing(*args, &block)
16
- @methods << [args, block] unless args == [:respond_to?, :to_proc]
18
+ def method_missing(*args, **kwargs, &block)
19
+ @methods << [args, kwargs, block] unless args == [:respond_to?, :to_proc]
17
20
  self
18
21
  end
19
22
 
20
23
  def to_proc
21
24
  ::Kernel.lambda do |obj|
22
- @methods.inject(obj) { |current, (args,block)| current.send(*args, &block) }
25
+ @methods.inject(obj) { |current, (args, kwargs, block)| current.send(*args, **kwargs, &block) }
23
26
  end
24
27
  end
25
28
  end
data/lib/vendor/mysql.rb CHANGED
@@ -34,9 +34,9 @@ class Mysql
34
34
  # Make Mysql object and connect to mysqld.
35
35
  # @param args same as arguments for {#connect}.
36
36
  # @return [Mysql]
37
- def new(*args)
37
+ def new(...)
38
38
  my = self.init
39
- my.connect(*args)
39
+ my.connect(...)
40
40
  end
41
41
 
42
42
  alias real_connect new
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: outback
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthias Grosser
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-20 00:00:00.000000000 Z
11
+ date: 2024-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-sftp
@@ -24,6 +24,34 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rexml
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: base64
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
27
55
  - !ruby/object:Gem::Dependency
28
56
  name: s3
29
57
  requirement: !ruby/object:Gem::Requirement
@@ -88,7 +116,7 @@ homepage: http://github.com/onrooby/outback
88
116
  licenses:
89
117
  - MIT
90
118
  metadata: {}
91
- post_install_message:
119
+ post_install_message:
92
120
  rdoc_options: []
93
121
  require_paths:
94
122
  - lib
@@ -103,9 +131,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
131
  - !ruby/object:Gem::Version
104
132
  version: '0'
105
133
  requirements: []
106
- rubyforge_project:
107
- rubygems_version: 2.5.1
108
- signing_key:
134
+ rubygems_version: 3.5.9
135
+ signing_key:
109
136
  specification_version: 4
110
137
  summary: Ruby Backup Tool
111
138
  test_files: []