blacklight 5.16.0 → 5.16.1

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.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/app/controllers/concerns/blacklight/catalog.rb +17 -2
  4. data/lib/blacklight.rb +4 -0
  5. data/{app/models → lib}/blacklight/abstract_repository.rb +0 -0
  6. data/{app/models → lib}/blacklight/configuration.rb +1 -8
  7. data/{app/models → lib}/blacklight/configuration/facet_field.rb +0 -0
  8. data/{app/models → lib}/blacklight/configuration/field.rb +0 -0
  9. data/{app/models → lib}/blacklight/configuration/fields.rb +0 -0
  10. data/{app/models → lib}/blacklight/configuration/search_field.rb +0 -0
  11. data/{app/models → lib}/blacklight/configuration/solr_field.rb +0 -0
  12. data/{app/models → lib}/blacklight/configuration/sort_field.rb +0 -0
  13. data/{app/models → lib}/blacklight/configuration/tool_config.rb +0 -0
  14. data/{app/models → lib}/blacklight/configuration/view_config.rb +0 -0
  15. data/{app/models → lib}/blacklight/search_builder.rb +0 -0
  16. data/lib/blacklight/solr.rb +5 -0
  17. data/{app/models → lib}/blacklight/solr/repository.rb +0 -0
  18. data/{app/models → lib}/blacklight/solr/request.rb +0 -0
  19. data/{app/models → lib}/blacklight/solr/response.rb +0 -0
  20. data/{app/models → lib}/blacklight/solr/response/facets.rb +0 -0
  21. data/{app/models → lib}/blacklight/solr/response/group.rb +0 -0
  22. data/{app/models → lib}/blacklight/solr/response/group_response.rb +0 -0
  23. data/{app/models → lib}/blacklight/solr/response/more_like_this.rb +0 -0
  24. data/{app/models → lib}/blacklight/solr/response/pagination_methods.rb +0 -0
  25. data/{app/models → lib}/blacklight/solr/response/response.rb +0 -0
  26. data/{app/models → lib}/blacklight/solr/response/spelling.rb +0 -0
  27. data/{app/models/concerns → lib}/blacklight/solr/search_builder_behavior.rb +0 -0
  28. data/spec/models/blacklight/solr/search_builder_spec.rb +9 -4
  29. data/spec/views/catalog/index.atom.builder_spec.rb +1 -1
  30. metadata +24 -25
  31. data/app/models/blacklight/solr/search_builder.rb +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7f04052db0293c8e93daad2cd0292fb6f6dd221d
4
- data.tar.gz: 915bc9c1fc3a1685ac79c0ee68ff19d5a8ab5a62
3
+ metadata.gz: 151e13c103de8da06aff554974e4d6fb08f1ec6c
4
+ data.tar.gz: 5c610d9673326a95e419dcf0b8ae34487faa9808
5
5
  SHA512:
6
- metadata.gz: 79f8af63d92a6fcc81a8f2381477d7e09ea30e42ed3dd1f1bd34b8fe4d9e1c4baae9831d1169233f4bf4cce41ffd01b5dc5c272f8943f4da63c941bd1e3d0cfb
7
- data.tar.gz: a0388a293e6791114f1310ec5a83d219746bfd151bc29fc024afa7933ef0c7755ed4d8179c60421c80eab4a43eaf38a0b4489356659d2050b9171d527c28fc4a
6
+ metadata.gz: 6dee016cf1931ba320fefff5f6cddf5180f482ea5a4d8a26d1c561bf6cff5614d2a6e057ad8b1958d7062a64262528df285004c923897824cc81ffa3dcf10fe2
7
+ data.tar.gz: 95261b33157f9c4544db07cb552f356377eb739ceccfe2605f773cf0200b6323fb645407e3a5b6f554d71db975ba0cedca9477dc580dfa67d6bc3b7baef1187f
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.16.0
1
+ 5.16.1
@@ -3,8 +3,23 @@ module Blacklight::Catalog
3
3
  extend ActiveSupport::Concern
4
4
  extend Deprecation
5
5
 
6
- SearchContext = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('Blacklight::Catalog::SearchContext', 'Blacklight::SearchContext')
7
- ComponentConfiguration = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('Blacklight::Catalog::ComponentConfiguration', 'Blacklight::DefaultComponentConfiguration')
6
+ module SearchContext
7
+ extend ActiveSupport::Concern
8
+ extend Deprecation
9
+ included do
10
+ Deprecation.warn(SearchContext, 'Blacklight::Catalog::SearchContext is deprecated; use Blacklight::SearchContext instead')
11
+ include Blacklight::SearchContext
12
+ end
13
+ end
14
+
15
+ module ComponentConfiguration
16
+ extend ActiveSupport::Concern
17
+ extend Deprecation
18
+ included do
19
+ Deprecation.warn(SearchContext, 'Blacklight::Catalog::ComponentConfiguration is deprecated; use Blacklight::DefaultComponentConfiguration instead')
20
+ include Blacklight::DefaultComponentConfiguration
21
+ end
22
+ end
8
23
 
9
24
  include Blacklight::Base
10
25
  include Blacklight::DefaultComponentConfiguration
@@ -12,6 +12,10 @@ module Blacklight
12
12
  SolrResponse = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('Blacklight::SolrResponse', 'Blacklight::Solr::Response')
13
13
  autoload :SolrHelper, 'blacklight/solr_helper'
14
14
 
15
+ autoload :AbstractRepository, 'blacklight/abstract_repository'
16
+ autoload :Configuration, 'blacklight/configuration'
17
+ autoload :SearchBuilder, 'blacklight/search_builder'
18
+
15
19
  extend Deprecation
16
20
 
17
21
  require 'blacklight/version'
@@ -6,6 +6,7 @@ module Blacklight
6
6
 
7
7
  require 'blacklight/configuration/view_config'
8
8
  require 'blacklight/configuration/tool_config'
9
+
9
10
  # XXX this isn't very pretty, but it works.
10
11
  require 'blacklight/configuration/fields'
11
12
  require 'blacklight/configuration/field'
@@ -225,14 +226,6 @@ module Blacklight
225
226
 
226
227
  def locate_search_builder_class
227
228
  ::SearchBuilder
228
- rescue NameError => e
229
- # If the NameError is a result of the SearchBuilder having a
230
- # NameError (e.g. NoMethodError) within it then raise the error.
231
- raise e if Object.const_defined? "::SearchBuilder"
232
-
233
- # Otherwise the NameError was a result of not being able to find SearchBuilder
234
- Deprecation.warn(Configuration, "Your application is missing the SearchBuilder. Have you run `rails generate blacklight:search_builder`? Falling back to Blacklight::Solr::SearchBuilder")
235
- Blacklight::Solr::SearchBuilder
236
229
  end
237
230
 
238
231
  def facet_paginator_class
@@ -2,5 +2,10 @@ module Blacklight
2
2
  module Solr
3
3
  require File.join(Blacklight::Engine.config.root, 'app', 'models', 'concerns', 'blacklight', 'document')
4
4
  require File.join(Blacklight::Engine.config.root, 'app', 'models', 'concerns', 'blacklight', 'solr', 'document')
5
+
6
+ autoload :Repository, 'blacklight/solr/repository'
7
+ autoload :Request, 'blacklight/solr/request'
8
+ autoload :Response, 'blacklight/solr/response'
9
+ autoload :SearchBuilderBehavior, 'blacklight/solr/search_builder_behavior'
5
10
  end
6
11
  end
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Blacklight::Solr::SearchBuilder do
3
+ describe Blacklight::Solr::SearchBuilderBehavior do
4
4
  let(:single_facet) { { format: 'Book' } }
5
5
  let(:multi_facets) { { format: 'Book', language_facet: 'Tibetan' } }
6
6
  let(:mult_word_query) { 'tibetan history' }
@@ -13,14 +13,19 @@ describe Blacklight::Solr::SearchBuilder do
13
13
 
14
14
  before { allow(context).to receive(:blacklight_config).and_return(blacklight_config) }
15
15
 
16
- let(:search_builder) { described_class.new(method_chain, context) }
16
+ let(:search_builder_class) do
17
+ Class.new(Blacklight::SearchBuilder) do
18
+ include Blacklight::Solr::SearchBuilderBehavior
19
+ end
20
+ end
21
+ let(:search_builder) { search_builder_class.new(method_chain, context) }
17
22
 
18
23
  subject { search_builder.with(user_params) }
19
24
 
20
25
  context "with default processor chain" do
21
- subject { described_class.new true, context }
26
+ subject { search_builder_class.new true, context }
22
27
  it "should use the class-level default_processor_chain" do
23
- expect(subject.processor_chain).to eq described_class.default_processor_chain
28
+ expect(subject.processor_chain).to eq search_builder_class.default_processor_chain
24
29
  end
25
30
  end
26
31
 
@@ -4,7 +4,7 @@ require 'rexml/document'
4
4
  describe "catalog/index" do
5
5
 
6
6
  before(:all) do
7
- @response = Blacklight::SolrResponse.new({ response: { numFound: 30 }}, { start: 10, rows: 10})
7
+ @response = Blacklight::Solr::Response.new({ response: { numFound: 30 }}, { start: 10, rows: 10})
8
8
 
9
9
  @config = CatalogController.blacklight_config
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.16.0
4
+ version: 5.16.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Rochkind
@@ -17,7 +17,7 @@ authors:
17
17
  autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
- date: 2015-11-05 00:00:00.000000000 Z
20
+ date: 2015-11-06 00:00:00.000000000 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: rails
@@ -313,30 +313,8 @@ files:
313
313
  - app/helpers/layout_helper.rb
314
314
  - app/helpers/render_constraints_helper.rb
315
315
  - app/helpers/search_history_constraints_helper.rb
316
- - app/models/blacklight/abstract_repository.rb
317
- - app/models/blacklight/configuration.rb
318
- - app/models/blacklight/configuration/facet_field.rb
319
- - app/models/blacklight/configuration/field.rb
320
- - app/models/blacklight/configuration/fields.rb
321
- - app/models/blacklight/configuration/search_field.rb
322
- - app/models/blacklight/configuration/solr_field.rb
323
- - app/models/blacklight/configuration/sort_field.rb
324
- - app/models/blacklight/configuration/tool_config.rb
325
- - app/models/blacklight/configuration/view_config.rb
326
316
  - app/models/blacklight/facet_paginator.rb
327
- - app/models/blacklight/search_builder.rb
328
317
  - app/models/blacklight/solr/facet_paginator.rb
329
- - app/models/blacklight/solr/repository.rb
330
- - app/models/blacklight/solr/request.rb
331
- - app/models/blacklight/solr/response.rb
332
- - app/models/blacklight/solr/response/facets.rb
333
- - app/models/blacklight/solr/response/group.rb
334
- - app/models/blacklight/solr/response/group_response.rb
335
- - app/models/blacklight/solr/response/more_like_this.rb
336
- - app/models/blacklight/solr/response/pagination_methods.rb
337
- - app/models/blacklight/solr/response/response.rb
338
- - app/models/blacklight/solr/response/spelling.rb
339
- - app/models/blacklight/solr/search_builder.rb
340
318
  - app/models/bookmark.rb
341
319
  - app/models/concerns/blacklight/configurable.rb
342
320
  - app/models/concerns/blacklight/document.rb
@@ -357,7 +335,6 @@ files:
357
335
  - app/models/concerns/blacklight/solr/document/more_like_this.rb
358
336
  - app/models/concerns/blacklight/solr/document/schema_org.rb
359
337
  - app/models/concerns/blacklight/solr/document/sms.rb
360
- - app/models/concerns/blacklight/solr/search_builder_behavior.rb
361
338
  - app/models/concerns/blacklight/token_based_user.rb
362
339
  - app/models/concerns/blacklight/user.rb
363
340
  - app/models/record_mailer.rb
@@ -464,11 +441,33 @@ files:
464
441
  - db/migrate/20140202020202_create_bookmarks.rb
465
442
  - db/migrate/20140320000000_add_polymorphic_type_to_bookmarks.rb
466
443
  - lib/blacklight.rb
444
+ - lib/blacklight/abstract_repository.rb
445
+ - lib/blacklight/configuration.rb
446
+ - lib/blacklight/configuration/facet_field.rb
447
+ - lib/blacklight/configuration/field.rb
448
+ - lib/blacklight/configuration/fields.rb
449
+ - lib/blacklight/configuration/search_field.rb
450
+ - lib/blacklight/configuration/solr_field.rb
451
+ - lib/blacklight/configuration/sort_field.rb
452
+ - lib/blacklight/configuration/tool_config.rb
453
+ - lib/blacklight/configuration/view_config.rb
467
454
  - lib/blacklight/engine.rb
468
455
  - lib/blacklight/exceptions.rb
469
456
  - lib/blacklight/rails/routes.rb
470
457
  - lib/blacklight/routes.rb
458
+ - lib/blacklight/search_builder.rb
471
459
  - lib/blacklight/solr.rb
460
+ - lib/blacklight/solr/repository.rb
461
+ - lib/blacklight/solr/request.rb
462
+ - lib/blacklight/solr/response.rb
463
+ - lib/blacklight/solr/response/facets.rb
464
+ - lib/blacklight/solr/response/group.rb
465
+ - lib/blacklight/solr/response/group_response.rb
466
+ - lib/blacklight/solr/response/more_like_this.rb
467
+ - lib/blacklight/solr/response/pagination_methods.rb
468
+ - lib/blacklight/solr/response/response.rb
469
+ - lib/blacklight/solr/response/spelling.rb
470
+ - lib/blacklight/solr/search_builder_behavior.rb
472
471
  - lib/blacklight/solr_helper.rb
473
472
  - lib/blacklight/utils.rb
474
473
  - lib/blacklight/version.rb
@@ -1,7 +0,0 @@
1
- module Blacklight::Solr
2
- # @deprecated In 6.0 you should have this class generated into your application and Blacklight will
3
- # no longer need to provide it.
4
- class SearchBuilder < Blacklight::SearchBuilder
5
- include Blacklight::Solr::SearchBuilderBehavior
6
- end
7
- end