- Implement method that dumps specified model data in fixture (YAML) format
- Implement import method that transfer fixture into database
- Add test helpers to make it easy to implement database related tests
- Add config options to be able to ignore specific columns
- Accept preprocessors to make filtering behavior pluggable and customizable
- Add Readme
- Fix mis-handling of namespaced class names (separated by
::
)
- Accept wider types of reference labels, allowing spaces in-between (tentative)
- Cope with relations that has different name with the actual class name
(e.g. associations defined using
:class_name
and:foreign_key
options)
- Update documents not to eagerload DumpedRailers to prevent accidental data breakage / leakage. To activate, it is preferable to require explicitly where necessary.
- Supported in-memopry fixtures. Now users can dump into and import from in-memory fixture object without saving files.
- Provide options to limit models to import, so that users can prohibit modification to arbitrary models.
- Support for Ruby 3.0.0 (requires Rails >= 6.0)
- Accept both global configuration as well as runtime (one-off) settings for all the available options. Now all the configured settings will be overridden at runtime when the settings are provided with arguments.
- Support
before_save
/after_save
callbacks with import! method. The callbacks are invoked just before (or after) each table's records are saved.
- Accept multiple (array) callbacks for
before_save
/after_save
arguments with DumpedRailers.import!.
- BREAKING preprocessor interface has changed so as that its API have consistency with that of callbacks.
- Preprocessors now require arguments (
model
,attributes
) in this order. Before version < 0.4, it was (attributes
,model
) - Attributes needs to be updated destructively within preprocessors. Return values are no longer required reflect the changes.
- Preprocessors now require arguments (
- Run all the
before
callbacks before any of the record import starts,after
callbacks after all the import.
- require std gems (e.g. ostruct, forwardable). Users of dumped_railers are no longer need to require them.
- Added CI support against Ruby 3.3, 3.2, together with Rails 7.x, while dropping Ruby < 3.2, Rails < 6.1
- Add new options to explicitly allow specific classes for YAML import.
- Accept Date, Time, DateTIme together with the classes that are set as ActiveRecord.yaml_column_permitted_classes be default.