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.
Sprockets is a Rack-based asset packaging library that serves as the core of the Rails asset pipeline. It compiles, concatenates, minifies, fingerprints, and serves JavaScript, CSS, images, fonts, and other static web assets. The architecture is modular: an `Environment` object manages load paths, processors, transformers, compressors, and exporters; a `Manifest` compiles assets to disk with digest filenames; and a `Server` provides a Rack endpoint for development. Assets flow through a pipeline of preprocessors (e.g., ERB, CoffeeScript, Babel), transformers (MIME type conversions), postprocessors, bundle processors (concatenation), and optionally compressors and exporters (gzip, file write). The library supports source maps, caching with dependency tracking, and extensible registration of custom processors, transformers, and compressors. It is a mature, well-architected library with clean abstractions and high reusability, though it carries some legacy components (e.g., YUI compressor, Sass importer) and optional external gem dependencies.
InvoicePrinter is a Ruby library for generating PDF invoices, with additional CLI and HTTP server interfaces. It takes structured invoice data (as Ruby objects or JSON) and generates formatted PDF documents using the Prawn library. The system consists of three main components: the core library for PDF generation, a command-line executable for direct use, and a server executable providing a HTTP API. The architecture shows good separation of concerns with distinct modules for data models, PDF rendering, font handling, and server interface.
Specinfra is a Ruby library that provides a common layer for infrastructure testing tools like serverspec and itamae. It offers a unified interface to check system properties (packages, services, files, network configuration, etc.) across diverse operating systems and execution environments. The architecture features a clean separation of concerns: backend abstractions for different execution methods (local, SSH, Docker, WinRM, etc.), a command factory for OS-specific command generation, and modular helpers for system detection and property management. The library dynamically selects the appropriate implementation based on the target system's OS and version, then executes checks via the chosen backend. Key entry points include the main Specinfra module, the Backend system, and the CommandFactory, which together enable extensible infrastructure verification.
ruby-nmap is a Ruby library that provides programmatic access to the nmap network scanning tool. It consists of two main components: 1) A command-line interface builder (Nmap::Command) that allows Ruby programs to configure and execute nmap scans with full access to nmap's options through a Ruby DSL, and 2) An XML parser (Nmap::XML) that converts nmap's XML output into navigable Ruby objects representing hosts, ports, services, OS detection results, and script output. The library acts as a bridge between Ruby applications and the nmap executable, handling the complexity of command-line argument construction and XML parsing while providing an idiomatic Ruby interface. The project is actively maintained with recent commits, comprehensive test coverage, and support for multiple Ruby versions.
prawn-svg is a Ruby library that renders SVG (Scalable Vector Graphics) documents into PDF format using the Prawn PDF library. It extends Prawn::Document with an svg() method that parses SVG input, applies CSS styles, handles external resources (images, fonts), and converts SVG elements into Prawn drawing commands. The architecture is modular with separate components for SVG parsing, CSS handling, attribute processing, coordinate transformation, and rendering of various SVG elements including shapes, paths, text, gradients, patterns, clipping paths, and masks. It supports most of the SVG 1.1 specification and provides configurable options for positioning, sizing, and resource loading.