geoblacklight 0.9.1 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54630133903f73e2584a94ca40f81be5fa2a72da
|
4
|
+
data.tar.gz: d60435d3dcd415c483cdcb5ce816d26f6a17b59e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e02435aec99534ed99924bcad9c3be4123fb1206774e6d854c69c2ffdc74add802c328fef507dbcf280beb4d4054ae502b0d9ce6735728ecb5b08b2d06efaa1f
|
7
|
+
data.tar.gz: 1381e4babb68674f9b998d3b9d257d24fd52987f9b2ad70c3da8141e12a408783e65bc7133b896599b5378b0e2f593334677e2388dd546cf0ed3b6f3b2eb041d
|
@@ -1,8 +1,10 @@
|
|
1
1
|
module Geoblacklight
|
2
2
|
class SearchBuilder < Blacklight::Solr::SearchBuilder
|
3
|
+
self.default_processor_chain += [:add_spatial_params]
|
4
|
+
|
3
5
|
def initialize(processor_chain, scope)
|
4
6
|
super(processor_chain, scope)
|
5
|
-
processor_chain
|
7
|
+
@processor_chain += [:add_spatial_params] unless @processor_chain.include?(:add_spatial_params)
|
6
8
|
end
|
7
9
|
|
8
10
|
def add_spatial_params(solr_params)
|
@@ -10,6 +10,26 @@ describe Geoblacklight::SearchBuilder do
|
|
10
10
|
|
11
11
|
subject { search_builder.with(user_params) }
|
12
12
|
|
13
|
+
describe '#initialize' do
|
14
|
+
it 'should have add_spatial_params in processor chain once' do
|
15
|
+
correct_processor_chain = [:default_solr_parameters,
|
16
|
+
:add_query_to_solr,
|
17
|
+
:add_facet_fq_to_solr,
|
18
|
+
:add_facetting_to_solr,
|
19
|
+
:add_solr_fields_to_query,
|
20
|
+
:add_paging_to_solr,
|
21
|
+
:add_sorting_to_solr,
|
22
|
+
:add_group_config_to_solr,
|
23
|
+
:add_range_limit_params,
|
24
|
+
:add_spatial_params]
|
25
|
+
expect(subject.processor_chain).to include :add_spatial_params
|
26
|
+
expect(subject.processor_chain).to match_array correct_processor_chain
|
27
|
+
new_search = described_class.new(subject.processor_chain, context)
|
28
|
+
expect(new_search.processor_chain).to include :add_spatial_params
|
29
|
+
expect(new_search.processor_chain).to match_array correct_processor_chain
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
13
33
|
describe '#add_spatial_params' do
|
14
34
|
it 'should return the solr_params when no bbox is given' do
|
15
35
|
expect(subject.add_spatial_params(solr_params)).to eq solr_params
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geoblacklight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Graves
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2015-04-
|
14
|
+
date: 2015-04-16 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: blacklight
|