cdmdexer 0.18.0 → 0.19.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
  SHA256:
3
- metadata.gz: d9864c85d2d86c48decf721e05582718c7edca604b5b60a58221b66abc5632c9
4
- data.tar.gz: d1cae834155be4e7595a8126130b38866744cec68178d8850f25dfb5b4e3d1d7
3
+ metadata.gz: 59d43d9c22b7fe79a88b39a9d44909f41062cbe24f97daa2d9458c70de3a7c56
4
+ data.tar.gz: cf687f21c8f8740dba42eb9b86d8272df812ea7456bfae6eb1314ec5f270189b
5
5
  SHA512:
6
- metadata.gz: 4b869bdeaee31345509c7f1e73d992ba0426f4dbf742f5c89fccb97731aa1d4e73306f0edc0e0b83f5a18eaba55f3c9bb24b2b0c6b2f2fe59bf58c629619e375
7
- data.tar.gz: 8552430d8a82618e9494982a0392a06376db7ac406c3921f3960eac87d8705e3dbcc4836ca313b5b89f353ec67b6e7e9ffecab3ee28ef726d000b1fdc5c0f5af
6
+ metadata.gz: f75efb0c7b642a71a6231eaa07fd6a7fe8ffa994e90175a0e7ee953795500458adf3e23b6f9461b2116144494d331e221ac7c63c717bd1bb55ab4efd981cf561
7
+ data.tar.gz: 2d9817ad1099ac49117f6bde773134c66b0da166ab5928ca513226996a93279b3d49f18b4905de17db751674c5219cbf5acec44e36f85f156981038d3ae21c33
@@ -4,11 +4,12 @@ module CDMDEXER
4
4
  class FieldTransformer
5
5
  extend Forwardable
6
6
  def_delegators :@field_mapping, :origin_path, :dest_path, :formatters
7
- attr_reader :field_value, :field_mapping, :formatter_klass
7
+ attr_reader :field_value, :field_mapping, :formatter_klass, :record_id
8
8
  def initialize(field_mapping: FieldMapping.new,
9
9
  record: {},
10
10
  formatter_klass: FieldFormatter)
11
11
  @field_mapping = field_mapping
12
+ @record_id = record.fetch('id', 'MISSING_RECORD_ID')
12
13
  @field_value = compact(record.at_path(origin_path))
13
14
  @formatter_klass = formatter_klass
14
15
  end
@@ -35,7 +36,7 @@ module CDMDEXER
35
36
  def transform_field
36
37
  formatter_klass.new(value: field_value, formatters: formatters).format!
37
38
  rescue StandardError => e
38
- raise "Mapping Error:#{field_mapping.config} Error:#{e.message}"
39
+ raise "FieldTransformer Mapping Error - Record: #{record_id} Mapping: #{field_mapping.config} Error:#{e.message}"
39
40
  end
40
41
  end
41
42
  end
@@ -1,3 +1,3 @@
1
1
  module CDMDEXER
2
- VERSION = "0.18.0"
2
+ VERSION = "0.19.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cdmdexer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - chadfennell
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-18 00:00:00.000000000 Z
11
+ date: 2019-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hash_at_path
@@ -215,7 +215,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
215
215
  - !ruby/object:Gem::Version
216
216
  version: '0'
217
217
  requirements: []
218
- rubygems_version: 3.0.3
218
+ rubyforge_project:
219
+ rubygems_version: 2.7.8
219
220
  signing_key:
220
221
  specification_version: 4
221
222
  summary: Load CONTENTdm data into a Solr Index. CDMDEXER expects to run inside a Rails