active-fedora 6.4.1 → 6.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 967a4215aac7cba00431147cd02fd5e9f96b04f1
4
- data.tar.gz: 3eb487a369aa83bfe1d9de8f1d016a5950ffa5a7
3
+ metadata.gz: 3121b41531277d5c0351a7e657d063fb628ba733
4
+ data.tar.gz: 48e5886abd01bc9afb4329004c8293401a89708d
5
5
  SHA512:
6
- metadata.gz: 9fd89f5819540cb4cd994f4009151d089b5d45f4502a7a0ee1480c4e6eadf2a6386c83e0ae95ea182e9054f324a8b20ee011a34d6bfec987f07459048911cdae
7
- data.tar.gz: 43f479f7be5b7a683eb748ac06e03150c897bc1b0ac9d1ea650a5b9c158fef9039aeeb1582b707a2136ac6c5b218aa011812e6492aa4b75e8f9e34078b75cb14
6
+ metadata.gz: 3757c8465f920bf90ce99c8319d58137c335929c8d5b115b157491e2f86a5df1a7686675f2e5c516ab434e28e55fa309afd0b0f4db02f58be10baf01684769e7
7
+ data.tar.gz: 6e3b6a10c6bc56d075df2779e2cc18b3574dd254e18df6fda760c8478177cf191281e6dad210f74cc4cb52dcc522756da66a43cff215d6d1eb265965bb41c14b
@@ -242,7 +242,7 @@ module ActiveFedora
242
242
  run_callbacks(:create) { super }
243
243
  end
244
244
 
245
- def update(*) #:nodoc:
245
+ def update_record(*) #:nodoc:
246
246
  run_callbacks(:update) { super }
247
247
  end
248
248
  end
@@ -11,7 +11,7 @@ module ActiveFedora
11
11
  result = create
12
12
  update_index if create_needs_index?
13
13
  else
14
- result = update
14
+ result = update_record
15
15
  update_index if update_needs_index?
16
16
  end
17
17
  return result
@@ -27,11 +27,14 @@ module ActiveFedora
27
27
  add_relationship(:has_model, self.class.to_class_uri)
28
28
  end
29
29
 
30
- def update_attributes(properties)
31
- self.attributes=properties
30
+ # Pushes the object and all of its new or dirty datastreams into Fedora
31
+ def update(attributes)
32
+ self.attributes=attributes
32
33
  save
33
34
  end
34
35
 
36
+ alias update_attributes update
37
+
35
38
  # Refreshes the object's info from Fedora
36
39
  # Note: Currently just registers any new datastreams that have appeared in fedora
37
40
  def refresh
@@ -138,16 +141,15 @@ module ActiveFedora
138
141
  persist
139
142
  end
140
143
 
144
+ def update_record
145
+ persist
146
+ end
147
+
141
148
  # replace the unsaved digital object with a saved digital object
142
149
  def assign_pid
143
150
  @inner_object = @inner_object.save
144
151
  end
145
152
 
146
- # Pushes the object and all of its new or dirty datastreams into Fedora
147
- def update
148
- persist
149
- end
150
-
151
153
  def persist
152
154
  result = @inner_object.save
153
155
 
@@ -1,3 +1,3 @@
1
1
  module ActiveFedora
2
- VERSION = "6.4.1"
2
+ VERSION = "6.4.2"
3
3
  end
@@ -339,7 +339,7 @@ describe ActiveFedora::Base do
339
339
 
340
340
  it "should update an existing record" do
341
341
  @test_object.stub(:new_record? => false)
342
- @test_object.should_receive(:update)
342
+ @test_object.should_receive(:update_record)
343
343
  @test_object.should_receive(:update_index)
344
344
  @test_object.save
345
345
  end
@@ -519,7 +519,6 @@ pending "This is broken, and deprecated. I don't want to fix it - jcoyne"
519
519
  end
520
520
 
521
521
  describe "update_attributes" do
522
-
523
522
  it "should set the attributes and save" do
524
523
  m = FooHistory.new
525
524
  att= {"fubar"=> '1234', "baz" =>'stuff'}
@@ -530,6 +529,18 @@ pending "This is broken, and deprecated. I don't want to fix it - jcoyne"
530
529
  m.update_attributes(att)
531
530
  end
532
531
  end
532
+
533
+ describe "update" do
534
+ it "should set the attributes and save" do
535
+ m = FooHistory.new
536
+ att= {"fubar"=> '1234', "baz" =>'stuff'}
537
+
538
+ m.should_receive(:fubar=).with('1234')
539
+ m.should_receive(:baz=).with('stuff')
540
+ m.should_receive(:save)
541
+ m.update(att)
542
+ end
543
+ end
533
544
 
534
545
  describe "update_indexed_attributes" do
535
546
  before do
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: 6.4.1
4
+ version: 6.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Zumwalt