Class: Nginxtra::CLI

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/nginxtra/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



157
158
159
# File 'lib/nginxtra/cli.rb', line 157

def source_root
  File.absolute_path File.expand_path("../../..", __FILE__)
end

Instance Method Details

#compileObject



62
63
64
65
66
67
# File 'lib/nginxtra/cli.rb', line 62

def compile
  Nginxtra::Error.protect self do
    set_working_dir!
    Nginxtra::Actions::Compile.new(self, prepare_config!).compile
  end
end

#convertObject



33
34
35
36
37
# File 'lib/nginxtra/cli.rb', line 33

def convert
  Nginxtra::Error.protect self do
    Nginxtra::Actions::Convert.new(self, nil).convert
  end
end

#installObject



75
76
77
78
79
# File 'lib/nginxtra/cli.rb', line 75

def install
  Nginxtra::Error.protect self do
    Nginxtra::Actions::Install.new(self, prepare_config!).install
  end
end


48
49
50
51
52
53
# File 'lib/nginxtra/cli.rb', line 48

def print
  Nginxtra::Error.protect self do
    set_working_dir!
    Nginxtra::Actions::Print.new(self, prepare_config!).print
  end
end

#reloadObject



119
120
121
122
123
124
# File 'lib/nginxtra/cli.rb', line 119

def reload
  Nginxtra::Error.protect self do
    set_working_dir!
    Nginxtra::Actions::Reload.new(self, prepare_config!).reload
  end
end

#restartObject



110
111
112
113
114
115
# File 'lib/nginxtra/cli.rb', line 110

def restart
  Nginxtra::Error.protect self do
    set_working_dir!
    Nginxtra::Actions::Restart.new(self, prepare_config!).restart
  end
end

#startObject



90
91
92
93
94
95
# File 'lib/nginxtra/cli.rb', line 90

def start
  Nginxtra::Error.protect self do
    set_working_dir!
    Nginxtra::Actions::Start.new(self, prepare_config!).start
  end
end

#statusObject



127
128
129
130
131
132
# File 'lib/nginxtra/cli.rb', line 127

def status
  Nginxtra::Error.protect self do
    set_working_dir!
    Nginxtra::Actions::Status.new(self, prepare_config!).status
  end
end

#stopObject



102
103
104
105
106
107
# File 'lib/nginxtra/cli.rb', line 102

def stop
  Nginxtra::Error.protect self do
    set_working_dir!
    Nginxtra::Actions::Stop.new(self, prepare_config!).stop
  end
end

#versionObject



137
138
139
140
141
# File 'lib/nginxtra/cli.rb', line 137

def version
  Nginxtra::Error.protect self do
    say Nginxtra::Version
  end
end