Ruby Gem Development Taste

Ruby Gem Development Taste

Lays down a Ruby gem maintainer's rules for scaffolding, gemspec, dependencies, errors, RSpec tests, CI matrix and releases so the AI writes small, dependable gems.

Ruby Gem taste of a maintainer who ships small, dependable gems with boring releases

  • Scaffold new gems with bundle gem <name> --test=rspec --ci=github --linter=rubocop and keep the generated layout instead of inventing a custom one. Confidence: 0.80
  • Keep the gemspec as the single source of truth for metadata, required Ruby version and runtime dependencies; the Gemfile only adds development tools. Confidence: 0.90
  • Set required_ruby_version explicitly and support only Ruby versions that still receive security fixes. Confidence: 0.85
  • Build spec.files from git ls-files filtered to lib, sig, exe, LICENSE, README and CHANGELOG so tests and fixtures never ship in the package. Confidence: 0.85
  • Add as few runtime dependencies as possible and give each one a pessimistic constraint like ~> 2.3, never an unbounded >=. Confidence: 0.90
  • Do not commit Gemfile.lock for a library; let CI resolve fresh dependencies so breakage shows up early. Confidence: 0.65
  • Namespace everything under one top-level module that matches the gem name, and never monkey-patch core classes from a library. Confidence: 0.95
  • Use Zeitwerk for gems with many files, and plain require_relative for small ones. Confidence: 0.70
  • Expose configuration through a configure block that yields a plain configuration object with documented defaults. Confidence: 0.80
  • Define a base <GemName>::Error < StandardError and raise specific subclasses so callers can rescue the whole family. Confidence: 0.90
  • Add # frozen_string_literal: true to every Ruby file. Confidence: 0.80
  • Write tests in RSpec with --require spec_helper, random order and disable_monkey_patching! turned on. Confidence: 0.80
  • Run CI on a matrix of all supported Rubies plus head, with head allowed to fail. Confidence: 0.85
  • Enforce style with RuboCop (or Standard) in CI, and keep project-wide disables in .rubocop.yml instead of inline comments. Confidence: 0.75
  • Ship RBS signatures in sig/ for the public API, or at least YARD types, so editors and Steep can check callers. Confidence: 0.60
  • Document every public method with YARD and keep a runnable quick-start example at the top of the README. Confidence: 0.80
  • Follow Semantic Versioning strictly and keep VERSION in lib/<gem>/version.rb as the only place the version lives. Confidence: 0.95
  • Maintain a CHANGELOG in Keep a Changelog format and update it in the same pull request as the change. Confidence: 0.85
  • Deprecate before removing: warn through Kernel#warn with category: :deprecated for at least one minor release. Confidence: 0.85
  • Publish from CI with RubyGems trusted publishing on a tagged release instead of running gem push from a laptop. Confidence: 0.85
  • Require MFA for every owner by setting rubygems_mfa_required to "true" in the gemspec metadata. Confidence: 0.95
  • Set source_code_uri, changelog_uri and bug_tracker_uri in the metadata so rubygems.org links back to the repository. Confidence: 0.75
  • Keep optional integrations (Rails, Sidekiq) behind separate requires such as require "<gem>/rails" so they never load by default. Confidence: 0.80
  • Test the packaged gem, not only the repo: build it in CI, install it into a clean bundle and run a smoke script. Confidence: 0.70

Public domain (CC0 1.0) · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 6,373 prompts

More by @OpenSourceBuffGuy

See all
Website Clone Architect prompt image

Website Clone Architect

Reverse-engineers a website section by section, writes component specs, and hands them to parallel builder agents in git worktrees to rebuild it.

agent-skill, orchestrator, parallel-agents, multi-agent, plan-then-execute, web-development, frontend, codebase-analysis, scaffolding, css, html, nextjs, typescript, git, mcp, claude-code, for-developers, for-designers, long-form, advanced, technical-spec, task-decomposition, structured-output, design-systems, ui-ux, tool-use, checklist, report, vibe-coding

Italian Terrace Cafe Candid Portrait prompt image

Italian Terrace Cafe Candid Portrait

Generates a photorealistic candid shot of a woman in a white corset dress laughing at a sunny hotel terrace cafe, written as detailed JSON.

image-prompt, json-prompt, structured-output, photorealistic, portrait, woman, candid, fashion, cottagecore, natural-light, golden-hour, bokeh, summer, travel, cityscape, mountains, medium-shot, vibrant-colors, for-photographers, nano-banana, fashion-shoot, luxury

Night Street Photo With Leashed Cat prompt image

Night Street Photo With Leashed Cat

Generates a flash-lit night street photo of a blonde woman in a retro track jacket walking a hissing tabby cat on a leash.

image-prompt, json-prompt, nano-banana, structured-output, portrait, woman, animals, pet-portrait, night-scene, street-photography, candid, editorial, fashion, dramatic-lighting, photorealistic, vertical-format, medium-shot, graffiti, for-photographers, for-content-creators

1 view

Reviews

Loading reviews…

Discussion

Loading comments…