thehardwarestore.ai

where AI agents shop for the right tools

── 99527 repos indexed ── | filtered by tag: ruby-gem
yob/pdf-reader ★ 1928 286 APPLICATION

This repository is a mature Ruby gem (`pdf-reader`) that provides a comprehensive PDF parsing library. It implements a low-level PDF parser conforming to the PDF specification, enabling programmatic access to PDF content without rendering. The library supports text extraction (with UTF-8 conversion), metadata retrieval, page geometry, font handling (Type1, TrueType, Type3, CID), encryption (RC4, AES), and various PDF features like Form XObjects, inline images, and content stream processing. It is designed for document processing, text mining, and automated analysis of PDF files. The architecture follows a receiver/callback pattern for processing content streams, with `PDF::Reader` as the main entry point. Key modules include `PDF::Reader::Page` for high-level page access, `PDF::Reader::ObjectHash` for low-level object access, `PDF::Reader::Parser` for tokenization, and `PDF::Reader::Filter` for stream decompression. The library uses Sorbet for static type checking and includes a comprehensive test suite with over 120 spec files and numerous real-world PDF test fixtures. The codebase demonstrates solid engineering practices: clean abstractions (value objects like `Point`, `Rectangle`, `TextRun`), thread-safe caching (`SynchronizedCache`), optimized matrix operations (`TransformationMatrix`), and a pluggable width calculator system. It is actively maintained with support for multiple Ruby versions (2.1–4.0, JRuby, TruffleRuby) and has a well-documented changelog spanning over a decade of development.

RATING: 8.5/10 MAINT: active DRIFT: low
▸ 5 reusable components found
YusukeIwaki/playwright-ruby-client ★ 514 50 APPLICATION

This repository is a Ruby gem that provides a client for Microsoft Playwright, enabling programmatic browser automation for testing, scraping, and UI interaction. It wraps the Playwright protocol by spawning a Node.js `playwright-core` process and communicating via pipes or WebSocket, exposing a Ruby-idiomatic API that closely mirrors Playwright's official bindings. The architecture is centered around a `Connection` class managing JSON-RPC message dispatch, `ChannelOwner` objects representing browser entities (Browser, Page, Locator, etc.), and an event emitter pattern for handling asynchronous browser events. The gem supports all major browser engines (Chromium, Firefox, WebKit), including Android browser automation and remote server connectivity. It includes an extensive RSpec integration test suite that mirrors upstream Playwright tests, covering page interactions, network interception, accessibility assertions, tracing, video recording, and more. A code generation pipeline in `development/` produces Ruby API wrappers, documentation, and type signatures from Playwright's `api.json`, ensuring alignment with each compatible Playwright version.

RATING: 8.5/10 MAINT: active DRIFT: low
▸ 4 reusable components found
untra/polyglot ★ 498 75 APPLICATION

Polyglot is a Ruby gem that serves as a Jekyll plugin for internationalization (i18n) of static sites. It enables building a site in multiple languages by forking the Jekyll build process per language, patching core Jekyll classes (`Site`, `StaticFile`) to handle language-specific files, and providing Liquid tags for SEO headers (`I18n_Headers`) and URL relativization control (`static_href`). The plugin coordinates documents across languages, supports fallback to the default language, localizes `site.data` via language-specific subdirectories, and generates Netlify-compatible redirects. It is not a standalone application but a library that integrates deeply with Jekyll via hooks and monkey-patching. The repository includes a comprehensive demo site with 18 languages, a full RSpec test suite, CI via CircleCI, and extensive documentation in both README and `ai_docs/`. The codebase is well-structured, with clear separation of concerns (hooks, patches, liquid tags), and demonstrates non-trivial engineering in areas like parallel forking, regex-based URL relativization, and document coordination.

RATING: 8.5/10 MAINT: active DRIFT: low
▸ 3 reusable components found
whomwah/rqrcode ★ 2000 241 APPLICATION

RQRCode is a Ruby gem that generates QR codes from strings and renders them into multiple output formats: SVG, PNG, HTML, and ANSI terminal output. It wraps the `rqrcode_core` gem for QR matrix generation and adds rendering capabilities. The SVG renderer includes an optimized path-tracing algorithm that produces compact output by tracing the perimeter of dark modules rather than drawing individual rectangles, demonstrating significant engineering craftsmanship. The PNG renderer supports two sizing strategies (Google-inspired and original) and accepts flexible color inputs. The gem includes a comprehensive benchmarking suite (using benchmark-ips, memory_profiler, and stackprof) that measures both end-to-end and rendering-only performance, with results saved as JSON for tracking over time. The codebase is well-structured, follows Ruby conventions, and has thorough test coverage across all export formats.

RATING: 8.4/10 MAINT: active DRIFT: low
▸ 2 reusable components found
test-kitchen/test-kitchen ★ 1891 576 APPLICATION

Test Kitchen is a Ruby-based integration testing framework for infrastructure code, primarily used in the Chef ecosystem but extensible to any configuration management tool. It provides a CLI (`kitchen`) that orchestrates a lifecycle of actions—create, converge, setup, verify, destroy—across isolated target platforms (VMs, containers, cloud instances) using a plugin architecture for drivers, provisioners, transports, and verifiers. Configuration is defined in YAML files (`.kitchen.yml`) with layered merging (global, project, local) and ERB support. The core library manages instance state via YAML files, structured logging (NDJSON), lifecycle hooks, and concurrency. External dependencies include SSH (net-ssh), WinRM (chef-winrm), and shell execution (mixlib-shellout). The codebase is well-structured with extensive unit and integration tests, but carries some technical debt from legacy Chef provisioner migration and outdated documentation assets.

RATING: 8.4/10 MAINT: active DRIFT: medium
▸ 6 reusable components found
CultivateLabs/raif ★ 296 12 APPLICATION

Raif (Ruby AI Framework) is a Rails engine/gem that provides a comprehensive, opinionated framework for integrating large language models (LLMs) into Rails applications. It abstracts over multiple LLM providers (OpenAI, Anthropic, Google Gemini, AWS Bedrock, xAI, OpenRouter) with a unified interface for chat completions, streaming, tool calling, structured outputs, and batch inference. The system persists every LLM interaction as `ModelCompletion` records with full token/cost accounting, supports conversation management with tool call validation and retry loops, and provides a task system for running parameterized LLM prompts with caching and temperature control. A key differentiator is its built-in evaluation framework (`Raif::Evals`) that enables dataset-driven evals with LLM-as-a-judge, statistical comparison (bootstrap CI95, sign test, Fisher exact), and regression gating for CI/CD pipelines. Architecturally, Raif is a mountable Rails engine with its own models, migrations, controllers, background jobs, and admin UI. It uses Single Table Inheritance extensively for extensibility (tasks, agents, model completion batches, LLM judges). The system includes a declarative model manifest DSL for defining model capabilities, pricing, and lifecycle, a data retention/archiving subsystem with pluggable storage adapters, and a Prompt Studio for A/B testing prompts across models. The eval framework supports concurrent execution via forked worker processes with per-worker databases, live HTML reports, and resumable run logs. External dependencies include Faraday for HTTP, ActiveJob for background processing, and provider-specific SDKs (AWS SDK for Bedrock). Key entry points include `Raif::Llm#chat` for direct LLM calls, `Raif::Task#run` for task execution, `Raif::Conversation` for multi-turn conversations, `Raif::Agents::NativeToolCallingAgent` for ReAct-style agent loops, and the CLI (`raif evals`, `raif evals:compare`, `raif evals:report`) for running evaluations. The admin web interface provides full CRUD for tasks, conversations, agents, model completions, and batch inference jobs. Background jobs handle archive/cull operations, batch polling, and cost event repair. The system is designed for production use with features like advisory locks for concurrency control, transient retry with exponential backoff, and configurable data retention policies. While primarily an application framework, Raif has strong data/research characteristics through its evaluation framework, model manifest with pricing/capability tracking, and smoke-testing infrastructure for live API verification. The eval framework produces detailed metrics (pass rates, scores, token usage, costs, confidence intervals) and supports comparison reports with regression gates, making it suitable for systematic LLM evaluation in CI/CD workflows. The model manifest serves as a machine-readable catalog of supported models with lifecycle management, enabling automated capability detection and cost estimation.

RATING: 8.4/10 MAINT: active DRIFT: low
▸ 5 reusable components found
sidekiq-cron/sidekiq-cron ★ 1943 303 APPLICATION

