Skip to content

railsmachine/parseconfig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rb-parseconfig

by BJ Dierkes
http://www.5dollarwhitebox.org
changes by Jesse Newland
http://www.railsmachine.com

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['log_file']
puts config['pid_file']
...

REQUIREMENTS:

* Ruby (Developed on 1.8.6)
* RubyGems

INSTALL:

sudo gem install parseconfig

LICENSE:

Copyright © 2006,2007 BJ Dierkes <[email protected]> Copyright © 2008-2104 Rails Machine

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.

About

simple config parser for files in the format of "param = value"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages