On Fri, Jan 06, 2012 at 01:26:21AM +0900, Intransition wrote:
> On Thursday, January 5, 2012 2:21:18 AM UTC-5, Chad Perrin wrote:
> > On Thu, Jan 05, 2012 at 02:39:38PM +0900, Intransition wrote:
> > >
> > > Use dot directory:
> > > 
> > >   $HOME/.yourappname/
> > > 
> > > In there the end-user can edit a `config` file (maybe config.yml, or 
> > > config.rb or whatever the appropriate extension). And also the data
> > > files you mention can go there too, e.g.
> > > `$HOME/.yourappname/foo.dat`.
> >
> > Where would I store this within the gem/project directory hierarchy,
> > though?  That's the real question I have with regard to where to put my
> > config and data files right now, and not so much where to install them
> > later (which I was thinking of doing in a manner quite like what you
> > describe here).
> 
> Ah, you mean for a default setup? You should keep it in your project, 
> either in `lib` somewhere or if you what to be FHS strict use `data/foo/` 
> which should be installed to `/usr/share/foo/`. However for the later, 
> RubyGems  doesn't install data to share, so you will have to access that 
> from the gem itself (maybe using `RbConfig.datadir`?) -- which is why I say 
> just using `lib` is much easier.
> 
> Then have your program setup the user defaults on an initial run.

It kinda looks like you're still talking about post-installation paths.
Maybe I'm misunderstanding something.

What I was asking about was how to organize things in the *project*
directory, from which things are bundled in a gem archive for
distribution, so that things conform to expectations when people look at
the source of an unpacked gem archive or check the source in an online
DVCS code hosting repository.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]