samvera-nesting_indexer 0.3.3 → 0.4.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44146a263d2c1393f018e7872cbe48547ea39b5c
|
4
|
+
data.tar.gz: f5a05c985357effa6b65bea5a203273c20042d80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 <
|
22
|
+
class AdapterConfigurationError < ConfigurationError
|
9
23
|
attr_reader :expected_methods
|
10
24
|
def initialize(object, expected_methods)
|
11
25
|
@expected_methods = expected_methods
|