hybag 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/hybag/ingester.rb +3 -1
- data/lib/hybag/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWMxNWM2NTA4Mzg0Mjg4N2ZmMTZkOTM1NjhlZmUyYzdjYTNkMWIwNA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YWVlZmFkMGU5MjRkMjM2MjM2Y2Y5Zjc4MWEzOGZiODc4YTA2YjkwYQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTY0NzA4ZWY3ZTllOTcyZWJkYmFlMjAyZThmNjUyZWQ3NGJlYzIxMmYwNWEx
|
10
|
+
ODg1Mjc3OTc5Y2U3NzFkYjU3ODU4MjBkYjYyMTBhYzU4NTllY2YwNDE3ZTdj
|
11
|
+
Mzg3MDQ4MmVjNjhiMTE0MzExZmQ1YTQ0MTc4OWU4YTExYWE4OTc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjcxNjVkNzE5NTQ3NjQ2MmEyOGI2NTJiYmE1NGE5MWI5YzdlYzRmYjUzYzVi
|
14
|
+
ZGM2NThmZjZiZjkwNjMxMGZhMTU4Mjg5YTIzMzE3MThjNDExZWFiZmIwYmVj
|
15
|
+
ODYxN2JmYmE4MzNhOTEyMDFlZmYzZjU3MTk3ZTg4N2MzNjVkZTc=
|
data/lib/hybag/ingester.rb
CHANGED
@@ -36,7 +36,9 @@ module Hybag
|
|
36
36
|
def add_bag_file_to_object(object, bag_file, binary=true)
|
37
37
|
parsed_name = bag_filename_to_label(bag_file)
|
38
38
|
found_datastream = object.datastreams.values.find{|x| x.dsid.downcase == bag_filename_to_label(bag_file).downcase}
|
39
|
-
|
39
|
+
open_tag = 'r'
|
40
|
+
open_tag = 'rb' if binary
|
41
|
+
content = File.open(bag_file, open_tag).read
|
40
42
|
content = transform_content(content) unless binary
|
41
43
|
if found_datastream
|
42
44
|
found_datastream = replace_subject(content, found_datastream)
|
data/lib/hybag/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hybag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Trey Terrell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|