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



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

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

#init(name) ⇒ Object



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

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

#lintObject



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

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



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

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

#loginObject



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

def 
  Commands::Login.run(options)
end

#pullObject



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

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

#pushObject



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

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

#serveObject



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

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

#versionObject



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

def version
  puts VERSION
end