active-fedora 9.1.0 → 9.1.1
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/attributes.rb +1 -1
- data/lib/active_fedora/version.rb +1 -1
- data/spec/unit/attributes_spec.rb +21 -1
- 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: 1d27733036fa2ceffef04a07c51f6287e1a29345
|
4
|
+
data.tar.gz: 45c6e01a1d0508a3a316771973183cc48a7f08eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 921a3c46c4485ec83789512be1fe9caf1d16445f18121d68944a3a3f742b64a1010a7db5bbcf05b77e1d8c094d36ef2e7ea8f506ee8a0f5c046fe16a0788c5f0
|
7
|
+
data.tar.gz: c491773b0438275c4d75e998e54eae06940a4a6137b92630fee5530eafa16e77dc1e56ca003114ccabe9604bf686f443492b40e4ff0581bb856dfc5c39d8aef3
|
@@ -175,7 +175,7 @@ module ActiveFedora
|
|
175
175
|
if properties.key?(:predicate)
|
176
176
|
define_active_triple_accessor(name, properties, &block)
|
177
177
|
elsif properties.key?(:delegate_to)
|
178
|
-
define_delegated_accessor([name], properties.delete(:delegate_to), properties.
|
178
|
+
define_delegated_accessor([name], properties.delete(:delegate_to), properties.reverse_merge(multiple: true), &block)
|
179
179
|
else
|
180
180
|
raise "You must provide `:datastream' or `:predicate' options to property"
|
181
181
|
end
|
@@ -34,7 +34,7 @@ describe ActiveFedora::Base do
|
|
34
34
|
end
|
35
35
|
|
36
36
|
describe "#property" do
|
37
|
-
context "with an xml property" do
|
37
|
+
context "with an xml property (default cardinality)" do
|
38
38
|
before do
|
39
39
|
class BarHistory4 < ActiveFedora::Base
|
40
40
|
has_metadata type: BarStream2, name: "xmlish"
|
@@ -57,6 +57,26 @@ describe ActiveFedora::Base do
|
|
57
57
|
subject { obj.xmlish.cow }
|
58
58
|
it { is_expected.to eq ['one', 'two'] }
|
59
59
|
end
|
60
|
+
end
|
61
|
+
|
62
|
+
context "with multiple set to false" do
|
63
|
+
before do
|
64
|
+
class BarHistory4 < ActiveFedora::Base
|
65
|
+
has_metadata type: BarStream2, name: "xmlish"
|
66
|
+
property :cow, delegate_to: 'xmlish', multiple: false
|
67
|
+
end
|
68
|
+
end
|
69
|
+
after do
|
70
|
+
Object.send(:remove_const, :BarHistory4)
|
71
|
+
end
|
72
|
+
|
73
|
+
let(:obj) { BarHistory4.new }
|
74
|
+
|
75
|
+
before { obj.cow = 'one' }
|
76
|
+
describe "the object accessor" do
|
77
|
+
subject { obj.cow }
|
78
|
+
it { is_expected.to eq 'one' }
|
79
|
+
end
|
60
80
|
|
61
81
|
end
|
62
82
|
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.1.
|
4
|
+
version: 9.1.1
|
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: 2015-04-
|
13
|
+
date: 2015-04-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rsolr
|