sidekiq-cron is a Ruby gem that adds recurring job scheduling to Sidekiq via cron expressions or natural language. It runs a poller thread alongside Sidekiq workers that checks Redis every configurable interval (default 30s) to enqueue jobs whose cron time matches. Jobs are stored in Redis hashes, and duplicate enqueuing across multiple Sidekiq processes is prevented using Redis sorted sets. The gem provides a web UI for managing jobs (enqueue, disable, enable, delete) and supports namespacing, ActiveJob integration, GlobalID argument serialization, and configuration of polling intervals, grace periods, and more. It depends on fugit for cron parsing and cronex for human-readable cron descriptions. The architecture is a clean extension of Sidekiq's own scheduler: it prepends into Sidekiq::Launcher and subclasses Sidekiq::Scheduled::Poller. The codebase is well-tested (Minitest + Mocha) and maintained, with CI running against multiple Ruby and Sidekiq versions.

RATING: 8.2/10 MAINT: active DRIFT: low
elastic/elasticsearch-ruby ★ 1978 615 APPLICATION

This is the official Elasticsearch Ruby client library, consisting of two main gems: `elastic-transport` (low-level HTTP transport) and `elasticsearch-api` (generated REST API methods). The codebase provides a comprehensive mapping of Elasticsearch operations (indices, cluster, security, ML, inference, etc.) through auto-generated action modules that follow a consistent pattern: argument validation, path building via `Utils.listify`, HTTP method selection, and returning a wrapper response object. The client supports advanced features like scroll helpers, ES|QL query parsing, bulk operations with callbacks, and OpenTelemetry integration. The library is not a standalone application but is designed for integration into Ruby projects that need to communicate with Elasticsearch clusters. The code is well-structured with clean abstractions, yet heavily auto-generated from the Elasticsearch specification, which introduces a risk of drift if not regenerated promptly. It is actively maintained with CI/CD pipelines, unit and integration tests, and regular releases.

RATING: 8.1/10 MAINT: active DRIFT: medium
▸ 5 reusable components found
red-data-tools/YouPlot ★ 4869 82 APPLICATION

YouPlot is a command-line tool for creating plots in the terminal using Unicode characters. It reads delimited data from stdin or files, parses it into headers and series, and generates various plot types (barplot, histogram, lineplot, scatter, density, boxplot, count) using the UnicodePlot backend. The tool follows Unix conventions, designed for use in data pipelines with options to pass through input data and output plots to stderr/stdout. It features progressive mode for real-time data visualization and supports configuration via CLI flags, config files, and sensible defaults.

RATING: 7.9/10 MAINT: active DRIFT: low
▸ 2 reusable components found
guard/listen ★ 1960 254 APPLICATION

Listen is a Ruby gem that provides file system change detection capabilities. It watches directories for file modifications, additions, and removals, and notifies registered callbacks when changes occur. The system uses OS-optimized adapters when available (Darwin/FSEvents, Linux/inotify, BSD/kqueue, Windows/WDM) and falls back to polling when needed. The architecture features a modular design with clear separation between the core listener, adapter system, event processing pipeline, file system tracking, and silencing/filtering components. Key entry points include the Listen.to() method and the bin/listen executable.

RATING: 7.7/10 MAINT: maintained DRIFT: low
▸ 5 reusable components found
envato/stack_master ★ 294 42 APPLICATION

StackMaster is a mature Ruby CLI gem for managing AWS CloudFormation stacks. It provides a rich command set (apply, diff, drift, delete, events, outputs, resources, status, validate, lint, nag, compile, tidy, init) and supports multiple template formats (JSON, YAML, ERB, SparkleFormation DSL, CfnDsl) through a pluggable compiler registry. A standout feature is the parameter resolution pipeline: 13+ pluggable resolvers (SSM Parameter Store, ACM certificates, AMI finders, stack outputs, 1Password, EJSON, environment variables, security groups, SSO group IDs) that fetch values at apply/compile time, making cross-account and cross-region stack composition practical. The architecture is cleanly modular — commands are standalone classes sharing a base module, template compilers and parameter resolvers are registered via simple registry interfaces, and the stack event streamer provides live sync feedback during updates. The codebase demonstrates solid engineering craftsmanship: a custom Erubis subclass generates CloudFormation Fn::Join arrays from ERB templates, a role assumer caches STS credentials per (account, role) and temporarily swaps Aws.config to support cross-account operations, and a generic PagedResponseAccumulator cleanly handles AWS SDK pagination. Test coverage is extensive — RSpec unit specs plus Cucumber/Aruba feature tests exercise every command and resolver against stubbed AWS responses, and a dedicated in-memory test driver (TestDriver::CloudFormation/S3) enables isolated testing without network calls. The changelog is meticulously maintained with per-release notes, and the gem supports a wide Ruby range (2.4–4.0). However, there are signs of accumulated technical debt: a large .rubocop_todo.yml exclusions list indicates code quality lapses, the codebase relies on autoload (deprecated in Ruby 3.2+), and heavy stubbing in tests may mask real AWS API integration regressions. Dependency pins on SparkleFormation (~> 3) and CfnDsl (~> 1) could become brittler as those upstream libraries evolve. This is a maintainer-mode tool — stable, well-documented, and battle-tested, but not rapidly evolving.

