Stanford University Libraries online exhibits showcase
Clone or download
Latest commit e09e18f Sep 17, 2018
Permalink
Failed to load latest commit information.
app Appease Rubocop: Layout/EmptyLineAfterGuardClause Sep 17, 2018
bin Update to Rails 5.2 (#1186) Jun 1, 2018
config Use an ordinary HttpCheck until the upstream SolrCheck is updated to … Sep 11, 2018
db update spotlight to v2.2.0 Aug 16, 2018
lib Appease Rubocop: Layout/EmptyLineAfterGuardClause Sep 17, 2018
log Initial commit Apr 3, 2014
public Remove unused favicon Sep 7, 2018
solr/config Copy exhibit tags into catch-all search fields; fixes #1192 (#1198) Jun 19, 2018
spec Appease Rubocop: Layout/EmptyLineAfterGuardClause Sep 17, 2018
vendor/assets add Mirador page jumper plugin ++ @aeschylus Nov 22, 2017
.coveralls.yml add coveralls Nov 20, 2015
.gitignore add rails config to gitignore (not added on install) Oct 12, 2017
.hound.yml Clean up 2 tests (#333) Aug 27, 2016
.rspec Add better error reporting/handling when importing SDR items (#280) Aug 1, 2016
.rubocop.yml Address new rubocop warnings Mar 16, 2018
.rubocop_todo.yml Update .rubocop_todo Sep 17, 2018
.scss-lint.yml Import hound's scss-lint default configuration with our local overrides Dec 2, 2015
.solr_wrapper.yml Update .solr_wrapper.yml to use 7.4.0 Sep 11, 2018
.travis.yml Add sidekiq-pro; fixes #1061 Mar 7, 2018
CHANGELOG.md update changelog for v1.21 Aug 16, 2018
Capfile Explicitly load Git SCM in Capfile (#1119) Mar 8, 2018
Gemfile Update dependencies Jul 6, 2018
Gemfile.lock Update dependencies Sep 17, 2018
LICENSE Add LICENSE file Aug 14, 2014
README.md Remove old information from the README (#1204) Jun 23, 2018
Rakefile Address new rubocop warnings Mar 16, 2018
config.ru Add frozen_string_literal magic comment to all files Nov 13, 2017

README.md

Build Status Coverage Status

SUL Spotlight Exhibit

The project's master branch provides a template Spotlight application with SUL branding and functionality.

Configuration

Exhibits need to provide the following configuration files:

  • config/database.yml - Standard Rails database configuration
  • config/honeybadger.yml - Honeybadger.io exception reporting configuration
  • config/blacklight.yml - Blacklight solr configuration
  • config/initializers/secret_token.rb - Rails secret token

Reindexing content

A Rake task is provided to (re)index content into the Solr index. It uses the configured sets in config/exhibit.yml.

$ rake spotlight:index

A whenever-based cron task is configured to run nightly to keep the exhibit synchronized with the latest upstream changes. At this time, the task only adds or modifies records, and does not remove records that have been deleted or disassociated with the given OAI set.

Development

Requirements

  • Redis (for running background jobs with Sidekiq)

See projectblacklight/spotlight for additional requirements.

Install dependencies, set up the databases and run migrations:

$ bundle install
$ bundle exec rake db:setup

You can spin up the Rails server, solr_wrapper, and populate the Solr index using this command:

$ REMOTE_USER="archivist1@example.com" bundle exec rake server

When prompted to create an admin user, the email should match the email provided in REMOTE_USER. This will allow you to bypass the webauth authentication.

Testing

Run RuboCop and tests:

$ bundle exec rake

Tip: if you receive the error message ERROR: Core 'blacklight-core' already exists! you have an instance of Solr running elsewhere. Clean out your data with solr_wrapper clean or search for rogue instances with ps aux | grep solr.

Deploying

You must be on VPN to deploy the worker machine. Then deploy as usual using Capistrano:

$ cap stage deploy