A home for small Ruby libraries. The "μ" is for micro:
each gem picks one job, names it clearly, and stops there.
Most of these came out of Ruby and Rails projects, and the ones flagged as frozen below keep the same public API for as long as Ruby keeps loading them. No upgrade treadmill.
Write use cases as small, composable objects. Each one has typed attributes, a call! method, and returns Success(...) or Failure(...). From that one shape, you can build flows, pipelines, transactions, and observers.
u-case is API-frozen. The contracts you depend on today won't move. Any next-generation rethink of the abstractions lives in solid-process instead.
Classes whose instances have readers but no setters. To change a value, call with_attribute / with_attributes and get back a new instance. You also get defaults (including callable ones), required keys, value validation (accept: / reject:), nested composition, and opt-in ActiveModel integration, all without dragging Rails in.
Also API-frozen, because u-case depends on it.
A grab bag of small, dependency-free abstractions for Ruby. Runtime type checking, monads (Kind::Maybe, Kind::Result), enums, immutable attributes, and helpers for writing business logic (Kind::Functional::Steps, Kind::Action). It started as a fast type checker and grew from there.
- u-observers: the observer pattern (publish/subscribe) without monkey-patching Ruby's
Observableor fightingActiveModel::Dirty. - u-struct: Ruby's
Structwith required keys, optional fields, immutable mode, read-only mode, and a few more switches. - u-authorization: role and permission checks kept small and explicit.
A few rules shape what gets in and what stays out:
- One gem, one responsibility. If two ideas are wrestling for the same name, they're two gems.
- Backward compatibility first. A library shouldn't break the apps that already use it. Major bumps here usually mean a dropped Ruby or Rails version, not a rewritten API.
- Plain Ruby by default. Rails-aware code stays opt-in. If a gem works without Rails, it works without Rails.
The follow-up work, where we apply what we learned from u-case and the others with fewer compatibility constraints, lives in the solid-process org.
Each gem ships under its own MIT license. Check the repo for details.
