-
Notifications
You must be signed in to change notification settings - Fork 124
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
support Valkyrie work creation with Hyrax transactions #4359
Conversation
2b65be6
to
33ec06a
Compare
d4e9b75
to
e69699e
Compare
bump `Hyrax::Transactions` into the engine for use with Valkyrie resources. provide a `#transactions` method for controllers via `Hyrax::Controller`, to support easy reference to transactions (by name).
e69699e
to
b912535
Compare
add Valkyrie work creation handling for `WorksControllerBehavior`. this uses `Hyrax::Transactions` to process the work.
stub `registered_curation_concern_types` to simplify setup for registered concerns on test controllers. this is lighter weight and less error prone than actually registering the concern, with the tradeoff of being more tightly coupled to the configuration implementation details.
21b8479
to
15d2bca
Compare
the test routes need to be targeted on the `main_app` helper, since we want to register them on the host app. the stubs here are maybe not the ideal solution, but they seem to do the trick.
2813624
to
58b06d2
Compare
# A mixin for Hyrax support methods. This is meant to be included in | ||
# `ApplicationController`. | ||
# | ||
# @note private methods within this module are normally still "public API", |
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.
Excellent comment to clarify!
after(:context) do | ||
config = Hyrax.config | ||
types = config.registered_curation_concern_types - ["Hyrax::Test::SimpleWork"] | ||
before do |
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.
Is this working now? I'd imagine extracting a general support module might be helpful.
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.
i think it's working! nothing else is yet using similar behavior, but i'm 👍 on extracting before we end up duplicating this elsewhere.
add Valkyrie work creation handling for
WorksControllerBehavior
. this usesHyrax::Transactions
to process the work.to accomplish this, we first bump
Hyrax::Transactions
into the engine for use with Valkyrie resources.@samvera/hyrax-code-reviewers