samvera-nesting_indexer 0.3.3 → 0.4.0

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: 44a9f85d8434dd8c4862d6690f78629ed65fd685
4
- data.tar.gz: 606777f6961ff5af5029bfcb68af6a0b0368f6c5
3
+ metadata.gz: 44146a263d2c1393f018e7872cbe48547ea39b5c
4
+ data.tar.gz: f5a05c985357effa6b65bea5a203273c20042d80
5
5
  SHA512:
6
- metadata.gz: 488722ab67c7bc259c8d4b67b28cb409d779917163b85e1cec687f81dff18b880936c02e51700b317ea70c93224c01d5d40d68ea5f9a005da46a75b491b32fc6
7
- data.tar.gz: 2dfb3f448349914fce1df6f57b9c09962cf8edfda6c4b064f9e15d161e512b3d99a47dcae45b5bc9a365b3abceba8ead05ed22d13f8bddf43857eb1f1f799c40
6
+ metadata.gz: b56e99e99f68d103fc845f12803e45b69d4631908ff66db498c08d4b16b5232f714dac731018fa9c786b169cbc35383ba4657a54194ae26559e0548992ac89ae
7
+ data.tar.gz: 8f0ed5cfd36249fd513f4d3594548a4225375a76302b1444a404a4be62f9f5dd73b1402067c9332736a0569ebd85f970ddac5e5a828ccd16fcbb1069bd7305e7
@@ -19,6 +19,30 @@ module Samvera
19
19
  @maximum_nesting_depth = input.to_i
20
20
  end
21
21
 
22
+ def solr_key_suffix_for_parent_ids=(input)
23
+ @solr_key_suffix_for_parent_ids = input.to_s
24
+ end
25
+
26
+ def solr_key_suffix_for_parent_ids
27
+ @solr_key_suffix_for_parent_ids || raise(Exceptions::SolrKeyConfigurationError.new(name: __method__, config: self))
28
+ end
29
+
30
+ def solr_key_suffix_for_ancestors=(input)
31
+ @solr_key_suffix_for_ancestors = input.to_s
32
+ end
33
+
34
+ def solr_key_suffix_for_ancestors
35
+ @solr_key_suffix_for_ancestors || raise(Exceptions::SolrKeyConfigurationError.new(name: __method__, config: self))
36
+ end
37
+
38
+ def solr_key_suffix_for_pathnames=(input)
39
+ @solr_key_suffix_for_pathnames = input.to_s
40
+ end
41
+
42
+ def solr_key_suffix_for_pathnames
43
+ @solr_key_suffix_for_pathnames || raise(Exceptions::SolrKeyConfigurationError.new(name: __method__, config: self))
44
+ end
45
+
22
46
  # @api public
23
47
  # @return Samvera::NestingIndexer::Adapters::AbstractAdapter
24
48
  def adapter
@@ -4,8 +4,22 @@ module Samvera
4
4
  class RuntimeError < ::RuntimeError
5
5
  end
6
6
 
7
+ # There is some kind configuration error.
8
+ class ConfigurationError < RuntimeError
9
+ end
10
+
11
+ # Danger, the SolrKey may not be configured correctly.
12
+ class SolrKeyConfigurationError < ConfigurationError
13
+ attr_reader :name, :config
14
+ def initialize(name:, config:)
15
+ @name = name
16
+ @config = config
17
+ super "Expected #{name.inspect} to be set in Config #{config.inspect}"
18
+ end
19
+ end
20
+
7
21
  # Raised when we have a misconfigured adapter
8
- class AdapterConfigurationError < RuntimeError
22
+ class AdapterConfigurationError < ConfigurationError
9
23
  attr_reader :expected_methods
10
24
  def initialize(object, expected_methods)
11
25
  @expected_methods = expected_methods
@@ -1,5 +1,5 @@
1
1
  module Samvera
2
2
  module NestingIndexer
3
- VERSION = "0.3.3".freeze
3
+ VERSION = "0.4.0".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: samvera-nesting_indexer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Friesen