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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 35b37e4ce4fb55f72c525f6868b769f60af55d98
4
- data.tar.gz: 8705a17f008927df6c005fe327825c70479b1abe
3
+ metadata.gz: de5b5046afb1dd762565465806e9b98a67c21727
4
+ data.tar.gz: 46a49e17d79a44566e95a61403b233b61a37e556
5
5
  SHA512:
6
- metadata.gz: 4a534d6c9f2710b9ec7f5802bff389f3fbe8d42152a15d9494eb1c1003acc92d66b9d6727cf2c56986b7ada339ef8e7b5871fe26dcd6fee1bd7b115aee0a58ee
7
- data.tar.gz: 6ee26660bc33f7c8bd21f2c2618f3e0b3bc74355ae022b55bd201da6a85304509a577cd28710995442e78969251a7946ba2fdfd162b810330b5beacd398e3251
6
+ metadata.gz: fa2eec62f59fde87474c31cf72c28ba1f8bfbc3dc8377869d1d9f5bf2d26de643e834d4e34e5b9db1dfa432d3d5bc620791a92bedfcfff24ce2ed23646a99051
7
+ data.tar.gz: ad05b8ba63965874e5d56e8d2096954705088fc2b19f6fab47aaaaa7cf3fa300d523e2e27141dd78061246a66df7f94d9bdf938b0494013bc51c3aa1c5d5fb03
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ v9.4.3
2
+ 2015-09-30: Don't mark an attribute as changed if it's set to the same value
3
+ [Justin Coyne]
4
+
5
+ 2015-09-28: Remove unnecessary whitespace [Justin Coyne]
6
+
1
7
  v9.4.2
2
8
  2015-09-25: Refactor nested_attribute test for easier reading [Justin Coyne]
3
9
 
data/README.md CHANGED
@@ -64,7 +64,7 @@ integration server. To do that, unzip a copy of hydra-jetty first. This includes
64
64
  used during the testing process.
65
65
 
66
66
  ```bash
67
- rake jetty:unzip
67
+ rake jetty:unzip
68
68
  ```
69
69
 
70
70
  Once hydra-jetty is unzipped, the ci rake task will spin up jetty,
@@ -6,7 +6,7 @@ module ActiveFedora
6
6
  def set_value(*val)
7
7
  attribute = val.first
8
8
  unless [:has_model, :modified_date].include? attribute
9
- attribute_will_change!(attribute)
9
+ attribute_will_change!(attribute) unless self[val.first] == val.last
10
10
  end
11
11
  super
12
12
  end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module ActiveFedora
2
- VERSION = "9.4.2"
2
+ VERSION = "9.4.3"
3
3
  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
- it "should work for properties" do
232
- expect {
233
- subject.goose = ["honk!"]
234
- }.to change { subject.goose_changed? }.from(false).to(true)
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.2
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-25 00:00:00.000000000 Z
13
+ date: 2015-09-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rsolr