active-fedora 6.0.0.rc5 → 6.0.0.rc6

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: d4e2f066e9427bc89c4e04d96ee04b95b5dd1589
4
- data.tar.gz: cfa6839afae6e7a17734bcc80599afa75da00e8d
3
+ metadata.gz: 9409f2deb359a4478e64508db0a9e1efeddd3ede
4
+ data.tar.gz: 24abcbc60267a4dc7d119ea21e02bdf792f12b39
5
5
  SHA512:
6
- metadata.gz: c88d464c1acd22f8f8e4c6c5a905c78b7dae98f86b14a3a735ddb84139e54c2e497d22d3e627a7bf1c2144f40f17cb04fe3275030564430cf6df0c3e18039b5f
7
- data.tar.gz: 39c20226680cd0c79c4e39bcbf69cddd5c6d426b8c32c89b7efc913c0f92e3a2a56df57e2b2804812effeb4207040a96c42e13c947e8d232919e9361c5c712ca
6
+ metadata.gz: c3447788f7c5fbe82a19d97bee6f6c4b8fbef4811738e3555f9c853d18e0e77f8b3acc1114d342f27177d9b65ecfde8e45818568337d82cd4856bb145b42f029
7
+ data.tar.gz: 0e0471d596cd79f882e9face2f5f70c6a93ff72ce19e6759e081c79d7db2575354f1b74aa044ea7f807857c8af6455b1a05fa2c4f204ea8af9b76a30236fac5e
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
31
31
  s.add_development_dependency("yard")
32
32
  s.add_development_dependency("RedCloth") # for RDoc formatting
33
33
  s.add_development_dependency("rake")
34
- s.add_development_dependency("jettywrapper", ">=1.2.0")
34
+ s.add_development_dependency("jettywrapper", ">=1.4.0")
35
35
  s.add_development_dependency("rspec", ">= 2.9.0")
36
36
  s.add_development_dependency("equivalent-xml")
37
37
  s.add_development_dependency("rest-client")
@@ -8,7 +8,7 @@ module ActiveFedora
8
8
 
9
9
  def [] (key)
10
10
  if key == 'DC' && !has_key?(key)
11
- ds = Datastream.new(@obj.inner_object, key)
11
+ ds = Datastream.new(@obj.inner_object, key, :controlGroup=>'X')
12
12
  self[key] = ds
13
13
  end
14
14
  super
@@ -4,7 +4,7 @@ module ActiveFedora
4
4
 
5
5
  included do
6
6
  class_attribute :ds_specs
7
- self.ds_specs = {'RELS-EXT'=> {:type=> ActiveFedora::RelsExtDatastream, :label=>"Fedora Object-to-Object Relationship Metadata", :control_group=>'X', :block=>nil}}
7
+ self.ds_specs = {'RELS-EXT'=> {:type=> ActiveFedora::RelsExtDatastream, :label=>"Fedora Object-to-Object Relationship Metadata", :block=>nil}}
8
8
  class << self
9
9
  def inherited_with_datastreams(kls) #:nodoc:
10
10
  ## Do some inheritance logic that doesn't override Base.inherited
@@ -16,7 +16,7 @@ module ActiveFedora
16
16
  end
17
17
 
18
18
  def self.default_attributes
19
- super.merge(:controlGroup => 'X', :mimeType => 'text/xml')
19
+ super.merge(:controlGroup => 'M', :mimeType => 'text/xml')
20
20
  end
21
21
 
22
22
  # Create an instance of this class based on xml content
@@ -10,7 +10,7 @@ module ActiveFedora
10
10
  false
11
11
  end
12
12
  end
13
-
13
+
14
14
  include OM::XML::Document
15
15
  include OM::XML::TerminologyBasedSolrizer # this adds support for calling .to_solr
16
16
 
@@ -20,7 +20,7 @@ module ActiveFedora
20
20
  attr_accessor :internal_solr_doc
21
21
 
22
22
  def self.default_attributes
23
- super.merge(:controlGroup => 'X', :mimeType => 'text/xml')
23
+ super.merge(:controlGroup => 'M', :mimeType => 'text/xml')
24
24
  end
25
25
 
26
26
  # Create an instance of this class based on xml content
@@ -95,10 +95,9 @@ module ActiveFedora
95
95
  true
96
96
  end
97
97
 
98
- def content
99
- return to_xml if ng_xml_changed? || autocreate?
100
- val = local_or_remote_content(false)
101
- val unless val == "<?xml version=\"1.0\"?>\n"
98
+ def local_or_remote_content(ensure_fetch = true)
99
+ @content = to_xml if ng_xml_changed? || autocreate?
100
+ super
102
101
  end
