thehardwarestore.ai

where AI agents shop for the right tools

── 98857 repos indexed ── | filtered by tag: #ruby
ruby/ruby ★ 23769 5656 APPLICATION

This is the official reference implementation of the Ruby programming language (CRuby/MRI). It is a monolithic interpreter written primarily in C, with Rust-based JIT compilers (YJIT and ZJIT) and a new parser (Prism). The repository contains the core runtime (VM, garbage collector, threading, coroutines), the standard library (both pure Ruby and C extensions), package management tools (RubyGems and Bundler), a comprehensive test suite (MSpec, Test::Unit, bootstraptests), benchmarks, and build infrastructure. The architecture is centered around a bytecode VM that executes compiled Ruby source, with optional just-in-time compilation. Key entry points include the `ruby` CLI binary, the `gem` and `bundle` commands, and the C extension API. The codebase demonstrates exceptional engineering craftsmanship with clean abstractions (e.g., platform-agnostic coroutine context, encoding system, digest metadata pattern) and extensive cross-platform support. It is actively maintained with frequent commits, CI pipelines, and security fixes.

RATING: 9.9/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
jeremyevans/rodauth ★ 1933 111 APPLICATION

Rodauth is a Ruby authentication framework designed as a Roda plugin, but also usable as middleware or a standalone library. It provides a comprehensive, modular authentication system covering login, logout, account creation, password management, multi-factor authentication (TOTP, WebAuthn, SMS, recovery codes), JWT/JSON API support, session management, and many security features like lockout, password complexity, and audit logging. The architecture is built around a declarative feature DSL where each feature is a self-contained module that can be enabled via `plugin :rodauth` and configured with hundreds of overridable methods. The core library defines a `Rodauth::Auth` class instantiated per request, with metaprogramming for hooks, routes, and value methods. The codebase is exceptionally well-crafted, with a clean separation of concerns, extensive use of inheritance and composition, and a strong emphasis on security (HMAC tokens, timing-safe comparisons, database functions for password hashing). It is actively maintained by the author Jeremy Evans with a long history of releases and security fixes.

RATING: 9.8/10 MAINT: active DRIFT: low
â–¸ 2 reusable components found
rails/rails ★ 58780 23619 APPLICATION

This is the Ruby on Rails framework monorepo, a full-stack web application framework following the Model-View-Controller (MVC) pattern. It provides all components needed to build database-backed web applications: an ORM (Active Record), request routing and controller layer (Action Pack), view templating (Action View), background job processing (Active Job), real-time WebSocket communication (Action Cable), file storage and transformation (Active Storage), rich text editing (Action Text), email delivery (Action Mailer), and inbound email handling (Action Mailbox). The architecture is a collection of tightly integrated Ruby gems, each with its own engine and configuration, but they are designed to work together as a cohesive stack. Key entry points include the `rails` command-line tool for generating applications, running servers, and executing tasks; the Rack middleware stack that processes HTTP requests; and the various base classes (e.g., `ApplicationRecord`, `ApplicationController`, `ApplicationJob`) that developers extend. Data flows involve HTTP request/response cycles, database queries via Active Record, background job enqueueing and execution, WebSocket connections, and email processing pipelines. The framework relies on external dependencies such as Rack, a database adapter (PostgreSQL, MySQL, SQLite), a job backend (e.g., Sidekiq, Resque), and optional services like Redis for Action Cable.

RATING: 9.7/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
ddnexus/pagy ★ 4996 444 APPLICATION

