From 7cd2600267a52b20396dff9f9132ba6654c227d2 Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Sun, 9 Aug 2015 17:06:08 +0200 Subject: [PATCH] Cleanup: move constants out of Object. --- bin/qasim-cli | 4 ---- bin/qasim-gui | 5 +---- lib/qasim/constants.rb | 2 ++ 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/bin/qasim-cli b/bin/qasim-cli index a084a30..9fa7f2d 100755 --- a/bin/qasim-cli +++ b/bin/qasim-cli @@ -3,10 +3,6 @@ #$DEBUG = true #$VERBOSE = true -QASIM_INCLUDE_DIR = "lib" -QASIM_DATA_DIR = "." - - # # external libraries # diff --git a/bin/qasim-gui b/bin/qasim-gui index c5b8c7d..3591fcb 100755 --- a/bin/qasim-gui +++ b/bin/qasim-gui @@ -10,10 +10,7 @@ require 'set' require 'fcntl' require 'pathname' -QASIM_INCLUDE_DIR = Pathname.new(File.dirname(__FILE__)).parent + "lib" -QASIM_DATA_DIR = Pathname.new(File.dirname(__FILE__)).parent + "data" - -$:.push QASIM_INCLUDE_DIR +$:.push "lib" require 'qasim' require 'qasim/qasim_qrc' diff --git a/lib/qasim/constants.rb b/lib/qasim/constants.rb index 9d84e64..089ef09 100644 --- a/lib/qasim/constants.rb +++ b/lib/qasim/constants.rb @@ -1,4 +1,6 @@ module Qasim + APP_DATA_DIR = Pathname.new(File.dirname(__FILE__)).parent.parent.parent + "data" + APP_ICON_PATH = File.join QASIM_DATA_DIR, "icons" APP_SYSCONFIG_DIR = "/etc/qasim/maps.d"