tsuru/tsuru — pull request #976 by msabramo (2014-11-11 19:20:37+00:00)
Title: Add ability to guess app name from dirname

This is *in addition* to guessing app name from the `tsuru` git remote.

The `tsuru` git remote is tried first and if that doesn't work, then we take the name of the current directory and look to see if there is an app with that name. If there is, we use that; else error out.

The main reason for adding this is that I am thinking of createing a plugin or command that would automatically add the git remote for the user (e.g.: `tsuru app-add-git-remote`) (I am trying to make it as easy as possible to on-board devs on to tsuru in my org).

Examples:

```
$ git remote -v | grep tsuru

$ basename $(pwd)
profilesvc

$ tsuru app-info | egrep '^(Application|Address):'
Application: profilesvc
Address: profilesvc.10.128.40.70.xip.io

$ cd /var/log/powermanagement
$ tsuru app-info | egrep '^(Application|Address):'
Error: tsuru wasn't able to guess the name of the app.

Use the --app flag to specify it.

Git repository not found: Repository not found..
Current directory name (powermanagement) is not the name of a tsuru app
```