Sunday, May 19, 2024
HomeRuby On RailsHanami | Saying Hanami v2.0.0.beta3

Hanami | Saying Hanami v2.0.0.beta3


Whats up once more, mates! We’re excited to share our launch of Hanami 2.0.0.beta3!

Code Reloading

Hanami server and console now assist code reloading.

New apps are generated with hanami-reloader in Gemfile and with a brand new Guardfile.
Code reloading for hanami server is predicated on guard.
When the file system modifications due to code edits, Guard restarts the Hanami server.

In Hanami 1, we achieved code reloading with an “inside-the-framework” method that turned to be problematic.
With hanami-reloader, we carried out this “outside-the-framework” that has constructive implications:

  • File system watching is delegated to Guard
  • Hanami is now free from code reloading consciousness
  • Not bundling hanami-reloader (e.g. in manufacturing), eliminates robotically the code reloading logic
  • With zeitwerk and dry-container we achieved lazy boot of the app, leading to very quick code reloading.

Relating to the Hanami console, we reintroduced reload command to be invoked from the console to reload its context.

Puma

New apps are generated with puma in Gemfile and with config/puma.rb configuration.

Routes simplification

The routes definition in config/routes.rb seems to be easier with the elimination of outline wrapper.

Earlier than

# frozen_string_literal: true

module Bookshelf
  class Routes < Hanami::Routes
    outline do
      root { "Whats up from Hanami" }
    finish
  finish
finish

After

# frozen_string_literal: true

module Bookshelf
  class Routes < Hanami::Routes
    root { "Whats up from Hanami" }
  finish
finish

What’s included?

At present we’re releasing the next gems:

  • hanami v2.0.0.beta3
  • hanami-rspec v3.11.0.beta3 (it follows RSpec’s versioning)
  • hanami-cli v2.0.0.beta3
  • hanami-reloader v1.0.0.beta3

For particular modifications from the final beta launch, please see every gem’s personal CHANGELOG.

How can I attempt it?

⚡ gem set up hanami --pre
⚡ hanami new bookshelf
⚡ cd bookshelf
⚡ bundle exec hanami --help

Contributors

Thanks to those wonderful individuals for contributing to this launch!

Thanks

Thanks as at all times for supporting Hanami!

We are able to’t wait to listen to from you about this launch, and we’re trying ahead to checking in with you once more quickly. 🌸

Be part of a group of over 2,300+ builders.


By clicking “Subscribe” I wish to subscribe to Hanami mailing checklist.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments