Skip to content

A data curation Ruby on Rails engine built on Hydra and Sufia

License

Notifications You must be signed in to change notification settings

mstroming/curate

 
 

Repository files navigation

Curate Version Build Status Coverage Status

Curate is a Rails engine leveraging ProjectHydra and ProjectBlacklight components to deliver a foundation for an Institutional Repositories. It is released under the Apache 2 License

  1. Starting a new Curate-based Rails application
  2. or install by hand
  3. Developing and contributing back to the Curate gem
  4. Prerequisites
  5. Clone the Curate repository
  6. Jetty
  7. Running the specs 1. All of them 1. Some of them 1. With Zeus
  8. Contributing back

Starting a New Curate Based Application

When you generate your new Rails application, you can use Curate's application template:

$ rails new my_curate_application -m https://raw.github.com/ndlib/curate/master/lib/generators/curate/application_template.rb

Or Install By Hand

Add the following line to your application's Gemfile:

gem 'curate'

And then execute:

$ bundle
$ rails generate curate

Developing and Contributing back to the Curate gem

Prerequisites

You may need to have the following installed ‡

  • imagemagick
  • fits.sh
  • ffmpeg
  • Redis
  • rubygems
  • ClamAV

‡ - Why "you may need"? Some of these are only optionally used in development and tests; But production will need it.

Clone the Curate repository

From the command line:

git clone https://github.com/projecthydra/curate.git ./path/to/local

Jetty

Curate uses Jetty for development and testing. You could configure it to use an alternate Fedora and SOLR location, but that is an exercise for the reader.

Install Jetty

Install jetty, you should only need to do this once (unless you remove the ./jetty directory)

$ rake jetty:unzip

Running the Specs

Inside the Curate directory:

All of Them

  1. Make sure jetty is running (rake jetty:start); It will take a bit to spin up jetty.
  2. Make sure you have a dummy app ‡
  3. Run rake regenerate build the to get a clean app ./spec/dummy
  4. Then run rake spec; The tests will take quite a while ‡‡

‡ - A Rails engine requires a Rails application to run. The dummy app is an generated application inside Curate in the ./spec/internal directory ‡‡ - Slow tests are a big problem and we are working on speeding them up, but its complicated.

Some of Them

In some cases you want to know the results of a single test. Here's how you do it.

  1. Make sure jetty is running (rake jetty:start); It will take a bit to spin up jetty.
  2. Make sure you have a dummy app ‡
  3. Run rake regenerate build the to get a clean app ./spec/dummy
  4. Then run BUNDLE_GEMFILE=spec/internal/Gemfile bundle exec rspec path/to/spec.rb:LINE

‡ - With Curate being an Engine we need to point to the Dummy Application's Gemfile. In full Rails applications you can normally run the following rspec path/to/spec.rb:LINE

With Zeus

Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second. ‡

  1. In terminal window #1 run zeus start
  2. In terminal window #2, once Zeus is started: run zeus rake spec for all tests; or zeus test path/to/spec.rb:LINE for one

‡ - Loading the environment to run your tests takes less than a second. So running an individual test will take less time.

Contributing Back

There is an existing CONTRIBUTING.md document which is currently under review. For now, follow those guidelines.

About

A data curation Ruby on Rails engine built on Hydra and Sufia

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 96.5%
  • CoffeeScript 1.8%
  • JavaScript 1.6%
  • CSS 0.1%