Class: TRMNLP::CLI

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.default_bindObject



19
# File 'lib/trmnlp/cli.rb', line 19

def self.default_bind = File.exist?('/.dockerenv') ? '0.0.0.0' : '127.0.0.1'

.exit_on_failure?Boolean

Returns:

  • (Boolean)


17
# File 'lib/trmnlp/cli.rb', line 17

def self.exit_on_failure? = true

Instance Method Details

#buildObject



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

def build
  Commands::Build.run(options)
end

#clone(name, id) ⇒ Object



45
46
47
# File 'lib/trmnlp/cli.rb', line 45

def clone(name, id)
  Commands::Clone.run(options, name, id)
end

#init(name) ⇒ Object



39
40
41
# File 'lib/trmnlp/cli.rb', line 39

def init(name)
  Commands::Init.run(options, name)
end

#lintObject



71
72
73
74
# File 'lib/trmnlp/cli.rb', line 71

def lint
  # Exit non-zero when issues are found so CI pipelines can gate on it.
  exit(1) unless Commands::Lint.run(options)
end

#listObject



50
51
52
# File 'lib/trmnlp/cli.rb', line 50

def list
  Commands::List.run(options)
end

#loginObject



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

def 
  Commands::Login.run(options)
end

#pullObject



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

def pull
  Commands::Pull.run(options)
end

#pushObject



66
67
68
# File 'lib/trmnlp/cli.rb', line 66

def push
  Commands::Push.run(options)
end

#serveObject



79
80
81
# File 'lib/trmnlp/cli.rb', line 79

def serve
  Commands::Serve.run(options)
end

#versionObject



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

def version
  puts VERSION
end