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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
SUL Requests in a rails application that allows users to request materials from the Stanford University Library. This application aims to:
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
Configuration is handled through the RailsConfig settings.yml files.
super_admin_groups
is an array of LDAP workgroups that get all privileges in the application.site_admin_groups
is an array of LDAP workgroups that have the ability to manage all requests and related objects in the application.origin_admin_groups
has library codes configured with an array of LDAP workgroups that can manage requests originating from that library.destination_admin_groups
has library codes configured with an array of LDAP workgroups that can manage requests being sent to that library.in_admin_groups:
L-NEWARK: ['worgroup1', 'workgroup2']
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
has SUNet IDs configured with a fake LDAP WorkGroup stringfake_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']
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.
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
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
Open the “Request” button in SearchWorks in a new tab or new window.
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.