matthiasbeyer/diary.rb — pull request #87 by matthiasbeyer (2014-08-06 09:59:59+00:00)
Title: Ask to create the root / content dir if it does not exist.

At the moment, we just fail (by an uncatched exception) when the content dir
(which is /tmp/content) is not available.

Our flow should be:

1. Check if the root dir is available (~/.diary.rb)
1.1. If not: check if there is a config file available (~/diary.rb.conf) where the root dir could be set, if not ask to create the root dir
1.2. If yes: check if there is a config file in the root dir (~/.diary.rb/config), load and parse

2. Check if the content dir is available (~/.diary.rb/content by default, but the config can contain another one)
2.1. If the configuration says another dir or the default dir is available, continue as normal
2.2. If not, ask to create this directory.