-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alignment and configuration #40
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Before a 2.0 release, I think there are some updates due to README.md's example code for MyMinter
, to use Base
.
@@ -124,7 +136,7 @@ For more information about the format of Noid patterns, see pages 8-10 of the [N | |||
|
|||
### Custom minters | |||
|
|||
If you don't want your minter's state to be persisted, you may also pass in your own minter. First write up a minter class that looks like the following: | |||
If you don't want your minter's state to be persisted, you may also write and configure your own minter. First write up a minter class that looks like the following: | |||
|
|||
```ruby | |||
class MyMinter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class MyMinter < ActiveFedora::Noid::Minter::Base
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the example code need to change, too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, good call.
I have a spec refactor and docs branch, with a question about the This is possibly beyond the scope of this PR, but I'd like to resolve it before 2.0. |
bca7a9d
to
57691a0
Compare
@no-reply README updated. |
@mjgiarlo that looks good. Do you still mean to pull in the test refactor & docs, or should I push forward with this and submit a follow-up PR? |
a4cf800
to
d369566
Compare
…::Base`-based minter structure * Add accessor for default minter class to `Config` * Use configured minter class as default in service * Sets the default minter class to `Minter::Db` (rather than `Minter::File` -- **breaking change** from past versions) * Update README with instructions for overriding the minter and using `Minter::File` * Add `#read` and `#write` methods to minter classes * Add new rake tasks that can migrate minter state between persistence options (+ documentation for same) * Add test coverage for new minter `#read`/`#write` methods
d369566
to
6ca6959
Compare
I think it is problematic to have extracted locking to outside the transaction. Locking for update now happens in multiple places, including on every At the very least, some explanation would be appreciated why that is an improvement.
By my interpretation, Lastly, this was a lot of decomposable changes for one commit. 👎 |
SynchronizedMinter
and align its code with the newMinter::Base
-based minter structureConfig
Minter::Db
(rather thanMinter::File
-- breaking change from past versions)Minter::File
#read
and#write
methods to minter classes#read
/#write
methods