Class: DislokuCli

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.runObject



13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/disloku.rb', line 13

def self.run()
	begin
		DislokuCli.start()
	rescue Interrupt => e
		Disloku::Log.instance.warn("Disloku was killed with CTRL+C")
	rescue Exception => e
		Disloku::Log.instance.fatal("Unhandled exception: #{e.message}")
		if (ARGV.any?() { |a| a == "-d" || a == "--debug" })
			Disloku::Log.instance.fatal(e.backtrace.join("\n"))
		end
	end
end

Instance Method Details

#build(from = nil) ⇒ Object



48
49
50
51
# File 'lib/disloku.rb', line 48

def build(from = nil)
	cmd = Disloku::Commands::Build.new(options)
	cmd.execute(from)
end

#configObject



60
61
62
63
# File 'lib/disloku.rb', line 60

def config()
	cmd = Disloku::Commands::Config.new(options)
	cmd.execute()
end

#deploy(from = nil) ⇒ Object



37
38
39
40
# File 'lib/disloku.rb', line 37

def deploy(from = nil)
	cmd = Disloku::Commands::Deploy.new(options)
	cmd.execute(from)
end

#generateObject



54
55
56
57
# File 'lib/disloku.rb', line 54

def generate()
	cmd = Disloku::Commands::Generate.new(options)
	cmd.execute()
end

#versionObject



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

def version()
	puts(Disloku::VERSION)
end