Skip to content
A rough, pure-ruby implementation of the DPN BagIt spec.
Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib/dpn
test
.codeclimate.yml
.gitignore
.rspec
.rubocop.yml
.travis.yml
Gemfile
LICENSE.txt
README.md
Rakefile
dpn-bagit.gemspec
dpn_bagit_128.png
dpn_bagit_500.jpg
logo_license.txt

README.md

dpn_bagit

Build Status Code Climate Test Coverage

DPN::Bagit

Description

A ruby implementation of the DPN BagIt spec, which is itself an extension of the BagIt spec. Built on top of tipr/bagit.

This project is currently quite rough. At present, only deserialization from .tar and validation work.

Installation

Add this line to your application's Gemfile:

gem 'dpn-bagit'

And then execute:

$ bundle

Or install it yourself as:

$ gem install dpn-bagit

Usage

require 'dpn-bagit'

bag = DPN::Bagit::Bag.new(location_of_bag)
if bag.empty? == false
  if bag.valid?
    fixity = bag.fixity
    uuid = bag.uuid
    size = bag.size
  else
    puts bag.errors
  end
end


bag = DPN::Bagit::SerializedBag.new(location_of_tarball).unserialize!

Contributing

  1. Fork it ( https://github.com/malakai97/dpn-bagit/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request
You can’t perform that action at this time.