module Roda::RodaPlugins::RunAppendSlash

The run_append_slash plugin makes r.run use / as the PATH_INFO when calling the rack application if PATH_INFO would be empty. Example:

route do |r|
  r.on "a" do
    r.run App
  end
end

# without run_append_slash:
# GET /a => App gets "" as PATH_INFO
# GET /a/ => App gets "/" as PATH_INFO

# with run_append_slash:
# GET /a => App gets "/" as PATH_INFO
# GET /a/ => App gets "/" as PATH_INFO