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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce740401dd91d79ca33c2bebbe85413a6e6837076dfe16af47fc57a4738d274a
4
- data.tar.gz: d64d1d496b9d07b8b0930786e4f73e3185db39f4c29eaad2188a6e6fcd72128e
3
+ metadata.gz: 7b333172ac75b1d833635b9f904e958a7f3133171c79a768f61d0b9c998569f3
4
+ data.tar.gz: cd6008ab2fb0752fa5fcdbd202c1f83917d2ff0002752263b0303b025662ae77
5
5
  SHA512:
6
- metadata.gz: 4922613f24bef520545a0bf31cec9bafc6b66b7daba6b75ac8bd25c9eb4f3178688e1450286c5fd8fa91f84a60a82ea98b87a1132f7cfaaf7ad5e764b7d10a6c
7
- data.tar.gz: 58cf0b399ad28e219d8e85454b3dcc82428451b1481d41057fe301ff2f9f13428b168f989e2f53ba0e118097d732bf5172e2ade63d91d86d80204e125e6b4dd9
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?(/Kommentar/)
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 { it.match?("Typschlüssel") }] = :typekey }
196
- .tap { _1[row.index { it.match?("Entwicklungsbaureihe") }] = :devkey }
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
@@ -15,8 +15,8 @@ module Dcm
15
15
  end
16
16
 
17
17
  def match?(headers, row)
18
- return false unless row[3]
19
- return false unless row[3].match?(/CVAR/)
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
@@ -1,3 +1,3 @@
1
1
  module Dcm
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dcm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Mueller