Skip to content
This repository

A Rails interface to the Fedora repository, akin to Active Model

tree: d1a8584227

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.textile

Description

RubyFedora and ActiveFedora provide a set of Ruby gems for creating and managing objects in the Fedora Repository Architecture (http://fedora-commons.org). ActiveFedora is loosely based on “ActiveRecord” in Rails. The 3.x series of ActiveFedora depends on Rails 3, specifically activemodel and activesupport.

Getting Help

Installation

The gem is hosted on gemcutter.

gem install active-fedora

Getting Started

The ActiveFedora Console Tour gives you a brief tour through ActiveFedora’s features on the command line.

Testing (this Gem)

In order to run the RSpec tests, you need to have a copy of the ActiveFedora source code, and then run bundle install in the source directory.

git clone https://github.com/mediashelf/active_fedora.git
cd /wherever/active_fedora/is
bundle install
git submodule init
git submodule update

Testing with Hudson Rake Task

The hudson rake task will spin up jetty, import the fixtures, and run the tests for you.

  rake active_fedora:hudson

Testing Manually

If you want to run the tests manually, follow these instructions.

You need to have a copy of hydra-jetty running. To do this, download a working copy of hydra-jetty, cd into its root and run

java -jar start.jar

Then open a new terminal, go to your ActiveFedora source directory, and import fedora’s demo objects.

  export FEDORA_HOME=/path/to/hydra/jetty/fedora/default
  rake active_fedora:load_fixtures RAILS_ENV=test

This does the equivalent of:

  $FEDORA_HOME/client/bin/fedora-ingest-demos.sh localhost 8983 fedoraAdmin fedoraAdmin http
  rake af:import_fixture pid=hydrangea:fixture_mods_article1 RAILS_ENV=test

Now you’re ready to run the tests. In the directory where active_fedora is installed, run

  rake spec

Predicate Mappings

ActiveFedora versions 2.2.1 and higher provides specialized control over the predicate mappings used by SemanticNode. In order to provide your own mappings,
you must supply a predicate_mappings.yml in the same format as the config/predicate_mappings.yml file shipped with the ActiveFedora gem. Place the file in the same directory
as your fedora.yml file and use the current method of initializing ActiveFedora:

ActiveFedora.init("/path/to/my/config/fedora.yml")

If no predicate_mappings.yml file is found, ActiveFedora will use the default mappings.

Acknowledgements

Creator: Matt Zumwalt (MediaShelf)

Developers:
McClain Looney & Eddie Shin (MediaShelf), Rick Johnson (Notre Dame)

LICENSE:

Copyright © 2009-2010 Matt Zumwalt & MediaShelf, LLC

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License (LGPL) as
published by the Free Software Foundation, either version 3 of the License,
or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/> or
see <http://www.gnu.org/licenses/lgpl.html>.

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Something went wrong with that request. Please try again.