Skip to content

Upgrading sinatra 2 to 3

Breaking2.2.4 → 3.2.0Breaking11Security3Platform1Deprecated1New9Changed2Fixed15Other4

BreakingUpgrade verdict

11 breaking changes and a platform requirement change and 3 security fixes.

  • Templates written in Stylus are no longer supported.
  • Templates rendered with erubis are no longer supported.
  • Templates written in textile are no longer supported.
  • SASS templates are no longer supported.
Top 5 of 16 that need code or config changes

Ruby requirement changed in 3.0.0: >= 2.3.0 → >= 2.6.0.

Breaking11
Removes support for the Stylus template engine.
Stylus
Removes support for the erubis template engine.
erubis
Removes support for the textile template engine.
textile
Removes support for SASS as a template engine.
SASS
Removes support for Wlang as a template engine.
Wlang
Removes support for CoffeeScript as a template engine.
CoffeeScript
Removes support for Mediawiki as a template engine.
Mediawiki
Removes support for Creole as a template engine.
Creole
Removes support for Radius as a template engine.
Radius
Removes support for the defunct Less templating library.
Less
Removes Reel integration.
Reel
Security3
Escapes the filename in the Content-Disposition header.
Content-Disposition
Sinatra vulnerable to Reflected File Download attack
High · CVSS 8.8
Fixes a ReDoS vulnerability in Rack::Protection::IPSpoofing.
Rack::Protection::IPSpoofing
Platform1
Requires Ruby 2.6 as the minimum Ruby version.
Deprecated1
Deprecates Sinatra Reloader, which will be removed in the next major release.
Sinatra Reloader

Generated by DepDelta from published Ruby source. Not mixed with prose notes.

  • removed: const Sinatra.ParamsConfig
  • removed: static method Sinatra.helpers(*)
  • removed: static method Sinatra.new(_ = …)
  • removed: static method Sinatra.register(*)
  • removed: static method Sinatra.use(*)
  • added: const Sinatra.PARAMS_CONFIG
  • removed: class Wrapper
  • removed: constructor Wrapper(_, _)
  • removed: method Base.options()
  • removed: method Templates.coffee(_, _ = …, _ = …)
  • removed: method Templates.creole(_, _ = …, _ = …)
  • removed: method Templates.erubis(_, _ = …, _ = …)
  • removed: method Templates.less(_, _ = …, _ = …)
  • removed: method Templates.mediawiki(_, _ = …, _ = …)
  • removed: method Templates.radius(_, _ = …, _ = …)
  • removed: method Templates.stylus(_, _ = …, _ = …)
  • removed: method Templates.textile(_, _ = …, _ = …)
  • removed: method Templates.wlang(_, _ = …, _ = …)
  • removed: method Wrapper.call(_)
  • removed: method Wrapper.helpers()
  • removed: method Wrapper.inspect()
  • removed: method Wrapper.settings()
  • removed: module Delegator
  • removed: static method Application.register(*)
  • removed: static method Base.add_filter(_, _ = …, **)
  • removed: static method Base.after(_ = …, **)
  • removed: static method Base.before(_ = …, **)
  • removed: static method Base.build(_)
  • removed: static method Base.call(_)
  • removed: static method Base.caller_files()
  • removed: static method Base.caller_locations()
  • removed: static method Base.callers_to_ignore()
  • removed: static method Base.condition(_ = …)
  • removed: static method Base.configure(*)
  • removed: static method Base.delete(_, _ = …)
  • removed: static method Base.development?()
  • removed: static method Base.disable(*)
  • removed: static method Base.enable(*)
  • removed: static method Base.error(*)
  • removed: static method Base.extensions()
  • removed: static method Base.get(_, _ = …)
  • removed: static method Base.head(_, _ = …)
  • removed: static method Base.helpers(*)
  • removed: static method Base.layout(_ = …)
  • removed: static method Base.link(_, _ = …)
  • removed: static method Base.methodoverride=()
  • removed: static method Base.methodoverride?()
  • removed: static method Base.middleware()
  • removed: static method Base.mime_type(_, _ = …)
  • removed: static method Base.mime_types(_)
  • removed: static method Base.new!()
  • removed: static method Base.new(*)
  • removed: static method Base.not_found()
  • removed: static method Base.options(_, _ = …)
  • removed: static method Base.patch(_, _ = …)
  • removed: static method Base.post(_, _ = …)
  • removed: static method Base.production?()
  • removed: static method Base.prototype()
  • removed: static method Base.public_dir()
  • removed: static method Base.put(_, _ = …)
  • removed: static method Base.quit!()
  • removed: static method Base.register(*)
  • removed: static method Base.reset!()
  • removed: static method Base.run!(_ = …)
  • removed: static method Base.running?()
  • removed: static method Base.set(_, _ = …, _ = …)
  • removed: static method Base.start!(_ = …)
  • removed: static method Base.stop!()
  • removed: static method Base.template(_)
  • removed: static method Base.test?()
  • removed: static method Base.unlink(_, _ = …)
  • removed: static method Base.use(_, *)
  • removed: static method Delegator.delegate(*)
  • removed: static property Base.errors: reader
  • removed: static property Base.filters: reader
  • removed: static property Base.routes: reader
  • removed: static property Base.templates: reader
  • removed: static property Delegator.target: accessor
  • removed: static set Base.inline_templates(_ = …)
  • removed: static set Base.public(_)
  • removed: static set Base.public_dir(_)
  • changed: class BadRequest < TypeError → class BadRequest < Error
  • changed: class NotFound < NameError → class NotFound < Error
  • added: class Error < StandardError
  • added: class TemplateCache
  • added: constructor TemplateCache()
  • added: method IndifferentHash.except(*)
  • added: method TemplateCache.clear()
  • added: method TemplateCache.fetch(*)