base_indexer 0.3.1 → 0.3.2

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: bc2b857a204cdb42d04c834c080dc52e3aea19f4
4
- data.tar.gz: a57b3855269a109320beeacec4c72e82444a6635
3
+ metadata.gz: c7ea4cd421f377a0dfde47d401fe4b6ca20109d1
4
+ data.tar.gz: 43b93f9e9e73097db8b2b32c5fa4c1c93e57606c
5
5
  SHA512:
6
- metadata.gz: c42ddb24d31a70b1542720fd870810ab52ab9f103310d263fa1fe58869020849fd120c85d893b3465cbcc1b992721f098d5fa22abd94df0e3b58d5ec162b1776
7
- data.tar.gz: a4b73649485f2ac01bea5e7136a83b0465250e886ff38dd2c70136572eeeda6124d0d1a91145ba4516a14f6443b2d1dda11f5a5677cffd471cf27dfeff0d9fdb
6
+ metadata.gz: 87306d3dc67800ebbb6f7488d3154f92c1ec003d90ad08a22e5914c2636ed0f8731fd8c7b4fdb94147440cb80bceecc1e28e794eb6bda00de2c06c1cfb196869
7
+ data.tar.gz: ea79ed4b56a09f6c816e90afbbf780b97c2565866b21b277f1735eaf46abbf6f1f48221cabc16ec772fd3d62f6fcc2cf2d7e9ef59d68252aa2f8790f3e295692
@@ -43,6 +43,8 @@ module BaseIndexer
43
43
  targets_hash = get_targets_hash_from_param(targets)
44
44
  end
45
45
 
46
+ targets_hash = update_targets_before_write(targets_hash, purl_model)
47
+
46
48
  # Get SOLR configuration and write
47
49
  solr_targets_configs = BaseIndexer.solr_configuration_class_name.constantize.instance.get_configuration_hash
48
50
  BaseIndexer.solr_writer_class_name.constantize.new.process( druid, solr_doc, targets_hash, solr_targets_configs)
@@ -79,6 +81,15 @@ module BaseIndexer
79
81
  return targets_hash
80
82
  end
81
83
 
84
+ # It allows the consumer to modify the targets list before doing the final writing
85
+ # to the solr core. Default behavior returns the targets_hash as it is
86
+ # @param targets_hash [Hash] a hash of targets with true value
87
+ # @param purl_model [DiscoveryIndexer::Reader::PurlxmlModel] represents the purlxml model
88
+ # @return [Hash] a hash of targets
89
+ def update_targets_before_write(targets_hash, purl_model)
90
+ return targets_hash
91
+ end
92
+
82
93
  # It converts collection_druids list to a hash with names. If the druid doesn't
83
94
  # have a collection name, it will be excluded from the hash
84
95
  # @param collection_druids [Array] a list of druids
@@ -1,3 +1,3 @@
1
1
  module BaseIndexer
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: base_indexer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ahmed Alsum
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-07 00:00:00.000000000 Z
11
+ date: 2015-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails