active-fedora 3.1.0.pre9 → 3.1.0.pre10

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active-fedora (3.1.0.pre9)
4
+ active-fedora (3.1.0.pre10)
5
5
  activeresource (~> 3.0.0)
6
6
  activesupport (~> 3.0.0)
7
7
  equivalent-xml
data/config/fedora.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  development:
2
2
  url: http://fedoraAdmin:fedoraAdmin@127.0.0.1:8983/fedora
3
3
  test:
4
- url: http://fedoraAdmin:fedoraAdmin@127.0.0.1:8983/fedora
4
+ url: http://fedoraAdmin:fedoraAdmin@127.0.0.1:8983/fedora-test
5
5
  production:
6
6
  url: http://fedoraAdmin:fedoraAdmin@127.0.0.1:8080/fedora
7
7
 
data/config/jetty.yml ADDED
@@ -0,0 +1,3 @@
1
+ jetty_port: 8983
2
+ java_opts:
3
+ - "-Xmx256m -XX:MaxPermSize=128m"
@@ -834,6 +834,7 @@ module ActiveFedora
834
834
  solr_doc.merge!(SOLR_DOCUMENT_ID.to_sym => pid, ActiveFedora::SolrService.solr_name(:system_create, :date) => self.create_date, ActiveFedora::SolrService.solr_name(:system_modified, :date) => self.modified_date, ActiveFedora::SolrService.solr_name(:active_fedora_model, :symbol) => self.class.inspect)
835
835
  end
836
836
  datastreams.each_value do |ds|
837
+ ds.ensure_xml_loaded if ds.respond_to? :ensure_xml_loaded ### Can't put this in the model because it's often implemented in Solrizer::XML::TerminologyBasedSolrizer
837
838
  solr_doc = ds.to_solr(solr_doc) if ds.kind_of?(ActiveFedora::MetadataDatastream) || ds.kind_of?(ActiveFedora::NokogiriDatastream) || ( ds.kind_of?(ActiveFedora::RelsExtDatastream) && !opts[:model_only] )
838
839
  end
839
840
  begin
@@ -866,8 +867,8 @@ module ActiveFedora
866
867
  #double check pid and id in record match
867
868
  raise "Object #{pid} not found in Solr" unless !result.nil? && !solr_doc.nil? && pid == solr_doc[SOLR_DOCUMENT_ID]
868
869
  else
869
- raise "Solr document record id and pid do not match" unless pid == solr_doc[SOLR_DOCUMENT_ID]
870
- end
870
+ raise "Solr document record id and pid do not match" unless pid == solr_doc[SOLR_DOCUMENT_ID]
871
+ end
871
872
 
872
873
  create_date = solr_doc[ActiveFedora::SolrService.solr_name(:system_create, :date)].nil? ? solr_doc[ActiveFedora::SolrService.solr_name(:system_create, :date).to_s] : solr_doc[ActiveFedora::SolrService.solr_name(:system_create, :date)]
873
874
  modified_date = solr_doc[ActiveFedora::SolrService.solr_name(:system_create, :date)].nil? ? solr_doc[ActiveFedora::SolrService.solr_name(:system_modified, :date).to_s] : solr_doc[ActiveFedora::SolrService.solr_name(:system_modified, :date)]
@@ -95,6 +95,7 @@ module ActiveFedora
95
95
  # Solr must be synchronized with RELS-EXT data in Fedora.
96
96
  def from_solr(solr_doc)
97
97
  #cycle through all possible predicates
98
+ model.relationships_loaded = true
98
99
  ActiveFedora::Base.predicate_mappings[ActiveFedora::Base.default_predicate_namespace].keys.each do |predicate|
99
100
  predicate_symbol = ActiveFedora::SolrService.solr_name(predicate, :symbol)
100
101
  value = (solr_doc[predicate_symbol].nil? ? solr_doc[predicate_symbol.to_s]: solr_doc[predicate_symbol])
@@ -1,3 +1,3 @@
1
1
  module ActiveFedora
2
- VERSION = "3.1.0.pre9"
2
+ VERSION = "3.1.0.pre10"
3
3
  end
@@ -346,7 +346,7 @@ describe ActiveFedora do
346
346
  describe "outside of rails" do
347
347
  it "should load the default packaged config/fedora.yml file if no explicit config path is passed" do
348
348
  ActiveFedora.init()
349
- ActiveFedora.fedora.options[:url].to_s.should == "http://127.0.0.1:8983/fedora"
349
+ ActiveFedora.fedora.options[:url].to_s.should == "http://127.0.0.1:8983/fedora-test"
350
350
  end
351
351
  it "should load the passed config if explicit config passed in as a string" do
352
352
  ActiveFedora.init(:fedora_config_path=>'./spec/fixtures/rails_root/config/fedora.yml')
@@ -390,7 +390,7 @@ describe ActiveFedora do
390
390
  it "should load the default file if no config is found at Rails.root" do
391
391
  stub_rails(:root=>File.join(File.dirname(__FILE__),"../fixtures/bad/path/to/rails_root"))
392
392
  ActiveFedora.init()
393
- ActiveFedora.fedora_config[:url].should == "http://fedoraAdmin:fedoraAdmin@127.0.0.1:8983/fedora"
393
+ ActiveFedora.fedora_config[:url].should == "http://fedoraAdmin:fedoraAdmin@127.0.0.1:8983/fedora-test"
394
394
  end
395
395
  end
396
396
  end
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: 1923832011
4
+ hash: 1923832013
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 3
8
8
  - 1
9
9
  - 0
10
10
  - pre
11
- - 9
12
- version: 3.1.0.pre9
11
+ - 10
12
+ version: 3.1.0.pre10
13
13
  platform: ruby
14
14
  authors:
15
15
  - Matt Zumwalt
@@ -560,6 +560,7 @@ files:
560
560
  - Rakefile
561
561
  - active-fedora.gemspec
562
562
  - config/fedora.yml
563
+ - config/jetty.yml
563
564
  - config/predicate_mappings.yml
564
565
  - config/solr.yml
565
566
  - config/solr_mappings.yml