geoblacklight 0.9.1 → 0.9.2

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: a389fc333cbe630a7ac3660914238f022e23bff8
4
- data.tar.gz: 2bce6269f6d334bc6b9dc26a67adc45fc4da5404
3
+ metadata.gz: 54630133903f73e2584a94ca40f81be5fa2a72da
4
+ data.tar.gz: d60435d3dcd415c483cdcb5ce816d26f6a17b59e
5
5
  SHA512:
6
- metadata.gz: c0dcb5fab1faeec1b5717df0e1fe30ee6b72895b360e02ffc76bac454b08106565620b60e2d1d2de14b69500f04c876726e2da7672ff9d2053d6ed2751aee62c
7
- data.tar.gz: bb025868024d82323684086345dcb387382e3bf6485d7f0f4dbaa1070e96a827c42a8b7c58f4cad06af868bda63f54a89049d386a9ec63d934bb61d7c44a2dea
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 << :add_spatial_params
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)
@@ -1,3 +1,3 @@
1
1
  module Geoblacklight
2
- VERSION = '0.9.1'
2
+ VERSION = '0.9.2'
3
3
  end
@@ -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.1
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 00:00:00.000000000 Z
14
+ date: 2015-04-16 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: blacklight