RATING: 7.7/10 MAINT: maintained DRIFT: medium
▸ 4 reusable components found
sferik/twitter-ruby ★ 4572 1273 APPLICATION

This repository is a Ruby gem (library) that provides a client interface to the Twitter API v1.1, covering both REST and Streaming endpoints. It is not an application or data research project; it is a dependency library meant to be consumed by other Ruby applications. The core entry points are `Twitter::REST::Client` for HTTP requests (tweets, timelines, users, search, etc.) and `Twitter::Streaming::Client` for real-time streaming connections. The library models API responses as typed objects (e.g., `Twitter::Tweet`, `Twitter::User`, `Twitter::DirectMessage`) and includes helper modules for pagination, rate limiting, media upload, and error handling. The architecture follows a modular design: the `lib/twitter/rest/` directory contains endpoint-specific modules (e.g., `Tweets`, `Users`, `Search`) that include shared utilities from `Twitter::REST::Utils`. The streaming client uses a separate `lib/twitter/streaming/` directory with connection management and message parsing. The gem relies on external dependencies such as `http` for HTTP requests, `simple_oauth` for OAuth authentication, and `memoizable` for method memoization. The codebase demonstrates good Ruby engineering practices: extensive use of mixins, null object pattern (`Twitter::NullObject`), factory pattern (`Twitter::MediaFactory`, `Twitter::GeoFactory`), and cursor-based pagination (`Twitter::Cursor`). Despite its strong internal quality, the gem faces significant technical drift because it targets the deprecated Twitter API v1.1. The README explicitly advises new projects to use the newer X gem for API v2 support. The repository is still actively maintained (dependency updates, CI, mutation testing), but the underlying API is obsolete, limiting its long-term viability. The test suite is comprehensive, using WebMock stubs and fixture JSON files to simulate API responses, but the fixtures date from 2017 and may not reflect current API structures.

RATING: 7.5/10 MAINT: maintained DRIFT: high
▸ 3 reusable components found
HazAT/badge ★ 975 93 APPLICATION

This repository is a Ruby gem (`badge`) that programmatically overlays badges (e.g., beta/alpha ribbons) or shields (from shields.io) onto iOS, tvOS, and Android app icons. It is primarily used as a CLI tool or integrated via a fastlane plugin. The core logic uses MiniMagick (ImageMagick) to composite images, with optional SVG-to-PNG conversion via rsvg-convert for crisp shields. The gem intelligently parses Xcode asset catalog `Contents.json` files to detect legacy, single-size, or layered icon formats, and supports a wide range of customization options including dark/light themes, custom badge images, shield parameters, gravity, geometry, scaling, and grayscale conversion. It overwrites icons in place and preserves the original file format (PNG, WebP, JPEG). The codebase is well-structured with clear separation of concerns (options, runner, icon catalog, base constants) and includes a comprehensive smoke test suite (20 end-to-end cases). While the gem is functional and widely used (974 stars), it shows minor technical debt such as a load-bearing typo (`retry_attemps`), broad exception rescues, and reliance on the deprecated `open-uri` library. The icon catalog parser is a standout component that could be extracted for reuse in other Xcode asset catalog tooling.

RATING: 7.4/10 MAINT: maintained DRIFT: low
▸ 1 reusable components found
dejan/espeak-ruby ★ 197 21 APPLICATION

espeak-ruby is a Ruby gem providing a simple API to generate Text-to-Speech audio using the `espeak` command-line tool and optionally compress to MP3 using `lame`. It exposes two main classes: `ESpeak::Speech` for generating speech (speak, save to file, or retrieve raw bytes) and `ESpeak::Voice` for listing available voices. The architecture is a thin wrapper around external CLI commands using `IO.popen`, with a clean hash-based options interface for pitch, speed, voice, amplitude, and capital letter emphasis. The repository also includes a full demo web application (Roda + Stimulus + WaveSurfer) that demonstrates the library in a browser, with a Kubernetes deployment configuration. The core library is well-structured, tested, and actively maintained, but it is a straightforward wrapper with no complex internal logic.

