stepmod-utils 0.6.2 → 0.6.4
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/exe/stepmod-srl-migrate +6 -0
- data/lib/stepmod/utils/stepmod_file_annotator.rb +13 -6
- data/lib/stepmod/utils/version.rb +1 -1
- data/stepmod-utils.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd6272ff4c3c263a1bb31f5dabb58058d933a2fa0ef9c9711d23152f79f3634a
|
4
|
+
data.tar.gz: cf84426917abec57f8abf4af78f23089bc50eb475103860672a748f9023155bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6342de4cb0ebb220c0d8f0849796e738e75d9ec2182120471af41e11f6eb65f8c1f1944386ec42e7639ba7f69a915c6e4e25552f119fdfb43e0cb35dc7b022fb
|
7
|
+
data.tar.gz: e78c8c07b90fe7e27521849235dc3c60e3be12eb2e122eca8c2ea5a06701c764205ac8f346714114cf3b5c9470753ee04abcf2da8f9f52f302e51862c0cfbcb9
|
data/exe/stepmod-srl-migrate
CHANGED
@@ -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_]
|
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
|
-
"
|
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
|
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
|
{
|
data/stepmod-utils.gemspec
CHANGED
@@ -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", "
|
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.
|
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-
|
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:
|
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:
|
152
|
+
version: 0.3.7
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: shale
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|