From 16f524699f5fdf72d444c9f2f3dc761aafa6988d Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Sun, 31 Jul 2011 23:23:37 +0200 Subject: [PATCH] Added support for system configured maps. --- qasim/config.rb | 3 ++- qasim/constants.rb | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/qasim/config.rb b/qasim/config.rb index 9a8ee88..81dd072 100644 --- a/qasim/config.rb +++ b/qasim/config.rb @@ -8,6 +8,7 @@ require 'find' require 'rubygems' require 'rdebug/base' +require 'qasim/constants' require 'qasim/map' module Qasim @@ -53,7 +54,7 @@ module Qasim rdebug "Config: #{@config_dir}/config" @maps = [] - Find.find( @config_dir ) do |path| + Find.find( @config_dir, APP_SYSCONFIG_DIR ) do |path| if File.file? path if File.basename( path ) =~ /.map$/ begin diff --git a/qasim/constants.rb b/qasim/constants.rb index c0a0184..0ffc237 100644 --- a/qasim/constants.rb +++ b/qasim/constants.rb @@ -1,5 +1,6 @@ module Qasim APP_ICON_PATH = File.join QASIM_INCLUDE_DIR, "icons" + APP_SYSCONFIG_DIR = "/etc/qasim/maps.d" APP_NAME = "Qasim" APP_VERSION = "0.1" end