active-fedora 3.1.0.rc2 → 3.1.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active-fedora (3.1.0.pre10)
4
+ active-fedora (3.1.0.rc2)
5
5
  activeresource (~> 3.0.0)
6
6
  activesupport (~> 3.0.0)
7
7
  equivalent-xml
@@ -13,7 +13,7 @@ PATH
13
13
  om (>= 1.4.3)
14
14
  rdf
15
15
  rdf-rdfxml
16
- rubydora (~> 0.1.9)
16
+ rubydora (= 0.2.1)
17
17
  solr-ruby (>= 0.0.6)
18
18
  solrizer (> 1.0.0)
19
19
  xml-simple (>= 1.0.12)
@@ -59,7 +59,7 @@ GEM
59
59
  logger (1.2.8)
60
60
  mediashelf-loggable (0.4.7)
61
61
  metaclass (0.0.1)
62
- mime-types (1.16)
62
+ mime-types (1.17.2)
63
63
  mocha (0.10.0)
64
64
  metaclass (~> 0.0.1)
65
65
  multipart-post (1.1.2)
@@ -87,7 +87,7 @@ GEM
87
87
  ruby-debug-base (~> 0.10.4.0)
88
88
  ruby-debug-base (0.10.4)
89
89
  linecache (>= 0.3)
90
- rubydora (0.1.9)
90
+ rubydora (0.2.1)
91
91
  activemodel
92
92
  activesupport
93
93
  fastercsv
@@ -27,7 +27,7 @@ Gem::Specification.new do |s|
27
27
  s.add_dependency("mediashelf-loggable")
28
28
  s.add_dependency("equivalent-xml")
29
29
  s.add_dependency("facets")
30
- s.add_dependency("rubydora", '~>0.1.9')
30
+ s.add_dependency("rubydora", '0.2.1')
31
31
  s.add_dependency("rdf")
32
32
  s.add_dependency("rdf-rdfxml")
33
33
  s.add_development_dependency("yard")
@@ -10,7 +10,6 @@ module ActiveFedora
10
10
  include Solrizer::FieldNameMapper
11
11
  attr_accessor :model
12
12
 
13
-
14
13
  def changed?
15
14
  (model && model.relationships_are_dirty) || super
16
15
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveFedora
2
- VERSION = "3.1.0.rc2"
2
+ VERSION = "3.1.0.rc3"
3
3
  end
@@ -36,6 +36,31 @@ class MockAFBaseFromSolr < ActiveFedora::Base
36
36
  end
37
37
  end
38
38
 
39
+ describe "Datastreams synched together" do
40
+ before do
41
+ class DSTest < ActiveFedora::Base
42
+ def configure_defined_datastreams
43
+ super
44
+ unless self.datastreams.keys.include? 'test_ds'
45
+ add_file_datastream("XXX",:dsid=>'test_ds', :mimeType=>'text/html')
46
+ end
47
+ end
48
+ end
49
+ end
50
+ it "Should update datastream" do
51
+ @nc = DSTest.new
52
+ @nc.save
53
+ @nc.test_ds.content.should == 'XXX'
54
+ ds = @nc.datastreams['test_ds']
55
+ ds.content = "Foobar"
56
+ @nc.save
57
+ DSTest.find(@nc.pid).datastreams['test_ds'].content.should == 'Foobar'
58
+ DSTest.find(@nc.pid).test_ds.content.should == 'Foobar'
59
+ end
60
+
61
+ end
62
+
63
+
39
64
  describe ActiveFedora::Base do
40
65
 
41
66
  before(:all) do
@@ -738,8 +763,8 @@ describe ActiveFedora::Base do
738
763
  minivan = f.read
739
764
  f.rewind
740
765
  f2 = File.new(File.join( File.dirname(__FILE__), "../fixtures/dino.jpg" ))
741
- dino = f.read
742
- f.rewind
766
+ dino = f2.read
767
+ f2.rewind
743
768
  f.stubs(:content_type).returns("image/jpeg")
744
769
  f.stubs(:original_filename).returns("minivan.jpg")
745
770
  f2.stubs(:content_type).returns("image/jpeg")
@@ -400,8 +400,8 @@ describe ActiveFedora::Base do
400
400
 
401
401
  rels_ext = ActiveFedora::RelsExtDatastream.new(@test_object.inner_object, 'RELS-EXT')
402
402
  rels_ext.model = @test_object
403
- rels_ext.expects(:new?).returns(true)
404
- rels_ext.expects(:save).returns(true)
403
+ rels_ext.expects(:changed?).returns(true).times(3) # FIXME Rubydora is holding one object, while we have a different one.
404
+ rels_ext.expects(:save).returns(true).twice #TODO why two times?
405
405
  rels_ext.expects(:serialize!)
406
406
  clean_ds = mock("ds2")
407
407
  clean_ds.stubs(:dirty? => false, :changed? => false, :new? => false)
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active-fedora
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15424097
4
+ hash: 15424099
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 3
8
8
  - 1
9
9
  - 0
10
10
  - rc
11
- - 2
12
- version: 3.1.0.rc2
11
+ - 3
12
+ version: 3.1.0.rc3
13
13
  platform: ruby
14
14
  authors:
15
15
  - Matt Zumwalt
@@ -18,7 +18,7 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2011-10-28 00:00:00 -05:00
21
+ date: 2011-10-30 00:00:00 -05:00
22
22
  default_executable:
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency
@@ -210,14 +210,14 @@ dependencies:
210
210
  requirement: &id013 !ruby/object:Gem::Requirement
211
211
  none: false
212
212
  requirements:
213
- - - ~>
213
+ - - "="
214
214
  - !ruby/object:Gem::Version
215
- hash: 9
215
+ hash: 21
216
216
  segments:
217
217
  - 0
218
+ - 2
218
219
  - 1
219
- - 9
220
- version: 0.1.9
220
+ version: 0.2.1
221
221
  type: :runtime
222
222
  version_requirements: *id013
223
223
  - !ruby/object:Gem::Dependency