Hello wonderful community!
Today we're happy to announce
v1.3.0.beta1 release 🙌 , with the stable release (
v1.3.0) scheduled for October 2018.
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 thing it's the best experience, we decided to promote RSpec as the default testing framework.
Since 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.
Since 2.0 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 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 the corresponding webserver (eg. Nginx) feature, a Rack middleware (eg.
rack-ssl), or another strategy to force HTTPS connection.
Hanami::Action#parsed_body, and it will be removed in future releases of Hanami.
- 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)
- 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
- 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
gem install hanami --pre hanami new bookshelf
We'll release new beta versions, with enhancements, and bug fixes. The stable release is expected on October 2018, in the meantime, please try this beta and report issues.
Happy coding! 🌸