ndr_import 11.0.0 → 11.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/ndr_import/version.rb +1 -1
- data/lib/ndr_import/xml/column_mapping.rb +7 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b3b3b485a77caed57442e97c7391c4d95b68ee4a9ae5af1a6e53b9a1fd95987
|
4
|
+
data.tar.gz: fbf1799920b70ddcbc6014c269e90a6d3d9689f01a306042ab2cac7152637eff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b06f9293e925ef74ecb96a1ae24f7732bf057ff6642a29245ad99f51b6bd48d608257575c48a2bbe89a509de1f9db44a457567175e9f3a354840f48fe5d1e92c
|
7
|
+
data.tar.gz: 37c8145eea0bb9f6f1788f202524cd233a7b542088b7d540f5d7d236ca910dcaf950ffd0adf6a4619afb64a6f4b7082c478d90a4b7bf19dba8016b6ab3fba07b
|
data/CHANGELOG.md
CHANGED
data/lib/ndr_import/version.rb
CHANGED
@@ -57,19 +57,19 @@ module NdrImport
|
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
60
|
-
# Append "_1", "_2" etc to repeating rawtext and optionally mapped field names
|
61
|
-
# single record, so data is not overwritten
|
60
|
+
# Append "_1.1", "_2.1", "_1" etc to repeating rawtext and optionally mapped field names
|
61
|
+
# within a single record, so data is not overwritten
|
62
62
|
def apply_new_rawtext_and_mapped_names_to(new_column)
|
63
63
|
existing_rawtext = existing_column['rawtext_name'] || existing_column['column']
|
64
64
|
column_name_increment = new_column['column'].scan(/\[(\d+)\]/)
|
65
65
|
relative_path_increment = new_column.dig('xml_cell', 'relative_path').scan(/\[(\d+)\]/)
|
66
66
|
|
67
|
-
# Find all the increments (e.g. [1], [2]) from the new column and
|
68
|
-
# as the rawtext and column name increment
|
69
|
-
increment = (column_name_increment + relative_path_increment).flatten.
|
70
|
-
new_column['rawtext_name'] = existing_rawtext + "_#{increment}"
|
67
|
+
# Find all the increments (e.g. [1], [2]) from the new column and concatenate them to
|
68
|
+
# use as the rawtext and column name increment
|
69
|
+
increment = (column_name_increment + relative_path_increment).flatten.compact.join('.')
|
70
|
+
new_column['rawtext_name'] = existing_rawtext + "_#{increment}" if increment.present?
|
71
71
|
|
72
|
-
return unless
|
72
|
+
return unless increment.present? && increment_field_name
|
73
73
|
|
74
74
|
new_column['mappings'] = incremented_mappings_for(new_column, increment)
|
75
75
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ndr_import
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 11.0.
|
4
|
+
version: 11.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- NCRS Development Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|