wordmove 1.4.0.pre9 → 1.4.0.pre10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wordmove/cli.rb +1 -0
- data/lib/wordmove/deployer/ftp.rb +11 -3
- data/lib/wordmove/logger.rb +6 -2
- data/lib/wordmove/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 781f0aa3bebc3b78dd3e36efa9e049027fcaec32
|
4
|
+
data.tar.gz: f91ee9fb6ab4e11224b763aaf413e8fbfc054fb9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec771f5a51e0d4ca7f168953b6be7389083b27953f36ff431272666487c85c262c043fd8f961fc8da8822cfd5c06f328b7f3f14784e61b063712332a59fe6ee9
|
7
|
+
data.tar.gz: 503596d3476878e32374edc55364369447a5458541f4f9f7517f664d83922079bf94c6cc69073706593c8c810c74eb80ef65b7bebc62a7548b3b8ba920064e7c
|
data/lib/wordmove/cli.rb
CHANGED
@@ -44,7 +44,11 @@ module Wordmove
|
|
44
44
|
run mysql_import_command(local_dump_path, local_options[:database])
|
45
45
|
|
46
46
|
# and locally
|
47
|
-
|
47
|
+
if options[:debug]
|
48
|
+
logger.debug "Remote dump located at: #{local_dump_path}"
|
49
|
+
else
|
50
|
+
run rm_command(local_dump_path)
|
51
|
+
end
|
48
52
|
end
|
49
53
|
|
50
54
|
private
|
@@ -99,7 +103,7 @@ module Wordmove
|
|
99
103
|
end
|
100
104
|
|
101
105
|
def import_remote_dump
|
102
|
-
temp_path = local_wp_content_dir.path("
|
106
|
+
temp_path = local_wp_content_dir.path("log.html")
|
103
107
|
remote_import_script_path = remote_wp_content_dir.path("import.php")
|
104
108
|
# generate a secure one-time password
|
105
109
|
one_time_password = SecureRandom.hex(40)
|
@@ -114,7 +118,11 @@ module Wordmove
|
|
114
118
|
"&start=1&foffset=0&totalqueries=0&fn=dump.sql"
|
115
119
|
].join
|
116
120
|
download(import_url, temp_path)
|
117
|
-
|
121
|
+
if options[:debug]
|
122
|
+
logger.debug "Operation log located at: #{temp_path}"
|
123
|
+
else
|
124
|
+
run rm_command(temp_path)
|
125
|
+
end
|
118
126
|
# remove script remotely
|
119
127
|
remote_delete(remote_import_script_path)
|
120
128
|
end
|
data/lib/wordmove/logger.rb
CHANGED
@@ -18,8 +18,12 @@ module Wordmove
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
def error(
|
22
|
-
puts "
|
21
|
+
def error(message)
|
22
|
+
puts " error".red + " | ".black + message
|
23
|
+
end
|
24
|
+
|
25
|
+
def debug(message)
|
26
|
+
puts " debug".magenta + " | ".black + message
|
23
27
|
end
|
24
28
|
|
25
29
|
private
|
data/lib/wordmove/version.rb
CHANGED