S
Sean Russell
Hi,
registry is a Ruby binding to The Linux Registry
(http://registry.sourceforge.net). The Linux Registry, in turn, is a
C-based library for storing persistent environment variables, similar
to the Windows registry or NeXTSTEP's "defaults" library. The goal is
to provide a consistent interface to storing configuration data and
remove the need to implement parsing code in every application that
stores configurations.
The Linux Registry uses the filesystem as the database, so variable
permissions are supported. Furthermore, the registry is small (28k)
with very few link requirements (linux-gate.so, libc.so, and
ld-linux.so on my machine), making it suitable for using in early boot
processes such as init. Values are stored in files, and are editable
with standard tools without going through the library; of course, a
command line tool for getting, setting, and listing variables is also
available.
Widespread acceptance of the Linux Registry would remove vast amounts
of redundant configuration parsing code in Linux applications, and
would make creating GUI configuration tools easier. It would reduce
the amount of knowledge needed to deal with the /etc mess by reducing
the number of config file formats. The project is open, free, and
well thought-out, and I encourage you to look into it if you've any
interest.
This particular project, registry for Ruby, is a simple, and currently
limited, binding to libregistry. Six API calls are supported, and
these calls constitute the bulk of what normal libregistry use would
be. This is the first release, and I plan on at least two significant
upgrades to the API; one to support binary values (which libregistry
supports), and one to provide access to the permissions API.
Current use of the toolkit looks something like this:
require 'registry'
Registry:pen {
userhome = Registry::get( "user/uid" )
Registry::set( "user/sw/MyApp/dbdir",
"#{userhome}/.MyApp" )
puts "Keys available are: "
Registry::keys.each { |key| puts "\t#{key}" }
Registry::remove( "user/sw/MyApp/dbdir" )
}
The project depends on the Linux Registry, of course, and is available
at:
http://www.germane-software.com/software/Libraries/registry
(note the capital "L" in "Libraries").
Email me with any questions or comments.
--- SER
registry is a Ruby binding to The Linux Registry
(http://registry.sourceforge.net). The Linux Registry, in turn, is a
C-based library for storing persistent environment variables, similar
to the Windows registry or NeXTSTEP's "defaults" library. The goal is
to provide a consistent interface to storing configuration data and
remove the need to implement parsing code in every application that
stores configurations.
The Linux Registry uses the filesystem as the database, so variable
permissions are supported. Furthermore, the registry is small (28k)
with very few link requirements (linux-gate.so, libc.so, and
ld-linux.so on my machine), making it suitable for using in early boot
processes such as init. Values are stored in files, and are editable
with standard tools without going through the library; of course, a
command line tool for getting, setting, and listing variables is also
available.
Widespread acceptance of the Linux Registry would remove vast amounts
of redundant configuration parsing code in Linux applications, and
would make creating GUI configuration tools easier. It would reduce
the amount of knowledge needed to deal with the /etc mess by reducing
the number of config file formats. The project is open, free, and
well thought-out, and I encourage you to look into it if you've any
interest.
This particular project, registry for Ruby, is a simple, and currently
limited, binding to libregistry. Six API calls are supported, and
these calls constitute the bulk of what normal libregistry use would
be. This is the first release, and I plan on at least two significant
upgrades to the API; one to support binary values (which libregistry
supports), and one to provide access to the permissions API.
Current use of the toolkit looks something like this:
require 'registry'
Registry:pen {
userhome = Registry::get( "user/uid" )
Registry::set( "user/sw/MyApp/dbdir",
"#{userhome}/.MyApp" )
puts "Keys available are: "
Registry::keys.each { |key| puts "\t#{key}" }
Registry::remove( "user/sw/MyApp/dbdir" )
}
The project depends on the Linux Registry, of course, and is available
at:
http://www.germane-software.com/software/Libraries/registry
(note the capital "L" in "Libraries").
Email me with any questions or comments.
--- SER