Created
April 21, 2010 17:32
-
-
Save knzai/374139 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Rack::Bug | |
map '/my_sweet_rack_app' | |
run MySweetRackApp.new | |
end | |
map '/' | |
DenyAccessAndRecordRetinaApp.new | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def app | |
eval "Rack::Builder.new {( " + File.read(File.dirname(__FILE__) + '/../config.ru') + "\n )}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah, good idea. In this usage I was handling all my dirname stuff within the app, but not a bad precaution.