V1.3: v1.3.0


  • Edit Gemfile, by changing Hanami version: gem 'hanami', '~> 1.3'

  • Edit Gemfile, by changing Hanami Model version: gem 'hanami-model', '~> 1.3'

  • [DEPRECATION] Remove force_ssl from apps/*/application.rb in favor of web server rules (e.g. NGINX) or rack-ssl-enforcer.

# config/environment.rb
require "rack/ssl-enforcer"

Hanami.configure do
  # ...
  middleware.use Rack::SslEnforcer
end
  • [DEPRECATION] Remove body_parsers from apps/*/application.rb in favor of a new Hanami middleware:
# config/environment.rb
require "hanami/middleware/body_parser"

Hanami.configure do
  # ...
  middleware.use Hanami::Middleware::BodyParser, :json
end
  • [DEPRECATION] Remove usage of parsed_request_body from actions. Parsed body is accessible via params.

  • [DEPRECATION] Convert Hanami::Utils::String usage of instance methods to class methods (e.g. Hanami::Utils::String.new("hanami").titleize to Hanami::Utils::String.titleize("hanami"))

  • [DEPRECATION] Convert Hanami::Utils::Hash usage of instance methods to class methods (e.g. Hanami::Utils::Hash.new("a" => 1).symbolize to Hanami::Utils::Hash.symbolize("a" => 1))

  • Run bundle update hanami hanami-model

If you have any problem, don’t hesitate to look for help in chat.