------art_650_2527163.1325780778964
Content-Type: multipart/alternative; 
	boundary---art_651_5174578.1325780778964"

------art_651_5174578.1325780778964
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit



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.


------art_651_5174578.1325780778964
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<br><br>On Thursday, January 5, 2012 2:21:18 AM UTC-5, Chad Perrin wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On Thu, Jan 05, 2012 at 02:39:38PM +0900, Intransition wrote:<br>&gt; Use dot directory:<br>&gt; <br>&gt; &nbsp; $HOME/.yourappname/<br>&gt; <br>&gt; In there the end-user can edit aconfig` file (maybe config.yml, or <br>&gt; config.rb or whatever the appropriate extension). And also the data files <br>&gt; you mention can go there too, e.g. `$HOME/.yourappname/foo.dat`.<p>Where would I store this within the gem/project directory hierarchy,<br>though? &nbsp;That's the real question I have with regard to where to put my<br>config and data files rightow, and not so much where to install them<br>later (which I was thinking of doing in a manner quite like what you<br>describe here).</p></blockquote><div><br></div><div>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 &nbsp;doesn't install data to share, so&nbsp;you will have to access that from the gem itself (maybe using `RbConfig.datadir`?) --hich is why I say just using `lib` is much easier.</div><div><br></div><div>Then have your program setup the user defaults on an initial run.</div><div><br></div><blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><p></p><p></p><p></p><p></p><p></p><p></p><p></p></blockquote>
------art_651_5174578.1325780778964--

------art_650_2527163.1325780778964--