dcm 0.2.0 → 0.2.1
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 +4 -4
- data/lib/codinginfo.rb +6 -3
- data/lib/variant_filter.rb +2 -2
- data/lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7b333172ac75b1d833635b9f904e958a7f3133171c79a768f61d0b9c998569f3
|
|
4
|
+
data.tar.gz: cd6008ab2fb0752fa5fcdbd202c1f83917d2ff0002752263b0303b025662ae77
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4e8f3adedacfc9b5498b71cd4d205be74bdc5ff136828d72234df9e97a99e7216176a03fbde70143e0620ece63d2511fb2246ce60016bcef8b6d73ab7d67e478
|
|
7
|
+
data.tar.gz: c1a1b44482b74ac929c754291fd703085d2e289ef0997d7e8c9ab7718b494ad41d6c53489a68b8ed447a41558c3f79672b41cf31c05ddbc4d47dd0190e1ff6a8
|
data/lib/codinginfo.rb
CHANGED
|
@@ -182,7 +182,7 @@ class Codinginfo
|
|
|
182
182
|
def parse_headers!(headers, row)
|
|
183
183
|
return false unless row[1]&.match?(/SWFK-ID/)
|
|
184
184
|
return false unless row[1]&.match?(/CVAR_BeguData/)
|
|
185
|
-
return false unless row[2]&.match?(/
|
|
185
|
+
return false unless row[2]&.match?(/Homologations-I-Stufe/)
|
|
186
186
|
|
|
187
187
|
headers.replace(
|
|
188
188
|
row
|
|
@@ -192,8 +192,11 @@ class Codinginfo
|
|
|
192
192
|
.map { _1.sub(/\n.*/, "") }
|
|
193
193
|
.tap { _1[0] = :typestr }
|
|
194
194
|
.tap { _1[1] = :swfk_id } # SWFK-ID \nCVAR_BeguData"
|
|
195
|
-
.tap { _1[row.index {
|
|
196
|
-
.tap { _1[row.index {
|
|
195
|
+
.tap { _1[row.index { |c| c.match?("Homologations-I-Stufe") }] = :hom_istep }
|
|
196
|
+
.tap { _1[row.index { |c| c.match?("Kommentar") }] = :comment }
|
|
197
|
+
.tap { _1[row.index { |c| c.match?("Gruppe") }] = :group }
|
|
198
|
+
.tap { _1[row.index { |c| c.match?("Typschlüssel") }] = :typekey }
|
|
199
|
+
.tap { _1[row.index { |c| c.match?("Entwicklungsbaureihe") }] = :devkey }
|
|
197
200
|
)
|
|
198
201
|
true
|
|
199
202
|
end
|
data/lib/variant_filter.rb
CHANGED
|
@@ -15,8 +15,8 @@ module Dcm
|
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
def match?(headers, row)
|
|
18
|
-
return false unless row[
|
|
19
|
-
return false unless row[
|
|
18
|
+
return false unless row[headers.index(:group)]
|
|
19
|
+
return false unless row[headers.index(:group)].match?(/CVAR/)
|
|
20
20
|
return false unless headers.include?(@key)
|
|
21
21
|
|
|
22
22
|
matchers.any? { row[headers.index(@key)].match?(_1) }
|
data/lib/version.rb
CHANGED