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 © 2006,2007 BJ Dierkes <[email protected]>

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.