sul-dlss/sul-requests

Name: sul-requests

Owner: Stanford University Digital Library

Description: Rails application for requesting materials from Stanford University Library

Created: 2015-03-31 22:27:27.0

Updated: 2018-05-15 19:13:52.0

Pushed: 2018-05-15 19:13:52.0

Homepage: null

Size: 2849

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Build Status Coverage Status Code Climate Code Climate Test Coverage Stories in Ready Latest Tagged version

SUL Requests

SUL Requests in a rails application that allows users to request materials from the Stanford University Library. This application aims to:

  1. Support Scan & Deliver service for limited materials.
  2. Provide better support for the Special Collections request process. Request all materials from a single online form, regardless of home location.
  3. Address known usability/accessibility issues with existing request forms.
  4. Support necessary administrative tasks, including request mediation, updating the paging schedule, adding/removing requestable item categories.
Requirements
  1. Ruby (2.2.1 or greater)
  2. Rails (4.2.0 or greater)
  3. A database
Installation

Clone the repository

$ git clone git@github.com:sul-dlss/sul-requests.git

Change directories into the app and install dependencies

$ bundle install

Run database migrations

$ rake db:migrate

Start the development server

$ rails s
Configuring

Configuration is handled through the RailsConfig settings.yml files.

WorkGroups
Faking WorkGroups in Development

In order to develop the application it may be necessary to fake workgroups so that we don't need a local LDAP service.

fake_ldap_attributes:
  user_sunet:
    WEBAUTH_LDAPPRIVGROUP: 'some-set|of-workgroup-strings'

So your config/settings/development.local.yml file might look like:

_ldap_attributes:
our sunet id):
WEBAUTH_LDAPPRIVGROUP: 'mine:mine'

r_admin_groups: ['mine:mine']
Token Encryption

There is a token encryption library that handles encrypting and decrypting tokens given to users who only submit a Name/Email or Library ID for identification purposes. To keep these tokens secure we require a secret and a salt configured of moderate complexity and randomness (SecureRandom.hex(128) can be useful). Once configured, these keys (or the tokens generated in the app) MUST NOT change, otherwise the tokens that users have been given will no longer be valid.

Testing

The test suite (with RuboCop style enforcement) will be run with the default rake task (also run on travis)

$ rake

The specs can be run without RuboCop enforcement

$ rake spec

The RuboCop style enforcement can be run without running the tests

$ rake rubocop
How to create requests in local development
  1. Use SearchWorks to find appropriate records.

For example:

Page:  find something at SAL3 using the "Library" facet and "At the Library" in the "Access" facet
Scan:  ditto
Mediated Page:  find something at Special Collections using the "Library" facet
  1. Open the “Request” button in SearchWorks in a new tab or new window.

  2. Copy the Request url after the host name and paste it after “localhost:3000” in your browser, when you have the app running locally. (i.e. /scan/... or /mediated_page/...) Then submit the request in your browser pointed to your locally running app.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.