Skip to content

Commit

Permalink
🧹 Revert previous commit and update Bulkrax
Browse files Browse the repository at this point in the history
This commit will update Bulkrax to 5.4.1 instead of using the override
from the last commit.  We also revert the changes from the last commit.
  • Loading branch information
kirkkwang committed Oct 4, 2023
1 parent 26ae013 commit 07fde57
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ gem 'blacklight_oai_provider', '~> 6.1', '>= 6.1.1'
gem 'blacklight_range_limit', '6.5.0'
gem 'bolognese', '>= 1.9.10'
gem 'bootstrap-datepicker-rails'
gem 'bulkrax', '~> 5.3'
gem 'bulkrax', '~> 5.4'
gem 'byebug', group: %i[development test]
gem 'capybara', group: %i[test]
gem 'capybara-screenshot', '~> 1.0', group: %i[test]
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ GEM
signet (~> 0.8)
typhoeus
builder (3.2.4)
bulkrax (5.4.0)
bulkrax (5.4.1)
bagit (~> 0.4)
coderay
dry-monads (~> 1.4.0)
Expand Down Expand Up @@ -1328,7 +1328,7 @@ DEPENDENCIES
blacklight_range_limit (= 6.5.0)
bolognese (>= 1.9.10)
bootstrap-datepicker-rails
bulkrax (~> 5.3)
bulkrax (~> 5.4)
byebug
capybara
capybara-screenshot (~> 1.0)
Expand Down
15 changes: 0 additions & 15 deletions app/factories/bulkrax/object_factory_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,6 @@ module ObjectFactoryDecorator
def environment(attrs)
Hyrax::Actors::Environment.new(object, Ability.new(@user), attrs, true)
end

# TODO: Verify and remove this once Bulkrax is updated 5.4.1 over greater and this is no longer needed
def search_by_identifier
# ref: https://github.com/samvera-labs/bulkrax/issues/866
# ref:https://github.com/samvera-labs/bulkrax/issues/867
# work_index = ::ActiveFedora.index_field_mapper.solr_name(work_identifier, :facetable)
work_index = work_identifier
query = { work_index =>
source_identifier_value }
# Query can return partial matches (something6 matches both something6 and something68)
# so we need to weed out any that are not the correct full match. But other items might be
# in the multivalued field, so we have to go through them one at a time.
match = klass.where(query).detect { |m| m.send(work_identifier).include?(source_identifier_value) }
return match if match
end
end
end

Expand Down

0 comments on commit 07fde57

Please sign in to comment.