Project

General

Profile

« Previous | Next » 

Revision d4b5798a

Added by Marc Dequènes about 15 years ago

  • ID d4b5798aee4e9b3ddb65a7087ddb0c7726363333

[evol] added setup.rb installer, with hooks to generate locales and a 'lib/cyborghood/config.rb' file having a new CyborgHood::Config providing with installation paths, and created CyborgHood::Info to contain software general information (rakefile build-depends are then reduced to the minimum)

View differences:

lib/cyborghood/base.rb
require 'singleton'
require 'yaml'
require 'log4r'
require "cyborghood/lang_additions"
require 'gettext'
require "cyborghood/config"
require "cyborghood/info"
require "cyborghood/lang_additions"
module CyborgHood
include GetText
bindtextdomain("cyborghood", {:path => File.join(APP_ROOT, "locale"), :charset => "UTF-8"})
PRODUCT = "CyborgHood"
VERSION = "0.2.0~dev"
bindtextdomain("cyborghood", {:path => Config::L10N_DIR, :charset => "UTF-8"})
# severities: # :dangerous :unrecoverable :ignorable
# categories:
......
class Config
include Singleton
CFG_DIR = './config/'
WORK_DIR = './var/lib/cyborghood/'
CONFFILE_GLOBAL = "cyborghood.conf"
CONFFILE_BOT = "cyborghood_%s.conf"
......
end
end
# temporary
def work_dir
WORK_DIR
end
private
def self.fetch_config(name = nil)

Also available in: Unified diff