Class: Takeltau::Ship

Inherits:
SubCommandBase show all
Includes:
ConfigModule, DockerCheckDaemon, LoggingModule, SystemModule
Defined in:
lib/takeltau/ship/cli.rb

Overview

tau ship

Instance Method Summary collapse

Methods included from DockerCheckDaemon

#docker_check_daemon

Methods included from ConfigModule

#config, #configured?, #initialize_config

Methods included from SystemModule

#command_available_else_error?, #hash_to_yaml, #read_yaml_erb_file, #read_yaml_file, #rm_fr, #run, #run_and_capture, #run_and_exit, #run_and_fork, #try, #write_file

Methods included from LoggingModule

#initialize_logging, #log

Methods inherited from SubCommandBase

banner, subcommand_prefix

Constructor Details

#initialize(args = [], local_options = {}, configuration = {}) ⇒ Ship

Returns a new instance of Ship.



11
12
13
14
15
16
17
# File 'lib/takeltau/ship/cli.rb', line 11

def initialize(args = [], local_options = {}, configuration = {})
  # initialize thor parent class
  super

  log.debug 'Check docker dameon for ship subcommand'
  exit false unless docker_check_daemon 'cmd_ship_docker', 'cmd_ship_docker_check'
end

Instance Method Details

#boardObject



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

def board
  Takeltau::ShipContainer.new.
end

#cleanObject

ship clean: Takeltau::ShipProject#clean



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

def clean
  Takeltau::ShipContainer.new.clean
end

#command(*args) ⇒ Object



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

def command(*args)
  Takeltau::ShipContainer.new.command(*args)
end

#docker(*args) ⇒ Object



74
75
76
# File 'lib/takeltau/ship/cli.rb', line 74

def docker(*args)
  Takeltau::ShipContainer.new.podman(*args)
end

#listObject



84
85
86
# File 'lib/takeltau/ship/cli.rb', line 84

def list
  Takeltau::ShipContainer.new.list
end

#loginObject



94
95
96
# File 'lib/takeltau/ship/cli.rb', line 94

def 
  Takeltau::ShipContainer.new.
end

#logs(*args) ⇒ Object



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

def logs(*args)
  Takeltau::ShipContainer.new.logs(*args)
end

#lsObject



114
115
116
# File 'lib/takeltau/ship/cli.rb', line 114

def ls
  Takeltau::ShipContainer.new.list
end

#podman(*args) ⇒ Object



124
125
126
# File 'lib/takeltau/ship/cli.rb', line 124

def podman(*args)
  Takeltau::ShipContainer.new.podman(*args)
end

#restart(project = 'default') ⇒ Object



135
136
137
# File 'lib/takeltau/ship/cli.rb', line 135

def restart(project = 'default')
  Takeltau::ShipProject.new.restart project
end

#sail(project = 'default') ⇒ Object



165
166
167
# File 'lib/takeltau/ship/cli.rb', line 165

def sail(project = 'default')
  Takeltau::ShipProject.new.start project
end

#start(project = 'default') ⇒ Object



155
156
157
# File 'lib/takeltau/ship/cli.rb', line 155

def start(project = 'default')
  Takeltau::ShipProject.new.start project
end

#stopObject



175
176
177
# File 'lib/takeltau/ship/cli.rb', line 175

def stop
  Takeltau::ShipProject.new.stop
end

#sudo(*args) ⇒ Object



145
146
147
# File 'lib/takeltau/ship/cli.rb', line 145

def sudo(*args)
  Takeltau::ShipContainer.new.sudo(*args)
end

#updateObject



204
205
206
# File 'lib/takeltau/ship/cli.rb', line 204

def update
  Takeltau::ShipContainer.new.update
end

#versionObject



184
185
186
# File 'lib/takeltau/ship/cli.rb', line 184

def version
  Takeltau::ShipInfo.new.version
end

#wreckObject



194
195
196
# File 'lib/takeltau/ship/cli.rb', line 194

def wreck
  Takeltau::ShipProject.new.stop
end