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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 613a09dfb2ffdd26f9e0823e55cff69c6b961c00
4
- data.tar.gz: 66603795ff46db8c1d2422ae81794eb6577fa9e8
3
+ metadata.gz: 7d200e9daf99c7353b330f224712892324084079
4
+ data.tar.gz: 41a789cec11119fd7c79f21b9743251c7146a642
5
5
  SHA512:
6
- metadata.gz: 29615bcda338d44a3e40972d5e1adb54946ffc14e3473b5c5e3763eff87aac40c792dfc4e6450b3beadcaf896bd2960ff160c065458d2b21dcac118c7a080d8f
7
- data.tar.gz: ea6981f21d6c4cac06f40b2f563f257cdd4bc8ec26591346935593914f27f73b17ee4ab5a9e8fc58ea367f3302045ae2e14bbcf60aed9b0f6291094a3e5959d5
6
+ metadata.gz: e38356f808d2e7d154c561c176c4c6174b263f3d2e3fcc7d6805589c3db7b67ed49069e136321bbc42e74d1f91209f233ac8bb5fde47328a4e93b46cd64f2431
7
+ data.tar.gz: 763d99fd97419eb7df26a6fd2a7da0094c24bdf53b90d2fa2cfa72d17a4f0cf9bbc652a35868eb3027dbc793f7876ea60e880a8c016bb547ec50dc42e315e773
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.7.3
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
- mod_time = ProfileParser.canonicalize_date(ds.dsCreateDate)
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.3
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-17 00:00:00.000000000 Z
11
+ date: 2014-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastercsv