Skip to content

Commit

Permalink
made author and subject independent
Browse files Browse the repository at this point in the history
  • Loading branch information
niquerio committed Nov 15, 2023
1 parent 6ea8aae commit a6d9b9d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ node_modules/
public/browse.css
.bash_history
.cache/
.solargraph.yml
3 changes: 2 additions & 1 deletion env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ BIBLIO_SOLR='http://biblio-server/solr'
AUTHOR_SOLR='http://catalog-solr-server/solr'
BROWSE_SOLR='http://catalog-solr-server/solr'
CALLNUMBER_CORE='callnumbers'
AUTHORITY_CORE='authors'
AUTHORITY_CORE='authority_core'
AUTHOR_COLLECTION='author_collection'
SOLR_USER='solr'
SOLR_PASSWORD='SolrRocks'
SOLR_CLOUD_ON='false'
2 changes: 1 addition & 1 deletion lib/models/author_list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def self.for(direction:, reference_id:, num_rows_to_display:, original_reference
num_rows_to_display: num_rows_to_display,
original_reference: original_reference,
banner_reference: banner_reference,
browse_solr_client: BrowseSolrClient.new(solr_url: S.author_solr, core: S.authority_core, match_field: "term", q: "browse_field:name", solr_cloud_on: S.solr_cloud_on?)
browse_solr_client: BrowseSolrClient.new(solr_url: S.author_solr, core: S.author_collection, match_field: "term", q: "browse_field:name", solr_cloud_on: S.solr_cloud_on?)
)

new(browse_list: browse_list)
Expand Down
4 changes: 4 additions & 0 deletions lib/services.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
ENV["AUTHOR_SOLR"] || ENV["BROWSE_SOLR"]
end

S.register(:author_collection) do
ENV["AUTHOR_COLLECTION"] || ENV["AUTHORITY_CORE"]
end

[
"BROWSE_SOLR", "BIBLIO_SOLR", "SOLR_USER", "SOLR_PASSWORD",
"CALLNUMBER_CORE", "AUTHORITY_CORE"
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def app = Sinatra::Application

# set up dependencies
S.register(:author_solr) { S.browse_solr }
S.register(:author_collection) { S.authority_core }
S.register(:solr_cloud_on?) { false }

RSpec.configure do |config|
Expand Down

0 comments on commit a6d9b9d

Please sign in to comment.