active-fedora 9.0.2 → 9.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +7 -0
- data/README.md +2 -4
- data/lib/active_fedora/relation/finder_methods.rb +9 -2
- data/lib/active_fedora/version.rb +1 -1
- data/spec/integration/query_result_builder_spec.rb +2 -2
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 505a6045300f42aa08d9d68632b7847cddc7b9a7
|
4
|
+
data.tar.gz: 05360af6100e21a5513b612292da24cf01cf9b16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 399d4f0a75a882db61ccaece0343dcdfa509670cc0e8aa8e11aa830a87797825ac3f923e9c577ef83f70ec02bd1bc7b7f770f7d242807fb443641677c504e70b
|
7
|
+
data.tar.gz: 7a9b1ae26cbed3732b28bd337304765790393f4af1b3b8b4ebf1c98ae8036b1a2d7a8a2ce0779dbe98b8bdd49c5373f4e4900eed005d46806fda0f37740c5e6f
|
data/History.txt
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
v9.0.3
|
2
|
+
2015-03-04: Encapsulate solr_escape and make it private [Justin Coyne]
|
3
|
+
|
4
|
+
2015-03-04: Update readme [Justin Coyne]
|
5
|
+
|
6
|
+
2015-02-28: Use modified RSolr.solr_escape method [Adam Wead]
|
7
|
+
|
1
8
|
v9.0.0
|
2
9
|
2015-01-30: When save! is called only validate once [Justin Coyne]
|
3
10
|
|
data/README.md
CHANGED
@@ -6,12 +6,10 @@ Description
|
|
6
6
|
[![Dependencies](https://gemnasium.com/projecthydra/active_fedora.png)](https://gemnasium.com/projecthydra/active\_fedora)
|
7
7
|
[![Coverage Status](https://img.shields.io/coveralls/projecthydra/active_fedora.svg)](https://coveralls.io/r/projecthydra/active_fedora)
|
8
8
|
|
9
|
-
|
9
|
+
ActiveFedora is a Ruby gem for creating and
|
10
10
|
managing objects in the Fedora Repository Architecture
|
11
11
|
([http://fedora-commons.org](http://fedora-commons.org)). ActiveFedora
|
12
|
-
is loosely based on “ActiveRecord” in Rails.
|
13
|
-
ActiveFedora depends on Rails 3, specifically activemodel and
|
14
|
-
activesupport.
|
12
|
+
is loosely based on “ActiveRecord” in Rails. Version 9.0+ works with Fedora 4 and prior versions work on Fedora 3.
|
15
13
|
|
16
14
|
Getting Help
|
17
15
|
------------
|
@@ -264,10 +264,10 @@ module ActiveFedora
|
|
264
264
|
if value.empty?
|
265
265
|
"-#{key}:['' TO *]"
|
266
266
|
elsif value.is_a? Array
|
267
|
-
value.map { |val| "#{key}:#{
|
267
|
+
value.map { |val| "#{key}:#{solr_escape(val)}" }
|
268
268
|
else
|
269
269
|
key = SOLR_DOCUMENT_ID if (key === :id || key === :id)
|
270
|
-
"#{key}:#{
|
270
|
+
"#{key}:#{solr_escape(value)}"
|
271
271
|
end
|
272
272
|
end
|
273
273
|
end
|
@@ -283,5 +283,12 @@ module ActiveFedora
|
|
283
283
|
end
|
284
284
|
end
|
285
285
|
|
286
|
+
|
287
|
+
private
|
288
|
+
# Adds esaping for spaces which are not handled by RSolr.solr_escape
|
289
|
+
# See rsolr/rsolr#101
|
290
|
+
def solr_escape terms
|
291
|
+
RSolr.solr_escape(terms).gsub(/\s+/,"\\ ")
|
292
|
+
end
|
286
293
|
end
|
287
294
|
end
|
@@ -30,7 +30,7 @@ describe ActiveFedora::QueryResultBuilder do
|
|
30
30
|
Object.send(:remove_const, :FooObject)
|
31
31
|
end
|
32
32
|
it "should return an array of objects that are of the class stored in active_fedora_model_s" do
|
33
|
-
query =
|
33
|
+
query = ActiveFedora::SolrQueryBuilder.construct_query_for_ids([@test_object.id, @foo_object.id])
|
34
34
|
solr_result = ActiveFedora::SolrService.query(query)
|
35
35
|
result = ActiveFedora::QueryResultBuilder.reify_solr_results(solr_result)
|
36
36
|
expect(result.length).to eq 2
|
@@ -40,7 +40,7 @@ describe ActiveFedora::QueryResultBuilder do
|
|
40
40
|
end
|
41
41
|
|
42
42
|
it 'should #reify a lightweight object as a new instance' do
|
43
|
-
query =
|
43
|
+
query = ActiveFedora::SolrQueryBuilder.construct_query_for_ids([@foo_object.id])
|
44
44
|
solr_result = ActiveFedora::SolrService.query(query)
|
45
45
|
result = ActiveFedora::QueryResultBuilder.reify_solr_results(solr_result,{:load_from_solr=>true})
|
46
46
|
expect(result.first).to be_instance_of FooObject
|
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: 9.0.
|
4
|
+
version: 9.0.3
|
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: 2015-
|
13
|
+
date: 2015-03-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rsolr
|
@@ -565,4 +565,3 @@ signing_key:
|
|
565
565
|
specification_version: 4
|
566
566
|
summary: A convenience libary for manipulating documents in the Fedora Repository.
|
567
567
|
test_files: []
|
568
|
-
has_rdoc:
|