Skip to content

Commit

Permalink
🧹 Remove Account and Site overrides
Browse files Browse the repository at this point in the history
This commit will remove the #mobius? shenanigans throughout the codebase
and update the CsvParserDecorator to add the `identifier` header to the
combined CSV.  The submodule is updated as well to bring in the PDF.js
temporary fix.
  • Loading branch information
kirkkwang committed Mar 27, 2024
1 parent fcf05af commit e1ed343
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 61 deletions.
7 changes: 0 additions & 7 deletions app/helpers/hyku_knapsack/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,5 @@

module HykuKnapsack
module ApplicationHelper
def tenant_registered_curation_concern_types
if current_account.mobius?
MOBIUS_CONCERNS
else
Hyrax.config.registered_curation_concern_types - MOBIUS_CONCERNS
end
end
end
end
4 changes: 0 additions & 4 deletions app/models/account_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ module AccountDecorator
truman
webster
].freeze

def mobius?
name.in?(MOBIUS_TENANTS)
end
end

Account.prepend(AccountDecorator)
2 changes: 0 additions & 2 deletions app/models/concerns/bulkrax/has_local_processing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ module HasLocalProcessing
# add any special processing here, for example to reset a metadata property
# to add a custom property from outside of the import data
def add_local
return unless Account.find_by(tenant: Apartment::Tenant.current).mobius?

remove_escape_character_from_values!
remove_duplicates_from_identifier!

Expand Down
20 changes: 0 additions & 20 deletions app/models/site_decorator.rb

This file was deleted.

19 changes: 0 additions & 19 deletions app/views/admin/work_types/edit.html.erb

This file was deleted.

6 changes: 0 additions & 6 deletions config/initializers/bulkrax.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,5 @@
'relation' => { from: %w[sm_relation relation], split: true },
'rights' => { from: %w[sm_rights rights], split: true }
})

config.default_work_type = -> { Site.first&.available_works&.first }

def Bulkrax.default_work_type
Bulkrax.config.default_work_type.call
end
end
end
4 changes: 2 additions & 2 deletions config/initializers/hyrax.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MOBIUS_CONCERNS = ['MobiusWork'].freeze
# frozen_string_literal: true

Hyrax.config do |config|
config.register_curation_concern MOBIUS_CONCERNS.map { |concern| concern.underscore.to_sym }
config.register_curation_concern :mobius_work
end
2 changes: 1 addition & 1 deletion hyrax-webapp
Submodule hyrax-webapp updated 204 files

0 comments on commit e1ed343

Please sign in to comment.