boston-library / bpldc_authority_api

API for returning authority data and controlled values for BPLDC descriptive metadata
1 stars 0 forks source link

add rbmscv to authorities list and remove deprecated rbms authorities #46

Closed ebenenglish closed 2 years ago

ebenenglish commented 2 years ago

Add Bpldc::Authority:

{ code: 'rbmscv', base_url: 'http://id.loc.gov/vocabulary/rbmscv',
  name: 'Controlled Vocabulary for Rare Materials Cataloging', genres: true }

Remove Bpldc::Authority where code ==:

rbbin
rbgenr
rbpap
rbpri
rbprov
rbpub
rbtyp

Make sure to update db/seeds.rb as well.

More info: https://trac.bpl.org/Repository/ticket/1481

ebenenglish commented 2 years ago

Updated on staging and production using this script:

rb = Bpldc::Authority.new({ code: 'rbmscv', base_url: 'http://id.loc.gov/vocabulary/rbmscv', name: 'Controlled Vocabulary for Rare Materials Cataloging', genres: true })
rb.save!

%w(rbbin rbgenr rbpap rbpri rbprov rbpub rbtyp).each do |dep|
  auth = Bpldc::Authority.find_by(code: dep)
  auth.destroy!
end