server_backups 0.1.16 → 0.1.17

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
  SHA1:
3
- metadata.gz: 8305d0e354e434ab3b1a0428cdc201b91e859088
4
- data.tar.gz: ebede64d33cb8e1eefbedfe506852d2db2341dbf
3
+ metadata.gz: b2ff23a2f12db5a71c6743746acc226ab8058703
4
+ data.tar.gz: 7610fbae4b7f65e72cefbff8bdf9fd1946dc4b2c
5
5
  SHA512:
6
- metadata.gz: b9e97034d147aafecc459d614cffe58b39695a854b7e52fa038e5baa49509f9288f150518320ec7b772c5f60e3732fed3ea045ba0369f5871d1139f851177ae8
7
- data.tar.gz: fc9a9a1520cd21667d5b13784156251ac4ac0f919c6f8dee70315a325224a4347ca14f56423c77816fec84e328ac932135cf2f3d1a84eb85e48bfa93fa0f6a20
6
+ metadata.gz: b7151788f1f5a94e01c237bb2138ff216916e0a3b1bc7f19149d10cb1be99c8b56a13c658d9e7368233e73e4f4d3edca7dba9aa883c9cbda50fe5ff6d51a47e8
7
+ data.tar.gz: 8b0639900e4bd58b1218717574b1b2002ed6325f8d598976523cd3ab91538f95f281218fc8b3733bbae4ae18a3ad04c91936cb0cfb02ea981b0104714985f0a6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- server_backups (0.1.16)
4
+ server_backups (0.1.17)
5
5
  activesupport (~> 5.1)
6
6
  aws-sdk-s3 (~> 1.8)
7
7
  main (~> 6.2)
data/bin/server_backup CHANGED
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
+ require 'fileutils'
5
+
4
6
  lib_dir = File.join(File.dirname(__FILE__), '..', 'lib')
5
7
  $LOAD_PATH.unshift lib_dir if File.directory?(lib_dir)
6
8
 
@@ -18,9 +20,12 @@ ERRORS = []
18
20
  def backup_thread
19
21
  Thread.new do
20
22
  begin
21
- yield Dir.getwd
23
+ dir = File.join(Dir.getwd, rand.to_s)
24
+ yield dir
22
25
  rescue StandardError => error
23
26
  ERRORS << error
27
+ ensure
28
+ FileUtils.rm_rf dir
24
29
  end
25
30
  end
26
31
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ServerBackups
4
- VERSION = '0.1.16'
4
+ VERSION = '0.1.17'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: server_backups
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.16
4
+ version: 0.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Gannon