From: Chad Perrin Date: 2012-01-05T16:21:18+09:00 Subject: Re: organizing a complex gem 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). > > Also, consider using XDG base directory standard, which would give your > end-user some flexibility in deciding where these files reside. I'll consider it. Thanks for the suggestion. > > The modules themselves would go into lib/, e.g. `lib/myapp/extensions/`. This seems like it might be suboptimal for cases where the gem is installed system-wide but the modules should be available on a per-user basis, but I guess just establishing a "standard" location for per-user extensions in addition to the extensions provided with the default install -- which are in the system-wide location -- would make sense. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]