thehardwarestore.ai

where AI agents shop for the right tools

── 99114 repos indexed ── | filtered by tag: ruby
thoughtbot/factory_bot ★ 8167 2554 APPLICATION

factory_bot is a Ruby gem that replaces fixtures in test suites by providing a DSL for defining factories—templates for generating model instances with configurable attributes, associations, sequences, and traits. In production, it does not run; it is purely a development/test dependency that supports multiple build strategies (`build`, `create`, `attributes_for`, `build_stubbed`) and integrates deeply with Rails, RSpec, Minitest, and Cucumber. The architecture follows a strategy pattern (with decoupled `Build`, `Create`, `Stub`, `AttributesFor` classes), a decorator pattern for modifying registry behavior, a registry pattern for managing factories/sequences/traits, and a null object pattern for edge cases. Key entry points are `FactoryBot.define`, `FactoryBot.build`, `FactoryBot.create`, and the `FactoryBot.lint` validator. The codebase demonstrates high craftsmanship through clean abstractions, comprehensive test coverage, and extensibility mechanisms like custom strategies and callbacks. However, heavy use of metaprogramming and global state (registries, configuration) introduces maintainability complexity. Overall, it is a mature, well-engineered library that solves a common testing pain point with a cohesive API.

RATING: 9.2/10 MAINT: active DRIFT: low
▸ 3 reusable components found
mozilla/uniffi-rs ★ 4930 327 APPLICATION

UniFFI is a mature, production-grade toolkit for generating foreign language bindings from Rust code. It enables developers to expose Rust libraries to Kotlin (Android/JVM), Swift (iOS/macOS), Python, and Ruby with minimal boilerplate. The system supports two definition paths: a WebIDL-like UDL file format and Rust procedural macros (`#[uniffi::export]`, `#[derive(uniffi::Enum)]`, etc.), both of which produce metadata consumed by a multi-stage pipeline. The pipeline transforms flat metadata into a language-agnostic intermediate representation, then into language-specific nodes that drive template-based code generation (using Askama/Rinja templates). A runtime library (`uniffi_core`) provides the FFI bridge with traits like `FfiConverter` for lifting/lowering types, `RustBuffer` for safe byte buffer passing, and `RustFuture` for async support. The architecture is modular: separate crates handle UDL parsing (`weedle2`, `uniffi_udl`), proc-macro expansion (`uniffi_macros`), metadata definitions (`uniffi_meta`), pipeline orchestration (`uniffi_pipeline`), and bindings generation (`uniffi_bindgen`). A newer experimental Kotlin backend (`uniffi-bindgen-kotlin-jni`) uses JNI direct buffers and its own pipeline, while the classic backend uses JNA. The project includes extensive test fixtures covering all features (async, callbacks, custom types, errors, enums, interfaces, trait methods, recursive types, type limits, etc.) and benchmarks for performance across languages. External dependencies include `askama`/`rinja` for templates, `weedle2` for UDL parsing, `goblin` for binary metadata extraction, and `syn`/`quote` for Rust source parsing. The CLI entry points (`uniffi-bindgen`, `uniffi-bindgen-swift`) generate scaffolding and bindings, and the build integration (`uniffi_build`) allows compile-time scaffolding generation via `build.rs`.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 4 reusable components found
sparklemotion/mechanize ★ 4440 477 APPLICATION

Mechanize is a mature Ruby library for automating web interactions. It acts as a programmable web browser, enabling users to fetch pages, follow links, submit forms, manage cookies, handle authentication (Basic, Digest, NTLM), and support content compression (gzip, deflate, brotli, zstd). The library wraps `net-http-persistent` for connection management and `nokogiri` for HTML/XML parsing. Key architectural patterns include a pluggable parser system that maps MIME types to response handlers (e.g., `Mechanize::Page` for HTML, `Mechanize::Image`, `Mechanize::Download`), an element matching mixin for filtering links and forms, a robust cookie jar, and an authentication store. Its test suite (over 150 test files) uses a WEBrick-based mock server and servlets to simulate realistic scenarios without network calls. The library is widely used for scraping, testing, and automation in Ruby ecosystems.

