foreman_maintain 0.5.4 → 0.5.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88713e93aedca954a3162bfcb296a4e34702d3d5ffa4378b6f913081a5377e2c
|
4
|
+
data.tar.gz: 561a9cf651b6a8676efe9471eb2cde54e30cec37cf37f311f59ee7a886f44642
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d0d4a7cbdad45bcfd35be8029fa7be9b458b72df62a9e83a72ffdd1e3b049fcff2ba72b2368531f2a40a40ac6578381fe57a91ef8abbcd7edd63908b9759071
|
7
|
+
data.tar.gz: 4635df0f060dd06372cb9ff77cbc6f0ac8756dbd4b7814f47e27444e4e1d480b648b5175391f4c337e1dd3934a5b077d5db4caa22b74b4c085ac66c9ba81dba9
|
@@ -8,6 +8,7 @@ module Procedures::Backup
|
|
8
8
|
param :incremental_dir, 'Changes since specified backup only'
|
9
9
|
end
|
10
10
|
|
11
|
+
# rubocop:disable Metrics/MethodLength
|
11
12
|
def run
|
12
13
|
puts "Creating backup folder #{@backup_dir}"
|
13
14
|
|
@@ -22,8 +23,14 @@ module Procedures::Backup
|
|
22
23
|
|
23
24
|
FileUtils.rm(Dir.glob(File.join(@backup_dir, '.*.snar'))) if @preserve_dir
|
24
25
|
if @incremental_dir
|
25
|
-
|
26
|
+
if (snar_files = Dir.glob(File.join(@incremental_dir, '.*.snar'))).empty?
|
27
|
+
raise "#{@incremental_dir}/*.snar files unavailable. "\
|
28
|
+
'Provide a valid previous backup directory'
|
29
|
+
else
|
30
|
+
FileUtils.cp(snar_files, @backup_dir)
|
31
|
+
end
|
26
32
|
end
|
27
33
|
end
|
34
|
+
# rubocop:enable Metrics/MethodLength
|
28
35
|
end
|
29
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_maintain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Nečas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|
@@ -378,7 +378,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
378
378
|
- !ruby/object:Gem::Version
|
379
379
|
version: '0'
|
380
380
|
requirements: []
|
381
|
-
rubygems_version: 3.0.
|
381
|
+
rubygems_version: 3.0.3
|
382
382
|
signing_key:
|
383
383
|
specification_version: 4
|
384
384
|
summary: Foreman maintenance tool belt
|