Releases: samvera/noid-rails
v3.2.0
v3.0.3
3.0.3 (2021-05-13)
Merged pull requests:
v3.0.1
Change Log
- Bug Fix: Allow override of identifier_in_use lambda (#86)
Optional Configuration of identifier_in_use
This fix allows you to set a new lambda for identifier_in_use which checks to see if the newly minted id is already in use. By default, this method always indicates that the new id is not in use by always returning false.
Example Optional Configuration:
::Noid::Rails.config.identifier_in_use = lambda do |id|
ActiveFedora::Base.exists?(id) || ActiveFedora::Base.gone?(id)
end
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
2.0.0.beta4
The default minter in ActiveFedora::Noid 2.x is a new database-backed minter (vs. a filesystem-backed minter) to better support multi-host production installations (where a shared database is commonplace).
If you want to keep using the filesystem-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::File
end
If on the other hand you want to start using the new database-backed minter, there is a rake task that will copy your minter's state from the filesystem to the database:
$ rake active_fedora:noid:migrate:file_to_database
And there's an accompanying rake task for copying state from the database back to the file if you decide to move back later.
If you 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
1.0.2
The 1.0.2 version of AF::Noid includes:
- Bugfix: Append to minter state files in binary mode to avoid encoding-related issues in different environments.
Thanks to the contributors for this release: @mjgiarlo, @awead, and @jcoyne.
Upgrade notes
Point your Gemfile at active_fedora-noid 1.0.2 and run bundle update active_fedora-noid
.
Then, if you are using a stateful minter, run the following rake task to migrate your statefile to the new format. (If you're using a custom statefile, not /tmp/minter-state, set an environment variable called AFNOID_STATEFILE
with its path to make the task aware of your statefile.)
rake active_fedora:noid:migrate_statefile
Changes
1.0.1
NOTE: There is no 1.0.0 version. (It was released briefly and then yanked.)
The 1.0.1 version of AF::Noid includes:
- Use Marshal to serialize minter state rather than YAML, for performance reasons
- Bugfix: nested nodes (such as those are used in PCDM) should not break the routine that translates URIs to identifiers (#7)
- Bugfix: the URL length should be calculated rather than assumed, allowing for greater template variability
Thanks to the contributors for this release: @jechols, @mjgiarlo, @jcoyne, @terrellt, @escowles, @Cam156, and @cjcolvar.
Upgrade notes
To upgrade from 0.3.0, point your Gemfile at active_fedora-noid 1.0.1 and run bundle update active_fedora-noid
.
Then, if you are using a stateful minter, run the following rake task to migrate your statefile to the new format. (If you're using a custom statefile, not /tmp/minter-state, set an environment variable called AFNOID_STATEFILE
with its path to make the task aware of your statefile.)
rake active_fedora:noid:migrate_statefile