Skip to content
CAI
Software that uses CAICheck a score

rroblak/seed_dump

61.7

Adequate · 19 September 2026

961

lines of production code

Ruby

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

SeedDump is a Ruby gem that generates seed files from existing ActiveRecord database records. It handles complex data types and dependency ordering to produce idempotent, bulk-importable seed scripts. The tool supports multiple Rails versions and offers flexible configuration for batching, exclusions, and output formats.

Features

Initial release of SeedDump gem for ActiveRecord seed generation

This change introduces the SeedDump library, providing a new capability to generate Ruby seed files from existing ActiveRecord database records. The core logic in \lib/seed\_dump/dump\_methods.rb\ handles record serialization with support for complex types (CarrierWave, ActionText, RGeo, BigDecimal, IPAddr, Ranges) and offers options for batching, exclusion, and bulk import formats (activerecord-import, insert\_all, upsert\_all). The \lib/seed\_dump/environment.rb\ module manages model discovery, automatically deduplicating HABTM and STI models, sorting them by foreign key dependencies to prevent import errors, and applying per-model or global limits. Integration is provided via \lib/seed\_dump/railtie.rb\, which loads the rake tasks for command-line usage.

_lib/seed\dump · high confidence

Behavioural changes

Refactor SeedDump library structure and dependencies

The SeedDump library has been restructured to require the 'ipaddr' standard library and load specific internal modules (enumeration, dump\_methods, environment) via explicit require statements. The main SeedDump class now extends Environment and DumpMethods, and conditionally loads a Railtie if Rails is defined, replacing the previous single-file implementation with a modular architecture.

lib · high confidence

Seed Dump 3.4.2: Rails 8 support, new dump options, and test infrastructure overhaul

This release updates the gem to version 3.4.2, adding explicit support for Rails 8 (alongside Rails 6.1–7.2) via the Appraisals testing matrix. It introduces several new dump capabilities: \insert\_all\ for faster bulk inserts, \upsert\_all\ for idempotent seeding with conflict handling, \group\_sti\_by\_class\ to properly handle Single Table Inheritance subclasses with distinct enums, and \header\ to add command metadata to seed files. The default creation method is now \create!\, and the \MODELS\_EXCLUDE\ option replaces the legacy \ALL\_EXCEPT\. The project has migrated its test suite from Rake tests to RSpec, updated the Rakefile to use \bundler/gem\_tasks\, and cleaned up legacy plugin hooks (\init.rb\, \install.rb\) and documentation files.

(repo-wide) · high confidence

Simplified db:seed:dump task implementation

The \db:seed:dump\ rake task has been refactored to delegate its logic to \SeedDump.dump\_using\_environment\, replacing the previous inline implementation that manually iterated through model files, handled environment variables (such as WITH\_ID, LIMIT, MODELS, and APPEND), and generated seed data. This change removes the complex, self-contained task code in favor of a cleaner, centralized service method, effectively stripping out the previous command-line option parsing and file-writing logic from the rake file itself.

lib/tasks · high confidence

Fixes

Fixes for batch processing, offset handling, and primary key ordering

The seed dumping process now correctly handles tables without primary keys by skipping ordering when none are present, resolves issues with default scopes selecting specific columns in COUNT queries by using unscope, and corrects batch size and offset calculations to ensure accurate data iteration.

_lib/seed\_dump/dump\methods · high confidence

Test coverage

Added RSpec test suite for seed dump functionality; Removed legacy test infrastructure files.

Dependencies

Add Appraisal configurations for Rails 6.1 through 8.0

Added new Appraisal gemfiles and lockfiles to enable testing against Rails 6.1, 7.0, 7.1, 7.2, and 8.0 (alpha). This allows the library to verify compatibility with these specific versions of ActiveRecord and ActiveSupport, including updates to the sqlite3 gem version for Rails 8.0.

gemfiles · high confidence

Initial release of seed\_dump gem

Introduces the seed\_dump gem, a tool for dumping parts of a Rails database into db/seeds.rb. The package specifies runtime dependencies on activerecord and activesupport (version 4 or higher) and includes development dependencies such as rspec, factory\_bot, and byebug for testing and debugging.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 62.

Lenses

  • Code Health 100
  • Architecture 69
  • Maturity 55
  • Readiness 58
  • Security 80

Changes since last survey

  • 300 commits — 252 feature/other, 48 fixes

By area

  • (root) — 165 commits
  • lib/seed_dump — 68 commits
  • (repo) — 25 commits
  • lib/tasks — 12 commits
  • lib/seed_dump.rb — 4 commits
  • spec/dump_methods_spec.rb — 3 commits
  • spec/factories — 3 commits
  • .github/workflows — 2 commits
  • lib/clip.rb — 2 commits
  • spec/seed_dump_spec.rb — 2 commits
  • test/models — 2 commits
  • test/seed_dump_test.rb — 2 commits
  • lib/true.rb — 1 commit
  • lib/version.rb — 1 commit
  • railties/tasks.rake — 1 commit
  • spec/console_methods_spec.rb — 1 commit
  • spec/environment_spec.rb — 1 commit
  • spec/helpers.rb — 1 commit
  • spec/models — 1 commit
  • spec/parameters_spec.rb — 1 commit

Notable commits

  • fix: Actually fix gem homepage.
  • fix: Add group_sti_by_class option to fix STI models with different enums
  • fix: Fix #104: Add UPSERT_ALL option to preserve IDs and foreign keys
  • fix: Fix #105: Handle Time/BigDecimal in nested Hashes and Arrays
  • fix: Fix #111: Use ISO 8601 format for datetime dumps to preserve timezone
  • fix: Fix #112: Handle non-model ActiveRecord::Base descendants
  • fix: Fix #117: CarrierWave uploader columns now dump correctly
  • fix: Fix #120: STI models no longer create duplicate seed entries
  • fix: Fix #121: Model names ending in 's' incorrectly singularized
  • fix: Fix #126: Add HEADER option for comment headers in seed files
  • fix: Fix #127: BATCH_SIZE now outputs separate method calls per batch
  • fix: Fix #128: Exclude created_on/updated_on by default
  • fix: Fix #130: Use const_get for HABTM join models in seed output
  • fix: Fix #142: Add MODEL_LIMITS for per-model limit overrides
  • fix: Fix #147: Add INCLUDE_ALL option to include all columns
  • fix: Fix #150: Use write-only file modes for pipe compatibility
  • fix: Fix #153: Add insert_all output format option
  • fix: Fix #154: Handle ActionText::Content in seed dumps
  • fix: Fix #163 & Refactor tests/codebase (#166)
  • fix: Fix #165: Handle default_scope with select in COUNT queries
  • …and 280 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

rroblak/seed_dump was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 19 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 0cbab4659b70409f7b8f3f13eb536c76966aeaa6 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.