traject_plus 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/traject_plus/extraction.rb +1 -1
- data/lib/traject_plus/indexer/step.rb +4 -1
- data/lib/traject_plus/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8a834e5438fea87e70c76613829687057f7b79c
|
4
|
+
data.tar.gz: 9246f088e53b02c1ddbbccf9ee1b15ca43859bba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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,
|
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
|
-
|
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
|
data/lib/traject_plus/version.rb
CHANGED
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.
|
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:
|
14
|
+
date: 2018-06-26 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|