cul_scv_hydra 0.14.1 → 0.14.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/cul_scv_fedora/dummy_object.rb +7 -1
- data/lib/cul_scv_hydra/version.rb +1 -1
- data/lib/cul_scv_hydra.rb +7 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OGNiMWVjMGJkNjg5NzdlOTQ0MWViODRlNjE0YTc1YzcxODQxYTcxNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDZmZWZhMzQwOGJkY2RjYmM0ZDg2Y2QxMjA2MTRjZDA2NjE2YWU5Mg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjlmZTg3YjdmODlhYWI1OGFkOTM3ZDFjNTI3N2I2NmVkNmUyNDJlOWRiNjlh
|
10
|
+
YjFmZGQwNThjNGY3ZmZlNWM3ZGZhODNlZjlhMjc0NjExYzAxODMyODg4MzQ4
|
11
|
+
ZGY4Y2FkMjRmYTAwZWExYjFjMDMzYTdhNTRiMTY1NGMxYTdmMjk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YmViODEyNGFjMzBiNzYzYmYyODkwZDdlMjMwMTMwMTEwMjdiYjY0MTVlZTk0
|
14
|
+
OGIwYjBjMjYwNGVhNDcyMGQ5MjViNjI4ODE0Y2VjODg1OWJhY2FhNmEzMmFl
|
15
|
+
MzU3NTlkYWE4NjliNDhjZTI1N2VmMjFjYjI2MTg1NzcyMzE4NmY=
|
@@ -10,6 +10,12 @@ module Cul
|
|
10
10
|
def new_record?
|
11
11
|
@isNew
|
12
12
|
end
|
13
|
+
def new_record=(val)
|
14
|
+
@isNew = val
|
15
|
+
end
|
16
|
+
def internal_uri
|
17
|
+
@uri ||= "info:fedora/#{@pid}"
|
18
|
+
end
|
13
19
|
def connection
|
14
20
|
Cul::Scv::Fedora.connection
|
15
21
|
end
|
@@ -17,7 +23,7 @@ module Cul
|
|
17
23
|
Cul::Scv::Fedora.repository
|
18
24
|
end
|
19
25
|
def spawn(pid)
|
20
|
-
s = DummyObject.new(pid)
|
26
|
+
s = DummyObject.new(pid, @isNew)
|
21
27
|
s.connection= connection
|
22
28
|
s.repository= repository
|
23
29
|
s
|
data/lib/cul_scv_hydra.rb
CHANGED
@@ -29,8 +29,13 @@ module Cul
|
|
29
29
|
def self.ds_for_uri(fedora_uri, fake_obj=nil)
|
30
30
|
return nil unless fedora_uri =~ /info\:fedora\/.*/
|
31
31
|
p = fedora_uri.split('/')
|
32
|
-
|
33
|
-
|
32
|
+
return ds_for_opts({pid: p[1], dsid: p[2]})
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.ds_for_opts(opts={}, fake_obj=nil)
|
36
|
+
return nil unless opts[:pid] and opts[:dsid]
|
37
|
+
fake_obj = fake_obj.nil? ? DummyObject.new(opts[:pid]) : fake_obj.spawn(opts[:pid])
|
38
|
+
return (opts[:class] || ::Rubydora::Datastream).new(fake_obj, opts[:dsid])
|
34
39
|
end
|
35
40
|
end
|
36
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cul_scv_hydra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin Armintor
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: blacklight
|