Class: Wordmove::Doctor

Inherits:
Object
  • Object
show all
Defined in:
lib/wordmove/doctor.rb,
lib/wordmove/doctor/ssh.rb,
lib/wordmove/doctor/mysql.rb,
lib/wordmove/doctor/rsync.rb,
lib/wordmove/doctor/wpcli.rb,
lib/wordmove/doctor/movefile.rb

Defined Under Namespace

Classes: Movefile, Mysql, Rsync, Ssh, Wpcli

Class Method Summary collapse

Class Method Details

rubocop:disable Metrics/MethodLength



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/wordmove/doctor.rb', line 38

def self.banner
  paint = <<-'ASCII'
    .------------------------.
    |       PSYCHIATRIC      |
    |         HELP  5¢       |
    |________________________|
    ||     .-"""--.         ||
    ||    /        \.-.     ||
    ||   |     ._,     \    ||
    ||   \_/`-'   '-.,_/    ||
    ||   (_   (' _)') \     ||
    ||   /|           |\    ||
    ||  | \     __   / |    ||
    ||   \_).,_____,/}/     ||
  __||____;_--'___'/ (      ||
 |\ ||   (__,\\    \_/------||
 ||\||______________________||
 ||||                        |
 ||||       THE DOCTOR       |
 \|||         IS [IN]   _____|
  \||                  (______)
   `|___________________//||\\
                       //=||=\\
                       `  ``  `
  ASCII

  puts paint
end

.movefileObject



12
13
14
15
# File 'lib/wordmove/doctor.rb', line 12

def self.movefile
  movefile_doctor = Wordmove::Doctor::Movefile.new
  movefile_doctor.validate!
end

.mysqlObject



17
18
19
20
# File 'lib/wordmove/doctor.rb', line 17

def self.mysql
  mysql_doctor = Wordmove::Doctor::Mysql.new
  mysql_doctor.check!
end

.rsyncObject



27
28
29
30
# File 'lib/wordmove/doctor.rb', line 27

def self.rsync
  rsync_doctor = Wordmove::Doctor::Rsync.new
  rsync_doctor.check!
end

.sshObject



32
33
34
35
# File 'lib/wordmove/doctor.rb', line 32

def self.ssh
  ssh_doctor = Wordmove::Doctor::Ssh.new
  ssh_doctor.check!
end

.startObject



3
4
5
6
7
8
9
10
# File 'lib/wordmove/doctor.rb', line 3

def self.start
  banner
  movefile
  mysql
  wpcli
  rsync
  ssh
end

.wpcliObject



22
23
24
25
# File 'lib/wordmove/doctor.rb', line 22

def self.wpcli
  wpcli_doctor = Wordmove::Doctor::Wpcli.new
  wpcli_doctor.check!
end