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



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

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

#init(name) ⇒ Object



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

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

#lintObject



68
69
70
71
# File 'lib/trmnlp/cli.rb', line 68

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



47
48
49
# File 'lib/trmnlp/cli.rb', line 47

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



55
56
57
# File 'lib/trmnlp/cli.rb', line 55

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

#pushObject



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

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

#serveObject



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

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

#versionObject



81
82
83
# File 'lib/trmnlp/cli.rb', line 81

def version
  puts VERSION
end