Files | Admin

Notes:

Release Name: 0.4.1

Notes:
rb-parseconfig
    by BJ Dierkes
    http://www.5dollarwhitebox.org 

== DESCRIPTION:
  
rb-parseconfig is a Ruby class written to parse simple configuration 
files in the format of 'param = value'. The key benefit is that your ruby 
scripts can use the same configuration files of most unix/linux 
applications.

== FEATURES/PROBLEMS:
  
Parsing of simple configuration files (not Ruby specific).
Allows ruby applications as well as Bash Init scripts to use the same config.

Problem: Currently single quotes are stripped... therefore, values with a 
single quote are not possible.

== SYNOPSIS:

  require('rubygems')
  require('parseconfig')
  config = ParseConfig.new('/path/to/config/file')
  puts config.get_value('log_file')
  puts config.get_value('pid_file')
  ...

== REQUIREMENTS:

  * Ruby (Developed on 1.8.6)
  * RubyGems 

== INSTALL:

  sudo gem install parseconfig

== LICENSE:

Copyright (C) 2006,2007  BJ Dierkes <wdierkes@5dollarwhitebox.org>

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.


Changes: * Sun Sep 03 2007 BJ Dierkes <wdierkes@5dollarwhitebox.org> - 0.4.1 - Now using 'instance_variable_set' and 'instance_variable_get' instead of 'eval' (yeah.. that was dirty). * Sat Aug 11 2007 BJ Dierkes <wdierkes@5dollarwhitebox.org> - 0.3.2 - reorganizing files a bit - renamed methods .... no more uglyStyle... now new_style. * Fri Feb 23 2007 BJ Dierkes <wdierkes@5dollarwhitebox.org> - 0.3.1 - Added a bit of code to remove 'single' quotes... so, until I figure a better option, values can't contain single quotes * Wed Feb 07 2007 BJ Dierkes <wdierkes@5dollarwhitebox.org> - 0.2.1 - Renamed ParseConfig.class.rb to ParseConfig.rb - Add 'strip' to remove trailing white spaces from config file * Wed Dec 13 2006 BJ Dierkes <wdierkes@5dollarwhitebox.org> - 0.1.3 - Added error check to ensure configFile is readable * Sat Nov 25 2006 BJ Dierkes <wdierkes@5dollarwhitebox.org> - 0.1.2 - Added regex to only read lines matching /\s*=\s*/ as The class would bork if you had say, and empty line * Fri Nov 24 2006 BJ Dierkes <wdierkes@5dollarwhitebox.org> - 0.1.1 - Built class, which is functional and fully usable