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

Hyrax 3 Upgrade #9

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby-version: ['2.6']
ruby-version: ['2.7']
experimental: [false]
include:
- ruby-version: 2.7
- ruby-version: 3.0
experimental: true

steps:
Expand Down
4 changes: 4 additions & 0 deletions lib/tufts/curation/indexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ class Indexer < Hyrax::WorkIndexer

def generate_solr_document
super.tap do |solr_doc|
# record the indexing app name so we know who indexed this object
identifier = Tufts::Curation::IndexerIdentifier.new
solr_doc['indexing_app_tesim'] = identifier.identify

solr_doc['pub_date_facet_isim'] = date_facet
index_sort_fields solr_doc
create_facets solr_doc
Expand Down
21 changes: 21 additions & 0 deletions lib/tufts/curation/indexing_identifier.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module Tufts
module Curation
class IndexerIdentifier
# Allow for global configuration
class << self
attr_accessor :configured_app_name
end

attr_accessor :app_name

def initialize(app_name = nil)
# Use the provided name, or fall back to the configured name, or the default
@app_name = app_name || self.class.configured_app_name || 'default_app'
end

def identify
@app_name
end
end
end
end
4 changes: 2 additions & 2 deletions tufts-curation.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ Gem::Specification.new do |gem|
Dir.glob('lib/**/*.rb')
gem.require_paths = %w[lib]

gem.required_ruby_version = '>= 2.3.4'
gem.required_ruby_version = '>= 2.3.4', '< 4.0'

gem.add_dependency 'activerecord'
gem.add_dependency 'activesupport'
gem.add_dependency 'active-fedora', '>= 11.5', '<= 12.99'
gem.add_dependency 'hyrax', '>= 2.1.0', '<= 2.9.9'
gem.add_dependency 'hyrax', '>= 2.1.0', '< 4'
gem.add_dependency 'chronic'
gem.add_development_dependency 'yard', '~> 0.9'
gem.add_development_dependency 'bixby', '~> 1.0'
Expand Down
Loading