Skip to content

sul-dlss/exhibits

Folders and files

NameName
Last commit message
Last commit date
Nov 21, 2017
Nov 13, 2017
Nov 20, 2017
Oct 18, 2017
Nov 21, 2017
Apr 3, 2014
Apr 3, 2014
Nov 21, 2017
Nov 21, 2017
Feb 13, 2017
Nov 20, 2015
Oct 12, 2017
Aug 27, 2016
Aug 1, 2016
Nov 15, 2017
Nov 10, 2017
Dec 2, 2015
Sep 25, 2017
Oct 4, 2017
Nov 17, 2017
Nov 13, 2017
Nov 16, 2017
Nov 20, 2017
Aug 14, 2014
Oct 31, 2017
Nov 13, 2017
Nov 13, 2017

Repository files navigation

Build Status Coverage Status Dependency Status

SUL Spotlight Exhibit template project

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/gdor.yml - gdor indexer configuration (i.e. url of dor-fetcher service and purl url basenames), use config/gdor.yml.example as a template

  • config/exhibit.yml - Exhibit indexing directives (in addition to the indexer configuration above). It can contain environment-specific sets that should be synchronized using the rake spotlight:reindex task. E.g.:

    production:
      sets:
        - is_member_of_oo000oo0000
        - is_member_of_oo000oo0001
    
  • config/initializers/secret_token.rb - Rails secret token

  • public/.htaccess - An Apache .htaccess file with the necessary passenger configuration, e.g.:

    PassengerBaseURI /my-exhibit
    PassengerAppRoot /home/lyberadmin/exhibits/my-exhibit/current
    WebAuthLdapPrivgroup dlss:exhibits-admin
    

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