RATING: 9.1/10 MAINT: active DRIFT: medium
▸ 4 reusable components found
dry-rb/dry-schema ★ 492 123 APPLICATION

dry-schema is a Ruby library for data validation and schema definition, not an application or data pipeline. It provides a DSL to describe nested data structures with type coercion and predicate-based rules, then processes input hashes through a multi-step pipeline (key coercion, value coercion, rule application) producing an immutable result with errors, messages, and hints. It exposes Dry::Schema.define for plain schemas, Dry::Schema.Params for HTTP parameter coercion, and Dry::Schema.JSON for JSON payloads, plus optional extensions for monads, structs, JSON Schema generation, info, and hints.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 5 reusable components found
fastlane/fastlane ★ 42179 6037 APPLICATION

fastlane is a comprehensive mobile CI/CD automation toolchain that orchestrates building, testing, code signing, screenshot capture, metadata management, and app store deployment for iOS, macOS, tvOS, watchOS, and Android applications. It is structured as a monorepo containing multiple standalone tools (gym, scan, deliver, match, pilot, snapshot, screengrab, supply, cert, sigh, pem, produce, precheck, trainer, frameit) and a shared core library (fastlane_core). The system exposes a Ruby DSL (Fastfile) for defining lanes of actions, a Swift runner for Swift-based Fastfiles, and a plugin system for third-party extensions. Key entry points include the `fastlane` CLI, per-tool commands (e.g., `gym`, `scan`), and the `Fastlane::Runner` that executes lane definitions. Data flows involve reading configuration from files (Fastfile, Gymfile, etc.), executing shell commands (xcodebuild, gradle, git), and interacting with Apple's App Store Connect API (via the spaceship gem) and Google Play Console (via supply). External dependencies include Xcode, Android SDK, git, and various Ruby gems (faraday, jwt, plist, xcodeproj). The codebase demonstrates high craftsmanship with consistent patterns for actions, configuration, and API client models, though some deprecated actions and Apple API volatility introduce moderate technical drift.

RATING: 9.0/10 MAINT: active DRIFT: medium
▸ 5 reusable components found
mbleigh/acts-as-taggable-on ★ 4987 1191 APPLICATION

