diff --git a/app.rb b/app.rb index b7d14b7..7bd129b 100644 --- a/app.rb +++ b/app.rb @@ -16,6 +16,13 @@ module Maptool set :public_folder, File.join(__dir__, "public") set :views, File.join(__dir__, "views") + # sinatra/json defaults to MultiJson, whose `encode` (what + # sinatra-contrib 4.2.1 actually calls) is deprecated in newer + # multi_json versions in favor of a constant this app has no other use + # for — stdlib JSON already does the same job and every use of the + # `json` helper below is a plain hash/array, nothing MultiJson-specific. + set :json_encoder, JSON + # A persistent secret across restarts/redeploys — otherwise every deploy # would invalidate every logged-in session's cookie (see # docs/deployment.adoc). Falls back to a random one so the app still