mattetti/wd-sinatra — pull request #29 by kamui (2013-05-02 07:12:50+00:00)
Title: Switch generated sinatra app from classic to modular style

I tried to `hub pull-request -b mattetti:master -i 26` for issue #26, but it said I couldn't change the issue, so I created a new PR.

I'm not sure I'm using `template` [here](https://github.com/kamui/wd-sinatra/blob/modular/bin/wd_sinatra#L49-L55) the best way, because it's copying the entire app template over, and then this method renders the rb files over the copied files. Maybe there's a better way to do that.

Also, I'm not sure what goes in `sinatra_config.rb` vs `middleware.rb`. For instance, you had `use Rack::ContentLength` defined in both places. Technically, any rack or sinatra middleware could be defined in either place.

`middleware.rb` gets loaded, then routes, then `sinatra_contrib.rb`. That means any helpers you want to define need to go into `middleware.rb` because the route service implementations might refer to helpers not defined yet right? Also, I was tempted to use `Sinatra::ConfigFile`, but that would have to be defined in app.rb since other libraries would need access to those config settings. I'm just a little confused with what goes where.