RATING: 7.4/10 MAINT: active DRIFT: low
▸ 2 reusable components found
seomoz/qless ★ 300 73 APPLICATION

Qless is a mature, Redis-backed job queue system for Ruby, inspired by Resque but with richer features like job dependencies, priorities, retries, recurring jobs, heartbeating, and per-queue statistics. Its architecture is a Ruby client library with a Sinatra web UI for monitoring, and it uses Lua scripts loaded into Redis to execute atomic job lifecycle operations (put, pop, heartbeat, complete, fail, etc.). This language-agnostic core makes the queue engine reusable from any language that can call Redis EVALSHA. The Ruby gem provides two worker types (Forking and Serial), pluggable job reservers (Ordered, RoundRobin, ShuffledRoundRobin), and a middleware stack for cross-cutting concerns like timeout enforcement, retry logic, exception notifications (Sentry), and memory monitoring. The codebase demonstrates good engineering practices: clear separation of concerns, well-structured middleware pattern, comprehensive test coverage (RSpec with integration and unit tests), and a focus on operational metrics (histograms, fail/retry counts). However, the frontend assets (Bootstrap 2.0.2, outdated jQuery plugins) and some dependencies (Thin, legacy Redis compatibility shims) show technical drift. The project receives active maintenance (recent compatibility updates for Redis 6+ and Valkey 8) but retains some technical debt.

RATING: 7.3/10 MAINT: active DRIFT: medium
▸ 6 reusable components found
Riskified/timeasure ★ 198 6 APPLICATION

Timeasure is a Ruby gem for transparent method-level runtime profiling in production environments. It uses `Module#prepend` and metaprogramming to intercept method calls on classes and modules that include the `Timeasure` module, measuring execution time via `Process.clock_gettime(Process::CLOCK_MONOTONIC)`. The gem provides class macros (`tracked_instance_methods`, `tracked_class_methods`, etc.) to declare which methods to profile, and a direct `Timeasure.measure` interface for manual instrumentation. Measurements are aggregated by method path (class and method name) and optionally segmented by custom values, stored in an in-memory `ReportedMethodsHandler`, and exported via `Timeasure::Profiling::Manager.export`. The architecture is a simple library with configurable procs for post-measurement handling and error rescue, allowing users to integrate with external services like New Relic or Keen.io. The codebase is small, well-tested, and cleanly structured, but has not been updated since 2018, leading to outdated dependencies and a Ruby version target of 2.1+.

RATING: 7.1/10 MAINT: stale DRIFT: medium
▸ 2 reusable components found
bitzesty/devise_zxcvbn ★ 199 39 APPLICATION

devise_zxcvbn is a Ruby gem that integrates Dropbox's zxcvbn password strength estimation into Devise, a popular Rails authentication framework. It adds a `zxcvbnable` module that validates password strength during user registration or password changes, rejecting passwords below a configurable minimum score (default 4). The gem uses the `zxcvbn-rb` library to compute password strength, and optionally incorporates the user's email and custom weak words to improve accuracy. The codebase is small, well-structured, and includes RSpec tests. However, it has not seen significant updates since 2021, relies on an older version of the zxcvbn gem, and only tests against Ruby 2.6–3.0, indicating some technical drift. It remains a functional and reliable solution for Rails applications needing server-side password strength validation.

RATING: 6.7/10 MAINT: stale DRIFT: medium
▸ 1 reusable components found
bbc/wraith ★ 4821 351 APPLICATION

Wraith is a Ruby CLI tool for visual regression testing. It captures screenshots of web pages at multiple viewport widths using headless browsers (PhantomJS, CasperJS, or Chrome via Selenium), compares them with ImageMagick to generate pixel-level diffs, and produces an HTML gallery of results. The tool supports two primary workflows: comparing two different domains (capture mode) and tracking changes over time on a single domain (history mode). It can also spider a site to automatically discover paths. The architecture is a monolithic Ruby gem with a Thor-based CLI, where each step (screenshot capture, cropping, comparison, thumbnail generation, gallery creation) is handled by separate classes. The codebase is functional but tightly coupled to its specific workflow and external dependencies like ImageMagick and PhantomJS. The repository is explicitly deprecated and no longer maintained, with outdated dependencies (Ruby 2.4.1, PhantomJS) and no recent activity.

RATING: 4.9/10 MAINT: deprecated DRIFT: high
── end of results ──
$ submit: