cloner 0.5.3 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 65cf7ed3b95db14d1812afe5ac041c2ad921c10b
4
- data.tar.gz: a9235985365c5ad37cc1f60f87922e4f7f7e2bc0
3
+ metadata.gz: a976f4c658e427e47949ba187908652734a484e6
4
+ data.tar.gz: 4a05f678a461b6126971dfd2cffcb20787f8e32c
5
5
  SHA512:
6
- metadata.gz: 7bb11885b2c7a8baa9b007ae7f6c058030a1dac2efb98e9333dbf5d5b0edadb70ab6acea055378cf1f7494b1114c546f63ed9b0e536ad556c4e9682469e5f288
7
- data.tar.gz: f7cb7fe1d9423cd693e5a545fb3acd61b86c6c034fdbbfacd90d065aa34f50a34dc6fec68af26770d3c7d20c46eb05a69b710dc5341cd3678a94fee2f1076a55
6
+ metadata.gz: 701d3f0f91cb47bc92ed1bdc04deeccc16a6b100854a704d60a5bc3c24086865c2e1813205f6fd25b9bf7a1ec11654f35ba234614b6cd3fb23d3e8c424128bb4
7
+ data.tar.gz: cf7cb50911b222812df0fcdb11512d35d55826713c1d5b5953eb3249c242f2c78f6b20bb29cfae66e644f480e9040bf480336b91744f910c635c243c047df7f6
@@ -50,6 +50,10 @@ module Cloner::MongoDB
50
50
  end
51
51
  end
52
52
 
53
+ def mongodb_dump_extra
54
+ ""
55
+ end
56
+
53
57
  def mongodb_dump_remote
54
58
  puts "backup remote DB via ssh"
55
59
  do_ssh do |ssh|
@@ -61,7 +65,7 @@ module Cloner::MongoDB
61
65
  else
62
66
  username, password = mongodb_r_conf['username'], mongodb_r_conf['password']
63
67
  end
64
- dump = "mongodump -u #{e username} -p #{e password} -d #{e mongodb_r_conf['database']} --authenticationDatabase #{e mongodb_r_conf['database']} -o #{e remote_dump_path}"
68
+ dump = "mongodump -u #{e username} -p #{e password} -d #{e mongodb_r_conf['database']} --authenticationDatabase #{e mongodb_r_conf['database']} -o #{e remote_dump_path} #{mongodb_dump_extra}"
65
69
  puts dump if verbose?
66
70
  ret = ssh_exec!(ssh, dump)
67
71
  check_ssh_err(ret)
@@ -46,6 +46,10 @@ module Cloner::Postgres
46
46
  end
47
47
  end
48
48
 
49
+ def pg_dump_extra
50
+ ""
51
+ end
52
+
49
53
  def pg_dump_remote
50
54
  puts "backup remote DB via ssh"
51
55
  do_ssh do |ssh|
@@ -53,7 +57,7 @@ module Cloner::Postgres
53
57
  ret = ssh_exec!(ssh, "mkdir -p #{e remote_dump_path}")
54
58
  check_ssh_err(ret)
55
59
  host = ar_r_conf['host'].present? ? "-h #{e ar_r_conf['host']}" : ""
56
- dump = pg_remote_auth + "pg_dump -Fc -U #{e ar_r_conf['username']} #{host} #{e ar_r_conf['database']} > #{e(remote_dump_path + '/tmp.bak')}"
60
+ dump = pg_remote_auth + "pg_dump -Fc #{pg_dump_extra} -U #{e ar_r_conf['username']} #{host} #{e ar_r_conf['database']} > #{e(remote_dump_path + '/tmp.bak')}"
57
61
  puts dump if verbose?
58
62
  ret = ssh_exec!(ssh, dump)
59
63
  check_ssh_err(ret)
@@ -1,4 +1,4 @@
1
1
  module Cloner
2
- VERSION = "0.5.3"
2
+ VERSION = "0.5.4"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebtv
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-06 00:00:00.000000000 Z
11
+ date: 2016-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor