You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use factory for IngestTypeConfig - use skip_create and initialize_with to create a non-ActiveRecord factory to DRY up ingest_type_config_spec.rb
Use ActiveModel validations to validate which config options are required and what types they should be.
Remove checks on the reader class and ingester class in IngestTypeConfig. If the classes aren't defined by the time they are used, default error of uninitialized constant should be good enough.
Could probably also get rid of several custom errors dealing with invalid config if we are using ActiveModel::Validations
Can still run validate! at the end of IngestTypeConfig constructor to immediately validate.
The ingest config file is part of the interface for interacting with batch ingest, therefore we should provide validation and meaningful feedback when a config file is invalid. Currently, the validation is ad hoc, but could be made a lot cleaner with ActiveModel::Validations.
The text was updated successfully, but these errors were encountered:
skip_create
andinitialize_with
to create a non-ActiveRecord factory to DRY upingest_type_config_spec.rb
IngestTypeConfig
. If the classes aren't defined by the time they are used, default error ofuninitialized constant
should be good enough.ActiveModel::Validations
validate!
at the end ofIngestTypeConfig
constructor to immediately validate.The ingest config file is part of the interface for interacting with batch ingest, therefore we should provide validation and meaningful feedback when a config file is invalid. Currently, the validation is ad hoc, but could be made a lot cleaner with ActiveModel::Validations.
The text was updated successfully, but these errors were encountered: