chrisallenlane/cheat — pull request #184 by brutus (2014-08-19 13:23:38+00:00)
Title: Change the way default data directory is calculated

refactored the `default_path` function in `sheets` and added two functions to `utils`:

* `get_userdata_dir`

returns the default user data directory: from envvar, in homedir or in standard dir.

* `get_default_data_dir`

returns the default directory used for user data: chooses based on system and user.

Now which directory is used to store the user sheets, is determined the following way:

1. If the `DEFAULT_CHEAT_DIR` environment variable is set, use it.

2. If a `.cheat` directory exists in the home directory, use it.

3. Use a `cheat` directory in the systems default directory for user data.