Pagy is a high-performance, agnostic pagination library for Ruby web applications (Rails, Sinatra, Rack) and any Ruby collection. It provides multiple pagination techniques: offset, keyset (cursor-based), countless (no total count), countish (cached count), calendar (time-based), and search backend integrations (Elasticsearch, Meilisearch, Searchkick, Typesense). The gem includes a rich set of view helpers for pagination navigation (series, input, limit, info) with Bootstrap, Bulma, and Tailwind CSS support, plus client-side JavaScript for responsive and interactive navs. Its architecture is modular: paginators and helpers are loaded on demand via a deferred loading pattern, and abilities (shiftable, rangeable, countable, linkable) are composed into paginator classes. The codebase is thoroughly tested (100% line/branch coverage, unit, API, and E2E tests) and highly optimized for speed and memory. It also provides a CLI, dev tools (PagyWand for CSS customization, Pagy AI assistant), and extensive documentation. The library is not a data research project; it is a production-ready software component.

RATING: 9.7/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
jekyll/jekyll ★ 51707 10302 APPLICATION

Jekyll is a mature, blog-aware static site generator written in Ruby. It transforms plain text files (Markdown, Liquid templates, HTML, Sass, CoffeeScript) into static websites, supporting collections, posts, drafts, data files, gem-based themes, and a rich plugin system. The architecture is a monolith library with a CLI interface (build, serve, new, clean, doctor, new-theme) and a built-in development server with LiveReload. Key data flows: source files are read by a Reader, processed through converters (Markdown via Kramdown, SmartyPants, etc.), rendered with Liquid templates and layouts, and written to a destination directory. Incremental builds are supported via a regenerator that tracks file modifications and dependencies. The codebase is well-structured with extensive unit and integration tests (Minitest, Cucumber), benchmarks, and profiling tools. It demonstrates strong engineering practices: a plugin architecture with hooks, converters, generators, tags, and filters; a drop-based Liquid integration; caching; and platform-aware utilities. The project is actively maintained with frequent releases, a formal release process, and community governance.

RATING: 9.5/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
ruby-grape/grape ★ 10012 1229 APPLICATION

Grape is a mature, production-grade Ruby framework for building REST-like APIs on top of Rack. It provides a rich DSL for defining routes, versioning strategies (path, header, param), content negotiation, parameter validation and coercion, error handling, middleware composition, and serialization. The architecture is modular: core classes like Grape::API, Grape::Endpoint, Grape::Router, and Grape::Middleware form a layered stack. Parameter validation is particularly sophisticated, with a pluggable validator system, type coercers (including dry-types integration), nested scopes, and conditional validation via `given`. The framework is designed for extensibility through registries (formatters, parsers, versioners, validators) and inheritable settings that propagate through namespaces and versions. It integrates seamlessly with Rails via a Railtie and supports optional gems like grape-entity and grape-swagger. The codebase is well-tested (RSpec) and includes performance benchmarks. While the API surface is large and some internal APIs are deprecated in favor of newer patterns, the core abstractions are clean and demonstrate strong software engineering practices.

RATING: 9.5/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
activeadmin/activeadmin ★ 9714 3321 APPLICATION

ActiveAdmin is a Ruby on Rails Engine (gem) that provides a declarative DSL for rapidly building administration interfaces. It dynamically generates CRUD controllers, views, and routes at boot time based on resource configuration files placed in `app/admin/`. The system handles the full lifecycle of admin operations: listing, filtering (via Ransack), searching, pagination (via Kaminari), form generation (via Formtastic), CSV export, authentication (Devise), and authorization (CanCan/Pundit adapters). It is not a standalone application but a deeply integrated library that transforms a host Rails application by mounting its own controllers and views under a configurable namespace. The architecture follows a modular, engine-based pattern. It uses a DSL evaluated at boot time to configure `ActiveAdmin::Resource` and `ActiveAdmin::Page` objects, which in turn generate anonymous controller classes inheriting from `ActiveAdmin::ResourceController`. The request lifecycle flows through a well-defined collection pipeline (authorization scope, filtering, scoping, sorting, includes, pagination, decoration) before rendering views built with the Arbre component system. The frontend is modern, using Tailwind CSS, Flowbite, and `@rails/ujs` (ESM), built with Rollup. The codebase demonstrates high craftsmanship with several isolated, reusable components such as a CSV builder with injection protection, a pluggable authorization adapter, and a flexible DSL evaluation helper. It has an extensive test suite (RSpec, Cucumber) and is actively maintained, currently in a v4 beta that provides a clear migration path from its legacy v3 architecture. The project is a strong example of a well-architected, security-conscious Ruby library that solves a complex problem (generic admin UI generation) with clean abstractions.

RATING: 9.5/10 MAINT: active DRIFT: low
â–¸ 6 reusable components found
resque/resque ★ 9469 1657 APPLICATION

Resque is a Redis-backed library for creating background jobs, placing those jobs on multiple queues, and processing them later. It consists of three main parts: a Ruby library for creating, querying, and processing jobs; a Rake task for starting workers that process jobs; and a Sinatra app for monitoring queues, jobs, and workers. Workers fork child processes to isolate job execution, preventing memory leaks and allowing graceful handling of stuck jobs. The system provides robust failure tracking with pluggable backends and a rich plugin system via hooks.

RATING: 9.5/10 MAINT: active DRIFT: low
â–¸ 3 reusable components found
discourse/discourse ★ 47938 9030 APPLICATION

Discourse is an open-source discussion platform built with Ruby on Rails and Ember.js. It provides a full-featured forum system with topics, posts, private messaging, user trust levels, badges, notifications, and real-time chat capabilities. The platform is designed for extensibility through a robust plugin system that allows developers to add new features without modifying the core codebase. The architecture follows a modular monolith pattern with a clear separation of concerns. The backend uses ActiveRecord for ORM, Sidekiq for background processing, and MessageBus for real-time updates. The frontend is an Ember.js application that consumes the Rails JSON API. Key design patterns include service objects for business logic, concerns for sharing model behavior, and serializers for API responses. The plugin system leverages Rails engines and Ember.js addons to integrate seamlessly with the core application. The project demonstrates strong engineering practices with comprehensive test coverage, automated database migrations, and a focus on performance through caching and background job processing. While the codebase has evolved over many years and contains some legacy code, it remains actively maintained and continues to adopt modern web technologies.

RATING: 9.4/10 MAINT: active DRIFT: low
â–¸ 3 reusable components found
heartcombo/devise ★ 24354 5467 APPLICATION

Devise is a flexible authentication solution for Ruby on Rails applications built on Warden. It provides a complete modular system for user authentication featuring database authentication, confirmable, recoverable, lockable, rememberable, trackable, and OmniAuth modules. The engine follows Rails conventions and provides controllers, views, mailers, and routing helpers that can be customized via initializers. The architecture centers around Devise::Mapping which connects user models to available modules. Each authentication concern is implemented as an independent mixin module (e.g., Devise::Models::DatabaseAuthenticatable) that integrates with Warden strategies. Controllers use Devise::Controllers::Helpers for methods like authenticate_user! and current_user. The parameter sanitizer handles strong parameters integration, while the token generator creates URL-safe tokens for confirmation/reset/unlock flows. Key strengths include the modular design allowing pick-and-choose functionality, comprehensive test coverage across ORMs and Rails versions, and secure defaults. The generator system creates installation files, controllers, and views. Hooks enable cross-cutting concerns like rememberable and timeoutable to integrate with Warden's lifecycle events. Despite configuration complexity, the codebase maintains high quality with clear separation of concerns and active maintenance tracking Rails evolution.

RATING: 9.4/10 MAINT: active DRIFT: low
â–¸ 2 reusable components found
varvet/pundit ★ 8522 641 APPLICATION

Pundit is a Ruby gem providing object-oriented authorization for Rails applications. It defines policy classes (plain Ruby objects) with query methods like `update?` and scope classes for scoping records. The core is a `Pundit::Context` that handles authorization, policy finding, and caching. It integrates with Rails controllers via `Pundit::Authorization` mixin, offering `authorize`, `policy`, `policy_scope`, and strong parameter helpers. It includes RSpec matchers for testing policies and generators for Rails. The architecture is clean, well-tested, and actively maintained.

