rubydora 1.7.3 → 1.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/rubydora/digital_object.rb +3 -1
- data/spec/lib/digital_object_spec.rb +10 -0
- 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: 7d200e9daf99c7353b330f224712892324084079
|
4
|
+
data.tar.gz: 41a789cec11119fd7c79f21b9743251c7146a642
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e38356f808d2e7d154c561c176c4c6174b263f3d2e3fcc7d6805589c3db7b67ed49069e136321bbc42e74d1f91209f233ac8bb5fde47328a4e93b46cd64f2431
|
7
|
+
data.tar.gz: 763d99fd97419eb7df26a6fd2a7da0094c24bdf53b90d2fa2cfa72d17a4f0cf9bbc652a35868eb3027dbc793f7876ea60e880a8c016bb547ec50dc42e315e773
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.7.
|
1
|
+
1.7.4
|
@@ -283,7 +283,9 @@ module Rubydora
|
|
283
283
|
mod_time = memo_time
|
284
284
|
self.datastreams.select { |dsid, ds| ds.changed? }.each do |dsid, ds|
|
285
285
|
ds.save
|
286
|
-
|
286
|
+
if ds.dsCreateDate
|
287
|
+
mod_time = ProfileParser.canonicalize_date(ds.dsCreateDate)
|
288
|
+
end
|
287
289
|
end
|
288
290
|
mod_time
|
289
291
|
end
|
@@ -269,6 +269,16 @@ describe Rubydora::DigitalObject do
|
|
269
269
|
# object date should be canonicalized and updated
|
270
270
|
@object.lastModifiedDate.should == '2012-01-02:05:15:45.1Z'
|
271
271
|
end
|
272
|
+
|
273
|
+
it "should not set lastModifiedDate if the before_save callback is false" do
|
274
|
+
@object.stub(:datastreams) { { :changed_ds => @changed_ds } }
|
275
|
+
@changed_ds.should_receive(:dsCreateDate).and_return(nil)
|
276
|
+
@changed_ds.should_receive(:save)
|
277
|
+
@object.should_not_receive(:lastModifiedDate=)
|
278
|
+
@object.save
|
279
|
+
# object date should be unchanged from its original value
|
280
|
+
@object.lastModifiedDate.should == '2011-01-02:05:15:45.1Z'
|
281
|
+
end
|
272
282
|
|
273
283
|
it "should save a datastream whose attributes have changed" do
|
274
284
|
@object.stub(:datastreams) { { :changed_attr_ds => @changed_attr_ds } }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubydora
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Beer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastercsv
|