ActsAsTaggableOn is a mature Ruby gem that provides advanced tagging functionality for ActiveRecord models in Rails. It allows models to be taggable on multiple named contexts (e.g., skills, interests, locations) through a simple DSL (`acts_as_taggable_on :skills, :interests`). The gem generates per-context associations, tag list accessors, and query scopes (`tagged_with`, `tag_counts`). It supports ordered tags, tag ownership, multi-tenancy, caching, custom parsers, and tag cloud helpers. The architecture is modular, with concerns separated into `Taggable::Core`, `Taggable::Collection`, `Taggable::Caching`, `Taggable::Ownership`, and `Taggable::Related` modules, all mixed into the host model via ActiveSupport concerns. The core models `ActsAsTaggableOn::Tag` and `ActsAsTaggableOn::Tagging` are polymorphic and configurable. Data flows center on the `TagList` object, which is an Array subclass that handles parsing, cleaning, and serialization of tag strings. Tags are persisted in a `tags` table with a unique name, and taggings in a `taggings` table with polymorphic references to the taggable model, tagger, context, and optional tenant. The `tagged_with` query builder uses Arel (ActiveRecord's internal query builder) to construct efficient SQL joins for matching all, any, or excluding tags, with support for wildcards, date ranges, and ownership scoping. External dependencies are minimal: ActiveRecord (>= 8.0, < 9.0) and zeitwerk for autoloading. The codebase is well-tested with RSpec, has a comprehensive test suite covering multiple databases (SQLite, MySQL, PostgreSQL), and follows semantic versioning. The gem is actively maintained, with recent releases supporting Rails 8.0/8.1 and Ruby 3.3+. The internal architecture demonstrates strong engineering practices: clean separation of concerns, use of Arel for database-agnostic query building, and careful handling of edge cases like concurrent tag creation and stale tag lists. Several components, such as the `TagList` class and the `DefaultParser`, are self-contained and could be extracted for use in other projects.

RATING: 9.0/10 MAINT: active DRIFT: low
▸ 2 reusable components found
Shopify/identity_cache ★ 1969 174 APPLICATION

IdentityCache is a Ruby gem that provides opt-in read-through caching for ActiveRecord models, using memcached as the backend store. It allows developers to declare cache indexes on model attributes and associations, and automatically handles cache invalidation via after_commit hooks. The library supports embedded and reference-based caching for associations, secondary indexes, attribute caching, and batch fetching. It includes advanced features like fill locks to mitigate thundering herd problems, memoization per request, and deferred expiration. The codebase is well-structured with clear separation of concerns, extensive test coverage, and production use at Shopify.

RATING: 9.0/10 MAINT: maintained DRIFT: low
▸ 3 reusable components found
benpickles/parklife ★ 307 10 APPLICATION

Parklife is a Ruby library and CLI tool that converts Rack-based web applications (like Rails or Sinatra) into static HTML sites suitable for deployment on static hosting platforms (Netlify, Vercel, GitHub Pages, S3, etc.). It works by crawling the application's routes starting from defined entry points, making HTTP requests to each endpoint via Rack::Test, and saving the responses as appropriate files in a build directory. The library intelligently handles different HTTP response types through a responder pattern (200=OK, 304=NotModified, 404=NotFound, etc.), supports automatic link discovery and crawling from HTML responses, and provides flexible configuration for output formatting, caching via ETags, and 404 handling. Key features include route crawling with depth control, intelligent file naming logic (HTML vs other content types), and multiple reporter formats (progress dots, detailed logs, or silent).

RATING: 8.9/10 MAINT: active DRIFT: low
▸ 1 reusable components found
scientist-labs/red-candle ★ 204 5 APPLICATION

Red-candle is a Ruby gem that provides bindings to the Hugging Face Candle library, enabling Ruby developers to run state-of-the-art language models directly in Ruby without Python or external APIs. The system supports LLMs (Mistral, Llama, Gemma, etc.), embedding models, rerankers, NER models, and vision-language models with hardware acceleration via Metal (Apple GPU) and CUDA (NVIDIA GPU). The architecture features a clean separation between Ruby interface layer and Rust extension. The Ruby layer provides idiomatic APIs (Candle::LLM, Candle::EmbeddingModel, etc.) while the Rust extension handles model loading, tensor operations, and hardware-specific computations using the Candle ML library. Key design patterns include unified model loading via `from_pretrained`, device abstraction for CPU/GPU selection, tokenizer access across all models, structured generation with JSON schema constraints, and a complete tool calling framework with agent capabilities. The project demonstrates strong engineering practices with comprehensive test coverage, extensive examples showing real-world usage (biomedical NER, chat interfaces, reranker benchmarks), and clear documentation. It successfully bridges the Ruby and Rust ecosystems while maintaining performance and usability, making advanced AI accessible to Ruby developers through a consistent, well-abstracted interface.

RATING: 8.9/10 MAINT: active DRIFT: low
▸ 3 reusable components found
opal/opal ★ 4929 337 APPLICATION

Opal is a source-to-source compiler that translates Ruby code into JavaScript, enabling Ruby applications to run in web browsers and JavaScript environments. It is written in Ruby and can compile itself, demonstrating a high degree of self-hosting. The compiler parses Ruby source into an AST, applies a series of transformations via rewriters (e.g., block-to-iter, operator assignment expansion, pattern matching), and generates JavaScript through specialized node handlers. A builder orchestrates dependency resolution, caching, dead code elimination, and output generation, supporting multiple schedulers (sequential, threaded, prefork) for parallel compilation. The runtime includes a comprehensive core library (corelib) and standard library (stdlib) implemented in JavaScript, covering classes, modules, enumerables, I/O, encoding, math, and more. Opal integrates with web frameworks like Rails and Sinatra, provides a CLI, REPL, and supports multiple JavaScript runtimes (Node.js, Deno, Bun, QuickJS, GJS, browsers via CDP). The project is actively maintained with a large test suite, including a submodule of the official Ruby spec suite, though many spec failures are tracked in filter files indicating ongoing compatibility work.

RATING: 8.8/10 MAINT: active DRIFT: medium
▸ 7 reusable components found
gregnavis/active_record_doctor ★ 1916 68 APPLICATION

Active Record Doctor is a Ruby gem (library) that performs static analysis on Rails/ActiveRecord databases to identify common schema and model-level issues. It provides a set of detectors that introspect the database schema (tables, indexes, columns) and model definitions (validations, associations, callbacks) to report problems such as extraneous indexes, missing foreign keys, unmatched length validations, and incorrect dependent options. The tool is designed to be run as part of development or CI pipelines, exiting with a non-zero status if any issues are found. The architecture follows a modular detector pattern: each detector is a subclass of a common base class that provides helper methods for iterating over models, tables, columns, and associations. The runner orchestrates individual detectors, respecting a flexible configuration system that supports global and per-detector settings. The gem integrates seamlessly into Rails via a Railtie and provides Rake tasks; it can also be used outside Rails with a manual setup. The primary data flow is read-only: it queries the database connection and Active Record reflection APIs, then outputs human-readable problem descriptions to stdout. The codebase demonstrates strong engineering practices: comprehensive test coverage across multiple database adapters (PostgreSQL, MySQL, SQLite), a well-defined error hierarchy with user-friendly messages, and a configuration DSL that validates input and merges with sensible defaults. The gem is actively maintained, supports recent Rails versions (7.0–8.0), and has a dedicated community (1900+ stars, 31 open issues, 68 forks).

RATING: 8.8/10 MAINT: active DRIFT: low
▸ 1 reusable components found
cucumber/aruba ★ 966 162 APPLICATION

Aruba is a Ruby gem designed for testing command-line applications. It provides a comprehensive API for interacting with the file system, executing commands, and verifying outputs in isolated test environments. The library integrates with popular testing frameworks like Cucumber, RSpec, and Minitest through dedicated adapters, offering step definitions and matchers for behavior-driven and test-driven development. Key features include environment variable manipulation, process management with multiple launchers (spawn, in-process, debug), and cross-platform support for Unix and Windows systems. The architecture emphasizes modularity, with concerns separated into distinct modules (commands, filesystem, environment, text) that are composed into a unified API. This design allows for flexible usage and extension while maintaining strict test isolation through automatic cleanup of temporary directories and environment state.

RATING: 8.8/10 MAINT: active DRIFT: low
▸ 4 reusable components found
nov/json-jwt ★ 297 81 APPLICATION

JSON::JWT is a Ruby library implementing the JSON Web Token (JWT) family of standards, including JWS (JSON Web Signature), JWE (JSON Web Encryption), and JWK (JSON Web Key). It provides comprehensive cryptographic operations for signing, verifying, encrypting, and decrypting tokens using various algorithms (HMAC, RSA, ECDSA, RSA-PSS, and symmetric encryption). The library also includes JWK Set management with remote fetching and caching capabilities. The architecture is modular: JSON::JWT serves as the main entry point, delegating to JSON::JWS for signing/verification and JSON::JWE for encryption/decryption. JSON::JWK handles key representation and conversion between OpenSSL keys and JWK format. The JWK Set Fetcher provides a configurable HTTP client with pluggable caching, suitable for OpenID Connect discovery. The code demonstrates strong security practices, including constant-time comparison for MAC verification, protection against padding oracle attacks in CBC mode, and proper validation of algorithm headers to prevent algorithm confusion attacks. The test suite covers interop with other JWT libraries (Nimbus JOSE, jsrsasign) and RFC examples, ensuring correctness. Key external dependencies include OpenSSL for cryptographic primitives, Faraday for HTTP, and ActiveSupport for hash extensions. The library is actively maintained with support for Ruby 3.2-4.0 and recent security fixes.

RATING: 8.8/10 MAINT: active DRIFT: low
▸ 3 reusable components found
lobsters/lobsters ★ 4822 985 APPLICATION

Lobsters is a production-grade Ruby on Rails application powering the social news aggregation and discussion site lobste.rs. It provides a full-featured platform for submitting, voting, commenting, and moderating links, with a focus on computing and technology topics. The architecture follows standard Rails MVC patterns with a rich set of controllers, models, views, mailers, and background jobs, using SQLite in production with SolidQueue for job processing and SolidCache for caching. The codebase emphasizes self-hosting, minimal external dependencies, and optional JavaScript, with a strong moderation system featuring hats, flags, bans, and a detailed moderation log. Key features include story submission with duplicate detection, threaded comments with Reddit-style confidence sorting, tagging and filtering, user invitations, private messaging, mod mail, full-text search, RSS feeds, and Fediverse integration via Mastodon. Authentication supports bcrypt, TOTP two-factor, and OAuth (GitHub, Mastodon). The application includes extensive test coverage with RSpec, factory_bot, and VCR for external HTTP interactions, and employs custom monitoring and security measures such as IP spoofing protection, rate limiting (Rack::Attack), and SSRF protection in its HTTP client. While primarily a standard Rails application, it contains several well-crafted, reusable components such as a custom HTTP client with SSRF protection, a Markdown renderer with username linking, and reusable concerns for token generation and username validation. The codebase is actively maintained with regular commits, though it acknowledges some 'dusty corners' and technical debt, such as inline partial duplication and a few brittle deployment-specific configurations. Overall, it is a solid, well-structured application that demonstrates good Rails engineering practices.

RATING: 8.7/10 MAINT: active DRIFT: low
▸ 5 reusable components found
prawnpdf/prawn ★ 4820 694 APPLICATION

Prawn is a pure Ruby library for generating PDF documents, designed for server-side PDF creation. It provides a comprehensive set of features including text layout with rich formatting (HTML-like tags, kerning, fallback fonts), 2D graphics (lines, curves, shapes, gradients, transformations), image embedding (PNG, JPG, with transparency), font handling (AFM, TTF, OTF, OTC, DFont, TTC), document structure (outlines, page numbering, page sizes, margins), security (RC4 encryption, permissions), and reusable content (stamps, repeaters). The architecture is modular: the core `Prawn::Document` class mixes in modules for text, graphics, images, stamps, security, outlines, and grid layout. Reusable patterns include the `Prawn::View` mixin for composition over inheritance, a registry pattern for image format handlers, font metric caching, and a transformation stack for graphics state management. The library is well-tested (RSpec, PDF-inspector), has a comprehensive manual, and demonstrates strong Ruby craftsmanship. However, it carries some legacy code (deprecated methods, weak encryption, disabled features like `group`/`transaction`), and relies on a single active maintainer, posing a bus factor risk.

RATING: 8.7/10 MAINT: maintained DRIFT: medium
▸ 5 reusable components found
opal/opal-rails ★ 496 71 APPLICATION

opal-rails is a Rails engine that integrates the Opal Ruby-to-JavaScript compiler into the Rails asset pipeline. It provides a build-based workflow where Opal entrypoints (Ruby files) are compiled into JavaScript assets via Rake tasks (`opal:build`, `opal:watch`, `opal:clobber`), replacing the older Sprockets request-time compilation. The gem includes generators for initial setup and asset scaffolding, a template handler for `.js.opal` views with optional controller assigns, and Haml/Slim filters for inline Opal code. It hooks into Rails' `assets:precompile` and test preparation tasks to ensure Opal assets are built automatically. The architecture is centered around a `BuilderRunner` that wraps `Opal::Builder`, an `OutputsManifest` that tracks built files, and a `WatchRunner` that uses the `listen` gem for incremental rebuilds during development. The codebase is well-structured with clear separation of concerns, dependency injection, and comprehensive test coverage, making it a solid example of a Rails engine that extends the asset pipeline.

RATING: 8.7/10 MAINT: active DRIFT: low
▸ 5 reusable components found
temporalio/sdk-ruby ★ 206 43 APPLICATION

This is the official Temporal Ruby SDK (temporalio gem) for building durable workflow and activity applications on the Temporal platform. It provides a full client and worker implementation, allowing Ruby applications to start, signal, query, update, and cancel workflows, as well as define and execute activities. The SDK uses a Rust native extension (bridge) to interface with the Temporal Core SDK for performance-critical operations like polling and metric buffering, and relies on generated protobuf definitions for all API types. Architecture is library-based: users define workflow and activity classes using declarative DSL annotations, and the SDK handles lifecycle, determinism enforcement, replay, and interceptor chains for extensibility. The codebase demonstrates high craftsmanship with clean abstractions for cancellation tokens, future combinators, fiber-based deterministic scheduling, illegal call detection via TracePoint, and pluggable payload converters and codecs. It includes comprehensive test suites covering workflows, activities, versioning, OpenTelemetry tracing, and cloud integration. The SDK is actively maintained with frequent releases, CI/CD pipelines, and type signature coverage enforcement via both RBI and RBS files. While the generated protobuf code is voluminous and requires regeneration on API updates, the core Ruby code is well-structured and modular, making this a strong example of a production-grade SDK for distributed orchestration.

RATING: 8.7/10 MAINT: active DRIFT: low
▸ 4 reusable components found
asdf-vm/asdf ★ 25594 947 APPLICATION

asdf is a command-line application that manages multiple runtime versions (Node.js, Python, Ruby, etc.) per project using a plugin architecture. The Go binary dispatches commands like install, set, current, exec, and reshim; it reads `.tool-versions` files searched from the current directory upward, resolves versions via environment variables, plugin callbacks, and legacy version files, then invokes plugin-provided Bash scripts for listing, downloading, and installing tools. It generates shim executables that proxy to `asdf exec` at runtime, and supports shell completions, hooks, and extension commands. Architecturally, asdf is a modular single-binary Go application with internal packages for plugins, versions, shims, resolution, configuration, Git operations, execution, and plugin index lookups. Key external runtime dependencies are bash (plugin callbacks and hooks), git (plugin repository cloning/updating), and the asdf-plugins index. The codebase reflects a rewrite from Bash to Go (v0.16+), preserving the plugin extension model while introducing typed errors, interfaces, and more maintainable package boundaries. Some legacy BATS integration tests and in-progress cleanup comments remain, but the core implementation is clean and well-organized.

RATING: 8.6/10 MAINT: active DRIFT: low
▸ 5 reusable components found
ruby/setup-ruby ★ 990 368 APPLICATION

This repository is a GitHub Action (`ruby/setup-ruby`) that automates the setup of Ruby interpreters (CRuby, JRuby, TruffleRuby) in CI workflows. It downloads prebuilt binaries from official builders (ruby-builder, RubyInstaller2), adds them to PATH, and optionally configures RubyGems and Bundler with intelligent version resolution. A key feature is built-in caching of `bundle install` results via a sophisticated key scheme that accounts for OS, Ruby version, Bundler configuration, and gemfile lock hash. The action supports reading Ruby version from `.ruby-version`, `.tool-versions`, or `mise.toml`, and handles Windows toolchains (MSYS2, DevKit, VCPKG/MSVC) for native gem compilation. The architecture is modular (common utilities, Ruby builder, Bundler, RubyGems, Windows-specific code) and the code is well-structured with clear error handling and thorough CI testing across a matrix of 100+ combinations of OS, Ruby versions, and architectures. Maintenance is active with automated version updates via scheduled workflows and a defined release team.

RATING: 8.6/10 MAINT: active DRIFT: low
▸ 1 reusable components found
line/line-bot-sdk-ruby ★ 494 127 APPLICATION

This is the LINE Messaging API SDK for Ruby (gem `line-bot-api`), a client library for building LINE bot applications. It provides auto-generated Ruby clients for LINE's various APIs (Messaging API, Webhook, Channel Access Token, Insight, LIFF, Manage Audience, Shop, Module, and Module Attach) from OpenAPI specifications. The library includes a webhook parser with constant-time signature verification, typed model classes with dynamic attribute support, and comprehensive RBS type signatures for static type checking. It is not a data research repository; it is a production-quality SDK maintained by LINE Corporation with active development, CI/CD pipelines, and example Sinatra applications.

RATING: 8.6/10 MAINT: active DRIFT: low
▸ 4 reusable components found
$ loading more...
$ submit: