active-fedora 5.6.0 → 5.6.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -4,9 +4,9 @@ module ActiveFedora
|
|
4
4
|
|
5
5
|
attr_reader :graph, :subject, :predicate, :options
|
6
6
|
|
7
|
-
delegate :class, :to_s, :==, :kind_of?, :each, :
|
8
|
-
:
|
9
|
-
:to => :values
|
7
|
+
delegate :class, :to_s, :==, :kind_of?, :each, :each_with_index, :map,
|
8
|
+
:empty?, :as_json, :is_a?, :to_ary, :to_a, :inspect, :first,
|
9
|
+
:last, :include?, :count, :size, :join, :[], :to => :values
|
10
10
|
|
11
11
|
# @param graph RDF::Graph
|
12
12
|
# @param subject RDF::URI
|
@@ -9,6 +9,7 @@ describe ActiveFedora::NtriplesRDFDatastream do
|
|
9
9
|
map.title(:in => RDF::DC)
|
10
10
|
map.publisher(:in => RDF::DC)
|
11
11
|
map.creator(:in => RDF::DC)
|
12
|
+
map.educationLevel(:in => RDF::DC)
|
12
13
|
map.based_near(:in => RDF::FOAF)
|
13
14
|
map.related_url(:to => "seeAlso", :in => RDF::RDFS)
|
14
15
|
end
|
@@ -39,6 +40,16 @@ describe ActiveFedora::NtriplesRDFDatastream do
|
|
39
40
|
@subject.related_url.should == ["http://google.com/"]
|
40
41
|
end
|
41
42
|
|
43
|
+
it "should be able to call enumerable methods on the fields" do
|
44
|
+
@subject.title.join(', ').should == "Title of work"
|
45
|
+
@subject.title.count.should == 1
|
46
|
+
@subject.title.size.should == 1
|
47
|
+
@subject.title[0].should == "Title of work"
|
48
|
+
@subject.title.to_a.should == ["Title of work"]
|
49
|
+
val = []
|
50
|
+
@subject.title.each_with_index {|v, i| val << "#{i}. #{v}"}
|
51
|
+
val.should == ["0. Title of work"]
|
52
|
+
end
|
42
53
|
|
43
54
|
it "should return fields that are not TermProxies" do
|
44
55
|
@subject.created.should be_kind_of Array
|
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: 5.6.
|
4
|
+
version: 5.6.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-02-
|
14
|
+
date: 2013-02-04 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rsolr
|
@@ -566,7 +566,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
566
566
|
version: '0'
|
567
567
|
segments:
|
568
568
|
- 0
|
569
|
-
hash:
|
569
|
+
hash: 372868863086851520
|
570
570
|
requirements: []
|
571
571
|
rubyforge_project: rubyfedora
|
572
572
|
rubygems_version: 1.8.25
|