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)


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

def self.exit_on_failure? = true

Instance Method Details

#auditObject



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

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

#caddy_runObject



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

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

#doctorObject



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

def doctor
  Commands::Doctor.new.call
end

#down(name) ⇒ Object



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

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

#edit(name) ⇒ Object



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

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

#ensureObject



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

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

#listObject



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

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

#logsObject



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

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

#reloadObject



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

def reload
  Commands::Reload.new.call
end

#remove(name) ⇒ Object



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

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

#retrustObject



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

def retrust
  Commands::Retrust.new.call
end

#setupObject



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

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

#statusObject



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

def status
  Commands::Status.new.call
end

#up(name) ⇒ Object



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

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

#versionObject



109
110
111
# File 'lib/easy_caddy/cli.rb', line 109

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