active-fedora 1.1.11 → 1.1.13

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,11 @@
1
+ 1.1.13
2
+
3
+ MetadataDatastream.update_indexed_attributes was no longer marking the object dirty when triggered. Resulted in changed datastreams not saving. Fixed now.
4
+
5
+ 1.1.12
6
+
7
+ * Minor fix to Base.get_values_from_datstream (wasn't returning default values when necessary)
8
+
1
9
  1.1.11
2
10
 
3
11
  * fix to update_index preventing double-metadata
data/Rakefile CHANGED
@@ -21,7 +21,7 @@ begin
21
21
  gem.add_dependency('mime-types', '>= 1.16')
22
22
  gem.add_dependency('multipart-post')
23
23
  gem.add_dependency('nokogiri')
24
- gem.add_dependency('om', '>= 0.1.7')
24
+ gem.add_dependency('om', '>= 0.1.9')
25
25
  # gem.add_dependency('yaml')
26
26
 
27
27
  gem.add_development_dependency "rspec", ">= 1.2.9"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.11
1
+ 1.1.13
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{active-fedora}
8
- s.version = "1.1.11"
8
+ s.version = "1.1.13"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matt Zumwalt", "McClain Looney"]
12
- s.date = %q{2010-07-02}
12
+ s.date = %q{2010-07-17}
13
13
  s.description = %q{ActiveFedora provides for creating and managing objects in the Fedora Repository Architecture.}
14
14
  s.email = %q{matt.zumwalt@yourmediashelf.com}
15
15
  s.extra_rdoc_files = [
@@ -345,7 +345,7 @@ Gem::Specification.new do |s|
345
345
  s.add_runtime_dependency(%q<mime-types>, [">= 1.16"])
346
346
  s.add_runtime_dependency(%q<multipart-post>, [">= 0"])
347
347
  s.add_runtime_dependency(%q<nokogiri>, [">= 0"])
348
- s.add_runtime_dependency(%q<om>, [">= 0.1.7"])
348
+ s.add_runtime_dependency(%q<om>, [">= 0.1.9"])
349
349
  s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
350
350
  s.add_development_dependency(%q<mocha>, [">= 1.2.9"])
351
351
  s.add_development_dependency(%q<ruby-debug>, [">= 0"])
@@ -355,7 +355,7 @@ Gem::Specification.new do |s|
355
355
  s.add_dependency(%q<mime-types>, [">= 1.16"])
356
356
  s.add_dependency(%q<multipart-post>, [">= 0"])
357
357
  s.add_dependency(%q<nokogiri>, [">= 0"])
358
- s.add_dependency(%q<om>, [">= 0.1.7"])
358
+ s.add_dependency(%q<om>, [">= 0.1.9"])
359
359
  s.add_dependency(%q<rspec>, [">= 1.2.9"])
360
360
  s.add_dependency(%q<mocha>, [">= 1.2.9"])
361
361
  s.add_dependency(%q<ruby-debug>, [">= 0"])
@@ -366,7 +366,7 @@ Gem::Specification.new do |s|
366
366
  s.add_dependency(%q<mime-types>, [">= 1.16"])
367
367
  s.add_dependency(%q<multipart-post>, [">= 0"])
368
368
  s.add_dependency(%q<nokogiri>, [">= 0"])
369
- s.add_dependency(%q<om>, [">= 0.1.7"])
369
+ s.add_dependency(%q<om>, [">= 0.1.9"])
370
370
  s.add_dependency(%q<rspec>, [">= 1.2.9"])
371
371
  s.add_dependency(%q<mocha>, [">= 1.2.9"])
372
372
  s.add_dependency(%q<ruby-debug>, [">= 0"])
@@ -79,6 +79,7 @@ module ActiveFedora
79
79
  values = instance_eval("#{field_name}_values=(new_values)")
80
80
  result[field_name] = {"0"=>values}
81
81
  end
82
+ self.dirty = true
82
83
  end
83
84
  return result
84
85
  end
@@ -136,8 +136,11 @@ class ActiveFedora::NokogiriDatastream < ActiveFedora::Datastream
136
136
  self.class.accessor_xpath(*OM.destringify(field_key) ).nil?
137
137
  end
138
138
  end
139
- result = update_properties( params )
140
- self.dirty = true
139
+ result = {}
140
+ unless params.empty?
141
+ result = update_properties( params )
142
+ self.dirty = true
143
+ end
141
144
  return result
142
145
  end
143
146
 
@@ -54,7 +54,9 @@ describe ActiveFedora::MetadataDatastream do
54
54
  @test_ds.field "swank", :text
55
55
  end
56
56
 
57
- it "should apply submitted hash to corresponding datastream field values" do
57
+ it "should apply submitted hash to corresponding datastream field values and mark the object dirty" do
58
+ @test_ds.should_not be_dirty
59
+
58
60
  att= {"fubar"=>{"-1"=>"mork", "0"=>"york"}}
59
61
  @test_ds.update_indexed_attributes(att)
60
62
  @test_ds.fubar_values.should == ['mork', 'york']
@@ -68,6 +70,8 @@ describe ActiveFedora::MetadataDatastream do
68
70
  result = @test_ds.update_indexed_attributes(att)
69
71
  result.should == {"fubar"=>{"0"=>"hork", "1"=>"tork", '3'=>'dang'}}
70
72
  @test_ds.fubar_values.should == ['hork', 'tork', 'mangle', 'dang']
73
+
74
+ @test_ds.should be_dirty
71
75
  end
72
76
 
73
77
  it "should support single-value arguments (as opposed to a hash of values with array indexes as keys)" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active-fedora
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 9
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 11
10
- version: 1.1.11
9
+ - 13
10
+ version: 1.1.13
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Zumwalt
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-07-02 00:00:00 -05:00
19
+ date: 2010-07-17 00:00:00 +02:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -102,12 +102,12 @@ dependencies:
102
102
  requirements:
103
103
  - - ">="
104
104
  - !ruby/object:Gem::Version
105
- hash: 21
105
+ hash: 9
106
106
  segments:
107
107
  - 0
108
108
  - 1
109
- - 7
110
- version: 0.1.7
109
+ - 9
110
+ version: 0.1.9
111
111
  type: :runtime
112
112
  version_requirements: *id006
113
113
  - !ruby/object:Gem::Dependency