cloner 0.6.0 → 0.6.1

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
- SHA1:
3
- metadata.gz: dedfd02ba4a012b43cb0775bd2ec3cd563691415
4
- data.tar.gz: 0607bccaae03a55e6fe60fa80e0fedc2883606ed
2
+ SHA256:
3
+ metadata.gz: 4327a76f4dbae0a838b04277cf1dfc42e40bd493a6557453fe20dd094ae7a017
4
+ data.tar.gz: 4b80a4c1ca652c01ab173b1711b84862a806c2318c246d700bd4abf21fa96cc0
5
5
  SHA512:
6
- metadata.gz: 4beb6a1618af270122ea5205029b49ad4ebe632f7451d7bfba0c280601cf39c96b26d32aa8a7f170fac0f49928766248d37185ae34aa53ffb8a52f1a813d1eab
7
- data.tar.gz: 6ea9aaa455d224a9e82ba80bf2a2cfd19e21f4483c12eedd9b58cda2652af71c48e4f913d27c7d0121930ac80e332c832bcb3ddd79acc1f44b987cc5066fbe27
6
+ metadata.gz: 39f309d98f2cd91d9df01ed50a0805590f8272bbf3be16302ae12891e0b27982816d25be76da99e5c38930027c9c5b5db473e55ad21e4a6f4ef5375a7490de68
7
+ data.tar.gz: 7d2f51fc2ca8d95e509836970e1c74bdc5a1dba1a8a4f9da8b72361904b6ee86de67a59c0f322fcb75258879215c96198cf1c2bb9ebfe90b75944497b7686c45
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Cloner
2
2
 
3
- Easily clone your production Mongoid or PostgreSQL database and files for local development or staging area.
3
+ Easily clone your production Mongoid or PostgreSQL / MySQL database and files for local development or staging area.
4
4
 
5
5
  ## Installation
6
6
 
@@ -31,11 +31,19 @@ module Cloner::Postgres
31
31
  def pg_restore_param
32
32
  "--no-owner -Fc -c"
33
33
  end
34
-
34
+
35
35
  def pg_bin_path(util)
36
36
  util
37
37
  end
38
38
 
39
+ def pg_local_bin_path(util)
40
+ pg_bin_path(util)
41
+ end
42
+
43
+ def pg_remote_bin_path(util)
44
+ pg_bin_path(util)
45
+ end
46
+
39
47
  def pg_dump_remote
40
48
  puts "backup remote DB via ssh"
41
49
  do_ssh do |ssh|
@@ -44,7 +52,7 @@ module Cloner::Postgres
44
52
  check_ssh_err(ret)
45
53
  host = ar_r_conf['host'].present? ? " -h #{e ar_r_conf['host']}" : ""
46
54
  port = ar_r_conf['port'].present? ? " -p #{e ar_r_conf['port']}" : ""
47
- dump = pg_remote_auth + "#{pg_bin_path 'pg_dump'} #{pg_dump_param} -U #{e ar_r_conf['username']}#{host}#{port} #{e ar_r_conf['database']} > #{e(remote_dump_path + '/tmp.bak')}"
55
+ dump = pg_remote_auth + "#{pg_remote_bin_path 'pg_dump'} #{pg_dump_param} -U #{e ar_r_conf['username']}#{host}#{port} #{e ar_r_conf['database']} > #{e(remote_dump_path + '/tmp.bak')}"
48
56
  puts dump if verbose?
49
57
  ret = ssh_exec!(ssh, dump)
50
58
  check_ssh_err(ret)
@@ -55,7 +63,7 @@ module Cloner::Postgres
55
63
  puts "restoring DB"
56
64
  host = ar_conf['host'].present? ? " -h #{e ar_conf['host']}" : ""
57
65
  port = ar_conf['port'].present? ? " -p #{e ar_conf['port']}" : ""
58
- restore = pg_local_auth + "#{pg_bin_path 'pg_restore'} #{pg_restore_param} -U #{e ar_conf['username']}#{host}#{port} -d #{e ar_to} #{e(pg_path + '/tmp.bak')}"
66
+ restore = pg_local_auth + "#{pg_local_bin_path 'pg_restore'} #{pg_restore_param} -U #{e ar_conf['username']}#{host}#{port} -d #{e ar_to} #{e(pg_path + '/tmp.bak')}"
59
67
  puts restore if verbose?
60
68
  pipe = IO.popen(restore)
61
69
  while (line = pipe.gets)
@@ -1,4 +1,4 @@
1
1
  module Cloner
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
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.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebtv
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-06 00:00:00.000000000 Z
11
+ date: 2018-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  requirements: []
128
128
  rubyforge_project:
129
- rubygems_version: 2.6.8
129
+ rubygems_version: 2.7.7
130
130
  signing_key:
131
131
  specification_version: 4
132
132
  summary: Easily clone your production Mongoid database and files for local development