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



22
23
24
# File 'lib/trmnlp/cli.rb', line 22

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

#clone(name, id) ⇒ Object



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

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

#init(name) ⇒ Object



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

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

#lintObject



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

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



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

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

#loginObject



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

def 
  Commands::Login.run(options)
end

#pullObject



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

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

#pushObject



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

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

#serveObject



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

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

#versionObject



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

def version
  puts VERSION
end