hybag 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NTZlMWY5YmQzZDYzOGFmNWVjMmNmNWVlYThiZjZjZjE2Y2MzZGNkOQ==
5
+ data.tar.gz: !binary |-
6
+ YjM2MDY2NTlkZGIxMTg5NWNkMGFjZTliMTYwNWRkZTVjMzNhYTlkNg==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ MTRmMDcwNDE3OGRkNjAzMDExZDA3MjI3ZjAwODgwM2VlN2UzMzlkYWQ4YzM3
10
+ YjM2NjM4OGIzOWEzMDAyYjEyMjMzYjJkYjZjMTQyNGYwODhhZTY0ZjI5ZDNi
11
+ ODMxZDM3OWYxNDBkNzUxNGQ0MmMzZDM5MjY0YjYzYjQzYjM4NjE=
12
+ data.tar.gz: !binary |-
13
+ MjRiM2ZmMGI4ZTE2NjI4Y2RhYzI2OTkyNTMxYmZlMzI4NzNmMDM0MmI0NTI0
14
+ MmZmYWM1MDA3YjE4YWM1YTM3YTc0NjYxZThjMGY5NDdhZTE1YjhhMmEyMjlj
15
+ YTJlMmQ5NGE1Nzg3OTI3MzEyZWEwZmE5NmNlMDIwMWU5YWI1ZjI=
data/.gitignore ADDED
@@ -0,0 +1,18 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ .idea
7
+ Gemfile.lock
8
+ InstalledFiles
9
+ _yardoc
10
+ coverage
11
+ doc/
12
+ lib/bundler/man
13
+ pkg
14
+ rdoc
15
+ spec/reports
16
+ test/tmp
17
+ test/version_tmp
18
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in hybag.gemspec
4
+ gemspec
data/Guardfile ADDED
@@ -0,0 +1,5 @@
1
+ guard 'rspec', :cli => '--color --drb --format documentation' do
2
+ watch(%r{^spec/.+_spec\.rb$})
3
+ watch(%r{^lib/(.+)\.rb$}) { |m| ["spec/lib/#{m[1]}_spec.rb", "spec/lib/hybag/baggable_spec.rb"] }
4
+ watch('spec/spec_helper.rb') { "spec" }
5
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Trey Terrell
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # Hybag
2
+
3
+ A Hydra gem for adding BagIt functionality to ActiveFedora models.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'hybag'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install hybag
18
+
19
+ ## Usage
20
+
21
+ ### Include the module in ActiveFedora models you'd like to be baggable
22
+
23
+ ```ruby
24
+ class TestClass < ActiveFedora::Base
25
+ include Hybag::Baggable
26
+ end
27
+ ```
28
+
29
+ ### Examples
30
+
31
+ #### Write the item to disk in rails_root/tmp/bags/filler/pid
32
+ ```ruby
33
+ test_class = TestClass.new.write_bag('filler')
34
+ ```
35
+
36
+ #### Delete a bag that was written already
37
+ ```ruby
38
+ test_class.delete_bag
39
+ ```
40
+
41
+ ## Contributing
42
+
43
+ 1. Fork it
44
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
45
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
46
+ 4. Push to the branch (`git push origin my-new-feature`)
47
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
data/hybag.gemspec ADDED
@@ -0,0 +1,32 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'hybag/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "hybag"
8
+ spec.version = Hybag::VERSION
9
+ spec.authors = ["Trey Terrell"]
10
+ spec.email = ["trey.terrell@oregonstate.edu"]
11
+ spec.description = 'A Hydra gem for adding BagIt functionality to ActiveFedora models.'
12
+ spec.summary = 'A Hydra gem for adding BagIt functionality to ActiveFedora models.'
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.3"
22
+ spec.add_development_dependency "rake"
23
+ spec.add_development_dependency "rspec"
24
+ spec.add_development_dependency "guard"
25
+ spec.add_development_dependency "guard-rspec"
26
+ spec.add_development_dependency 'fakefs'
27
+
28
+ spec.add_dependency 'active-fedora'
29
+ spec.add_dependency 'activesupport', '>= 3.2.13', '< 5.0'
30
+ spec.add_dependency 'bagit', '0.3.2.pre'
31
+ spec.add_dependency 'mime-types'
32
+ end
@@ -0,0 +1,64 @@
1
+ module Hybag
2
+ class BagWriter
3
+ attr_reader :bag
4
+ attr_reader :object
5
+ def initialize(object)
6
+ @object = object
7
+ @bag = object.bag
8
+ end
9
+ def write!
10
+ # add the datastreams to the bag, then manifest
11
+ @object.datastreams.each do |label, ds|
12
+ unless ds.content.nil?
13
+ label = label + mime_extension(ds)
14
+ if bag_tags.include? ds
15
+ bag.add_tag_file(label) { |f|
16
+ f.puts ds.content
17
+ }
18
+ elsif bag_fedora_tags.values.include? ds
19
+ bag.add_tag_file('fedora/' + label) { |f|
20
+ f.puts ds.content
21
+ }
22
+ else
23
+ bag.add_file(label) { |f|
24
+ content = ds.content
25
+ content = ds.content.read if ds.content.respond_to?(:read)
26
+ f.puts content.force_encoding('UTF-8')
27
+ }
28
+ end
29
+ end
30
+ end
31
+ bag.tagmanifest!
32
+ bag.manifest!
33
+ return bag
34
+ end
35
+
36
+ private
37
+
38
+ # return all non-fedora tag files
39
+ def bag_tags
40
+ object.metadata_streams
41
+ end
42
+
43
+ def mime_extension(ds)
44
+ if ds.kind_of?(ActiveFedora::NtriplesRDFDatastream)
45
+ ext = 'nt'
46
+ else
47
+ if ds.mimeType.blank?
48
+ ext = ''
49
+ else
50
+ ext = MIME::Types[ds.mimeType] || ''
51
+ ext = ext.first.extensions[0] unless ext.blank?
52
+
53
+ end
54
+ end
55
+ return '.' + ext
56
+ end
57
+
58
+ def bag_fedora_tags
59
+ object.datastreams.select { |label, ds| ds.is_a?(ActiveFedora::RelsExtDatastream) or ds.dsid == "DC"}
60
+ end
61
+
62
+
63
+ end
64
+ end
@@ -0,0 +1,45 @@
1
+ module Hybag
2
+ module Baggable
3
+ # @return [BagIt::Bag] The bag that was created on the filesystem.
4
+ def write_bag(path='')
5
+ @bag_path = generate_bag_path(path)
6
+ Hybag::Validator.new(self).validate!
7
+ # Delete currently existing bag
8
+ delete_bag
9
+ # Make and write the bag
10
+ FileUtils.mkdir_p bag_path
11
+ Hybag::BagWriter.new(self).write!
12
+ end
13
+
14
+ def bag_path
15
+ @bag_path ||= generate_bag_path
16
+ end
17
+
18
+ def bag
19
+ @bag = nil if @bag && @bag.bag_dir != bag_path
20
+ @bag ||= BagIt::Bag.new(bag_path)
21
+ end
22
+
23
+ def baggable?
24
+ true
25
+ end
26
+
27
+ def delete_bag
28
+ if(File.directory? bag_path)
29
+ FileUtils.rm_r(bag_path, :force => true)
30
+ @bag = nil
31
+ end
32
+ end
33
+
34
+ private
35
+
36
+ def bag_path_namespace
37
+ File.join('tmp','bags')
38
+ end
39
+
40
+ def generate_bag_path(path='')
41
+ path = Rails.root.join(bag_path_namespace, path) unless path.to_s.start_with? Rails.root.join(bag_path_namespace).to_s
42
+ return File.join(path, self.pid)
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,27 @@
1
+ module Hybag
2
+ class Validator
3
+ include ActiveModel::Validations
4
+ validate :bag_valid
5
+ validate :require_persisted
6
+ attr_reader :bag
7
+
8
+ def initialize(bag)
9
+ @bag = bag
10
+ end
11
+
12
+ def validate!
13
+ unless self.valid?
14
+ raise "Invalid Object for bagging"
15
+ end
16
+ end
17
+
18
+ def bag_valid
19
+ errors.add(:bag, "is not valid for bagging.") unless bag.baggable?
20
+ end
21
+
22
+ def require_persisted
23
+ errors.add(:bag, "is not persisted.") unless bag.persisted?
24
+ end
25
+
26
+ end
27
+ end
@@ -0,0 +1,3 @@
1
+ module Hybag
2
+ VERSION = "0.0.1"
3
+ end
data/lib/hybag.rb ADDED
@@ -0,0 +1,13 @@
1
+ require 'active_fedora'
2
+ require 'bagit'
3
+ require 'mime-types'
4
+
5
+ module Hybag
6
+ extend ActiveSupport::Autoload
7
+
8
+ autoload :Version
9
+ autoload :Baggable
10
+ autoload :Validator
11
+ autoload :BagWriter
12
+
13
+ end
@@ -0,0 +1,11 @@
1
+ class TestDatastream < ActiveFedora::NtriplesRDFDatastream
2
+ map_predicates do |map|
3
+ map.title(:in => RDF::DC)
4
+ end
5
+ end
6
+ class BaggableDummy < ActiveFedora::Base
7
+ include Hybag::Baggable
8
+ delegate_to :descMetadata, [:title]
9
+ has_metadata 'descMetadata', type: TestDatastream
10
+ has_file_datastream name: "content"
11
+ end
@@ -0,0 +1,13 @@
1
+ <http://oregondigital.org/resource/oregondigital:61> <http://purl.org/dc/terms/type> "Image" .
2
+ <http://oregondigital.org/resource/oregondigital:61> <http://purl.org/dc/terms/spatial> "Benton County (Ore.)" .
3
+ <http://oregondigital.org/resource/oregondigital:61> <http://purl.org/dc/terms/created> "2004-03-17" .
4
+ <http://oregondigital.org/resource/oregondigital:61> <http://purl.org/dc/terms/description> "Mexican workers in Benton County" .
5
+ <http://oregondigital.org/resource/oregondigital:61> <http://purl.org/dc/terms/rights> "Permission to use must be obtained from OSU Archives." .
6
+ <http://oregondigital.org/resource/oregondigital:61> <http://multimedialab.elis.ugent.be/users/samcoppe/ontologies/Premis/premis.owl#originalName> "P0120_2567" .
7
+ <http://oregondigital.org/resource/oregondigital:61> <http://purl.org/dc/terms/title> "Mexican workers" .
8
+ <http://oregondigital.org/resource/oregondigital:61> <http://purl.org/dc/terms/subject> "Agricultural laborers--Mexican--Oregon" .
9
+ <http://oregondigital.org/resource/oregondigital:61> <http://purl.org/dc/terms/subject> "Agricultural laborers--Housing--Oregon" .
10
+ <http://oregondigital.org/resource/oregondigital:61> <http://purl.org/dc/terms/identifier> "P120:2567" .
11
+ <http://oregondigital.org/resource/oregondigital:61> <http://purl.org/dc/terms/modified> "2011-12-19" .
12
+ <http://oregondigital.org/resource/oregondigital:61> <http://purl.org/dc/terms/hasFormat> "B&W print" .
13
+ <http://oregondigital.org/resource/oregondigital:61> <http://purl.org/dc/terms/date> "1944" .
Binary file
@@ -0,0 +1,92 @@
1
+ require 'spec_helper'
2
+ require File.join(DUMMY_PATH, "baggable_dummy")
3
+
4
+
5
+ describe Hybag::Baggable do
6
+ subject {@item}
7
+ before(:each) do
8
+ @item = BaggableDummy.new(:pid => "filler")
9
+ @item.descMetadata.content = File.open(File.join(FIXTURE_PATH,"example_datastream.nt")).read
10
+ content_file = File.open(File.join(FIXTURE_PATH,"hydra.png"))
11
+ @item.add_file_datastream(content_file, :dsid => "content", :mimeType => "image/png")
12
+ @item.stub(:persisted?).and_return(true)
13
+ # Stub Rails root
14
+ rails = double("Rails")
15
+ Rails = rails unless defined?(Rails)
16
+ Rails.stub(:root).and_return(Pathname.new('/test'))
17
+ end
18
+ before(:all) do
19
+ end
20
+ describe ".generate_bag_path" do
21
+ context "when given a path name" do
22
+ it "should return the Rails Root appended with the bag_path_namespace, path, and then namespace" do
23
+ subject.send(:generate_bag_path, 'testing').should == File.join("/test",subject.send(:bag_path_namespace),"testing","filler")
24
+ end
25
+ end
26
+ end
27
+
28
+ describe ".write_bag" do
29
+ include FakeFS::SpecHelpers
30
+ describe "validations" do
31
+ context "when not given a path" do
32
+ it "should not error" do
33
+ expect{subject.write_bag}.not_to raise_error
34
+ end
35
+ end
36
+ context "when given a path that does not exist" do
37
+ it "should not error" do
38
+ expect{subject.write_bag('/tmp/bag')}.not_to raise_error
39
+ end
40
+ end
41
+ end
42
+ describe "writing" do
43
+ let(:bag) {@bag}
44
+ before(:each) do
45
+ @bag = @item.write_bag('/tmp/bag')
46
+ end
47
+ it "should write tag files to disk" do
48
+ # TODO: stub out a rels-ext to make sure this happens.
49
+ #@bag.tag_files.should include(File.join(@bag.bag_dir, 'fedora', 'RELS-EXT.rdf'))
50
+ @bag.tag_files.should include(File.join(@bag.bag_dir, 'descMetadata.nt'))
51
+ end
52
+ it "should write content files to disk" do
53
+ @bag.bag_files[0].should include('content.png')
54
+ end
55
+ it "should update existing bags" do
56
+ @item.title = "Star Wars: A New Title"
57
+ bag = @item.write_bag('/tmp/bag')
58
+ File.open(File.join(bag.bag_dir, 'descMetadata.nt')).read.should include("Star Wars: A New Title")
59
+ end
60
+ it "should give back a valid bag" do
61
+ expect(bag).to be_valid
62
+ end
63
+ it "should accept subdirectories" do
64
+ bag = @item.write_bag('newBagDir')
65
+ File.directory?(bag.bag_dir).should be_true
66
+ bag.bag_dir.should include('newBagDir')
67
+ end
68
+ it "should create deep subdirectories" do
69
+ bag = @item.write_bag('deep/newBagDir')
70
+ File.directory?(bag.bag_dir).should be_true
71
+ bag.bag_dir.should include('deep/newBagDir')
72
+ end
73
+ it "should delete bags" do
74
+ File.directory?(@bag.bag_dir).should be_true
75
+ @item.delete_bag
76
+ File.directory?(@bag.bag_dir).should be_false
77
+ end
78
+
79
+
80
+ context "when the item is unsaved" do
81
+ before(:each) do
82
+ @item.stub(:persisted?).and_return(false)
83
+ end
84
+ it "should error" do
85
+ expect{@item.write_bag}.to raise_error
86
+ end
87
+ end
88
+
89
+
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,50 @@
1
+ require 'spec_helper'
2
+ require File.join(DUMMY_PATH, "baggable_dummy")
3
+
4
+ describe Hybag::Validator do
5
+ include FakeFS::SpecHelpers
6
+ let(:dummy) do
7
+ d = BaggableDummy.new
8
+ d.stub(:persisted?).and_return(true)
9
+ return d
10
+ end
11
+ subject{Hybag::Validator.new(dummy)}
12
+ describe "validations" do
13
+ context "when the given path exists" do
14
+ before(:each) do
15
+ FileUtils.mkdir_p '/tmp/bag'
16
+ end
17
+ it "should be valid" do
18
+ expect(subject).to be_valid
19
+ end
20
+ end
21
+ context "when the given path doesn't exist" do
22
+ it "should be valid" do
23
+ expect(subject).to be_valid
24
+ end
25
+ end
26
+ context "when the bag isn't baggable" do
27
+ before(:each) do
28
+ dummy.stub(:baggable?).and_return(false)
29
+ end
30
+ it "should not be valid" do
31
+ expect(subject).not_to be_valid
32
+ end
33
+ end
34
+ end
35
+ describe ".validate!" do
36
+ context "when the subject is valid" do
37
+ it "should not raise an error" do
38
+ expect{subject.validate!}.not_to raise_error
39
+ end
40
+ end
41
+ context "when the subject is invalid" do
42
+ before(:each) do
43
+ dummy.stub(:baggable?).and_return(false)
44
+ end
45
+ it "should raise an error" do
46
+ expect{subject.validate!}.to raise_error
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,15 @@
1
+ require 'rspec/autorun'
2
+ ENV['environment'] ||= 'test'
3
+ # - RSpec adds ./lib to the $LOAD_PATH
4
+ require 'hybag'
5
+ require 'pry'
6
+ #Resque.inline = Rails.env.test?
7
+ ROOT_PATH = File.dirname(__FILE__)
8
+ DUMMY_PATH = File.join(ROOT_PATH,"dummies")
9
+ FIXTURE_PATH = File.join(ROOT_PATH, "fixtures")
10
+
11
+ # Support
12
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
13
+
14
+ RSpec.configure do |config|
15
+ end
@@ -0,0 +1 @@
1
+ require 'fakefs/spec_helpers'
metadata ADDED
@@ -0,0 +1,216 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hybag
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Trey Terrell
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-08-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: guard
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: guard-rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ! '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ! '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: fakefs
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ! '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ! '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: active-fedora
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ! '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: activesupport
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: 3.2.13
118
+ - - <
119
+ - !ruby/object:Gem::Version
120
+ version: '5.0'
121
+ type: :runtime
122
+ prerelease: false
123
+ version_requirements: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - ! '>='
126
+ - !ruby/object:Gem::Version
127
+ version: 3.2.13
128
+ - - <
129
+ - !ruby/object:Gem::Version
130
+ version: '5.0'
131
+ - !ruby/object:Gem::Dependency
132
+ name: bagit
133
+ requirement: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - '='
136
+ - !ruby/object:Gem::Version
137
+ version: 0.3.2.pre
138
+ type: :runtime
139
+ prerelease: false
140
+ version_requirements: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - '='
143
+ - !ruby/object:Gem::Version
144
+ version: 0.3.2.pre
145
+ - !ruby/object:Gem::Dependency
146
+ name: mime-types
147
+ requirement: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ! '>='
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ type: :runtime
153
+ prerelease: false
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - ! '>='
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
159
+ description: A Hydra gem for adding BagIt functionality to ActiveFedora models.
160
+ email:
161
+ - trey.terrell@oregonstate.edu
162
+ executables: []
163
+ extensions: []
164
+ extra_rdoc_files: []
165
+ files:
166
+ - .gitignore
167
+ - Gemfile
168
+ - Guardfile
169
+ - LICENSE.txt
170
+ - README.md
171
+ - Rakefile
172
+ - hybag.gemspec
173
+ - lib/hybag.rb
174
+ - lib/hybag/bag_writer.rb
175
+ - lib/hybag/baggable.rb
176
+ - lib/hybag/validator.rb
177
+ - lib/hybag/version.rb
178
+ - spec/dummies/baggable_dummy.rb
179
+ - spec/fixtures/example_datastream.nt
180
+ - spec/fixtures/hydra.png
181
+ - spec/lib/hybag/baggable_spec.rb
182
+ - spec/lib/hybag/validator_spec.rb
183
+ - spec/spec_helper.rb
184
+ - spec/support/fakefs.rb
185
+ homepage: ''
186
+ licenses:
187
+ - MIT
188
+ metadata: {}
189
+ post_install_message:
190
+ rdoc_options: []
191
+ require_paths:
192
+ - lib
193
+ required_ruby_version: !ruby/object:Gem::Requirement
194
+ requirements:
195
+ - - ! '>='
196
+ - !ruby/object:Gem::Version
197
+ version: '0'
198
+ required_rubygems_version: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - ! '>='
201
+ - !ruby/object:Gem::Version
202
+ version: '0'
203
+ requirements: []
204
+ rubyforge_project:
205
+ rubygems_version: 2.0.3
206
+ signing_key:
207
+ specification_version: 4
208
+ summary: A Hydra gem for adding BagIt functionality to ActiveFedora models.
209
+ test_files:
210
+ - spec/dummies/baggable_dummy.rb
211
+ - spec/fixtures/example_datastream.nt
212
+ - spec/fixtures/hydra.png
213
+ - spec/lib/hybag/baggable_spec.rb
214
+ - spec/lib/hybag/validator_spec.rb
215
+ - spec/spec_helper.rb
216
+ - spec/support/fakefs.rb