defunkt/gist — pull request #158 by EvanPurkhiser (2013-12-23 10:18:24+00:00)
Title: Improve auth-token file path

Note: _This pull request isn't acceptable in it's current state, but I would like to open a dialog with a few questions!_

This PR provides a better place to store the `.gist` file on both OSX and Linux.

* For OSX the authentication token file is stored under `~/Library/Caches/gist` as specified by [this particular Apple technical Q/A](https://developer.apple.com/library/mac/qa/qa1170/_index.html#//apple_ref/doc/uid/DTS10001702-CH1-SECTION5).
* For Linux the authentication token is stored as `$XDG_CACHE_HOME/gist`, conforming to the [XDG Base Directory Specifications](http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html).

##### My questions are:

1. Should we consider the auth-token file a piece of cached information, or persistent information? I asked this question on [the Arch Linux forums](https://bbs.archlinux.org/viewtopic.php?id=173297) a little while ago, but only had one response.

2. How should I handle migration of the `~/.gist` file? When I opened a [similar PR](https://github.com/ConradIrwin/jist/pull/37) on the jist gem it was recomended that I do one of the two:
1. Move the original `~/.gist` file into the proper location. If I do this where should the logic reside in the code to handle moving the file?
2. Just read the original `~/.gist` file if it exists.