From: Tapio Kelloniemi Date: 2007-02-09T01:00:09+09:00 Subject: Ruby as a configuration language Hi I'm writing an automated software building framework in Ruby. The software compiles software packages from source code using human-written profiles. The profiles should be extremely easy to read and write by humans (and easy to parse by a program). I wish I could write the profiles in Ruby to avoid creating yet another advanced configuration language. But... it seems that I might not be able to do that. What I want is something like this: # An example package description file. The actual building commands are # written in a bash script. name = "gcc" version = "4.1.1" title = " "GNU Compiler Collection" description = "..." archive { localname = "#{name}-#{version}.tar.bz2" originalname = "#{name}-#{version}.tar.gz" baseurl "ftp://ftp.gnu.org/gnu/gcc/#{version}/" baseurl "ftp.mirror.site/gnu/gcc/#{version}/" convert = "gz-bz2" } # Optional components feature "gfortran" { title = "Fortran compiler" depend "gmp" } ### END example So my question is: is there a way to do this so that I would eval this package description file and appropriate fields of internal objects would be filled by the evaluated script? Thanks in advance! -- Tapio