Skip to content

myGrid/ruby-ro-bundle

Repository files navigation

Research Object Bundle Ruby Library

Authors

Robert Haines, Stuart Owen, Finn Bacall

Contact

support@mygrid.org.uk

Homepage

mygrid.github.io/ruby-ro-bundle

Source code

github.com/myGrid/ruby-ro-bundle

Licence

BSD (See Licence file or www.opensource.org/licenses/bsd-license.php)

Copyright

© 2014, 2015 The University of Manchester, UK

<img src=“https://badge.fury.io/rb/ro-bundle.svg” alt=“Gem Version” /> <img src=“https://codeclimate.com/github/myGrid/ruby-ro-bundle.svg” /> <img src=“https://travis-ci.org/myGrid/ruby-ro-bundle.svg?branch=master” alt=“Build Status” /> <img src=“https://coveralls.io/repos/myGrid/ruby-ro-bundle/badge.svg?branch=master” alt=“Coverage Status” />

Synopsis

This is a Ruby library for working with Research Object Bundle files. See the Research Object Bundle specification for more details.

This library is a work in progress! Until we release version 1.0.0 you can expect the API to change in incompatible ways, although we will try to keep this to an absolute minimum. Once version 1.0.0 is released we will be following the principles of Semantic Versioning for our version numbering scheme.

Usage

Most of this library’s API is provided by two underlying gems. Please consult their documentation in addition to this:

There are some examples of how to use the library provided in the bin directory:

  • ro-bundle-info: Print out simple metrics about this RO Bundle. This is analogous to the standard zipinfo command.

  • verify-ro-bundle: Verify that the specified RO Bundle is valid.

  • dir2ro: Recursively package up a directory into a RO Bundle. All files in the directory are added as aggregates.

  • zip2ro: Copy all files from a normal zip file into a RO Bundle. All files in the zip file are added as aggregates.

See the contents of the tests directory for even more example usage.

What this library cannot do yet

The RO Bundle specification is largely implemented but there are notable gaps at present, including:

  • Extra provenance information cannot yet be added using the pav: namespace.

  • The @graph member is not supported in the top-level manifest (although if it is present it will be preserved).