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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: db07402e3e8ca081253507888ffda0d81084c947
4
- data.tar.gz: 3b1ae9595815772239fb91fa04713afdb736a61e
3
+ metadata.gz: 1d27733036fa2ceffef04a07c51f6287e1a29345
4
+ data.tar.gz: 45c6e01a1d0508a3a316771973183cc48a7f08eb
5
5
  SHA512:
6
- metadata.gz: b8db754769fb5d0a4a93ee0b58304f92080a5d6ecec2a9e3730fdbbe623aa505af85b8c8a88d22ab9be86c93d118395c6134fe85b219b65b0bac091410a57675
7
- data.tar.gz: 01b0a5c53e12d3426ae309fdc80af82197ede177ee617ec7da0be468e99841da6e8f0a1db14b0d231b524c3658db3a704bc6ad8dc30f8b9c01726d44ef3bc99a
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.merge(multiple: true), &block)
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
@@ -1,3 +1,3 @@
1
1
  module ActiveFedora
2
- VERSION = "9.1.0"
2
+ VERSION = "9.1.1"
3
3
  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.0
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-16 00:00:00.000000000 Z
13
+ date: 2015-04-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rsolr