cloner 0.4.0 → 0.4.1

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: cea32c10a5456a2af0d37b26384e651e1234f16d
4
- data.tar.gz: ffcd5ad320f56b8ea5e627f751e677af51647edd
3
+ metadata.gz: 9f053124059bb67150acb7844510dbd68c4b59de
4
+ data.tar.gz: 88a6c80d311046b2897c1eacd132607d6618e43e
5
5
  SHA512:
6
- metadata.gz: 84ce1cfcd5e9875cbb06aee952fab09413fd99bbe128d86d5c0e9264f5a5af1784be4b3e49737e72c6a4acc2f421e33fcfb6e82b42aba59fb06c2c3f672eecc1
7
- data.tar.gz: 1eb36edc996a3f00a1985af522f474644dc092a389d33f624b85d3212338210f4047ebaa221f3dcf92b5fb065756db547b087be320661ca81d9dd4674f756209
6
+ metadata.gz: 958a391e9bf77a47e6015c59a93ec1ed2cd04956fefccfa9f3fafce0f031e10e20a5f4805d223f13b636fcbc4e08b5b3299f62fa4a9a11478d2b4f613a2c063d
7
+ data.tar.gz: 6c7fb0c2a632b1abbc9b9c2644e3240652bf03b5d101ab130fee23c3f4d5d772851ffe3bba113e94be3f933fbfc23b45d4f8c5636557e214770f46c7d91b8793
@@ -45,7 +45,8 @@ module Cloner::Postgres
45
45
  ssh.exec!("rm -R #{e remote_dump_path}")
46
46
  ret = ssh_exec!(ssh, "mkdir -p #{e remote_dump_path}")
47
47
  check_ssh_err(ret)
48
- dump = pg_remote_auth + "pg_dump -Fc -U #{e ar_r_conf['username']} -h #{e ar_r_conf['host']} #{e ar_r_conf['database']} > #{e(remote_dump_path + '/tmp.bak')}"
48
+ host = ar_r_conf['host'].present? ? "-h #{e ar_r_conf['host']}" : ""
49
+ 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')}"
49
50
  puts dump if verbose?
50
51
  ret = ssh_exec!(ssh, dump)
51
52
  check_ssh_err(ret)
@@ -54,8 +55,8 @@ module Cloner::Postgres
54
55
 
55
56
  def pg_dump_restore
56
57
  puts "restoring DB"
57
- restore = pg_local_auth + "pg_restore -Fc -c -U #{e ar_conf['username']} -d #{e ar_to} #{e(pg_path + '/tmp.bak')}"
58
- puts restore
58
+ host = ar_conf['host'].present? ? "-h #{e ar_conf['host']}" : ""
59
+ restore = pg_local_auth + "pg_restore -Fc -c -U #{e ar_conf['username']} #{host} -d #{e ar_to} #{e(pg_path + '/tmp.bak')}"
59
60
  puts restore if verbose?
60
61
  pipe = IO.popen(restore)
61
62
  while (line = pipe.gets)
@@ -1,3 +1,3 @@
1
1
  module Cloner
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
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.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebtv
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-01 00:00:00.000000000 Z
11
+ date: 2015-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor