orchardup/fig — pull request #317 by ryanbrainard (2014-07-13 06:51:03+00:00)
Title: Set default project name to dir name of fig.yml

This behavior already happens under normal circumstances, but when running Fig from a different directory than that of the `fig.yml`, the project name is the `cwd` instead of where the `fig.yml` is actually located. This means that if you change directories, you'll get a different project name even if you are pointing to the same `fig.yml` file. This fixes it so that the project name stays consistent for a given `fig.yml` file.

Because the `check_yaml_filename()` was not happening until `project()` was called and this behavior would have been duplicated in `project_name()`, I extracted out the `yaml_path` resolution into a property (just doing it in the initializer wouldn't work because the tests mutate the `base_dir` after initialization). I'm pretty new to Python, so please let me know if this could have been done in a better way.