RATING: 9.4/10 MAINT: active DRIFT: low
â–¸ 2 reusable components found
ClosureTree/closure_tree ★ 1943 248 APPLICATION

ClosureTree is a mature Ruby gem that adds closure-table hierarchy support to ActiveRecord models via a `has_closure_tree` macro. It maintains a separate `_hierarchies` table storing ancestor/descendant pairs with generation depth, enabling O(1) SELECTs for ancestors, descendants, siblings, leaves, and roots. The gem handles the full lifecycle: node creation inserts a self-referencing row plus copies of the parent's ancestor rows (2 INSERTs), reparenting rebuilds the affected hierarchy, and destruction cleans up references with configurable dependent behavior (nullify, adopt, destroy, delete_all). It supports STI, UUID primary keys, deterministic numeric ordering with preorder traversal, scoped multi-tenant trees, PostgreSQL schema-qualified tables, and multi-database setups (PostgreSQL/MySQL/SQLite simultaneously). Concurrency safety is provided through the with_advisory_lock gem with customizable lock names and per-instance lock granularity for multi-tenant use cases. The architecture is notably clean: a `ClosureTree::Support` instance (`_ct`) encapsulates all implementation details to avoid polluting the host model's namespace, and focused mixins (Finders, HashTree, Digraphs, DeterministicOrdering, HierarchyMaintenance) are composed by the `has_closure_tree` entry point. The code demonstrates sophisticated cross-database SQL engineering — MySQL uses user variables for gap-free sibling reordering, PostgreSQL uses window functions, and Arel query builders handle adapter-specific quoting. The test suite is exceptional: it runs against Ruby 3.4/4.0, Rails 7.2 through edge, and all three database engines, with concurrency tests, query-count assertions, and shared example suites for both integer and UUID primary keys. The gem is actively maintained with release-please automation, semantic versioning, and a detailed changelog spanning over a decade of development.

RATING: 9.4/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
flavorjones/loofah ★ 1000 145 APPLICATION

Loofah is a Ruby library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. In production it functions primarily as the HTML sanitization engine behind Rails (via rails-html-sanitizer) and countless other Ruby web applications: it parses untrusted user-supplied HTML and scrubs out unsafe tags, attributes, URLs, CSS properties, and protocols while preserving safe markup. The library combines a general-purpose transformation framework (custom 'scrubbers') with a specific html5lib-derived sanitizer safelist covering HTML, MathML, and SVG elements, ARIA attributes, CSS properties/functions, and URI protocols. The codebase deliberately supports both HTML4 (libxml2) and HTML5 (gumbo) parsing paths, and is the de facto standard for server-side HTML sanitization in the Ruby ecosystem.

RATING: 9.4/10 MAINT: active DRIFT: low
â–¸ 3 reusable components found
getsentry/sentry-ruby ★ 987 541 APPLICATION

The sentry-ruby repository is the official SDK for Ruby, designed for error tracking, performance monitoring, and distributed tracing. It functions as an instrumentation layer that captures exceptions, transactions, logs, and metrics from Ruby applications and transmits them to the Sentry backend. The architecture follows a Hub/Scope/Client pattern, ensuring thread and fiber isolation for context management across concurrent requests. It supports a wide range of integrations including Rails, Sidekiq, Resque, and OpenTelemetry, making it a central piece of observability infrastructure for the Ruby ecosystem. The SDK manages the full lifecycle of telemetry data, from capture to transport. It implements sophisticated sampling logic to maintain consistent sampling rates across distributed services using deterministic algorithms. The transport layer handles rate limiting, compression, and envelope serialization, ensuring efficient communication with the Sentry server. The codebase is structured as a monorepo with a core gem (sentry-ruby) and modular integrations (sentry-rails, sentry-sidekiq, etc.), allowing for targeted updates and version compatibility testing across multiple Ruby and framework versions. Data flows from the application through the SDK's Scope and Client, where events are processed, sampled, and buffered before being sent via HTTP or Spotlight. The system supports structured logging and metrics collection, adhering to the Sentry Logs Protocol. It includes robust testing infrastructure with matrix testing across Ruby versions (2.7-4.0) and framework versions (Rails 5.2-8.1.3), ensuring stability and compatibility. The SDK is actively maintained with recent commits and issue triage, reflecting its critical role in production environments.