103
102
 
104
103
  def autocreate?
@@ -7,8 +7,8 @@ module ActiveFedora
7
7
 
8
8
  attr_accessor :model
9
9
 
10
- def self.default_attributes
11
- super.merge(:mimeType => 'application/rdf+xml')
10
+ def self.default_attributes
11
+ super.merge(:controlGroup => 'X', :mimeType => 'application/rdf+xml')
12
12
  end
13
13
 
14
14
  def changed?
@@ -1,3 +1,3 @@
1
1
  module ActiveFedora
2
- VERSION = "6.0.0.rc5"
2
+ VERSION = "6.0.0.rc6"
3
3
  end
@@ -2,38 +2,6 @@ APP_ROOT = File.expand_path("#{File.dirname(__FILE__)}/../../")
2
2
 
3
3
  require 'jettywrapper'
4
4
 
5
- namespace :jetty do
6
- JETTY_URL = 'https://github.com/projecthydra/hydra-jetty/archive/new-solr-schema.zip'
7
- JETTY_ZIP = File.join 'tmp', JETTY_URL.split('/').last
8
- JETTY_DIR = 'jetty'
9
-
10
- desc "download the jetty zip file"
11
- task :download do
12
- system 'mkdir tmp' unless File.directory? 'tmp'
13
- puts "Downloading jetty..."
14
- system "curl -L #{JETTY_URL} -o #{JETTY_ZIP}"
15
- abort "Unable to download jetty from #{JETTY_URL}" unless $?.success?
16
- end
17
-
18
- task :unzip do
19
- Rake::Task["jetty:download"].invoke unless File.exists? JETTY_ZIP
20
- puts "Unpacking jetty..."
21
- tmp_save_dir = File.join 'tmp', 'jetty_generator'
22
- system "unzip -d #{tmp_save_dir} -qo #{JETTY_ZIP}"
23
- abort "Unable to unzip #{JETTY_ZIP} into tmp_save_dir/" unless $?.success?
24
-
25
- expanded_dir = Dir[File.join(tmp_save_dir, "hydra-jetty-*")].first
26
-
27
- system "mv #{expanded_dir} #{JETTY_DIR}"
28
- abort "Unable to move #{expanded_dir} into #{JETTY_DIR}/" unless $?.success?
29
- end
30
-
31
- task :clean do
32
- system "rm -rf #{JETTY_DIR}"
33
- Rake::Task["jetty:unzip"].invoke
34
- end
35
- end
36
-
37
5
  namespace :active_fedora do
38
6
  require 'active-fedora'
39
7
 
@@ -6,46 +6,31 @@ require "rexml/document"
6
6
  include ActiveFedora::Model
7
7
 
8
8
  describe 'bugs' do
9
- before :all do
9
+ before do
10
10
  class FooHistory < ActiveFedora::Base
11
11
  has_metadata :type=>ActiveFedora::SimpleDatastream, :name=>"someData" do |m|
12
12
  m.field "fubar", :string
13
- m.field "swank", :text
14
- end
15
- has_metadata :type=>ActiveFedora::SimpleDatastream, :name=>"withText" do |m|
16
- m.field "fubar", :text
17
13
  end
18
14
  end
19
- end
20
- after :all do
21
- Object.send(:remove_const, :FooHistory)
22
- end
23
-
24
- before(:each) do
25
15
  @test_object = FooHistory.new
26
16
  @test_object.save
27
17
  end
28
- after(:each) do
18
+ after do
29
19
  @test_object.delete
20
+ Object.send(:remove_const, :FooHistory)
30
21
  end
31
- it "should not clobber everything when setting a value" do
32
- ds = @test_object.datastreams["someData"]
33
- ds.fubar.should == []
34
- ds.should_not be_nil
35
- ds.fubar=['bar']
36
- ds.fubar.should == ['bar']
37
- @test_object.save
38
22
 
39
- @test_object.pid.should_not be_nil
23
+ it "should not clobber everything when setting a value" do
24
+ @test_object.someData.fubar=['initial']
25
+ @test_object.save!
40
26
 
41
27
  x = FooHistory.find(@test_object.pid)
42
- ds2 = x.datastreams["someData"]
43
- ds2.fubar.should == ['bar']
44
- ds2.fubar = ["meh"]
45
- ds2.fubar.should == ["meh"]
46
- x.save
28
+ x.someData.fubar = ["replacement"] # set a new value
29
+ x.save!
30
+
31
+
47
32
  x = FooHistory.find(@test_object.pid)
48
- x.datastreams['someData'].fubar.should == ["meh"]
33
+ x.someData.fubar.should == ["replacement"] # recall the value
49
34
  x.save
50
35
  end
51
36
  end
@@ -3,31 +3,21 @@ require "solrizer"
3
3
 
4
4
  describe ActiveFedora::OmDatastream do
5
5
 
6
- before(:all) do
7
- class HydrangeaArticle2 < ActiveFedora::Base
8
- # Uses the Hydra MODS Article profile for tracking most of the descriptive metadata
9
- has_metadata :name => "descMetadata", :type => Hydra::ModsArticleDatastream
10
-
11
- # A place to put extra metadata values
12
- has_metadata :name => "properties", :type => ActiveFedora::SimpleDatastream do |m|
13
- m.field 'collection', :string
14
- end
15
- end
16
-
17
- end
18
-
19
- after(:all) do
20
- Object.send(:remove_const, :HydrangeaArticle2)
21
- end
22
-
23
6
  describe "an new instance with a inline datastream" do
24
7
  before do
25
- @obj = HydrangeaArticle2.new
8
+ class HydrangeaArticle3 < ActiveFedora::Base
9
+ # Uses the Hydra MODS Article profile for tracking most of the descriptive metadata
10
+ has_metadata :name => "descMetadata", :type => Hydra::ModsArticleDatastream, :control_group => 'X'
11
+
12
+ end
13
+
14
+ @obj = HydrangeaArticle3.new
26
15
  @obj.save
27
16
  @obj.descMetadata.should be_inline
28
17
  end
29
18
  after do
30
19
  @obj.destroy
20
+ Object.send(:remove_const, :HydrangeaArticle3)
31
21
  end
32
22
  it "should not be changed when no fields have been set" do
33
23
  @obj.descMetadata.should_not be_content_changed
@@ -36,108 +26,138 @@ describe ActiveFedora::OmDatastream do
36
26
  @obj.descMetadata.title = 'Foobar'
37
27
  @obj.descMetadata.should be_content_changed
38
28
  end
39
- end
29
+ describe "#changed?" do
30
+ it "should not be changed if the new xml matches the old xml" do
31
+ @pid = "hydrangea:fixture_mods_article2"
32
+ @test_object = HydrangeaArticle3.find(@pid)
40
33
 
34
+ @test_object.descMetadata.ng_xml = @test_object.descMetadata.ng_xml
35
+ @test_object.descMetadata.should_not be_changed
36
+ end
41
37
 
42
- describe "#changed?" do
43
- it "should not be changed if the new xml matches the old xml" do
44
- @pid = "hydrangea:fixture_mods_article2"
45
- @test_object = HydrangeaArticle2.find(@pid)
38
+ it "should not be changed if there are minor differences in whitespace" do
39
+ obj = HydrangeaArticle3.new
40
+ obj.descMetadata.content = "<a>1</a>"
41
+ obj.save
42
+ obj.descMetadata.should_not be_changed
43
+ obj.descMetadata.content = "<a>1</a>\n"
44
+ obj.descMetadata.should_not be_changed
45
+ end
46
+ end
47
+ end
46
48
 
47
- @test_object.descMetadata.ng_xml = @test_object.descMetadata.ng_xml
48
- @test_object.descMetadata.should_not be_changed
49
+
50
+ describe "an instance that is a managed datastream" do
51
+ before(:all) do
52
+ class HydrangeaArticle2 < ActiveFedora::Base
53
+ # Uses the Hydra MODS Article profile for tracking most of the descriptive metadata
54
+ has_metadata :name => "descMetadata", :type => Hydra::ModsArticleDatastream
55
+ end
49
56
  end
50
57
 
58
+ after(:all) do
59
+ Object.send(:remove_const, :HydrangeaArticle2)
60
+ end
51
61
 
52
- it "should not be changed if there are minor differences in whitespace" do
62
+ describe "#changed?" do
63
+ it "should not be changed if the new xml matches the old xml" do
64
+ @pid = "hydrangea:fixture_mods_article2"
65
+ @test_object = HydrangeaArticle2.find(@pid)
53
66
 
54
- obj = HydrangeaArticle2.new
55
- obj.descMetadata.content = "<a>1</a>"
56
- obj.save
57
- obj.descMetadata.should_not be_changed
58
- obj.descMetadata.content = "<a>1</a>\n"
59
- obj.descMetadata.should_not be_changed
67
+ @test_object.descMetadata.ng_xml = @test_object.descMetadata.ng_xml
68
+ @test_object.descMetadata.should_not be_changed
69
+ end
60
70
 
71
+ it "should be changed if there are minor differences in whitespace" do
72
+ obj = HydrangeaArticle2.new
73
+ obj.descMetadata.content = "<a>1</a>"
74
+ obj.save
75
+ obj.descMetadata.should_not be_changed
76
+ obj.descMetadata.content = "<a>1</a>\n"
77
+ obj.descMetadata.should be_changed
78
+ end
61
79
  end
62
- end
63
80
 
64
- describe "empty datastream content" do
65
- it "should not break when there is empty datastream content" do
66
- obj = HydrangeaArticle2.new
67
- obj.descMetadata.content = ""
68
- obj.save
69
81
 
70
- end
71
- end
72
82
 
73
- describe '.term_values' do
74
- before do
75
- @pid = "hydrangea:fixture_mods_article2"
76
- @test_object = HydrangeaArticle2.find(@pid)
77
- @test_object.descMetadata.content = File.read(fixture('mods_articles/hydrangea_article1.xml'))
78
- @test_object.save
79
- @test_object = HydrangeaArticle2.find(@pid)
80
- @test_solr_object = ActiveFedora::Base.load_instance_from_solr(@pid)
81
- end
83
+ describe "empty datastream content" do
84
+ it "should not break when there is empty datastream content" do
85
+ obj = HydrangeaArticle2.new
86
+ obj.descMetadata.content = ""
87
+ obj.save
82
88
 
83
- it "should return the same values whether getting from solr or Fedora" do
84
- @test_solr_object.datastreams["descMetadata"].term_values(:name,:role,:text).should == ["Creator","Contributor","Funder","Host"]
85
- @test_solr_object.datastreams["descMetadata"].term_values({:name=>0},:role,:text).should == ["Creator"]
86
- @test_solr_object.datastreams["descMetadata"].term_values({:name=>1},:role,:text).should == ["Contributor"]
87
- @test_solr_object.datastreams["descMetadata"].term_values({:name=>0},{:role=>0},:text).should == ["Creator"]
88
- @test_solr_object.datastreams["descMetadata"].term_values({:name=>1},{:role=>0},:text).should == ["Contributor"]
89
- @test_solr_object.datastreams["descMetadata"].term_values({:name=>1},{:role=>1},:text).should == []
90
- ar = @test_solr_object.datastreams["descMetadata"].term_values(:name,{:role=>0},:text)
91
- ar.length.should == 4
92
- ar.include?("Creator").should == true
93
- ar.include?("Contributor").should == true
94
- ar.include?("Funder").should == true
95
- ar.include?("Host").should == true
96
-
97
- @test_object.datastreams["descMetadata"].term_values(:name,:role,:text).should == ["Creator","Contributor","Funder","Host"]
98
- @test_object.datastreams["descMetadata"].term_values({:name=>0},:role,:text).should == ["Creator"]
99
- @test_object.datastreams["descMetadata"].term_values({:name=>1},:role,:text).should == ["Contributor"]
100
- @test_object.datastreams["descMetadata"].term_values({:name=>0},{:role=>0},:text).should == ["Creator"]
101
- @test_object.datastreams["descMetadata"].term_values({:name=>1},{:role=>0},:text).should == ["Contributor"]
102
- @test_object.datastreams["descMetadata"].term_values({:name=>1},{:role=>1},:text).should == []
103
- ar = @test_object.datastreams["descMetadata"].term_values(:name,{:role=>0},:text)
104
- ar.length.should == 4
105
- ar.include?("Creator").should == true
106
- ar.include?("Contributor").should == true
107
- ar.include?("Funder").should == true
108
- ar.include?("Host").should == true
89
+ end
109
90
  end
110
- end
111
-
112
- describe '.update_values' do
113
- before do
114
- @pid = "hydrangea:fixture_mods_article2"
115
- @test_object = HydrangeaArticle2.find(@pid)
116
- @test_object.descMetadata.content = File.read(fixture('mods_articles/hydrangea_article1.xml'))
117
- @test_object.save
118
- @test_object = HydrangeaArticle2.find(@pid)
91
+
92
+ describe '.term_values' do
93
+ before do
94
+ @pid = "hydrangea:fixture_mods_article2"
95
+ @test_object = HydrangeaArticle2.find(@pid)
96
+ @test_object.descMetadata.content = File.read(fixture('mods_articles/hydrangea_article1.xml'))
97
+ @test_object.save
98
+ @test_object = HydrangeaArticle2.find(@pid)
99
+ @test_solr_object = ActiveFedora::Base.load_instance_from_solr(@pid)
100
+ end
101
+
102
+ it "should return the same values whether getting from solr or Fedora" do
103
+ @test_solr_object.datastreams["descMetadata"].term_values(:name,:role,:text).should == ["Creator","Contributor","Funder","Host"]
104
+ @test_solr_object.datastreams["descMetadata"].term_values({:name=>0},:role,:text).should == ["Creator"]
105
+ @test_solr_object.datastreams["descMetadata"].term_values({:name=>1},:role,:text).should == ["Contributor"]
106
+ @test_solr_object.datastreams["descMetadata"].term_values({:name=>0},{:role=>0},:text).should == ["Creator"]
107
+ @test_solr_object.datastreams["descMetadata"].term_values({:name=>1},{:role=>0},:text).should == ["Contributor"]
108
+ @test_solr_object.datastreams["descMetadata"].term_values({:name=>1},{:role=>1},:text).should == []
109
+ ar = @test_solr_object.datastreams["descMetadata"].term_values(:name,{:role=>0},:text)
110
+ ar.length.should == 4
111
+ ar.include?("Creator").should == true
112
+ ar.include?("Contributor").should == true
113
+ ar.include?("Funder").should == true
114
+ ar.include?("Host").should == true
115
+
116
+ @test_object.datastreams["descMetadata"].term_values(:name,:role,:text).should == ["Creator","Contributor","Funder","Host"]
117
+ @test_object.datastreams["descMetadata"].term_values({:name=>0},:role,:text).should == ["Creator"]
118
+ @test_object.datastreams["descMetadata"].term_values({:name=>1},:role,:text).should == ["Contributor"]
119
+ @test_object.datastreams["descMetadata"].term_values({:name=>0},{:role=>0},:text).should == ["Creator"]
120
+ @test_object.datastreams["descMetadata"].term_values({:name=>1},{:role=>0},:text).should == ["Contributor"]
121
+ @test_object.datastreams["descMetadata"].term_values({:name=>1},{:role=>1},:text).should == []
122
+ ar = @test_object.datastreams["descMetadata"].term_values(:name,{:role=>0},:text)
123
+ ar.length.should == 4
124
+ ar.include?("Creator").should == true
125
+ ar.include?("Contributor").should == true
126
+ ar.include?("Funder").should == true
127
+ ar.include?("Host").should == true
128
+ end
119
129
  end
130
+
131
+ describe '.update_values' do
132
+ before do
133
+ @pid = "hydrangea:fixture_mods_article2"
134
+ @test_object = HydrangeaArticle2.find(@pid)
135
+ @test_object.descMetadata.content = File.read(fixture('mods_articles/hydrangea_article1.xml'))
136
+ @test_object.save
137
+ @test_object = HydrangeaArticle2.find(@pid)
138
+ end
120
139
 
121
- it "should not be dirty after .update_values is saved" do
122
- @test_object.datastreams["descMetadata"].update_values([{:name=>0},{:role=>0},:text] =>"Funder")
123
- @test_object.datastreams["descMetadata"].should be_changed
124
- @test_object.save
125
- @test_object.datastreams["descMetadata"].should_not be_changed
126
- @test_object.datastreams["descMetadata"].term_values({:name=>0},{:role=>0},:text).should == ["Funder"]
127
- end
128
- end
140
+ it "should not be dirty after .update_values is saved" do
141
+ @test_object.datastreams["descMetadata"].update_values([{:name=>0},{:role=>0},:text] =>"Funder")
142
+ @test_object.datastreams["descMetadata"].should be_changed
143
+ @test_object.save
144
+ @test_object.datastreams["descMetadata"].should_not be_changed
145
+ @test_object.datastreams["descMetadata"].term_values({:name=>0},{:role=>0},:text).should == ["Funder"]
146
+ end
147
+ end
129
148
 
130
149
 
131
- describe ".to_solr" do
132
- before do
133
- object = HydrangeaArticle2.new
134
- object.descMetadata.journal.issue.publication_date = Date.parse('2012-11-02')
135
- object.save!
136
- @test_object = HydrangeaArticle2.find(object.pid)
150
+ describe ".to_solr" do
151
+ before do
152
+ object = HydrangeaArticle2.new
153
+ object.descMetadata.journal.issue.publication_date = Date.parse('2012-11-02')
154
+ object.save!
155
+ @test_object = HydrangeaArticle2.find(object.pid)
137
156
 
138
- end
139
- it "should solrize terms with :type=>'date' to *_dt solr terms" do
140
- @test_object.to_solr[ActiveFedora::SolrService.solr_name('mods_journal_issue_publication_date', type: :date)].should == ['2012-11-02T00:00:00Z']
157
+ end
158
+ it "should solrize terms with :type=>'date' to *_dt solr terms" do
159
+ @test_object.to_solr[ActiveFedora::SolrService.solr_name('mods_journal_issue_publication_date', type: :date)].should == ['2012-11-02T00:00:00Z']
160
+ end
141
161
  end
142
162
  end
143
163
  end
@@ -177,9 +177,10 @@ describe ActiveFedora::Datastreams do
177
177
 
178
178
  describe "#dc" do
179
179
  it "should be the DC datastream" do
180
- m = mock
181
- subject.stub(:datastreams => { 'DC' => m})
182
- subject.dc.should == m
180
+ subject.dc.should be_kind_of ActiveFedora::Datastream
181
+ end
182
+ it "should be an inline datastream" do
183
+ subject.dc.controlGroup.should == 'X'
183
184
  end
184
185
  end
185
186
 
@@ -22,6 +22,10 @@ describe ActiveFedora::NomDatastream do
22
22
  subject.to_solr['a_s'].should include('123')
23
23
  subject.to_solr['b_s'].should include('asdf')
24
24
  end
25
+
26
+ it "should be a managed datastream" do
27
+ subject.controlGroup.should == 'M'
28
+ end
25
29
  end
26
30
 
27
31
  describe "with options for .set_terminology" do
@@ -54,4 +58,4 @@ describe ActiveFedora::NomDatastream do
54
58
  end
55
59
 
56
60
  end
57
- end
61
+ end
@@ -31,11 +31,10 @@ describe ActiveFedora::OmDatastream do
31
31
  @test_ds.stub(:new? => false)
32
32
  end
33
33
 
34
- after(:each) do
35
- end
36
-
37
34
  its(:metadata?) { should be_true}
38
35
 
36
+ its(:controlGroup) { should == "M"}
37
+
39
38
  it "should include the Solrizer::XML::TerminologyBasedSolrizer for .to_solr support" do
40
39
  ActiveFedora::OmDatastream.included_modules.should include(OM::XML::TerminologyBasedSolrizer)
41
40
  end
@@ -175,7 +174,7 @@ describe ActiveFedora::OmDatastream do
175
174
  @test_ds.stub(:new? => true)
176
175
  @test_ds.stub(:ng_xml_changed? => true)
177
176
  @test_ds.stub(:to_xml => "fake xml")
178
- @mock_repo.should_receive(:add_datastream).with(:pid => nil, :dsid => 'descMetadata', :versionable => true, :content => 'fake xml', :controlGroup => 'X', :dsState => 'A', :mimeType=>'text/xml')
177
+ @mock_repo.should_receive(:add_datastream).with(:pid => nil, :dsid => 'descMetadata', :versionable => true, :content => 'fake xml', :controlGroup => 'M', :dsState => 'A', :mimeType=>'text/xml')
179
178
 
180
179
  @test_ds.serialize!
181
180
  @test_ds.save
@@ -24,6 +24,7 @@ describe ActiveFedora::RelsExtDatastream do
24
24
  end
25
25
 
26
26
  its(:metadata?) { should be_true}
27
+ its(:controlGroup) { should == "X"}
27
28
 
28
29
  describe "#mimeType" do
29
30
  it 'should use the application/rdf+xml mime type' 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.0.0.rc5
4
+ version: 6.0.0.rc6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Zumwalt
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-03-07 00:00:00.000000000 Z
13
+ date: 2013-03-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rsolr
@@ -242,14 +242,14 @@ dependencies:
242
242
  requirements:
243
243
  - - '>='
244
244
  - !ruby/object:Gem::Version
245
- version: 1.2.0
245
+ version: 1.4.0
246
246
  type: :development
247
247
  prerelease: false
248
248
  version_requirements: !ruby/object:Gem::Requirement
249
249
  requirements:
250
250
  - - '>='
251
251
  - !ruby/object:Gem::Version
252
- version: 1.2.0
252
+ version: 1.4.0
253
253
  - !ruby/object:Gem::Dependency
254
254
  name: rspec
255
255
  requirement: !ruby/object:Gem::Requirement