Skip to content

Instantly share code, notes, and snippets.

@knzai
Created April 21, 2010 17:32
Show Gist options
  • Save knzai/374139 to your computer and use it in GitHub Desktop.
Save knzai/374139 to your computer and use it in GitHub Desktop.
use Rack::Bug
map '/my_sweet_rack_app'
run MySweetRackApp.new
end
map '/'
DenyAccessAndRecordRetinaApp.new
end
def app
eval "Rack::Builder.new {( " + File.read(File.dirname(__FILE__) + '/../config.ru') + "\n )}"
end
@knzai
Copy link
Author

knzai commented May 28, 2010

Yeah, good idea. In this usage I was handling all my dirname stuff within the app, but not a bad precaution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment