From b750e281efde9dcb149a97cd4b88c1e1aaeb83a6 Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Fri, 5 Jun 2015 18:57:05 +0200 Subject: [PATCH] Cleanup main script (remove bundler ref & unwanted inclusions). --- bin/kook | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/bin/kook b/bin/kook index 9161f9b..8ef2c0d 100755 --- a/bin/kook +++ b/bin/kook @@ -1,23 +1,17 @@ #!/usr/bin/env ruby # vim: set syntax=ruby: -#require 'bundler/setup' require 'yaml' require 'singleton' require 'pathname' -require 'bundler/setup' - require 'colorize' require 'pp' -DATA_DIR = File.expand_path( - File.join(File.dirname(Pathname.new(__FILE__).realpath),'..') -) +DATA_DIR = (Pathname.new(__FILE__).dirname + '..').realpath.to_s -VERSION = "0.3" - -$:.insert 0, File.join(DATA_DIR, 'lib') +# FIXME: should not require including the 'lib' dir. +#$:.insert 0, File.join(DATA_DIR, 'lib') require 'thor' require 'kook' @@ -25,6 +19,8 @@ require 'kook' begin Kook::CLI::Main.start(ARGV) rescue Exception => exception + # In case of unhandled exception. + # FIXME: Manage display & create log file STDERR.puts "ERROR(#{exception.class}) : #{exception}" STDERR.puts exception.backtrace exit 1