stepmod-utils 0.3.25 → 0.3.26

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: 46ea2364546e11b067f0d3d21e78d0a1df701ec5189aeb94d08461d551b22786
4
- data.tar.gz: ab5adf48414ca093c86ff2fbe12155ff7eab79102412f1c1f9949ee5e7eac591
3
+ metadata.gz: b9ad52321cd8307aae7754edc2b9e45f2e20d372aceca95c667befce3717fae2
4
+ data.tar.gz: c86cb0fb6e7a7c8e654571cbc0eb31792e760be7069402e04d05c17db8e13e14
5
5
  SHA512:
6
- metadata.gz: 16eb837cff97033e742a20f2513ca426f69d41bb49cce9956c450f41c90290bd3404083c378a40b0ac6c35a68c974c57db1b11e5919cc6a1d5da9b65845b310b
7
- data.tar.gz: c3df83672ebda912b592c487698b61e1e19e91cc31da78959dae7d3f4d3836b6a1940d78e33eec34dca92815fe7385e0289f3170303f989187132e1ef21ebc82
6
+ metadata.gz: 4e19c30c54c9f4b8d6b32fbdf998ac7b741f5fb81193552e991c3e3daa194dc2bd37c1a3277245e8954672cb64d0c1260a070509e1e3daa199628acd993c89cf
7
+ data.tar.gz: a3601da30f90d16a8bb6c53a17950af15ca761379ded0f7ebb0a25607822944221e8d2d79c32a78c752ba470badc68b69ce3d047a30452201fbd78dfb28a1664
@@ -16,6 +16,8 @@ def all_express_files(stepmod_dir)
16
16
  end
17
17
 
18
18
  index.xpath("resources/resource").each do |item|
19
+ next if item["name"] == "iso13584_expressions_schema"
20
+
19
21
  files << "#{stepmod_dir}/data/resources/#{item['name']}/#{item['name']}.exp"
20
22
  end
21
23
 
@@ -17,7 +17,7 @@ module Stepmod
17
17
  # TODO: converted_definition is not supposed to be an attribute, it is
18
18
  # supposed to be a method!
19
19
  class << self
20
- def parse(definition_xml, reference_anchor:, reference_clause:, file_path:, language_code: "en")
20
+ def parse(definition_xml, reference_anchor:, reference_clause:, file_path:, language_code: "eng")
21
21
  converted_definition = Stepmod::Utils::StepmodDefinitionConverter.convert(
22
22
  definition_xml,
23
23
  {
@@ -21,13 +21,13 @@ module Stepmod
21
21
  if !published_info.nil?
22
22
  @pubid = Pubid::Iso::Identifier.parse(published_info)
23
23
 
24
- @part = pubid.part
25
- @version = pubid.edition
26
- @pub_year = pubid.year
24
+ @part = pubid.part&.to_s
25
+ @version = pubid.edition&.to_s
26
+ @pub_year = pubid.year&.to_s
27
27
  elsif !schema.version.nil?
28
- @part = schema.version.items.find { |i| i.name == "part" }.value
29
- @version = schema.version.items.find { |i| i.name == "part" }.value
30
- @pub_year = schema.version.items.find { |i| i.name == "part" }.value
28
+ @part = schema.version.items.find { |i| i.name == "part" }.value&.to_s
29
+ @version = schema.version.items.find { |i| i.name == "part" }.value&.to_s
30
+ @pub_year = schema.version.items.find { |i| i.name == "part" }.value&.to_s
31
31
  else
32
32
  raise "PublishedInfoNotFound"
33
33
  end
@@ -268,7 +268,7 @@ module Stepmod
268
268
  year = "" if year == "tbd"
269
269
  edition = bib.attributes["version"].value
270
270
 
271
- pubid = Pubid::Iso::Identifier.new(
271
+ pubid = Pubid::Iso::Identifier.create(
272
272
  publisher: "ISO",
273
273
  number: 10303,
274
274
  )
@@ -102,7 +102,7 @@ module Stepmod
102
102
 
103
103
  # add resource paths
104
104
  repo_index.xpath("//resource").each do |x|
105
- next if x['status'] == WITHDRAWN_STATUS
105
+ next if x["status"] == WITHDRAWN_STATUS || x["name"] == "iso13584_expressions_schema"
106
106
 
107
107
  path = Pathname.new("#{stepmod_dir}/resources/#{x['name']}/#{x['name']}_annotated.exp")
108
108
  files << path if File.exist? path
@@ -340,7 +340,7 @@ module Stepmod
340
340
  },
341
341
  ],
342
342
  notes: notes,
343
- language_code: "en",
343
+ language_code: "eng",
344
344
  part: bibdata.part,
345
345
  schema: schema,
346
346
  document: document,
@@ -1,5 +1,5 @@
1
1
  module Stepmod
2
2
  module Utils
3
- VERSION = "0.3.25".freeze
3
+ VERSION = "0.3.26".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stepmod-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.25
4
+ version: 0.3.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-14 00:00:00.000000000 Z
11
+ date: 2023-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby