Name: library_hours_rails
Owner: Stanford University Digital Library
Description: Library hours management and API
Created: 2015-05-20 23:57:12.0
Updated: 2018-05-22 21:20:04.0
Pushed: 2018-05-22 21:20:05.0
Homepage: https://library-hours.stanford.edu
Size: 321
Language: Ruby
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This application allows stakeholders to create and maintain library and location hours for the Stanford University Libraries.
Libraries may have many locations within the building, and each may keep separate hours.
Library hours can be created in bulk by setting normal business hours for each quarter, intersession, or other term and add exceptions to e.g. holidays. Library hours can also be imported from a batch upload spreadsheet.
This application also provides API access to those hours for downstream consumers, including:
api/v1/library/:library_id/location/:id/hours/for/:when
drupal/hours_:month
library/:library_id/location/:id/hours.json
t clone https://github.com/sul-dlss/library_hours_rails.git
library_hours_rails
ndle install
ke db:migrate
ils server
This project uses rails_config
to manage environment-specific configuration. Default configuration is available in config/settings.yml
and includes:
super_admin_groups
, groups who are able to modify library and location datasite_admin_groups
, groups who are able to modify library hours dataYou can import libraries and locations from the libraries.stanford.edu website and initial Stanford quarter, intersession and holiday data using the db:seed
rake task:
ke db:seed # load libraries and locations from libraries.stanford.edu
Initial library hours can be seeded using a CSV export from the library hours website. After importing the CSV spreadsheet, you also need to mark relevant locations as “keeping hours”, e.g.:
tion.select { |x| x.calendars.any? }.each { |x| x.update(keeps_hours: true) }
ke