cul_hydra 1.10.0 → 1.11.0

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
  SHA256:
3
- metadata.gz: c9f2d1672e6b0151d647c2982cb663e138e8f9066ca610926a87a0e993f41e8f
4
- data.tar.gz: 4f5c9ded2819a0e2a0456c64c88623de5e2c85fc49388ed511ad674800adf15c
3
+ metadata.gz: a00f8ff9e61a56af80a27f48225517956a370d24243a5dcb090e803f78c35d98
4
+ data.tar.gz: bfa3132fbf567bda31f498411a52cdd2995864223c93aa07acd4aeb37aecaf9f
5
5
  SHA512:
6
- metadata.gz: e28a9ab016bc62b8ebac7f0ded9481c766db74e74f36426d1eeffd46535a7036ab3a8b80b444188c9385132b7afd67a40dfc86ed8d6a24b43de6036629ffc655
7
- data.tar.gz: 4eac117be6bf09d0c59e4222a5c5c5422941826f4cd287b5839d09a38db580edb92277d1c838de80d7a687af472e6bac8eda52c1932b1a44aae852405e9e5f95
6
+ metadata.gz: 065a2f0a6ac2d6619d5e5c09274b5a218900628ae252149e9cc2d65e9d575e0fdad570399775b9c350f35450bdfdbd3392f7440418c26be3a066be4733720a5f
7
+ data.tar.gz: 71692ab2aa1668090b8d18412a36c5a0d45024a941340a62bb1ee62acf5d165cdf1ca16ee960738cd5512946f409a24c3a11407ed6b24db964f347adf97ff478
@@ -3,7 +3,7 @@ module Cul::Hydra::ApplicationIdBehavior
3
3
 
4
4
  def find_for_params(path,solr_params)
5
5
  res = blacklight_config.repository.send_and_receive(path, {key=>solr_params.to_hash, method:blacklight_config.http_method})
6
- Blacklight::SolrResponse.new(res, solr_params, solr_document_model: blacklight_config.solr_document_model)
6
+ Blacklight::SolrResponse.new(res, solr_params, blacklight_config: blacklight_config)
7
7
  end
8
8
 
9
9
  def get_solr_response_for_app_id(id=nil, extra_controller_params={})
@@ -18,7 +18,7 @@ module Cul::Hydra::ApplicationIdBehavior
18
18
  #p[:qt] ||= blacklight_config.document_solr_request_handler
19
19
  repository = blacklight_config.repository_class.new(blacklight_config)
20
20
  solr_response = repository.search(p)
21
- raise Blacklight::Exceptions::InvalidSolrID.new(id) if solr_response.docs.empty?
21
+ raise Blacklight::Exceptions::RecordNotFound.new(id) if solr_response.docs.empty?
22
22
  document = SolrDocument.new(solr_response.docs.first, solr_response)
23
23
  @response, @document = [solr_response, document]
24
24
  end
@@ -35,7 +35,7 @@ module Cul::Hydra::ApplicationIdBehavior
35
35
  #p[:qt] ||= blacklight_config.document_solr_request_handler
36
36
  repository = blacklight_config.repository_class.new(blacklight_config)
37
37
  solr_response = repository.search(p)
38
- raise Blacklight::Exceptions::InvalidSolrID.new(id) if solr_response.docs.empty?
38
+ raise Blacklight::Exceptions::RecordNotFound.new(id) if solr_response.docs.empty?
39
39
  document = SolrDocument.new(solr_response.docs.first, solr_response)
40
40
  @response, @document = [solr_response, document]
41
41
  end
@@ -4,10 +4,10 @@ module Cul::Hydra::Resolver
4
4
  extend ActiveSupport::Concern
5
5
 
6
6
  included do
7
- # Whenever an action raises SolrHelper::InvalidSolrID, this block gets executed.
7
+ # Whenever an action raises SolrHelper::RecordNotFound, this block gets executed.
8
8
  # Hint: the SolrHelper #get_solr_response_for_doc_id method raises this error,
9
9
  # which is used in the #show action here.
10
- self.rescue_from Blacklight::Exceptions::InvalidSolrID, :with => :invalid_solr_id_error
10
+ self.rescue_from Blacklight::Exceptions::RecordNotFound, :with => :invalid_solr_id_error
11
11
  # When RSolr::RequestError is raised, the rsolr_request_error method is executed.
12
12
  # The index action will more than likely throw this one.
13
13
  # Example, when the standard query parser is used, and a user submits a "bad" query.
@@ -19,7 +19,7 @@ module Cul::Hydra::Resolver
19
19
  solr_params = blacklight_config.default_document_solr_params.merge!(extra_controller_params)
20
20
  solr_params[:fq] = "identifier_ssim:#{(id)}"
21
21
  solr_response = find((blacklight_config.document_solr_request_handler || blacklight_config.qt), solr_params)
22
- raise Blacklight::Exceptions::InvalidSolrID.new if solr_response.docs.empty?
22
+ raise Blacklight::Exceptions::RecordNotFound.new if solr_response.docs.empty?
23
23
  document = SolrDocument.new(solr_response.docs.first, solr_response)
24
24
  @response, @document = [solr_response, document]
25
25
  end
@@ -51,7 +51,7 @@ module Cul::Hydra::Resolver
51
51
  end
52
52
  end
53
53
  end
54
-
54
+
55
55
  # when a request for /resolve/:action/BAD_SOLR_ID is made, this method is executed...
56
56
  def invalid_solr_id_error
57
57
  id = params.delete(:id)
@@ -60,10 +60,6 @@ module Cul::Hydra::Resolver
60
60
  end
61
61
 
62
62
  def blacklight_solr
63
- @solr ||= RSolr.connect(blacklight_solr_config)
64
- end
65
-
66
- def blacklight_solr_config
67
- Blacklight.solr_config
63
+ @solr ||= Blacklight.default_index
68
64
  end
69
65
  end
@@ -1,6 +1,6 @@
1
1
  module Cul
2
2
  module Hydra
3
- VERSION = '1.10.0'
3
+ VERSION = '1.11.0'
4
4
  def self.version
5
5
  VERSION
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cul_hydra
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Armintor
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-10-27 00:00:00.000000000 Z
12
+ date: 2021-10-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -51,14 +51,14 @@ dependencies:
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '6.0'
54
+ version: '7.0'
55
55
  type: :runtime
56
56
  prerelease: false
57
57
  version_requirements: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '6.0'
61
+ version: '7.0'
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: httpclient
64
64
  requirement: !ruby/object:Gem::Requirement