Class: EasyCaddy::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/easy_caddy/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


21
# File 'lib/easy_caddy/cli.rb', line 21

def self.exit_on_failure? = true

Instance Method Details

#auditObject



98
99
100
# File 'lib/easy_caddy/cli.rb', line 98

def audit
  Commands::Audit.new(site: options[:site], fix: options[:fix]).call
end

#caddy_runObject



82
83
84
# File 'lib/easy_caddy/cli.rb', line 82

def caddy_run
  Commands::Run.new(config_path: options[:config], site: options[:site]).call
end

#doctorObject



63
64
65
# File 'lib/easy_caddy/cli.rb', line 63

def doctor
  Commands::Doctor.new.call
end

#down(name) ⇒ Object



53
54
55
# File 'lib/easy_caddy/cli.rb', line 53

def down(name)
  Commands::Down.new(name: name).call
end

#edit(name) ⇒ Object



37
38
39
# File 'lib/easy_caddy/cli.rb', line 37

def edit(name)
  Commands::Edit.new(name: name).call
end

#ensureObject



75
76
77
# File 'lib/easy_caddy/cli.rb', line 75

def ensure
  Commands::Ensure.new(config_path: options[:config], site: options[:site]).call
end

#listObject



43
44
45
# File 'lib/easy_caddy/cli.rb', line 43

def list
  Commands::List.new(format: options[:format]).call
end

#logsObject



91
92
93
# File 'lib/easy_caddy/cli.rb', line 91

def logs
  Commands::Logs.new(site: options[:site], lines: options[:lines], follow: options[:follow]).call
end

#reloadObject



68
69
70
# File 'lib/easy_caddy/cli.rb', line 68

def reload
  Commands::Reload.new.call
end

#remove(name) ⇒ Object



31
32
33
34
# File 'lib/easy_caddy/cli.rb', line 31

def remove(name)
  require 'tty-prompt'
  Commands::Remove.new(name: name, force: options[:force], prompt: TTY::Prompt.new).call
end

#setupObject



24
25
26
27
# File 'lib/easy_caddy/cli.rb', line 24

def setup
  require 'tty-prompt'
  Commands::Setup.new(prompt: TTY::Prompt.new).call
end

#statusObject



58
59
60
# File 'lib/easy_caddy/cli.rb', line 58

def status
  Commands::Status.new.call
end

#up(name) ⇒ Object



48
49
50
# File 'lib/easy_caddy/cli.rb', line 48

def up(name)
  Commands::Up.new(name: name).call
end

#versionObject



103
104
105
# File 'lib/easy_caddy/cli.rb', line 103

def version
  puts "ecaddy #{EasyCaddy::VERSION}"
end