Module: Zillabyte::CLI

Defined in:
lib/zillabyte/cli.rb,
lib/zillabyte/cli/config.rb,
lib/zillabyte-cli/version.rb

Defined Under Namespace

Modules: Config

Constant Summary collapse

VERSION =
"0.9.51"

Class Method Summary collapse

Class Method Details

.start(*args) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/zillabyte/cli.rb', line 3

def self.start(*args)
  require("zillabyte/helpers")
  begin
    Zillabyte::Helpers.error("We're sorry, but Zillabyte requires Ruby 1.9.3 or above.") if !Zillabyte::Helpers.version_okay?(RUBY_VERSION, "1.9.3")
    command = args.shift().strip() rescue "help"
    require("zillabyte/command")
    Zillabyte::Command.load(command)
    thr = Thread.new{Zillabyte::Command.tracker(command, args)}
    Zillabyte::Command.run(command, args)
    thr.join
  rescue Interrupt
    `stty icanon echo`
    Zillabyte::Helpers.error("Command cancelled.")
  rescue => error
    raise
    #display(error)
    #exit(1)
  end
end