Skip to content
CAI
Software that uses CAICheck a score

smart-rb/smart_injection

53.6

Adequate · 20 September 2026

1.1k

lines of production code

Ruby

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

SmartCore::Injection is a Ruby gem that provides a dependency injection framework for classes and modules. It enables developers to define imports with options for memoization, access control, and binding strategies, while resolving dependencies from a set of containers. The system supports both instance and class method injection, handles inheritance, and ensures thread safety during resolution.

Features

Added standard Ruby gem bin scripts for setup and console

The gem now includes standard executable scripts in the bin directory to streamline local development. The new bin/setup script automates the installation of dependencies via Bundler, while bin/console provides an interactive Ruby environment with Pry pre-loaded for easier debugging and exploration of the smart\_core library.

bin · high confidence

Initial release of SmartCore::Injection dependency injection library

This change introduces the SmartCore::Injection gem (version 0.3.0), providing a dependency injection framework for Ruby classes and modules. Users can now include the DSL to define imports with options for memoization, access control (public, private, protected), and binding strategies, while linking external containers to resolve dependencies. The implementation supports both instance and class method injection, handles inheritance by duplicating injector contexts for child classes, and ensures thread safety during injection operations.

_lib/smart\core/injection · high confidence

Initial release of SmartCore::Injection gem

This change introduces the SmartCore::Injection library, a Ruby gem providing dependency injection capabilities including method-injection strategies, container-based resolution, and static/dynamic bindings. The release includes the core library code, a comprehensive README with usage examples, and standard project scaffolding such as RSpec configuration, RuboCop linting rules, and a Rakefile for testing and code style checks.

(repo-wide) · high confidence

Introduces dependency injection module

Adds a new \SmartCore::Injection\ module that provides a public API for creating dependency injection containers. Users can now call \SmartCore::Injection(\*containers)\ to generate an injector module, which can be included in classes to automatically inject dependencies based on the provided containers. This introduces the core infrastructure for dependency injection within the SmartCore library.

_lib/smart\core · high confidence

New dependency locator components for container-based injection

This change introduces the core implementation files for the dependency locator subsystem within the injection framework. It adds ContainerProxy to manage resolution across multiple registered containers and handle observer notifications when dependencies change, Dependency to handle the actual binding and memoization logic with thread-safe barriers, and Factory to orchestrate the creation of locators based on injection settings. These components collectively enable the system to resolve dependencies from a set of containers, optionally memoize results, and react to container updates.

_lib/smart\core/injection/locator · high confidence

New injection injector components and settings validation

This change introduces the core infrastructure for the new dependency injection system within \lib/smart\_core/injection/injector\. It adds \ContainerSet\ to manage an ordered, thread-safe collection of containers with addition listeners, and \InjectionSettings\ to hold configuration for injectables (including imports, memoization, access levels, and binding strategies). A new \IncompatabilityControl\ module enforces strict validation on these settings, raising errors for invalid types or configurations. Additionally, \Modulizer\ provides utilities to build injectable modules from containers and inject the DSL into base classes, while \Strategies\ sets up the foundation for method injection.

_lib/smart\core/injection/injector · high confidence

Test coverage

Initial test suite for dependency injection and container behavior

Added RSpec tests to verify the core dependency injection functionality, including container definition, dependency rebinding, memoization, static vs dynamic imports, and class inheritance. The test suite also configures SimpleCov to enforce 100% code coverage on line and branch metrics.

spec · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 50 → 54 (+3.2)
  • Rubric changed (rubric-2026.08.17 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (-0.4)
  • Architecture 69 → 69 (+0.0)
  • Maturity 43 → 46 (+3.1)
  • Readiness 36 → 42 (+6.3)
  • Security 100 → 93 (-6.7)

Resolved (5)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — no supported dependency manifest was read
  • No exposed public API
  • Test reliability not included
  • single-maintainer — knowledge-concentration (bus factor) risk

New (12)

  • Critical CVE: [GHSA redacted] (Gemfile.lock)
  • High CVE: [GHSA redacted] (Gemfile.lock)
  • High CVE: [GHSA redacted] (Gemfile.lock)
  • Inconsistent naming convention for iteration. Ruby standard library typically uses 'each' and 'reverse_each'. However, if other collection methods in this API follow a different pattern (e.g., 'iterate' vs 'loop'), this stands out. In this specific snippet, it is consistent with Ruby idioms, but 'list()' is also present. If 'list()' returns an array, 'each' is redundant if the object is Enumerable. If not, it's fine. This is a minor point, but 'list' vs 'each' suggests a potential confusion between getting a snapshot vs iterating.
  • Inconsistent verb usage for similar operations. The DSL module uses 'import' while the Injector module uses 'inject' for what appears to be the same configuration action. Additionally, the '_static' suffix is used in both, but the base verbs differ.
  • Medium CVE: [GHSA redacted] (Gemfile.lock)
  • Outdated: armitage-rubocop
  • Outdated: pry
  • Outdated: rake
  • Outdated: rspec
  • Semantic duplication with inconsistent naming. Both methods appear to retrieve the set of containers associated with the current context (instance vs class). 'associated' and 'linked' are used interchangeably for the same concept.
  • TodoComment (lib/smart_core/injection.rb)

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

smart-rb/smart_injection was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit d0e50322e3d1b90fd5ed906284f70e24388a1e05 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-28e75b8e3254.