An Injectable Dependency Container implementation for Ruby
A Sinatra wrapper for a fully customizable Dependency injection system
Dinja, Dependency Injection Ninja allows you to decouple abstractions from implementations
A tiny dependency injection container
Simple dependency injection container
Getters & setters for dependency injection
An extension to Sinatra enabling dependency injection
Jeeves is a personal valet for your Ruby code. It is used to manage dependencies between loosely coupled classes via explicit declaraion. It is _not_ a traditional dependency injection framework, although it can easily fill that role.
Minimalistic dependency injection framework keeps all of your object setup code in one place.
Lazy Dependency Injection. Dependencies are allocated only when needed, optimizing performance.
A dependency injection framework based in PicoContainer.
Very simple library to inject dependencies
This is an easy tool to acomplish basic dependency injection in Ruby
LibInject is a developer tool for injecting external dependencies into a Ruby file.
add dependency injection to dry-container
MinDI is minimalist in that it attempts to map concepts of dependency injection into basic ruby constructs, rather than into a layer of specialized constructs.
Periodico is a lightweight pub/sub framework that leverages self-registration and dependency injection to communicate events to subscribers.
Guice inspired dependency injection
Utility for automatic dependency injection with support for aliases
Dependency Injection for Rails
Easily define object dependencies and inject them
ObjectInjection is dependency injection container.
A small library to help you manage services with dependency injection.
Simple dependency injection for ruby objects
Systematic dependency injection: keep your singletons manageable
Yep is a dependency injection framework written in ruby
Dependency injection framework for ruby
ObjectInjection is dependency injection container.
Inoculate is a small, thread-safe dependency injection library configured entirely with Ruby. It provides several life-cycles and provides dependency access through private accessors.
GraphMind attaches to an agent while it is running. Your instrumented app streams execution events to a local viewer, which renders the run as a live graph and can hold execution — before an LLM step, before/after a tool call, or on error — then resume with continue / retry / inject / abort. Local-first (127.0.0.1), zero runtime dependencies, fails open: with no debugger attached everything is a no-op, and a debugger that disconnects mid-hold releases every gate.
Fault injection for chaos engineering: arms a named experiment that makes a dependency fail, stall or lie for a share of calls, so the breakers, retries and budgets around it can be shown to work. Bound to Ruby from the zero-dependency rogue-machines crate. Disarmed by default, and every experiment carries an expiry it cannot outlive.
A small library for simplifying dependency injection.
Koine DI, for your dependency injection. Dependency injection container
ActiveDryDeps does not modify constructor and supports Dependency Injection for modules. Also you can import method from any object in your container. Adding extra dependencies is easy and improve readability your code.
Dependency injection helper method
attr_inject is a simple dependency injection solution for ruby.
Inject method with dependencies
Dependency Injection that allows you to generate pre-configured classes
Guice-ish dependency injection library for Ruby
Standalone Ruby library for completed AI input and output safety. Detects and redacts PII, identifies prompt injection attacks (including multi-turn patterns), scans for leaked secrets, enforces reusable custom restricted-content policies, and provides explicit Rails boundary adapters and sanitized application-defined notifications — runs entirely in-process with one lightweight bundled-gem dependency. Ships with a provider-agnostic llm_provider: hook for LLM-backed semantic evaluation.
Minimal dependency injection container for Ruby
kiosk-server is the host-side surface for Kiosk. The full surface ships: - The controllers — the per-verb endpoints (GET <endpoint>/<query-name>, POST <endpoint>/<action-name>) and the reserved endpoints (/kiosk/schema, /kiosk/pay), a derived OpenAPI description of both, OAuth client registration (RFC 7591) and the token endpoint (private_key_jwt client assertions, DPoP), JWKS, the KYC attestation endpoint, agents.txt / agents.json / kiosk.json discovery, and the account-binding ceremony (RFC 8628 device authorization and token poll, the verify and «Link an assistant» pages). - Kiosk::Server::Executor — dispatches a resolved command to the queries and actions the host registered. - Client registration and authentication, with a pluggable agent-IdP. - The proof-of-work toll that a kiosk-reputation policy sets (soft dependency; zero overhead when no policy is set). - A Rack middleware injecting the Kiosk-Server-Version / Kiosk-API-Version / Kiosk-Min-Client response headers, a pure-Ruby builder for the discovery documents, SQL generators for the canonical schema migrations, and a `kiosk:install` generator that lays down the initializer and the migrations. The Rails engine serves that whole surface from one `kiosk` block in config/routes.rb, which mounts it at Kiosk.configuration.mount_path — drawing the verb/auth/JWKS/KYC/binding routes under the mount and installing the root-relative discovery routes (agents.txt, .well-known) into the host — then one route per query and action the block names. It also auto-injects the headers middleware.
Dependency-free RESP command encoding and stream decoding with injectable sources, selectors, clocks, error mappers, and RESP3 type handlers.
An SPF engine that follows include:/redirect= chains, stops at the first matching mechanism, and counts DNS-querying terms against RFC 7208 §4.6.4's cap of 10 — so it agrees with what real receivers do instead of string-matching a token. It also plans the record a domain should publish: given what is already at the name, merge one include into the existing record rather than adding a second v=spf1 record beside it. And it prices a record: what the whole tree costs a receiver that evaluates all of it, term by term, against the same cap. No Rails, no runtime dependencies, injectable DNS resolver.
Scryer is an all-in-one security auditing and static analysis tool for Ruby on Rails applications — tells you what to fix first, across security, performance, dependencies, and code quality. It scans a Ruby/Rails codebase for security vulnerabilities, performance problems, dependency risk, and code-quality issues, then ranks everything it finds by severity across all of those categories — so a scan ends with one answer to "what's most worth fixing," not four separate reports to reconcile by hand. (Style/lint is RuboCop's job — Scryer doesn't touch that, except one narrow check.) Detects SQL injection, mass assignment, SSRF, path traversal, IDOR, insecure JWT/CORS/session config, hardcoded secrets, XSS, weak crypto, and more; N+1 queries, missing pagination, and other performance heuristics; near-duplicate code; and known-vulnerable gems via a live OSV.dev dependency audit — on by default, every run. Every finding includes a human-reviewable suggested fix — never auto-applied, optionally rewritten against your actual code by any LLM you configure. Reports in JSON, self-contained HTML, CSV, or SARIF (for GitHub Code Scanning). Zero runtime dependencies beyond Ruby's own stdlib.
RubstAPI is a FastAPI-inspired, Rack-compatible framework for building typed Ruby REST APIs. It provides request and response validation, dependency injection, OpenAPI 3.1 schemas, Swagger UI, ReDoc, security helpers, middleware, routing, background tasks, and testing utilities.
A small, dependency-free gem that encrypts and decrypts a single credentials.yml.enc file with AES-256-GCM. Ships an `mcr` command line tool for reading and writing values, plus a Ruby API. Designed for container and server workflows where the encrypted file travels with the image and the master key is injected at runtime via MAQUINA_MASTER_KEY.
A minimal dependency injection framework for Ruby, using vanilla Ruby semantics to define and reference dependencies from different providers.
Automatic Dependency Injection where you get to see and keep control of the constructor
Smartest is a Ruby test runner that brings pytest-style fixture injection to Ruby. Tests declare dependencies with keyword arguments, fixtures can depend on other fixtures, and teardown is handled explicitly when needed. Smartest is designed for readable Ruby tests, Rails system tests, and Playwright-powered browser testing.