stepmod-utils 0.4.12 → 0.4.13
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58a97c3c7381351ce5d0ff391e65f6b5d62ce52f541d51975b53c6e4793b5ae0
|
4
|
+
data.tar.gz: dd7d17312e634aaab93688e8f3fdee84e1895c025d74dd0a505fd357ea336756
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 896b518262254a61c6e0e6a5df7fe5fd992eef5f9a1fb1f9136ee0753a6dc649c9c1ba07fe192c939cfa51b545a4749ffa2610aa9dc4c609b2f7e9385f917437
|
7
|
+
data.tar.gz: 54f31dabc624b11cfe48dde83bd0108c07692c4d3d55ee49a7f70ab518cae6914a9013e99f232d1b0c95e2798627904b3f895dad0ff8b47a48d0cd28ed117f21
|
@@ -64,7 +64,7 @@ module Stepmod
|
|
64
64
|
options = {
|
65
65
|
schema_name: schema_name,
|
66
66
|
version: change_node.attr("version"),
|
67
|
-
description: converted_description(change_node.
|
67
|
+
description: converted_description(change_node.xpath("description").first),
|
68
68
|
}
|
69
69
|
|
70
70
|
MODULE_TYPES.each do |type|
|
@@ -132,9 +132,11 @@ module Stepmod
|
|
132
132
|
|
133
133
|
def extract_change_edition(schema_changes, options)
|
134
134
|
type = options[:type] || "schema"
|
135
|
-
|
136
|
-
|
137
|
-
|
135
|
+
node_type = type.gsub("_longform", "")
|
136
|
+
|
137
|
+
addition_nodes = schema_changes&.xpath("#{node_type}.additions") || []
|
138
|
+
modification_nodes = schema_changes&.xpath("#{node_type}.modifications") || []
|
139
|
+
deletion_nodes = schema_changes&.xpath("#{node_type}.deletions") || []
|
138
140
|
|
139
141
|
{
|
140
142
|
version: options[:version],
|
@@ -36,6 +36,7 @@ module Stepmod
|
|
36
36
|
text = preserve_keychars_within_backticks(text)
|
37
37
|
|
38
38
|
text = preserve_pipes_within_tables(text, state)
|
39
|
+
text = wrap_if_contains_spaces(text, state)
|
39
40
|
preserve_tags(text, state)
|
40
41
|
end
|
41
42
|
|
@@ -53,6 +54,12 @@ module Stepmod
|
|
53
54
|
text.gsub(/\A\n+/, "").gsub(/\n+\z/, "")
|
54
55
|
end
|
55
56
|
|
57
|
+
def wrap_if_contains_spaces(text, state)
|
58
|
+
return "(#{text})" if state[:equation] && text.strip.match?(/\s/) && text.match?(/^[A-Za-z ]+$/)
|
59
|
+
|
60
|
+
text
|
61
|
+
end
|
62
|
+
|
56
63
|
def remove_inner_newlines(text)
|
57
64
|
text.tr("\n\t", " ").squeeze(" ")
|
58
65
|
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.4.
|
4
|
+
version: 0.4.13
|
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-01-
|
11
|
+
date: 2024-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|