-
Notifications
You must be signed in to change notification settings - Fork 51
☄️ Valkyrize Hyku EPIC #2129
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
Merged
Merged
☄️ Valkyrize Hyku EPIC #2129
Changes from 250 commits
Commits
Show all changes
594 commits
Select commit
Hold shift + click to select a range
28e31ae
Delete _repository_content.html.erb
963fda8
use hyrax-4-valkyrie-support bulkrax branch
db7e39d
🐛 App was not loading after updating Hyrax
44aa7f7
⚙️ Don't remove backtrace in dev
887fbf2
remove bulkrax_identifier from Hyku
4322d9c
🧹 Make the appropriate link generate
c7ac8d6
🧹 Add Valkyrie test adapter
jeremyf 89d0c59
🧹 Always with the coppers
jeremyf 9be2b81
Merge pull request #2158 from samvera/i903-move-find-by-bulkrax-ident…
jeremyf e05e5c1
Updating Hyrax to latest version
jeremyf fc72267
🧹 Rework logic for #hydra_model
670784d
Merge branch 'i35-valkyrize-hyku' into i35-valkyrize-hyku-link-genera…
4622fa8
📚 Add docs regarding knapsack
jeremyf 57616a8
🧹 Favor not using valkyrie for the spec
jeremyf 2870a51
♻️ Only enable auto-redirect when Valkyrie enabled.
jeremyf 78db82f
🧹 Configure Bulkrax
adb7393
Merge remote-tracking branch 'origin/i35-valkyrize-hyku-link-generati…
9fdd797
Revert "🧹 Remove files declared in Knapsack"
jeremyf c694ce0
Revert "remove bulkrax_identifier from Hyku"
d68d78e
♻️ Bump Hyrax ref
jeremyf 3ac6ca9
♻️ Favor Hyrax::SolrService
jeremyf aa25008
Merge pull request #2160 from samvera/i35-favor-hyrax-solr-service
jeremyf 3e27770
make find_by_bulkrax_identifier.rb more dynamic
9e82fde
Merge branch 'i35-valkyrize-hyku' of https://github.com/samvera/hyku …
ac313c7
Leverage updated IIIF Print
jeremyf f3c1c67
🧹 Appeasing rubocop
jeremyf 78d26c5
find_by_source_identifier files moved to bulkrax
60e097e
Revert "find_by_source_identifier files moved to bulkrax"
e21d98e
update bulkrax and iiif_print versions
63aa39c
Merge branch 'main' into i35-valkyrize-hyku
4123e38
🧹 apply conditional to hyku indexing
bb112d0
💄 rubocop fix
dd61e0c
🧹 Fix set child flag
54f8d1f
Merge pull request #2161 from samvera/i35-valkyrize-hyku-relationships
jeremyf 3459609
add guard for ActiveFedora's member_ids
7b2f3b3
Update Bulkrax and IiifPrint
89df09e
remove HYKU_IIIF_PRINT conditional
6516b00
update hyrax and iiif print
7b32e43
Valkyrize reindex rake tasks
11ed1b0
🐛 Ensure underlying change to permissions
jeremyf 14a33e7
Fix for xray-rails not working
0b13c46
Merge branch 'main' into i35-valkyrize-hyku
jeremyf 093c404
Bumping Hyrax version
jeremyf f99eb6f
Merge pull request #2163 from samvera/remove-iiif-print-env-var
jeremyf 544b64f
💄rubocop fixes
ec12d8b
update hyrax, bulkrax, iiif_print
683e4d4
update hyrax
ecfe4a4
Pin Hyrax to functioning build
jeremyf a4d3125
Delete find_by_source_identifier_spec.rb
d30ae50
Update iiif_print
88d4cce
🧹 Remove `form` key from with_pdf_viewer
5c0ac17
🧹 Fix specs to reflect usage of Double Combo
jeremyf 6084d80
🐛 Use registered instead of restricted
jeremyf fc45945
🧹 Amend spec to highlight double combo nuance
jeremyf 5f70ffb
🧹 Rework lease expiry tests
jeremyf bfa71b7
💄 endless and ever appeasing of the coppers
jeremyf 51bf79b
🧹 Fix broken spec
jeremyf a0d1013
💄 endless and ever appeasing of the cops
jeremyf f0329f3
Adding documentation
jeremyf 8016058
🧹 Adjust AdminSet spec count to reflect query service
jeremyf 38ceb5d
🧹 Address assumptive redirect for /concern/generic_work/
jeremyf 818cdbc
🧹 Fixing redirect assumptions for insitutional visibility
jeremyf 6a065dd
🧹 Favor up to date double_combo
jeremyf 83738e1
Fixing a few specs to reflection Valkyriziation
jeremyf 05ff3be
🧹 Updating Hyrax version
jeremyf ee2e5be
include Bulkrax helpers and update Bulkrax
a7e3ac4
Rework spec to not rely on reload
jeremyf 02d8ef0
🧹 Fixing tests to use generic_resource_factory
jeremyf 683311c
Fixing a spec that needs a #to_a
jeremyf 9167757
♻️ Add Hyku.bulkrax_enabled?
jeremyf 9c3af9e
♻️ Favor re-using the controller and hopefully routes
jeremyf d02aa82
Demonstrate how we're using lazy migrations and model naming
jeremyf ea7a714
♻️ Remove generated files
jeremyf bd301a2
🧹 endless and ever appeasing of the coppers
jeremyf d6fa335
☑️ Tidying up tests
jeremyf 35286c3
☑️ Fixing a few broken tests
jeremyf 2a32321
Move ability declarations out of loop, where loop not needed
jeremyf 6bac079
💄 endless and ever appeasing of the coppers
jeremyf bedc3ad
☑️ Fill out require attributes
jeremyf c4b0c9e
☑️ Working through failing tests
jeremyf 95436af
Fixing broken specs
jeremyf a160896
🐛 Refactor collection ability class
jeremyf 2d2f1d4
Add elsif for FileSet and configure IIIF Print
c337df9
Bumping double_combo version
jeremyf 16ef18a
Favor helper method over instance variable
jeremyf b96c954
☑️ We need to create a method to stub
jeremyf 2fbffd8
☑️ Ever working towards tests
jeremyf 69cd025
💄 endless and ever appeasing of the coppers
jeremyf afaf1a0
🎁 Add some FileSet interface friendliness
jeremyf 59dbce3
☑️ Favor factory over process through actor stack
jeremyf 90abb58
☑️ Adding tests for GenericWorkResrouce
jeremyf a99685d
🎁 Favor inheriting from admin_set
jeremyf b911729
☑️ Removing spec/factories defined Hyrax
jeremyf 173053f
💄 endless and ever appeasing of the coppers
jeremyf 4f372ec
♻️ Fixing some tests to rely on factories instead of actor
jeremyf d90ed63
🚧 Update Hyrax and IIIF Print
67834dd
☑️ Fixing a few tests by re-purposing some factories
jeremyf 91368ee
WIP
jeremyf bf5f51b
Removing unneeded decorator and associated spec
jeremyf 5a8430b
🧹 Ignore vendor/gems directory
jeremyf 7f12d48
☑️ Adding documentation regarding Factories
jeremyf c106563
☑️ Fixing tests and factories for roles_service
jeremyf b53c20f
♻️ Favor site configuration for allow downloads
jeremyf 3d2b85a
☑️ Fixing a broken test
jeremyf c3e9c88
Fixing a few broken specs, still some broken
jeremyf 88edd03
💄 endless and ever appeasing of the coppers
jeremyf cf30c3e
Removing long-ago removable code
jeremyf fc4118a
Modify Collection & Admin Set Valkyrization
9de1b88
Coppers again
081378d
☑️ Favor explicit load of FactoryBot factories
jeremyf d53ac06
☑️ Working on getting more tests passing
jeremyf a6f1316
Merge branch 'i35-valkyrize-hyku' into i94-collections
jeremyf 2bba104
Merge pull request #2164 from samvera/i94-collections
jeremyf c3ab645
Fixing ever more specs that keep breaking underneath me
jeremyf 34bfb28
💄 endless and ever appeasing of the coppers
jeremyf 08eadab
♻️ Verify AdminSetResource factory build
jeremyf d164944
Adding specs to demonstrate factories
jeremyf ff50f74
🧹 Avoid assuming factory-bot is available.
jeremyf 848a270
🧹 We want to create admin set resources
jeremyf c1ab0e7
🧹 Fix broken spec due to not assuming admin group
jeremyf 244898b
☑️ Fixing specs by re-using factories
jeremyf 62bb52c
☑️ Adjust spec to use proper collection factory
jeremyf 44ee888
☑️ Favor factory over instance double
jeremyf 3660d46
☑️ Favor factory over explicit class
jeremyf 275e22b
☑️ Favor factory over stub, and correct form class
jeremyf 39c304f
☑️ Ensuring we start from a clean slate
jeremyf 61ad72e
Fixing specs
jeremyf d9dccb4
☑️ Fixing tests squashing bugs that might show up
jeremyf 6dd7401
Fixing specs to use resource classes
jeremyf 82816af
Bumping version of IIIF Print
jeremyf da05047
🐛 Add .each to find_all call
jeremyf e4167d4
Fixing feature specs by ensuring admin_group
jeremyf 628e5b6
🐛 Fixing a couple of different bugs
jeremyf 5068597
💄 endless and ever appeasing of the coppers
jeremyf f118fbf
WIP
jeremyf 36db042
♻️ Adding further collection ability testing
jeremyf 4937da0
♻️ Put long list of objects into a loop
jeremyf 15ec554
♻️ Adding more valkyrie native collection specs
jeremyf f4ca845
♻️ Re-arranging collection declarations
jeremyf 3dcbcf5
♻️ Working in the spec mines regarding permission
jeremyf 6891776
Adding specs for disable
jeremyf e1726df
♻️ Reworking specs and addressing significant typo
jeremyf cb576e2
🧹 Fix specs concerning collection management
jeremyf b7d2a37
Ever hacking on the specs
jeremyf 0f76a4e
💄 endless and ever appeasing of the coppers
jeremyf 8487114
🧹 Fix tests regarding collection management
jeremyf 4d98b70
🧹 Fixing Hyrax::CollectionType#collections query
jeremyf 5ca533f
🧹 Fixing a few broken specs
jeremyf 39a13d5
🧹 Reworking factory process
jeremyf f9fffdb
💄 endless and ever appeasing of the coppers
jeremyf 348c5a5
♻️ Favor member_ids_ssim over file_set_ids_ssim
jeremyf e7d82ee
☑️ Add role trait to reflect tests
jeremyf b9465cf
🧹 Set various presenter's with correct file_presenter_class
jeremyf 3936726
Bumping the double_combo
jeremyf 5680a18
Bumping version of IIIF Print and Bulkrax
jeremyf 5227adb
💄 endless and ever appeasing of the coppers
jeremyf 7377572
Adding tests to snare failing specs that work locally
jeremyf ca9d5ab
♻️ Working on factory bot creation of permission templates
jeremyf 54d0a42
♻️ Fix spec harness for permissions
jeremyf 917b2ce
📚 Add spec for factories to explain what happens
jeremyf ee48b61
Update double_combo and add bulkrax migrations
1824bc8
Fixing some underlying specs
jeremyf 4968242
♻️ Fix selector issue
jeremyf c66ba49
☑️ Let These Specs Pass!
jeremyf e581054
☑️ Typo
jeremyf e04a9c5
💄 endless and ever appeasing of the coppers
jeremyf 85772d7
Remove redundant declaration
jeremyf 17c2fc7
☑️ Remove flakey tests
jeremyf 4fd3954
☑️ Favor FactoryBot.valkyrie_create
jeremyf 389e953
☑️ Add explicit setting of models before discovery factories
jeremyf 649acac
🧹 Bump to new double_combo
jeremyf f59f070
Remove transient as the underlying problem fixed
jeremyf b5e74b7
♻️ Remove auto-creation of file
jeremyf 3d7de4e
☑️ Favor Hyrax::SolrService.connection to match interface
jeremyf 404f0c3
Bumping to new version of Hyrax double combo
jeremyf c80cff6
Update Hyrax
68f1750
Removing mocked tests that don't prove much
jeremyf 21d8e70
Add embargo and lease to wings
bc596c0
Update riiif config to replace deprecated method
e138418
Adding tenant for request spec
jeremyf d0c7832
Updating factory spec to catch a failure
jeremyf dcbceab
Update Hyrax to move binaries
7c9cb22
start spec to test file set migration
b21c477
🐛 Fix Account switch bug
jeremyf 89c5741
♻️ Remove method as duplicate of Hyrax
jeremyf 7a9b7b8
🎁 Auto-magically migrate file sets and binaries
jeremyf 1778bab
💄 endless and ever appeasing of the coppers
jeremyf 92045f9
♻️ Remove stray puts statement
jeremyf f4e2732
Attempting to squash a flakey set of specs
jeremyf 9072bac
Update #parent_path to account for various case statements
8d56979
💄 endless and ever appeasing of the coppers
jeremyf b0cbbac
I had to bail and copy the factories from Hyrax
jeremyf ff0a912
💄 endless and ever appeasing of the coppers
jeremyf c66865a
♻️ Disable some consistently failing specs
jeremyf a5771f8
Update hyrax version
17dea1b
Merge branch 'i35-valkyrize-hyku' of https://github.com/samvera/hyku …
47cbfbd
Merge branch 'main' into i35-valkyrize-hyku
jeremyf 6a4f1e5
Revert "I had to bail and copy the factories from Hyrax"
jeremyf 659d60c
Update Hyrax
66e9831
Bumping Hyrax version
jeremyf 4ac5e1e
Updating Hyrax to latest build with FS fixes
jeremyf 48133b1
Merge branch 'i35-valkyrize-hyku' of https://github.com/samvera/hyku …
1cd5ca1
Merge branch 'i35-valkyrize-hyku' of https://github.com/samvera/hyku …
da5c523
♻️ Update Hyku to new Double Combo and config file_set_model
jeremyf 3749af5
💄 endless and ever appeasing of the coppers
jeremyf c9c1185
Addressing potential routing errors
jeremyf e7718b2
Remove indexing of collection membership
jeremyf f41ba15
♻️ Adding Hyku::Application.work_types (see docs)
jeremyf 61c863d
♻️ Configure `Bulkrax.*_model_class` methods
jeremyf 05fd2eb
copy Rob's reprocessor script from GBH into Hyku
bkiahstroud d1d11bc
resolve most rubocop warnings
bkiahstroud d0e27dc
update rubocop_todo
bkiahstroud 3fbf2f4
Load HykuKnapsack decorators
06350fc
temp: debug build issues
4375a29
Revert "temp: debug build issues"
29ef204
Update Bulkrax
37b16e0
Update Bulkrax
fc85d08
Merge branch 'i35-valkyrize-hyku' of https://github.com/samvera/hyku …
7ff49ca
Update Bulkrax and Hyrax
0642931
🧹 Update bulkrax gem
d87e4ed
Update Bulkrax
ae46a17
🐛 Fix undefined local variable iiif_print
9614850
🐛 Fix collection membership bug (#2169)
laritakr a327222
update Bulkrax
6940b4c
Show PDF.js viewer when PDF.js FlipFlop is true
29963d3
revert previous commit and update logic of #show_pdf_viewer instead
1512867
Merge pull request #2171 from samvera/i185-edit-pdf-work-bug
a32664d
Update valkyrie gem
5542205
update valkyrie gem
f0f5421
Update bulkrax to fix bug
cfa48b4
Merge branch 'main' into i35-valkyrize-hyku
jeremyf 093251b
🧹 Clean up featured works and collections
75a9d99
Update IiifPrint (#2172)
laritakr 65c9abb
♻️ Favor method_missing over delegation
jeremyf fb6adf7
♻️ Remove config that was there for flakey tests
jeremyf 5e97d78
Update app/forms/hyrax/forms/admin/appearance_decorator.rb
jeremyf 5b61235
Favor published valkyrie gem version
jeremyf d3df1e0
🎁 Valkyrize Reindex jobs (#2173)
laritakr 5a90fcf
update gemfile to add support for sentry
2ec7b41
🗡 Stab in the dark at fixing an intermittent bug
jeremyf a8c49fd
add conditional to support HykuUp Knapsack specs
8cf0e95
add conditional to support HykuUp Knapsack specs
ad48579
Merge branch 'i35-valkyrize-hyku' of https://github.com/samvera/hyku …
f745207
:lipstick: rubocop fix
289ca62
:lipstick: rubocop fix
08779c1
Merge branch 'i35-valkyrize-hyku' of https://github.com/samvera/hyku …
19e5f3a
🧹 Add core to hash in spec
25f22cc
🧹 Add storage/files as a persisted volumn
a19960f
update bulkrax, hyrax, iiif_print
8e390ee
bump to rc3
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,6 @@ | |
|
||
// for catalog search result snippets | ||
.highlight { | ||
background: yellow; | ||
background: #ffff00; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line should be indented 2 spaces, but was indented 4 spaces |
||
font-weight: 700; | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,4 @@ | |
.video-embed-viewer { | ||
aspect-ratio: 16 / 9; | ||
width: 100%; | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
app/controllers/hyrax/generic_work_resources_controller.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource GenericWorkResource` | ||
module Hyrax | ||
# Generated controller for GenericWorkResource | ||
class GenericWorkResourcesController < ApplicationController | ||
# Adds Hyrax behaviors to the controller. | ||
include Hyrax::WorksControllerBehavior | ||
include Hyrax::BreadcrumbsForWorks | ||
self.curation_concern_type = ::GenericWorkResource | ||
|
||
# Use a Valkyrie aware form service to generate Valkyrie::ChangeSet style | ||
# forms. | ||
self.work_form_service = Hyrax::FormFactory.new | ||
end | ||
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource ImageResource` | ||
module Hyrax | ||
# Generated controller for ImageResource | ||
class ImageResourcesController < ApplicationController | ||
# Adds Hyrax behaviors to the controller. | ||
include Hyrax::WorksControllerBehavior | ||
include Hyrax::BreadcrumbsForWorks | ||
self.curation_concern_type = ::ImageResource | ||
|
||
# Use a Valkyrie aware form service to generate Valkyrie::ChangeSet style | ||
# forms. | ||
self.work_form_service = Hyrax::FormFactory.new | ||
end | ||
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# frozen_string_literal: true | ||
|
||
class SavedSearchesController < ApplicationController | ||
include Blacklight::SavedSearches | ||
|
||
helper BlacklightAdvancedSearch::RenderConstraintsOverride | ||
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource GenericWorkResource` | ||
# | ||
# @see https://github.com/samvera/hyrax/wiki/Hyrax-Valkyrie-Usage-Guide#forms | ||
# @see https://github.com/samvera/valkyrie/wiki/ChangeSets-and-Dirty-Tracking | ||
class GenericWorkResourceForm < Hyrax::Forms::ResourceForm(GenericWorkResource) | ||
include Hyrax::FormFields(:basic_metadata) | ||
include Hyrax::FormFields(:generic_work_resource) | ||
|
||
# Define custom form fields using the Valkyrie::ChangeSet interface | ||
# | ||
# property :my_custom_form_field | ||
|
||
# if you want a field in the form, but it doesn't have a directly corresponding | ||
# model attribute, make it virtual | ||
# | ||
# property :user_input_not_destined_for_the_model, virtual: true | ||
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource ImageResource` | ||
# | ||
# @see https://github.com/samvera/hyrax/wiki/Hyrax-Valkyrie-Usage-Guide#forms | ||
# @see https://github.com/samvera/valkyrie/wiki/ChangeSets-and-Dirty-Tracking | ||
class ImageResourceForm < Hyrax::Forms::ResourceForm(ImageResource) | ||
include Hyrax::FormFields(:basic_metadata) | ||
include Hyrax::FormFields(:image_resource) | ||
|
||
# Define custom form fields using the Valkyrie::ChangeSet interface | ||
# | ||
# property :my_custom_form_field | ||
|
||
# if you want a field in the form, but it doesn't have a directly corresponding | ||
# model attribute, make it virtual | ||
# | ||
# property :user_input_not_destined_for_the_model, virtual: true | ||
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource GenericWorkResource` | ||
class GenericWorkResourceIndexer < Hyrax::ValkyrieWorkIndexer | ||
include Hyrax::Indexer(:basic_metadata) | ||
include Hyrax::Indexer(:generic_work_resource) | ||
|
||
# Uncomment this block if you want to add custom indexing behavior: | ||
# def to_solr | ||
# super.tap do |index_document| | ||
# index_document[:my_field_tesim] = resource.my_field.map(&:to_s) | ||
# index_document[:other_field_ssim] = resource.other_field | ||
# end | ||
# end | ||
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource ImageResource` | ||
class ImageResourceIndexer < Hyrax::ValkyrieWorkIndexer | ||
include Hyrax::Indexer(:basic_metadata) | ||
include Hyrax::Indexer(:image_resource) | ||
|
||
# Uncomment this block if you want to add custom indexing behavior: | ||
# def to_solr | ||
# super.tap do |index_document| | ||
# index_document[:my_field_tesim] = resource.my_field.map(&:to_s) | ||
# index_document[:other_field_ssim] = resource.other_field | ||
# end | ||
# end | ||
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FeaturedWork.feature_limit = 6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource GenericWorkResource` | ||
class GenericWorkResource < Hyrax::Work | ||
include Hyrax::Schema(:basic_metadata) | ||
include Hyrax::Schema(:generic_work_resource) | ||
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# frozen_string_literal: true | ||
|
||
# Generated via | ||
# `rails generate hyrax:work_resource ImageResource` | ||
class ImageResource < Hyrax::Work | ||
include Hyrax::Schema(:basic_metadata) | ||
include Hyrax::Schema(:image_resource) | ||
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
app/services/hyrax/custom_queries/find_by_bulkrax_identifier.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# frozen_string_literal: true | ||
module Hyrax | ||
module CustomQueries | ||
## | ||
# @see https://github.com/samvera/valkyrie/wiki/Queries#custom-queries | ||
class FindByBulkraxIdentifier | ||
def self.queries | ||
[:find_by_bulkrax_identifier] | ||
end | ||
|
||
def initialize(query_service:) | ||
@query_service = query_service | ||
end | ||
|
||
attr_reader :query_service | ||
delegate :resource_factory, to: :query_service | ||
delegate :orm_class, to: :resource_factory | ||
|
||
## | ||
# @param identifier String | ||
def find_by_bulkrax_identifier(identifier:) | ||
query_service.run_query(sql_by_bulkrax_identifier, identifier).first | ||
end | ||
|
||
def sql_by_bulkrax_identifier | ||
<<-SQL | ||
SELECT * FROM orm_resources | ||
WHERE metadata -> 'bulkrax_identifier' ->> 0 = ?; | ||
SQL | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Rule declaration should be preceded by an empty line