Skip to content
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

Merged
merged 4 commits into from
Jun 30, 2020

Conversation

no-reply
Copy link
Contributor

@no-reply no-reply commented Jun 9, 2020

add Valkyrie work creation handling for WorksControllerBehavior. this uses Hyrax::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

@no-reply no-reply force-pushed the tx-create-controller branch 3 times, most recently from d4e9b75 to e69699e Compare June 22, 2020 16:56
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).
tamsin johnson added 2 commits June 29, 2020 11:36
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.
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.
# 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",
Copy link
Contributor

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
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@jeremyf jeremyf merged commit f47e483 into master Jun 30, 2020
@jeremyf jeremyf deleted the tx-create-controller branch June 30, 2020 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants