Cleanup main script (remove bundler ref & unwanted inclusions).

This commit is contained in:
Glenn Y. Rolland 2015-06-05 18:57:05 +02:00
parent d46d6a0fd4
commit b750e281ef

View file

@ -1,23 +1,17 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
# vim: set syntax=ruby: # vim: set syntax=ruby:
#require 'bundler/setup'
require 'yaml' require 'yaml'
require 'singleton' require 'singleton'
require 'pathname' require 'pathname'
require 'bundler/setup'
require 'colorize' require 'colorize'
require 'pp' require 'pp'
DATA_DIR = File.expand_path( DATA_DIR = (Pathname.new(__FILE__).dirname + '..').realpath.to_s
File.join(File.dirname(Pathname.new(__FILE__).realpath),'..')
)
VERSION = "0.3" # FIXME: should not require including the 'lib' dir.
#$:.insert 0, File.join(DATA_DIR, 'lib')
$:.insert 0, File.join(DATA_DIR, 'lib')
require 'thor' require 'thor'
require 'kook' require 'kook'
@ -25,6 +19,8 @@ require 'kook'
begin begin
Kook::CLI::Main.start(ARGV) Kook::CLI::Main.start(ARGV)
rescue Exception => exception rescue Exception => exception
# In case of unhandled exception.
# FIXME: Manage display & create log file
STDERR.puts "ERROR(#{exception.class}) : #{exception}" STDERR.puts "ERROR(#{exception.class}) : #{exception}"
STDERR.puts exception.backtrace STDERR.puts exception.backtrace
exit 1 exit 1