backupper 0.1.1 → 0.1.3

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: c75d458bf09673a1a294208a5b529fc73a803356
4
- data.tar.gz: 9d14ec6d7a95b7b6fd84a1e01834fda95e81cc20
3
+ metadata.gz: 87540071116c9775a805a84eaafb5d06ecf335d8
4
+ data.tar.gz: a76112f17dfcfcd15f971bc95e2fbcb55cc20bc2
5
5
  SHA512:
6
- metadata.gz: 3a1b057be174801c951053d6919eece9d681c7c02a381c70ab613652c86aacef4c3ab8b1eda3ca16ceea7a6fb00270758c343e62e9dfac895aa3c10c8c2fbc1a
7
- data.tar.gz: 4ab38c3ac345d0317aecfb87bca4b516c25c43bc347060a338527b9bd86b9105d07280419c3a180e3f7086f3563927224e9e1b9649a4a4f036fa272db6fe181e
6
+ metadata.gz: 9b8be9892a220bd6cb80b51bd79906393a7abaddf52480cadfd39d39b61782ae72aa0f2c274e2e11e82921ee86c24d970b94a79a5225f90e8dc50a4137674ec0
7
+ data.tar.gz: 5b4de132ed2370cdaec0e8cd4a2863a56835b3eb0cd9b9bebb8e05b9c9833e266283287054e23a4d89c5f54caae8bc3def3aca9b452f15fcefefcfc3849f0b77
@@ -31,6 +31,8 @@ Gem::Specification.new do |spec|
31
31
  spec.require_paths = ["lib"]
32
32
 
33
33
  spec.add_runtime_dependency "sshkit", "~> 1.15"
34
+ spec.add_runtime_dependency "mail", "~> 2.7"
35
+
34
36
  spec.add_development_dependency "bundler", "~> 1.16"
35
37
  spec.add_development_dependency "rake", "~> 10.0"
36
38
  end
@@ -1,7 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- #$LOAD_PATH << './lib'
4
-
5
3
  require 'backupper'
6
4
 
7
5
  if ARGV.size != 1
@@ -94,15 +94,14 @@ class Backupper
94
94
  if self.respond_to?("#{adapter}_dump_command")
95
95
  t = Time.now
96
96
  path = nil
97
- dump_name = nil
98
97
  filename = "#{key}__#{database}.sql.bz2"
99
98
  tempfile = File.join('/tmp', filename)
100
99
  dumpname = "#{Time.now.strftime('%Y-%M-%d_%H-%M-%S')}__#{filename}"
101
100
  path = File.join(outdir, dumpname)
102
101
  backupper = self
103
- on(host) do |host|
104
- host.password = password
105
- execute backupper.send("#{adapter}_dump_command", database: database, username: db_username, password: db_password, outfile: tempfile)
102
+ on(host) do |client|
103
+ client.password = password
104
+ execute 'set -o pipefail; ' + backupper.send("#{adapter}_dump_command", database: database, username: db_username, password: db_password, outfile: tempfile)
106
105
  download! tempfile, path
107
106
  execute :rm, tempfile
108
107
  end
@@ -1,3 +1,3 @@
1
1
  class Backupper
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backupper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - pioz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-18 00:00:00.000000000 Z
11
+ date: 2018-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sshkit
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.15'
27
+ - !ruby/object:Gem::Dependency
28
+ name: mail
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.7'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.7'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement