S
Shadowfirebird
Hi all,
Short version: What gems do people use to deal with program options in a YAML file and taken from the command line? I seem to have too much choice to make a sensible decision as to which to use.
Long version:
I mostly write command-line ruby programs and I've getting fed up with dealing with program options. You know the sort of thing: my program collects command line options using optparse; saved options from a YAML file; and implicitly knows good defaults for these. The idea being that these three all end up in a hash that the gubbins of my program can refer to.
I've decided that rather than dealing with this in a half-arsed manner I want to get it right this time. I don't mind rolling my own, but obviously if there's a gem that does it for me, I'll use that. The problem is that there are hundreds of gems called config-something, and half of them look as if they might do the job -- if there was any documentation...
(The real trick I'd like to pull is to specify the YAML filename on the command line, but still have the command line options override those in the YAML file.)
What does everyone else use?
Ta,
Shadowfirebird.
Short version: What gems do people use to deal with program options in a YAML file and taken from the command line? I seem to have too much choice to make a sensible decision as to which to use.
Long version:
I mostly write command-line ruby programs and I've getting fed up with dealing with program options. You know the sort of thing: my program collects command line options using optparse; saved options from a YAML file; and implicitly knows good defaults for these. The idea being that these three all end up in a hash that the gubbins of my program can refer to.
I've decided that rather than dealing with this in a half-arsed manner I want to get it right this time. I don't mind rolling my own, but obviously if there's a gem that does it for me, I'll use that. The problem is that there are hundreds of gems called config-something, and half of them look as if they might do the job -- if there was any documentation...
(The real trick I'd like to pull is to specify the YAML filename on the command line, but still have the command line options override those in the YAML file.)
What does everyone else use?
Ta,
Shadowfirebird.