Skip to content

Commit

Permalink
Clean up unused library settings; part of #3369
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer authored and dnoneill committed Jan 31, 2024
1 parent f139ff7 commit 921c34c
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 50 deletions.
37 changes: 3 additions & 34 deletions config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,10 @@ libraries:
about_url: https://library.stanford.edu/libraries/bowes-art-architecture-library
hours_api_url: art/location/art_library
name: Art & Architecture Library (Bowes)
BIOLOGY:
hours_api_url: biology/location/biology_library
name: Biology Library (Falconer)
BUSINESS:
about_url: https://www.gsb.stanford.edu/library
hours_api_url: business/location/business_library
name: Business Library
CHEMCHMENG:
hours_api_url: chemistry/location/chemistry_library
name: Chemistry & ChemEng Library (Swain)
CLASSICS:
name: Classics Library
EARTH-SCI:
Expand All @@ -120,27 +114,23 @@ libraries:
about_url: https://library.stanford.edu/libraries/terman-engineering-library
hours_api_url: engineering/location/engineering_library
name: Engineering Library (Terman)
GOV-DOCS:
GOV-DOCS: # not a FOLIO library, but shows up in MHLD data
name: Green Library
GREEN:
about_url: https://library.stanford.edu/libraries/cecil-h-green-library
hours_api_url: green/location/green_library
name: Green Library
GRN-REF:
GRN-REF: # not a FOLIO library, but probably shows up in MHLD data
name: Green Library
HILA:
about_url: https://www.hoover.org/library-archives
hours_api_url: hoover_archives/location/hv_archives
name: Hoover Library
suppress_items_list_on_results_view: true
suppress_location_request_link: true
HOPKINS:
about_url: https://library.stanford.edu/libraries/harold-miller-library-hopkins-marine-station
hours_api_url: marine_biology/location/marine_biology_library
name: Marine Biology Library (Miller)
IC:
hours_api_url: green/location/reference
IC-CHAT:
IC-CHAT: # fake code used internally for IC chat hours
hours_api_url: green/location/reference
JACKSON:
name: Business Library
Expand All @@ -149,14 +139,6 @@ libraries:
ezproxy_host: https://login.laneproxy.stanford.edu/login?
hours_api_url: medical/location/medical_library
name: Lane Medical Library
LANE-MED:
about_url: https://lane.stanford.edu/index.html
ezproxy_host: https://login.laneproxy.stanford.edu/login?
hours_api_url: medical/location/medical_library
name: Lane Medical Library
LATHROP:
hours_api_url: lathrop/location/tech-lounge
name: Lathrop Library
LAW:
about_url: https://law.stanford.edu/robert-crown-law-library/
ezproxy_host: https://ezproxy.law.stanford.edu/login?
Expand All @@ -166,26 +148,13 @@ libraries:
about_url: https://library.stanford.edu/libraries/harold-miller-library-hopkins-marine-station
hours_api_url: marine_biology/location/marine_biology_library
name: Marine Biology Library (Miller)
MATH-CS:
hours_api_url: math_stats/location/math_stats_library
name: Math & Statistics Library
MEDIA-CENTER:
hours_api_url: green/location/media_microtext
name: Media & Microtext Center
MEDIA-MTXT:
hours_api_url: green/location/media_microtext
name: Media & Microtext Center
MEYER:
hours_api_url: meyer/location/meyer_24_hour
name: Meyer Library
MUSIC:
about_url: https://library.stanford.edu/libraries/music-library
hours_api_url: music/location/music_library
name: Music Library
RUMSEYMAP:
about_url: https://library.stanford.edu/libraries/david-rumsey-map-center
hours_api_url: Rumsey/location/visitor-access
name: David Rumsey Map Center
RUMSEY-MAP:
about_url: https://library.stanford.edu/libraries/david-rumsey-map-center
hours_api_url: Rumsey/location/visitor-access
Expand Down
2 changes: 1 addition & 1 deletion lib/hours_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def full_url
end

def find_library
Settings.libraries[@library].hours_api_url
Settings.libraries[@library]&.hours_api_url
end

def get
Expand Down
4 changes: 2 additions & 2 deletions spec/features/brief_view_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
end
within '[data-preview-url="/preview/10"]' do
expect(page).to have_css('.brief-document ul li', text: 'Green Library : Stacks : (no call number)')
expect(page).to have_css('.brief-document ul li', text: 'Chemistry & ChemEng Library (Swain) : Current periodicals : (no call number)')
expect(page).to have_css('.brief-document ul li', text: 'Chemistry & ChemEng Library (Swain) : Stacks : ABC')
expect(page).to have_css('.brief-document ul li', text: 'Engineering Library (Terman) : Current periodicals : (no call number)')
expect(page).to have_css('.brief-document ul li', text: 'Engineering Library (Terman) : Stacks : ABC')
end
end
skip 'Brief preview', :js do
Expand Down
2 changes: 1 addition & 1 deletion spec/features/mhld_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
it "should be present in the location access panel" do
visit solr_document_path('10')

within('[data-hours-route="/hours/CHEMCHMENG"]') do
within('[data-hours-route="/hours/ENG"]') do
expect(page).to have_css('.location-name', text: 'Current periodicals')
expect(page).to have_css('.mhld', text: 'public note2')
expect(page).to have_css('.mhld.note-highlight', text: 'Latest: latest received2')
Expand Down
20 changes: 10 additions & 10 deletions spec/fixtures/solr_documents/10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,32 @@
- sirsi
:item_display_struct:
- barcode: "123"
library: CHEMCHMENG
library: ENG
home_location: STACKS
callnumber: ABC
full_shelfkey: ABC
- barcode: "456"
library: CHEMCHMENG
library: ENG
home_location: STACKS
callnumber: DEF
full_shelfkey: DEF
- barcode: "123"
library: CHEMCHMENG
library: ENG
home_location: STACKS
callnumber: GHI
full_shelfkey: GHI
- barcode: "321"
library: CHEMCHMENG
library: ENG
home_location: STACKS
callnumber: CBA
full_shelfkey: CBA
- barcode: "654"
library: CHEMCHMENG
library: ENG
home_location: STACKS
callnumber: FED
full_shelfkey: FED
- barcode: "876"
library: CHEMCHMENG
library: ENG
home_location: STACKS
callnumber: IHG
full_shelfkey: IHG
Expand All @@ -52,18 +52,18 @@
callnumber: JKL
full_shelfkey: JKL
- barcode: "123"
library: CHEMCHMENG
library: ENG
home_location: STACKS
callnumber: MNO
full_shelfkey: MNO
- barcode: "543"
library: BIOLOGY
library: MARINE-BIO
home_location: STACKS
callnumber: PQR
full_shelfkey: PQR
:mhld_display:
- "CHEMCHMENG -|- STACKS -|- public note1 -|- library has1 -|- latest received1"
- "CHEMCHMENG -|- CURRENTPER -|- public note2 -|- library has2 -|- latest received2"
- "ENG -|- STACKS -|- public note1 -|- library has1 -|- latest received1"
- "ENG -|- CURRENTPER -|- public note2 -|- library has2 -|- latest received2"
- "GREEN -|- STACKS -|- public note3 -|- library has3 -|- latest received3"
:isbn_display:
- "0393040801"
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/holdings_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
item_display_struct: [
{ barcode: 'barcode', library: 'SAL3', home_location: 'home-location' },
{ barcode: 'barcode', library: 'GREEN', home_location: 'home-location' },
{ barcode: 'barcode', library: 'BIOLOGY', home_location: 'home-location' }
{ barcode: 'barcode', library: 'MARINE-BIO', home_location: 'home-location' }
]
).items
)
Expand All @@ -90,7 +90,7 @@
end
it "should sort Green first then the rest alpha" do
expect(sortable_libraries.libraries.length).to eq 3
expect(sortable_libraries.libraries.map(&:code)).to eq ['GREEN', 'BIOLOGY', 'SAL3']
expect(sortable_libraries.libraries.map(&:code)).to eq ['GREEN', 'MARINE-BIO', 'SAL3']
end
end

Expand Down

0 comments on commit 921c34c

Please sign in to comment.