stepmod-utils 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stepmod/utils/stepmod_file_annotator.rb +13 -6
- data/lib/stepmod/utils/version.rb +1 -1
- metadata +2 -2
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
|
@@ -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
|
{
|
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-05-
|
11
|
+
date: 2024-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|