erikhuda/thor — pull request #432 by maxlinc (2014-08-14 03:59:20+00:00)
Title: Template stacktraces

This seems to be all it takes to get the correct filename and line number to show up when there is an error in a .tt template.

Stacktrace before:
```
(erb):7:in `block in template': undefined method `each' for nil:NilClass (NoMethodError)
from (erb):5:in `each'
from (erb):5:in `template'
from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/2.1.0/erb.rb:850:in `eval'
from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/2.1.0/erb.rb:850:in `result'
from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/actions/file_manipulation.rb:116:in `block in template'
```

Stacktrace after:
```
/Users/Thoughtworker/repos/opensource/swagger/swagger-thor/resources/templates/grape/files/app/api.rb.tt:7:in `block in template': undefined method `each' for nil:NilClass (NoMethodError)
from /Users/Thoughtworker/repos/opensource/swagger/swagger-thor/resources/templates/grape/files/app/api.rb.tt:5:in `each'
from /Users/Thoughtworker/repos/opensource/swagger/swagger-thor/resources/templates/grape/files/app/api.rb.tt:5:in `template'
from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/2.1.0/erb.rb:850:in `eval'
from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/2.1.0/erb.rb:850:in `result'
from /Users/Thoughtworker/repos/opensource/thor/lib/thor/actions/file_manipulation.rb:118:in `block in template'
```