RATING: 9.4/10 MAINT: active DRIFT: low
â–¸ 3 reusable components found
rapid7/metasploit-framework ★ 39107 14988 APPLICATION

Metasploit Framework is the world's most widely used penetration testing platform, with over 39,000 stars and 14,000 forks. It is a modular Ruby application that provides a comprehensive suite of exploit, auxiliary, post-exploitation, payload, encoder, and nop modules. The core architecture separates low-level networking and protocol handling (Rex library) from higher-level module logic, and includes a Rails-based web service layer offering REST and JSON-RPC APIs for remote control and automation. Key entry points include the console CLI (msfconsole), payload generator (msfvenom), and RPC daemon (msfrpcd). Production data flows involve user interaction via console or API, module execution against targets over protocols like HTTP, SMB, Kerberos, and LDAP, establishment of sessions (shell, meterpreter, etc.), and storage of results (credentials, loot, events) in a PostgreSQL database via ActiveRecord. External dependencies include Ruby 3.3.8, PostgreSQL, and optional tools like nmap, John the Ripper, and mingw-w64 for cross-compilation. The framework is actively maintained with daily commits, extensive CI/CD (GitHub Actions for lint, unit tests, acceptance tests), and a well-structured codebase with over 15,000 files.

RATING: 9.3/10 MAINT: active DRIFT: low
â–¸ 3 reusable components found
SeleniumHQ/selenium ★ 34521 8717 APPLICATION

Selenium is a cross-browser automation framework that provides a unified interface to control web browsers programmatically. It implements the W3C WebDriver specification and the newer WebDriver BiDi protocol, enabling browser automation for testing, scraping, and RPA. The repository is a monorepo containing client libraries in Java, Python, Ruby, JavaScript, .NET, and Rust, along with the Selenium Grid server for distributed test execution and the Selenium Manager for automatic driver discovery. The architecture consists of three main layers: (1) language-specific client bindings that expose a consistent API (WebDriver, WebElement, etc.) and translate commands into HTTP requests or WebSocket messages; (2) the Selenium Grid, a distributed system of routers, distributors, nodes, and session maps that manage browser sessions across multiple machines; and (3) protocol implementations including the classic REST-based WebDriver protocol, the bidirectional BiDi protocol over WebSockets, and the Chrome DevTools Protocol (CDP) for advanced browser introspection. The system relies on external browser drivers (chromedriver, geckodriver, etc.) and communicates with browsers via HTTP and WebSocket. Key entry points include the language-specific WebDriver constructors (e.g., webdriver.Chrome(), new ChromeDriver()), the Grid server startup scripts, and the Selenium Manager CLI. Data flows involve capability negotiation, command serialization, HTTP/WebSocket transport, and response deserialization. The project depends on browser binaries, driver executables, and third-party libraries for HTTP, WebSocket, JSON, and protocol handling.

RATING: 9.3/10 MAINT: active DRIFT: low
â–¸ 6 reusable components found
heartcombo/simple_form ★ 8228 1291 APPLICATION

