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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 37fbf39c85da8b63e44be8849a9ce41a15522c2e6b805cfb5f9de006701f3110
4
- data.tar.gz: 743944d95ebf66f6489df542172126de21bf71e86f9048518bdaa3b9efb9fe0e
3
+ metadata.gz: edeeb87ccd74f0291767f8b7f11a67c1c670a183935b4fa9e03f886f383e915d
4
+ data.tar.gz: f9ec9f2dd952a8893bb4876ff826c48dc590c1188ce9d1e26dd8de4ad5adce7c
5
5
  SHA512:
6
- metadata.gz: 54239cf1ac5eddd882ea7426124ee609987376942d79ac08d52fb7827dbde060345da8940aafad22fcc01e2db4a1f3047863759e649d7a9529c57aa2eb60b0de
7
- data.tar.gz: 4a2d387e3040dcf8f66d88c7f2f131b6bcc1c7fb81acc8d6fa583d46909e5f0dca91de3e8334ece768d6ccb716c7fa9112878aece02fdb54b4e4a9cc1b54a87e
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
- return if text.nil?
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
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Utils
3
- VERSION = "1.5.1".freeze
3
+ VERSION = "1.5.4".freeze
4
4
  end
5
5
  end
@@ -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.1
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-06-29 00:00:00.000000000 Z
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