Class: Thronglets::CLI

Inherits:
Thor
  • Object
show all
Extended by:
ThorExt::Start
Defined in:
lib/thronglets/cli.rb

Instance Method Summary collapse

Methods included from ThorExt::Start

extended, start

Instance Method Details

#consoleObject



42
43
44
45
46
47
48
49
50
# File 'lib/thronglets/cli.rb', line 42

def console
  say "Starting console"
  require File.join(Dir.pwd, "config", "temporal/env.rb")
  loader = Thronglets::Loader.new
  loader.load

  ARGV.clear # otherwise all script parameters get passed to IRB
  IRB.start
end

#listenObject



33
34
35
36
37
38
39
# File 'lib/thronglets/cli.rb', line 33

def listen
  say "Starting worker in listen mode"
  require File.join(Dir.pwd, "config", "temporal/env.rb")

  app = Thronglets::Listener.new
  app.run
end

#versionObject



19
20
21
# File 'lib/thronglets/cli.rb', line 19

def version
  say "thronglets/#{Thronglets::VERSION} #{RUBY_DESCRIPTION}"
end

#workerObject



24
25
26
27
28
29
30
# File 'lib/thronglets/cli.rb', line 24

def worker
  say "Starting worker"
  require File.join(Dir.pwd, "config", "temporal/env.rb")

  app = Thronglets::Worker.new
  app.run
end