active-fedora 9.0.0.beta1 → 9.0.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_fedora/version.rb +1 -1
- data/lib/active_fedora/versionable.rb +10 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d60ea93eeb279f9295e64e08e725c95cf5bea026
|
4
|
+
data.tar.gz: 625d2f73009486e3d60b2491a81589f13b11ab4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d438e3f43b8b128c721fb4c984ecce6fb8d250fa473ec85e586b51913f2fd27105a74bb8773249e74028c1955d6e882469acf6af2708d35526ab21328c034f6e
|
7
|
+
data.tar.gz: 0a7739691a954a784416251ec56322e7ce3ade16b7387d1d7c1476dcc6141dc54f545a4218f438e18c3c26e0f48b6aa3c4de5590af2a6b2fdc7ea88544094e0d
|
@@ -12,8 +12,6 @@ module ActiveFedora
|
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
|
-
# TODO: This only applies to objects. If we want the same for child resources, it would need to go
|
16
|
-
# under fcr:metadata
|
17
15
|
def model_type
|
18
16
|
if self.respond_to?(:metadata)
|
19
17
|
metadata.ldp_source.graph.query(predicate: ::RDF.type).objects
|
@@ -22,9 +20,11 @@ module ActiveFedora
|
|
22
20
|
end
|
23
21
|
end
|
24
22
|
|
23
|
+
# Returns an array of RDF::Literal objects where the version label matches
|
24
|
+
# our own version label and excludes auto-snapshot versions from Fedora.
|
25
25
|
def versions
|
26
26
|
results = versions_graph.query([nil, ::RDF::URI.new('http://fedora.info/definitions/v4/repository#hasVersionLabel'), nil])
|
27
|
-
results
|
27
|
+
numbered_versions(results)
|
28
28
|
end
|
29
29
|
|
30
30
|
def versions_graph
|
@@ -86,5 +86,12 @@ module ActiveFedora
|
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
|
+
def numbered_versions statements, literals = Array.new
|
90
|
+
statements.each do |statement|
|
91
|
+
literals << statement.object unless statement.object.to_s.match("auto-snapshot")
|
92
|
+
end
|
93
|
+
return literals
|
94
|
+
end
|
95
|
+
|
89
96
|
end
|
90
97
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active-fedora
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.0.0.
|
4
|
+
version: 9.0.0.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Zumwalt
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-11-
|
13
|
+
date: 2014-11-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rsolr
|