2.0.0
ActiveFedora::Noid 2.x provides a new database-backed minter (vs. the default minter which is filesystem-backed) to better support multi-host production installations.
If you want to start using the database-backed minter, you can configure that, in e.g. config/initializers/active_fedora-noid.rb
:
require 'active_fedora/noid'
ActiveFedora::Noid.configure do |config|
config.minter_class = ActiveFedora::Noid::Minter::Db
end
Using a database-backed minter can cause problems with your test suite, where it is often sensible to wipe out database rows between tests (which destroys the database-backed minter's state, which renders it unusable). To deal with this and still get the benefits of using the database-backed minter in development and production environments, you'll also want to add the following helper to your spec/spec_helper.rb
:
require 'active_fedora/noid/rspec'
If you switch to the new database-backed minter and want to include in that minter the state of your current file-backed minter, AF::Noid 2.x provides a new rake task that will copy your minter's state from the filesystem to the database:
$ rake active_fedora:noid:migrate:file_to_database
(There's also an accompanying rake task for copying state from the database back to the file if you decide to move back later.)
If you were previously using a custom minter and wish to continue using a custom minter, note that the public API for minters has changed. See the README for more: https://github.com/projecthydra-labs/active_fedora-noid#custom-minters