-
Notifications
You must be signed in to change notification settings - Fork 128
Add Sinatra::Runner For Managing Sinatra Servers #122
Conversation
module Sinatra | ||
class Runner | ||
def app_file | ||
File.expand_path("../server.rb", __FILE__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be configurable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is, by overriding this method.
No tests. :( |
end | ||
|
||
def run | ||
#puts command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can remove the puts
We'll look into this for Sinatra 1.5 |
@apotonick Find a way to make it configurable, remove the |
Ok, I'm going to merge this, even without the configure option (since there is a workaround) and tests. It's a new feature, that I will mark as experimental, so I'm fine if we add them later. |
Add Sinatra::Runner For Managing Sinatra Servers
sinatra/sinatra-contrib#122 has been merged. Closes trailblazer#195. Signed-off-by: Alex Coles <alex@alexbcoles.com>
This is extremely useful e.g. if you wanna test your REST client against a real backend (with real network calls). Assuming the test backend is a sinatra app, this class helps you to start and stop the server in your test.