meskyanichi/backup — pull request #572 by tombruijn (2014-08-25 19:57:36+00:00)
Title: Add backtraces to non-Backup::Error errors in CLI calls

Add support for backtraces on non-`Backup::Error` errors in CLI calls. See also #571

Example without backtraces:

```sh
$ bundle exec backup check
[2014/08/25 19:45:06][error] CLI::Error
[2014/08/25 19:45:06][error] --- Wrapped Exception ---
[2014/08/25 19:45:06][error] TypeError: no implicit conversion of Symbol into String
[2014/08/25 19:45:06][error] Configuration Check Failed.
```

Example with backtraces as per this PR:

```sh
$ bundle exec backup check
[2014/08/25 19:44:03][error] CLI::Error
[2014/08/25 19:44:03][error] --- Wrapped Exception ---
[2014/08/25 19:44:03][error] TypeError: no implicit conversion of Symbol into String
[2014/08/25 19:44:03][error] /Users/tom/projects/backup/lib/backup/cli.rb:222:in `check'
[2014/08/25 19:44:03][error] /Users/tom/.gem/ruby/2.1.2/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
[2014/08/25 19:44:03][error] /Users/tom/.gem/ruby/2.1.2/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
[2014/08/25 19:44:03][error] /Users/tom/.gem/ruby/2.1.2/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
[2014/08/25 19:44:03][error] /Users/tom/.gem/ruby/2.1.2/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
[2014/08/25 19:44:03][error] /Users/tom/projects/backup/bin/backup:5:in `'
[2014/08/25 19:44:03][error] /Users/tom/.gem/ruby/2.1.2/bin/backup:23:in `load'
[2014/08/25 19:44:03][error] /Users/tom/.gem/ruby/2.1.2/bin/backup:23:in `

'
[2014/08/25 19:44:03][error] Configuration Check Failed.
```

My only problem is with the specs. I don't use Mocha ever so the expectations on method calls was a bit of an experience. Does anyone have any insight in this and can review if I am doing it the right way? @tomash perhaps?