rroblak/seed_dump
59.3
Adequate · 6 November 2026
961
lines of production code
Ruby
primary language
4
measurements over time
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 cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 60 → 59 (-0.4)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 76 → 76 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 52 → 52 (+0.0)
- Readiness 59 → 59 (+0.0)
- Security 83 → 75 (-8.3)
Resolved (1)
- Off-boarding risk: anonymized user #1
New (1)
- Off-boarding risk: anonymized user #1
Written by cca.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 6 November 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.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.2+preprod-5c4e66d9318b.