stepmod-utils 0.6.2 → 0.6.4

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: 0ba239ce1178c1cff73be94862409e8d0801f45b4844a779502df8c9f33d2c5e
4
- data.tar.gz: 22e929a35fb7eea95b829f43d06f18cc95d25ef79a8361c273a57bb311624884
3
+ metadata.gz: dd6272ff4c3c263a1bb31f5dabb58058d933a2fa0ef9c9711d23152f79f3634a
4
+ data.tar.gz: cf84426917abec57f8abf4af78f23089bc50eb475103860672a748f9023155bf
5
5
  SHA512:
6
- metadata.gz: 5c74b4390e7d32cc70160da65bb1c401b00fc509454f8e35a7ef4148378fab5ab80dd96d7c4a9be9286dab5bbc7bd230a546c9a4a42443257880b2638bf003ed
7
- data.tar.gz: acdd911c1c8d0213904424fc936827fd1f2e97da77915b9897ca3b417943205e6b4012f30d6ad0679262f43220aada65d6dabd479a5a1ed3a1907614b987930b
6
+ metadata.gz: 6342de4cb0ebb220c0d8f0849796e738e75d9ec2182120471af41e11f6eb65f8c1f1944386ec42e7639ba7f69a915c6e4e25552f119fdfb43e0cb35dc7b022fb
7
+ data.tar.gz: e78c8c07b90fe7e27521849235dc3c60e3be12eb2e122eca8c2ea5a06701c764205ac8f346714114cf3b5c9470753ee04abcf2da8f9f52f302e51862c0cfbcb9
@@ -214,6 +214,12 @@ Dir.glob("#{stepmod_dir}/data/**/changes.yaml").each do |filepath|
214
214
  copy_files_to_document(path, stepmod_dir, srl_output_docs_dir)
215
215
  end
216
216
 
217
+ # Move mappings into document directories
218
+ Dir.glob("#{stepmod_dir}/data/**/mapping.yaml").each do |filepath|
219
+ path = Pathname.new(filepath)
220
+ copy_files_to_document(path, stepmod_dir, srl_output_docs_dir)
221
+ end
222
+
217
223
  log("*" * 30)
218
224
  log("[SRL MIGRATION: stepmod-utils] COMPLETE EXPRESS change YAML extraction.")
219
225
 
@@ -43,7 +43,7 @@ module Stepmod
43
43
  end
44
44
  end
45
45
 
46
- SCHEMA_VERSION_MATCH_REGEX = /^SCHEMA [0-9a-zA-Z_]+;\s*$/
46
+ SCHEMA_VERSION_MATCH_REGEX = /^[[:space:]]*?SCHEMA [0-9a-zA-Z_]+;(?<trailing>.*)[[:space:]]*$/
47
47
  def is_missing_version(schema_content)
48
48
  m = schema_content.match(SCHEMA_VERSION_MATCH_REGEX)
49
49
  if m.nil?
@@ -55,6 +55,16 @@ module Stepmod
55
55
  end
56
56
  end
57
57
 
58
+ def replace_schema_string_with_version(content)
59
+ m = content.match(SCHEMA_VERSION_MATCH_REGEX)
60
+ result = build_schema_string_with_version
61
+ unless m['trailing'].nil?
62
+ result = "#{result}#{m['trailing']}"
63
+ end
64
+
65
+ content.gsub!(SCHEMA_VERSION_MATCH_REGEX, result)
66
+ end
67
+
58
68
  def build_schema_string_with_version
59
69
  # Geometric_tolerance_arm => geometric-tolarance-arm
60
70
  name_in_asn1 = @schema_name.downcase.gsub("_", "-")
@@ -80,7 +90,7 @@ module Stepmod
80
90
  edition = @identifier.edition
81
91
  schema_or_object = (schema_type == :module) ? "schema" : "object"
82
92
 
83
- "SCHEMA #{@schema_name} '{ " \
93
+ "\nSCHEMA #{@schema_name} '{ " \
84
94
  "iso standard 10303 part(#{part}) " \
85
95
  "version(#{edition}) " \
86
96
  "#{schema_or_object}(1) " \
@@ -186,10 +196,7 @@ module Stepmod
186
196
  puts "[annotator-WARNING] schema (#{@schema_name}) missing version string. "\
187
197
  "Adding: `#{build_schema_string_with_version}` to schema."
188
198
 
189
- output_express.gsub!(
190
- SCHEMA_VERSION_MATCH_REGEX,
191
- build_schema_string_with_version
192
- )
199
+ output_express = replace_schema_string_with_version(output_express)
193
200
  end
194
201
 
195
202
  {
@@ -1,5 +1,5 @@
1
1
  module Stepmod
2
2
  module Utils
3
- VERSION = "0.6.2".freeze
3
+ VERSION = "0.6.4".freeze
4
4
  end
5
5
  end
@@ -40,7 +40,7 @@ Gem::Specification.new do |spec|
40
40
  spec.add_runtime_dependency "plurimath"
41
41
  spec.add_runtime_dependency "ptools"
42
42
  spec.add_runtime_dependency "pubid-iso"
43
- spec.add_runtime_dependency "reverse_adoc", ">= 0.3"
43
+ spec.add_runtime_dependency "reverse_adoc", "~> 0.3.7"
44
44
  spec.add_runtime_dependency "shale"
45
45
  spec.add_runtime_dependency "thor", ">= 0.20"
46
46
  spec.add_runtime_dependency "unitsml"
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.6.2
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-25 00:00:00.000000000 Z
11
+ date: 2024-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -140,16 +140,16 @@ dependencies:
140
140
  name: reverse_adoc
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ">="
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '0.3'
145
+ version: 0.3.7
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ">="
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '0.3'
152
+ version: 0.3.7
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: shale
155
155
  requirement: !ruby/object:Gem::Requirement