Europeana Collections portal as a Rails + Blacklight application.
Ruby Other
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app Merge branch 'feat/EC-2910-pjax-aware-draggable-rails-admin-tabs' int… Aug 16, 2018
bin
config https:// scheme for default Pro URL Aug 13, 2018
db Declare model class in migration Aug 10, 2018
deploy IBM deploy manually configurable postgres/redis connetions May 29, 2018
lib Rake tasks to create/delete all published gallery annotations May 10, 2018
log
spec Blog promo card ID is "blog" Aug 13, 2018
vendor/assets Initial proof-of-concept commit. Nov 25, 2014
.cfignore IBM deploy manually configurable postgres/redis connetions May 29, 2018
.codeclimate.yml Install bundler-audit May 11, 2018
.env.example https:// scheme for default Pro URL Aug 13, 2018
.gitattributes Line ending fix. Mar 2, 2015
.gitignore
.rspec Re #188: Clean out dev/debug code Jun 30, 2015
.rubocop.yml Add Rubocop config file. Jul 2, 2015
.ruby-style.yml Rubocop: target Ruby 2.5 Aug 1, 2018
.ruby-version Update Ruby to 2.5.0 Mar 28, 2018
.travis.yml Record sets browse pages (#1100) Jul 20, 2018
.yardopts Move yardoc documentation to yardoc dir Jun 23, 2016
Gemfile use latest i18n from develop branch Aug 6, 2018
Gemfile.lock Promo card definition for Pro blog post Aug 13, 2018
LICENSE.md Add EUPL 1.1 license. Feb 25, 2015
Procfile verbose puma startup Aug 11, 2017
README.md Merge pull request #1078 from europeana/feat/EC-2227-gallery-images-b… May 22, 2018
Rakefile Rubocop auto-correct Mar 28, 2018
config.ru Rubocop auto-correct Mar 28, 2018

README.md

Europeana Portal with Collections

Build Status Security Maintainability Test Coverage

Europeana Portal with Collections as a Rails + Blacklight application.

License

Licensed under the EUPL V.1.1.

For full details, see LICENSE.md.

Requirements

Installation

  • Download the source code
  • Run bundle install

Configuration

Environment variables

Most configuration settings are read from environment variables, described in detail in .env.example.

In development and test environments, these can be placed in a .env file in your application root.

Database

  1. Create a PostgreSQL database, and set its URL in the environment variable DATABASE_URL.
  2. Initialize the database: bundle exec rake db:setup

Testing

Create a test database and initialise with bundle exec rake db:test:prepare

Use the command bundle exec rspec from the project root to run the RSpec tests.

The integration tests use the poltergeist gem which has an external dependency on PhantomJS. http://phantomjs.org/download.html

File storage

Files are stored using Paperclip. To configure it, create config/paperclip.yml with any options required to configure your file storage system, e.g. fog.

In a development environment, copy the provided sample from deploy/development/config/paperclip.yml.

Cache store

If the file config/redis.yml exists, the application will use Redis as a cache store.

Site Administration/Users

Site content and some other "configuration" is managed through the cms. The cms by default is available at [hostname]/portal/en/cms/

To login and perform certain actions, an admin user account is required. To set up an admin user, run:

bundle exec rake user:create EMAIL=you@example.com PASSWORD=REPLACE ROLE=admin

Example configurations for different environments are in deploy/.

Usage

The application consists of three components:

  1. Web: bundle exec puma -C config/puma.rb

By default, Puma will listen on the port defined in the PORT environment variable, or 3000 by default. 2. Worker: bundle exec rake jobs:work 3. Scheduler: bundle exec clockwork lib/clock.rb

The commands for these components are declared in the Procfile.

In production, if your environment supports it you can use this Procfile. Otherwise, you will need to configure deployment scripts to run each process.

In development, you can launch the application with all processes using foreman: foreman start

Contributing

Follow the Europeana Ruby development guide.