Hanami 2.2.0.beta2 is out!

This beta is a special one: it includes something I’d originally ruled out for 2.2: multiple gateway support!

Now you’re just a single env var away from building a persistence layer that can seamlessly mix and match data from multiple different databases!

Oh, and we added MySQL support. And support for full contract-based params validation.

Next steps: an rc1 and then 2.2 final, all before @rubyconf!

https://hanamirb.org/blog/2024/09/25/hanami-220beta2/

#hanami #ruby #dry_rb

Hanami 2.2.0.beta2

Rounding out the database layer: MySQL, powerful multi-database support, plus full contracts in actions

Hanami

🌸 Announcing Hanami 2.2.0.beta2

For our second (and final!) beta of 2.2, we’re adding MySQL support, and introducing a powerful way to work across multiple databases.

(pssst, if you’re also a user of param validations inside actions, we have a little treat for you in this release too)

https://hanamirb.org/blog/2024/09/25/hanami-220beta2/

#ruby #hanami #dry_rb #oss #webdev #mysql

Hanami 2.2.0.beta2

Rounding out the database layer: MySQL, powerful multi-database support, plus full contracts in actions

Hanami

Read about ProtoInteractor, a simple business object I created to use with Hanami. It combines:

* The parameter parsing functionality of Hanami Actions.
* Do notation from Dry-Monads.
* Result objects, also from Dry-Monads.

Feedback and corrections (especially) are welcome! Please let me know what you think!

https://rossney.net/articles/protointeractor-a-simple-business-object-for-hanami/

#ruby #hanami #dry_rb #dryrb

ProtoInteractor: A Simple Business Object for Hanami

ProtoInteractor: A Simple Business Object for Hanami: This isn't an article about fantastic feats of programming prowess, but more of a cobbler's tale . . .

@swilgosz #hanami #dry_rb #hanamimastery

I would definitely be interested an an episode on this. 👍

My November'23 OS Update: Exploring database transaction management in dry-operation and incorporating global error handling to enhance flow classes. Check it out!

https://waiting-for-dev.github.io/blog/2023/12/01/open_source_status_november_2023

#ruby #dry_rb #hanami

Open Source Status: November 2023 - dry-operation failure hooks & database transactions

This month, there’s a lot in the making! My two main priorities remain dry-operation and web_pipe, and I’ve put a great deal of thought into both of them. I’m excited to share the progress I’ve made, so let’s get started!

Waiting for dev…

Here’s my open source status update for September, in which I make a range of small fixes, bend better_errors to our will via a clever li’l patch, kickstart a new dry-rb gem with @waiting_for_dev, and then release Hanami 2.1.0.beta2!

Things are moving, plenty going on. Catch yourself up: https://timriley.info/writing/2023/10/20/open-source-status-update-september-2023/

#ruby #hanami #dry_rb #opensource

Open source status update, September 2023 | Tim Riley / timriley.info

Seven years ago, Icelab’s web stack. We’re getting closer and closer to the day where we can replace most of this with just “Hanami 2”. 💪🏼

#ruby #hanami #dry_rb

TIL Types::Hash.map is still not fully supported by dry-schema/dry-validations. :(
https://github.com/dry-rb/dry-types/commit/04c66608f9d2e4b9e6aacb14e492ea9c13caea4a
#dry_rb #dry_types
Confess map types are not supported (ref dry-rb/dry-schema#467) · dry-rb/dry-types@04c6660

Flexible type system for Ruby with coercions and constraints - Confess map types are not supported (ref dry-rb/dry-schema#467) · dry-rb/dry-types@04c6660

GitHub
Solved: use `Types::Symbol.enum(symbol: 'string', ...)` if you want to convert Strings into Symbols.
#dry_rb #dry_types

How would you use dry-types/dry-schema to map a finite set of possible Strings to
a finite set of Symbols? `Types::String.enum('string' => :symbol)` only seems to map Strings and Symbols to Strings. I need the output to be Symbols.

Input: ['syn', 'ack']
Output: [:syn, :ack]

#dry_rb #dry_types #dry_schema