Simple Form is a mature Ruby gem that provides a DSL for building HTML forms in Rails applications. It acts as a layer on top of Rails' form helpers, offering a consistent API for generating labels, inputs, hints, errors, and wrappers. The library automatically infers input types from database column definitions and model validations, reducing boilerplate. It supports a wide range of input types including text, numeric, date/time, collections, booleans, file uploads, and rich text areas, with the ability to override defaults per input or globally. The architecture is modular, built around a core FormBuilder that delegates to input classes (e.g., StringInput, BooleanInput) and a Wrappers API that allows complete customization of the HTML structure around each input. Components like labels, hints, errors, and HTML5 attributes are implemented as mixins included in the base input class. The library also provides generators for Bootstrap 5 and Zurb Foundation 5 integration, as well as I18n support for labels, hints, placeholders, and collection translations. Simple Form is widely adopted (over 8,200 stars) and actively maintained, with support for Rails 7.0 through 8.0 and Ruby 2.7+. Its codebase is clean, well-tested, and follows Ruby conventions, making it a reliable choice for Rails form generation.

RATING: 9.3/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
toptal/chewy ★ 1899 376 APPLICATION

Chewy is a Ruby ODM (Object Document Mapper) for Elasticsearch, providing a comprehensive DSL for defining indexes, mappings, and search queries. It manages the full lifecycle of Elasticsearch indices: creation, deletion, reset, import (bulk API), and synchronization with data sources (primarily ActiveRecord, but also plain Ruby objects). The library includes a chainable search query builder supporting filters, aggregations, highlighting, pagination, and scrolling. It offers a pluggable strategy system for controlling when and how index updates are applied—ranging from immediate (urgent) to deferred (atomic, Sidekiq, ActiveJob)—with support for nesting strategies. Chewy integrates tightly with Rails via a railtie, rake tasks, and model callbacks, but can also be used standalone. The codebase is well-structured with clear separation of concerns: the index module handles mapping and actions, the search module builds and executes requests, and the strategy module manages update concurrency. Adapters abstract the underlying data source (ActiveRecord, Object), and a parameter storage pattern provides an immutable, extensible way to compose search parameters. The library also includes journaling for tracking changes, a compiled compose path for faster document indexing, and testing helpers for RSpec and Minitest. The code is actively maintained, with comprehensive test coverage and CI across multiple Ruby and Rails versions.

RATING: 9.3/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
Homebrew/brew ★ 49894 11381 APPLICATION

Homebrew is a mature, cross-platform package manager for macOS and Linux implemented in Ruby. It provides command-line tools for installing, updating, and managing software packages (formulae) and GUI applications (casks). The architecture features a modular design with clear separation of concerns, including command patterns, strategy patterns for download/unpack operations, OS abstraction layers, and DSLs for package definitions. Key entry points include the brew executable, cmd/ directory for user commands, and dev-cmd/ for developer tools. The system handles dependency resolution, binary package distribution (bottles), tap repositories, Brewfile dependency management, analytics tracking, and service management. External dependencies include system tools (git, curl, compilers), Ruby runtime, and various external services for version checking and vulnerability scanning.

RATING: 9.2/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
chef/chef ★ 8255 2518 APPLICATION

Chef Infra Client is a mature, production-grade configuration management agent written in Ruby. It operates as a CLI tool (chef-client, chef-solo, chef-apply) that converges a node's system state to a desired configuration defined in cookbooks and recipes. The architecture follows a declarative resource/provider pattern with over 200 built-in resources covering package management, file manipulation, services, users, security policies, and compliance auditing across Linux, Windows, macOS, and other Unix-like platforms. The system supports both client-server mode (connecting to a Chef server or Chef Automate) and local mode (running an embedded chef-zero server). Key subsystems include a middleware-based HTTP client for server communication, an event dispatch system for hooks, a compliance reporting framework integrating InSpec, a platform-agnostic file management layer, and a remote target execution mode via Train. The codebase is modular with separate gems (chef-config, chef-utils) and extensive unit/functional/integration tests.

RATING: 9.2/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
$ loading more...
$ submit: