active-fedora 6.6.0.rc3 → 6.6.0.rc4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +3 -3
- data/lib/active_fedora/solr_service.rb +6 -3
- data/lib/active_fedora/version.rb +1 -1
- data/spec/unit/solr_service_spec.rb +6 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b91704416bcc480154725e95946c40f9be9c459b
|
4
|
+
data.tar.gz: 71b13aaf17f894796c68bd314933e2ae4f6c4708
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: decd34709952404b85375d8c87aac27a8054e61d5a2b9c0d5c600aa53d1c8f7eda7c6693fb9a64ef44b34229a602a1e797fb342f6afae0a398dd65e6c69b37b5
|
7
|
+
data.tar.gz: a59b2fbf7e2023e6bbc321428202816d0d3f85798814d86351a1e0819f3cfbffff88a10db2db61a9cd7002f9ee5448816fb4ad88160768759dcb81fe730df71b
|
data/History.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
v6.6.0 (
|
1
|
+
v6.6.0 (rc4)
|
2
|
+
Fix deprecation warning when loading a has_many association [Justin Coyne]
|
2
3
|
Explicitly set cast to false on reload to avoid deprecation warnings [Justin Coyne]
|
3
|
-
Cast relationship results if class is ActiveFedora::Base [Justin
|
4
|
-
Coyne]
|
4
|
+
Cast relationship results if class is ActiveFedora::Base [Justin Coyne]
|
5
5
|
* Need to put changes for rc1 here*
|
6
6
|
|
7
7
|
v6.5.1 (2013-09-10)
|
@@ -46,9 +46,12 @@ module ActiveFedora
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def self.reify_solr_result(hit, opts = {})
|
49
|
-
|
50
|
-
|
51
|
-
|
49
|
+
klass = class_from_solr_document(hit)
|
50
|
+
if opts[:load_from_solr]
|
51
|
+
klass.load_instance_from_solr(hit[SOLR_DOCUMENT_ID])
|
52
|
+
else
|
53
|
+
klass.find(hit[SOLR_DOCUMENT_ID], cast: true)
|
54
|
+
end
|
52
55
|
end
|
53
56
|
|
54
57
|
def self.class_from_solr_document(hit, opts = {})
|
@@ -51,9 +51,9 @@ describe ActiveFedora::SolrService do
|
|
51
51
|
end
|
52
52
|
describe ".reify_solr_results" do
|
53
53
|
it "should use AudioRecord.find to instantiate objects" do
|
54
|
-
AudioRecord.should_receive(:find).with("my:_PID1_")
|
55
|
-
AudioRecord.should_receive(:find).with("my:_PID2_")
|
56
|
-
AudioRecord.should_receive(:find).with("my:_PID3_")
|
54
|
+
AudioRecord.should_receive(:find).with("my:_PID1_", cast: true)
|
55
|
+
AudioRecord.should_receive(:find).with("my:_PID2_", cast: true)
|
56
|
+
AudioRecord.should_receive(:find).with("my:_PID3_", cast: true)
|
57
57
|
ActiveFedora::SolrService.reify_solr_results(@sample_solr_hits)
|
58
58
|
end
|
59
59
|
it "should use AudioRecord.load_instance_from_solr when called with :load_from_solr option" do
|
@@ -65,9 +65,9 @@ describe ActiveFedora::SolrService do
|
|
65
65
|
end
|
66
66
|
describe ".lazy_reify_solr_results" do
|
67
67
|
it "should lazily reify solr results" do
|
68
|
-
AudioRecord.should_receive(:find).with("my:_PID1_")
|
69
|
-
AudioRecord.should_receive(:find).with("my:_PID2_")
|
70
|
-
AudioRecord.should_receive(:find).with("my:_PID3_")
|
68
|
+
AudioRecord.should_receive(:find).with("my:_PID1_", cast: true)
|
69
|
+
AudioRecord.should_receive(:find).with("my:_PID2_", cast: true)
|
70
|
+
AudioRecord.should_receive(:find).with("my:_PID3_", cast: true)
|
71
71
|
ActiveFedora::SolrService.lazy_reify_solr_results(@sample_solr_hits).each {|r| r}
|
72
72
|
end
|
73
73
|
it "should use AudioRecord.load_instance_from_solr when called with :load_from_solr option" 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.6.0.
|
4
|
+
version: 6.6.0.rc4
|
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-10-
|
13
|
+
date: 2013-10-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rsolr
|