Skip to content

Rake Tasks in Hydra Head

ndushay edited this page Apr 6, 2012 · 1 revision

Getting info about the rake tasks from the command line

rake -T

To narrow down the output, use grep. For example:

rake -T | grep hy

hydra:jetty Tasks

The main tasks: load, start, stop

  rake hydra:jetty:load                       # Copies the default SOLR config files and starts up the fedora instance.
  rake hydra:jetty:restart                    # Restarts the bundled Hydra Testing Server
  rake hydra:jetty:start                      # Starts the bundled Hydra Testing Server
  rake hydra:jetty:status                     # Returns the status of the Hydra::TestingServer.
  rake hydra:jetty:stop                       # Stops the bundled Hydra Testing Server

Subtasks: config, config_fedora, config_solr

  rake hydra:jetty:config                     # Copies the default Solr & Fedora configs into the bundled Hydra Testing Server
  rake hydra:jetty:config_fedora              # Copies a custom fedora config for the bundled Hydra Testing Server
  rake hydra:jetty:config_solr                # Copies the default SOLR config for the bundled Hydra Testing Server

hyhead Continuous Integration Tasks

hyhead Full Continuous Integration Build: ci

  rake hyhead:ci                              # Execute Continuous Integration build (docs, tests with coverage)

hyhead Test Host Setup: setup_test_host

Many of the other tasks call this for you.

  rake hyhead:setup_test_host                 # Copy all of the necessary code into the test host

Subtasks for setting up test host

These are the tasks used by setup_test_host

  rake hyhead:copy_plugin_to_host             # Copy the current plugin code into hydra-plugin_test_host/vendor/plugins/hydra-head
  rake hyhead:remove_plugin_from_host         # Remove hydra-plugin_test_host/vendor/plugins/hydra-head
  rake hyhead:copy_features_to_host           # Copy current contents of the features directory into hydra-plugin_test_host/features
  rake hyhead:remove_features_from_host       # Remove hydra-plugin_test_host/features
  rake hyhead:copy_fixtures_to_host           # Copy current contents of the spec/fixtures directory into hydra-plugin_test_host/spec/fixtures
  rake hyhead:remove_fixtures_from_host       # Remove hydra-plugin_test_host/spec/fixtures

hyhead RSpec Tasks

The main RSpec task: spec

  rake hyhead:spec                            # Easiest way to run rspec tests.

This is the same as calling

  rake hyhead:rspec:setup_and_run             # Sets up test host, loads fixtures, then runs specs - need to have jetty running.

Rspec subtasks

To run the rspec tests without any setup, use

  rake hyhead:rspec:run                       # Run the hydra-head specs - need to have jetty running, test host set up and fixtures loaded.

hyhead Cucumber Tasks

The main Cucumber task: cucumber

  rake hyhead:cucumber                        # Easieset way to run cucumber tests.

This is the same as calling

  rake hyhead:cucumber:setup_and_run          # Sets up test host, loads fixtures, then runs cucumber features - need to have jetty running.

Cucumber subtasks

To run the cucumber tests without any setup, use

  rake hyhead:cucumber:run                    # Run cucumber tests for hyhead - need to have jetty running, test host set up and fixtures loaded.

Generating RDocs

  rake hyhead:doc                             # Generate YARD Documentation
Clone this wiki locally