wordmove 2.4.4 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wordmove/doctor/mysql.rb +39 -14
- data/lib/wordmove/doctor/wpcli.rb +15 -3
- data/lib/wordmove/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a68e59fb1bab954285d92fb54a5bc22a80d3eaed
|
4
|
+
data.tar.gz: 04d2de2a8757d94e9bc2cd51bae581402c312f53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c816879ca889cc282e4f1702d411fe7aa7a122a19183a9e595b5db8eec71bd574fd286e79035cd138b897daec146618e528457409d79f3c541592c4b94e4e3ae
|
7
|
+
data.tar.gz: ab562f05754a7e759d0ef9c048ec2dc38fcd86bb14c4b9d56180a13fed07506190029016e27f9275779eaa10bfb2f50148c8c76d85d8f263e31a6c003651e0d5
|
@@ -20,6 +20,7 @@ module Wordmove
|
|
20
20
|
mysql_client_doctor
|
21
21
|
mysqldump_doctor
|
22
22
|
mysql_server_doctor
|
23
|
+
mysql_database_doctor
|
23
24
|
end
|
24
25
|
|
25
26
|
private
|
@@ -41,30 +42,54 @@ module Wordmove
|
|
41
42
|
end
|
42
43
|
|
43
44
|
def mysql_server_doctor
|
44
|
-
command =
|
45
|
-
|
46
|
-
command
|
47
|
-
|
48
|
-
|
49
|
-
|
45
|
+
command = mysql_command
|
46
|
+
|
47
|
+
if system(command, out: File::NULL, err: File::NULL)
|
48
|
+
logger.success "Successfully connected to the MySQL server"
|
49
|
+
else
|
50
|
+
logger.error <<-LONG
|
51
|
+
We can't connect to the MySQL server using credentials
|
52
|
+
specified in the Movefile. Double check them or try
|
53
|
+
to debug your system configuration.
|
54
|
+
|
55
|
+
The command used to test was:
|
56
|
+
|
57
|
+
#{command}
|
58
|
+
LONG
|
50
59
|
end
|
51
|
-
|
52
|
-
|
60
|
+
end
|
61
|
+
|
62
|
+
def mysql_database_doctor
|
63
|
+
command = mysql_command(database: config[:name])
|
53
64
|
|
54
65
|
if system(command, out: File::NULL, err: File::NULL)
|
55
66
|
logger.success "Successfully connected to the database"
|
56
67
|
else
|
57
|
-
logger.error
|
58
|
-
|
59
|
-
|
60
|
-
|
68
|
+
logger.error <<-LONG
|
69
|
+
We can't connect to the database using credentials
|
70
|
+
specified in the Movefile, or the database does not
|
71
|
+
exists. Double check them or try to debug your
|
72
|
+
system configuration.
|
61
73
|
|
62
|
-
|
74
|
+
The command used to test was:
|
63
75
|
|
64
|
-
|
76
|
+
#{command}
|
65
77
|
LONG
|
66
78
|
end
|
67
79
|
end
|
80
|
+
|
81
|
+
def mysql_command(database: nil)
|
82
|
+
command = ["mysql"]
|
83
|
+
command << "--host=#{Shellwords.escape(config[:host])}" if config[:host].present?
|
84
|
+
command << "--port=#{Shellwords.escape(config[:port])}" if config[:port].present?
|
85
|
+
command << "--user=#{Shellwords.escape(config[:user])}" if config[:user].present?
|
86
|
+
if config[:password].present?
|
87
|
+
command << "--password=#{Shellwords.escape(config[:password])}"
|
88
|
+
end
|
89
|
+
command << database if database.present?
|
90
|
+
command << "-e'QUIT'"
|
91
|
+
command.join(" ")
|
92
|
+
end
|
68
93
|
end
|
69
94
|
end
|
70
95
|
end
|
@@ -10,10 +10,22 @@ module Wordmove
|
|
10
10
|
def check!
|
11
11
|
logger.task "Checking local wp-cli installation"
|
12
12
|
|
13
|
-
if in_path?
|
14
|
-
logger.success "wp-cli is correctly installed
|
13
|
+
if in_path?
|
14
|
+
logger.success "wp-cli is correctly installed"
|
15
|
+
|
16
|
+
if up_to_date?
|
17
|
+
logger.success "wp-cli is up to date"
|
18
|
+
else
|
19
|
+
logger.error <<-LONG
|
20
|
+
wp-cli is not up to date.
|
21
|
+
Use `wp cli update` to update to the latest version.
|
22
|
+
LONG
|
23
|
+
end
|
15
24
|
else
|
16
|
-
logger.error
|
25
|
+
logger.error <<-LONG
|
26
|
+
wp-cli is not installed (or not in your $PATH).
|
27
|
+
Read http://wp-cli.org/#installing for installation info.
|
28
|
+
LONG
|
17
29
|
end
|
18
30
|
end
|
19
31
|
|
data/lib/wordmove/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wordmove
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefano Verna
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: exe
|
14
14
|
cert_chain: []
|
15
|
-
date: 2018-02-
|
15
|
+
date: 2018-02-13 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activesupport
|