active-fedora 9.4.2 → 9.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +6 -0
- data/README.md +1 -1
- data/lib/active_fedora/attribute_methods/dirty.rb +1 -1
- data/lib/active_fedora/attributes/property_builder.rb +1 -0
- data/lib/active_fedora/version.rb +1 -1
- data/spec/unit/attributes_spec.rb +22 -4
- 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: de5b5046afb1dd762565465806e9b98a67c21727
|
4
|
+
data.tar.gz: 46a49e17d79a44566e95a61403b233b61a37e556
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa2eec62f59fde87474c31cf72c28ba1f8bfbc3dc8377869d1d9f5bf2d26de643e834d4e34e5b9db1dfa432d3d5bc620791a92bedfcfff24ce2ed23646a99051
|
7
|
+
data.tar.gz: ad05b8ba63965874e5d56e8d2096954705088fc2b19f6fab47aaaaa7cf3fa300d523e2e27141dd78061246a66df7f94d9bdf938b0494013bc51c3aa1c5d5fb03
|
data/History.txt
CHANGED
data/README.md
CHANGED
@@ -28,6 +28,7 @@ module ActiveFedora::Attributes
|
|
28
28
|
mixin.class_eval <<-CODE, __FILE__, __LINE__ + 1
|
29
29
|
def #{name}(*args)
|
30
30
|
vals = get_values(:#{name})
|
31
|
+
return nil unless vals
|
31
32
|
raise ActiveFedora::ConstraintError, "Expected \\"#{name}\\" to have 0-1 statements, but there are \#{vals.size}" if vals.size > 1
|
32
33
|
vals.first
|
33
34
|
end
|
@@ -228,10 +228,28 @@ describe ActiveFedora::Base do
|
|
228
228
|
}.to change { subject.fubar_changed? }.from(false).to(true)
|
229
229
|
end
|
230
230
|
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
231
|
+
context "when a change is made to a property" do
|
232
|
+
it "is marked changed" do
|
233
|
+
expect {
|
234
|
+
subject.goose = ["honk!"]
|
235
|
+
}.to change { subject.goose_changed? }.from(false).to(true)
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
context "when a property is set to the same value" do
|
240
|
+
before do
|
241
|
+
subject.goose = ['honk!', 'Honk']
|
242
|
+
if ActiveModel.version < Gem::Version.new('4.2.0')
|
243
|
+
subject.send(:reset_changes)
|
244
|
+
else
|
245
|
+
subject.send(:clear_changes_information)
|
246
|
+
end
|
247
|
+
end
|
248
|
+
|
249
|
+
it "is not marked changed" do
|
250
|
+
subject.goose = ['honk!', 'Honk']
|
251
|
+
expect(subject.goose_changed?).to be false
|
252
|
+
end
|
235
253
|
end
|
236
254
|
end
|
237
255
|
|
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.4.
|
4
|
+
version: 9.4.3
|
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-09-
|
13
|
+
date: 2015-09-30 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rsolr
|