Hello wonderful community!
Today we're happy to announce
v1.3.0 stable release 🙌.
The 1.3 series is a preparatory work for 2.0.
We care a lot about Semantic Versioning and to make the upgrade as smooth as possible for the next major release. This is why we took the change to focus only on stability and to introduce enhancements to ease the upgrade.
Back in the days, when I started Hanami (which used to be known as Lotus), the choice about the default testing framework fell on Minitest because it's lightweight and feels more rubyish (if this is a thing). I used a lot Minitest at that time, especially for gems.
But I recognized that I rarely used it for web apps. For this kind of Ruby code, the completeness of RSpec makes my life easier.
Because Hanami is an opinionated software, because we want to offer what we think is the best experience, we decided to promote RSpec as the default testing framework.
From now on, the following command will generate a new project with RSpec:
$ hanami new bookshelf
For those who want to use Minitest:
$ hanami new bookshelf --test=minitest
Hanami::Utils::Hash as Ruby objects to be instantiated.
From 2.0 onward it won't be possible to do
Please use the corresponding class method:
From 2.0 these two classes will be turned into modules.
From future versions, Hanami will use
body_parsers as a setting in Hanami apps.
# apps/web/application.rb module Web class Application < Hanami::Application configure do # ... body_parsers :json end end end
Please use the new middleware:
# config/environment.rb require "hanami/middleware/body_parser" Hanami.configure do # ... middleware.use Hanami::Middleware::BodyParser, :json end
force_ssl as setting in Hanami apps.
# apps/web/application.rb module Web class Application < Hanami::Application configure do # ... force_ssl true end end end
Please use the corresponding webserver (eg. Nginx) feature, a Rack middleware (eg.
rack-ssl-enforcer), or another strategy to force HTTPS connection.
Hanami::Action#parsed_body, and it will be removed in future releases of Hanami.
- Automatically log body payload from body parsers (only in
- Preserve directory structure of assets at the precompile time
- Generate actions/views/mailers with nested module/class definition
- CLI: Introduce array type for arguments (
foo exec test spec/bookshelf/entities spec/bookshelf/repositories)
- CLI: Introduce array type for options (
foo generate config --apps=web,api)
- CLI: Introduce variadic arguments (
foo run ruby:latest -- ruby -v)
- Swappable JSON backend for
- Make possible to pass extra settings for custom logger instances (eg.
logger SemanticLogger.new, :foo, :bar)
hanami generate appto work without
- Fixed regression for
hanami new .that used to generate a broken project
- Don't use thread unsafe
Dir.chdirto serve static assets
- Generate correct syntax for layout unit tests
- Fix concatenation of
- Ensure that if
If-Modified-Sinceresponse HTTP headers are missing,
Last-Modifiedheaders will be in response HTTP headers.
- Don't show flash message for the request after a HTTP redirect.
#empty?to not reference stale flash data.
- Ensure to set
:disable_escapeoption only for
slimand don't let
tiltto emit a warning for other template engines
- Ensure partial rendering to respect
- Print informative message when unknown or wrong option is passed to CLI commands
- Skip attempting to parse unknown MIME types (only in
- Reliably parse query params for
Hanami::ModelURL connection string
- Print meaningful error message when
Hanami::ModelURL connection is misconfigured
gem install hanami hanami new bookshelf
If you're upgrading, please read the related Guides article.
Kai Kuchenbecker joined our core team! If you ever asked a quesion in our chat it's very likely you have been answered by him. Kai will continue to help people in chat and to ease the process from question to solution or bugfix.
This release will be the last minor version of
You may see patch versions to be released for bug fixes or deprecations.
From now on, our focus will be for 2.0!
Happy coding! 🌸