traject_plus 0.0.2 → 0.0.3

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: 873866bd201a052750b757ecca8d09143f37c15b
4
- data.tar.gz: a84652bf1ec85b3b848617fc87d508f08e57f97d
3
+ metadata.gz: c8a834e5438fea87e70c76613829687057f7b79c
4
+ data.tar.gz: 9246f088e53b02c1ddbbccf9ee1b15ca43859bba
5
5
  SHA512:
6
- metadata.gz: ebe6e8309618503d8458018c3de708d4d4ecf4845c07ec8380bfeb398112c8cb99ccfec58bd082ea97241b62fe5c7a50688eefd92e5a01948898052a5a3ee616
7
- data.tar.gz: dda2f2e692447d709d126ed6518c80b8f971b7b1bb268f977e9a2d7e2e738a35cff832ba74fedc5ea7ddcd4d93d09515238fc12099b8397d01c64c53c314fd0f
6
+ metadata.gz: 2ed41666055b98d3e5726435396bba301c4f0df8f3472aa5cdd51c016355d8a3a2a54dc2527cc42db2eea375bbf8955b76a024da44a3cb1872696e927df035a0
7
+ data.tar.gz: 43c7d9686789f1b2382a5bbbbdc6a6c2d408a8e849d17bace9f93313a066bba983f2311032313c9d3fee6efb2e5948bf920b0113828af72ab84b6e8a90ba7732
@@ -35,7 +35,7 @@ module TrajectPlus
35
35
  # to_field 'x', encode: 'UTF-8' # 'abc' to 'abc'
36
36
  # to_field 'x', insert: [1, 'x'] # 'abc' to 'axbc'
37
37
  ['split', 'concat', 'prepend', 'gsub', 'encode', 'insert'].each do |method|
38
- define_method(method) do |values, *args|
38
+ define_method(method) do |values, args|
39
39
  values.flat_map do |v|
40
40
  # Cannot prepend to frozen string; use #dup to effectively unfreeze
41
41
  v.dup.public_send(method, *args)
@@ -55,7 +55,10 @@ module TrajectPlus
55
55
  end
56
56
 
57
57
  accumulator.map do |record|
58
- result = indexer.map_record(record)
58
+ new_context = Traject::Indexer::Context.new(source_record: record, settings: indexer.settings)
59
+ new_context.clipboard[:parent] = context
60
+ indexer.map_to_context!(new_context)
61
+ result = new_context.output_hash
59
62
 
60
63
  if field_name
61
64
  self.class.add_accumulator_to_context! self, field_name, [result], context
@@ -1,3 +1,3 @@
1
1
  module TrajectPlus
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: traject_plus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2017-12-21 00:00:00.000000000 Z
14
+ date: 2018-06-26 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport