Skip to content

Add documentation for 9 popular Ruby/Rails libraries#172

Open
fishinakleinbottle wants to merge 3 commits intoandrewyng:mainfrom
fishinakleinbottle:add-ruby-docs
Open

Add documentation for 9 popular Ruby/Rails libraries#172
fishinakleinbottle wants to merge 3 commits intoandrewyng:mainfrom
fishinakleinbottle:add-ruby-docs

Conversation

@fishinakleinbottle
Copy link
Copy Markdown

@fishinakleinbottle fishinakleinbottle commented Mar 20, 2026

What

Adds LLM-optimized documentation for 9 popular Ruby libraries.

Rails framework:

  • ActiveRecord — ORM, querying, associations, validations, migrations (+ 3 reference files: associations, queries, migrations)
  • ActionController — routing, strong params, filters, rendering, JSON APIs
  • ActiveJob — background jobs, queue backends, retries, serialization

Authentication & background processing:

  • Devise — modules, routes, controller helpers, views, API auth
  • Sidekiq — native workers, ActiveJob adapter, queues, middleware, batches

Testing:

  • RSpec — matchers, let/subject, shared examples, Rails integration (+ 2 reference files: matchers, mocks)
  • FactoryBot — factories, traits, build strategies, transient attributes

HTTP clients:

  • Faraday — connection objects, composable middleware, retry, error handling
  • HTTParty — class-based API clients, response handling, streaming

Structure

  • 9 DOC.md entry points (all under 500 lines)
  • 5 reference files for progressive disclosure
  • Single-language directory pattern (author/docs/entry/DOC.md) per the content guide
  • Each doc includes a Golden Rule section matching the convention in existing docs

Versions

All versions verified against RubyGems as of March 2026:

Library Version Notes
ActiveRecord / ActionController / ActiveJob 8.0.2 Latest 8.0.x; 8.1.x exists but 8.0 is more widely deployed
Devise 4.9.4 Latest 4.x; 5.0 released Jan 2026, still early adoption
Sidekiq 7.3.10 Latest 7.x; 8.x requires Ruby 3.2+ / Redis 7+
RSpec 3.13.2 Latest
FactoryBot 6.5.6 Latest
Faraday 2.14.1 Latest
HTTParty 0.24.2 Latest

Why

Ruby (through the Ruby-on-Rails framework) is one of the most-used server-side languages with no existing coverage in Context Hub. These 9 libraries cover the most common Rails development patterns: data modeling, request handling, background jobs, authentication, testing, and HTTP clients.

Testing

  • node cli/bin/chub build content/ --validate-only — 1553 docs, 5 skills, 0 warnings
  • cd cli && npm test — 173 passed, 1 pre-existing flaky timeout (annotate --list)
  • All DOC.md files under 500 lines
  • Frontmatter YAML valid on all 14 files
  • Manual: installed get-api-docs skill in a Rails project, verified chub search finds Ruby docs and chub get returns correct content

How to verify locally

# Build and point chub at local content
node cli/bin/chub build content/ -o /tmp/chub-ruby-verify
mkdir -p ~/.chub
echo 'sources:\n  - name: local\n    path: /tmp/chub-ruby-verify' > ~/.chub/config.yaml

# Verify docs are findable and fetchable
chub search activerecord --lang rb
chub get rails/activerecord --lang rb
chub get rails/activerecord --lang rb --file references/associations.md
chub get sidekiq/package --lang rb
chub get rspec/package --lang rb --full

# Clean up
rm ~/.chub/config.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant