metanorma-utils 1.5.1 → 1.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/utils/main.rb +4 -5
- data/lib/utils/version.rb +1 -1
- data/metanorma-utils.gemspec +2 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: edeeb87ccd74f0291767f8b7f11a67c1c670a183935b4fa9e03f886f383e915d
|
4
|
+
data.tar.gz: f9ec9f2dd952a8893bb4876ff826c48dc590c1188ce9d1e26dd8de4ad5adce7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c24b7db0805bd859259e20f9ea029a7a010ebbdc256966db51ebb16e6bd8724d4adf53cfae7d45e32b716fa84bb8691b30b923fb9bd1f09c6a3c722ad6b8bcd
|
7
|
+
data.tar.gz: ff2f10cc3b20c51d693e218acdcd8177b697c93d4ed707a80ec2ad1d65788d72d1de68083078c5696f8d5f3be4a38cd6b4c4bd3a4815f3a4e1e0bf8a6718474e
|
data/lib/utils/main.rb
CHANGED
@@ -17,9 +17,8 @@ module Metanorma
|
|
17
17
|
# , " => ," : CSV definition does not deal with space followed by quote
|
18
18
|
# at start of field
|
19
19
|
def csv_split(text, delim = ";")
|
20
|
-
|
21
|
-
|
22
|
-
CSV.parse_line(text&.gsub(/#{delim} "(?!")/, "#{delim}\""),
|
20
|
+
text.nil? || text.empty? and return []
|
21
|
+
CSV.parse_line(text.gsub(/#{delim} "(?!")/, "#{delim}\""),
|
23
22
|
liberal_parsing: true,
|
24
23
|
col_sep: delim)&.compact&.map(&:strip)
|
25
24
|
end
|
@@ -55,7 +54,7 @@ module Metanorma
|
|
55
54
|
HTMLEntities.new.encode(
|
56
55
|
HTMLEntities.new.decode(
|
57
56
|
text.gsub(/ --? /, " — ")
|
58
|
-
.gsub(
|
57
|
+
.gsub("--", "—"),
|
59
58
|
)
|
60
59
|
.smart_format, :basic
|
61
60
|
)
|
@@ -65,7 +64,7 @@ module Metanorma
|
|
65
64
|
elem.traverse do |n|
|
66
65
|
next unless n.text?
|
67
66
|
|
68
|
-
n.replace(n.text.gsub(/\s+--?\s+/, "–").gsub(
|
67
|
+
n.replace(n.text.gsub(/\s+--?\s+/, "–").gsub("--", "–"))
|
69
68
|
end
|
70
69
|
end
|
71
70
|
|
data/lib/utils/version.rb
CHANGED
data/metanorma-utils.gemspec
CHANGED
@@ -24,7 +24,6 @@ Gem::Specification.new do |spec|
|
|
24
24
|
f.match(%r{^(test|spec|features|bin|.github)/}) \
|
25
25
|
|| f.match(%r{Rakefile|bin/rspec})
|
26
26
|
end
|
27
|
-
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
28
27
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
29
28
|
|
30
29
|
spec.add_dependency "asciidoctor", ">= 2"
|
@@ -37,6 +36,7 @@ Gem::Specification.new do |spec|
|
|
37
36
|
spec.add_dependency "sterile", "~> 1.0.14"
|
38
37
|
spec.add_dependency "uuidtools"
|
39
38
|
|
39
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
40
40
|
spec.add_development_dependency "debug"
|
41
41
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
42
42
|
spec.add_development_dependency "guard", "~> 2.14"
|
@@ -48,4 +48,5 @@ Gem::Specification.new do |spec|
|
|
48
48
|
spec.add_development_dependency "timecop", "~> 0.9"
|
49
49
|
spec.add_development_dependency "vcr", "~> 6.1.0"
|
50
50
|
spec.add_development_dependency "webmock"
|
51
|
+
#spec.metadata["rubygems_mfa_required"] = "true"
|
51
52
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|
@@ -136,6 +136,20 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: bundler
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '2.0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '2.0'
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: debug
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|