mn-requirements 0.3.6 → 0.3.7

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: 754071e6a128c01af6fd2526dce1b8cbbecb043e9e9a4f76877ba076a5edf573
4
- data.tar.gz: 8937c93e2818e1c5a8ba3b69320e740b7f271e372660f6f4ad5e9a58e491edc6
3
+ metadata.gz: a2ba672c0841ee7afdaa25c8eb3cd423b7d2033555610508dd548a3a59ca131e
4
+ data.tar.gz: 595088ec2f1c850dc6654e97a4daa593a5bbca658797a3016f24335af9738bb5
5
5
  SHA512:
6
- metadata.gz: ffd53201ea85a67bfe53b14a6e96696c6d0581ff2a56205e35756c15f7713ca184fef57e547767ce0f5bd96b8bacc284cf9852153e1cc848cc1cda57bb9971bc
7
- data.tar.gz: e350c1ca4121ac9bdcbece442b2a93d544eeed699d262e169ef883cff52deac2fddb47c308274e9377a178d711a26a44097498f9e8cc7419f370b2e1810407e4
6
+ metadata.gz: fba1dff3fce4185612b7edefa7518e1968b622b52aac5dc27f1373af2ee09990921e0cf0c009faca3a36f649ea600790b72bc887d0a5a90315f821c5449d9941
7
+ data.tar.gz: 7c38a1b25ee9aa29501437afb90947ba208038b571b63195529c8ac27afe82d7b9811b98f08605a07ed5b4130b9689b0fadcd038ddb6b3d25ef0e80e1bc7af99
data/Gemfile CHANGED
@@ -4,12 +4,6 @@ Encoding.default_internal = Encoding::UTF_8
4
4
  source "https://rubygems.org"
5
5
  git_source(:github) { |repo| "https://github.com/#{repo}" }
6
6
 
7
- group :development, :test do
8
- gem "rspec"
9
- end
10
-
11
- if File.exist? "Gemfile.devel"
12
- eval File.read("Gemfile.devel"), nil, "Gemfile.devel" # rubocop:disable Security/Eval
13
- end
14
-
15
7
  gemspec
8
+
9
+ eval_gemfile("Gemfile.devel") rescue nil
@@ -72,6 +72,15 @@ module Metanorma
72
72
  requirement_metadata_to_requirement(reqt)
73
73
  requirement_subparts_to_blocks(reqt)
74
74
  requirement_target_identifiers(reqt)
75
+ requirement_anchor_identifier(reqt)
76
+ end
77
+
78
+ def requirement_anchor_identifier(reqt)
79
+ Metanorma::Utils::guid_anchor?(reqt["id"]) or return
80
+ id = reqt.at("./identifier") or return
81
+ anchor = id.text.strip
82
+ anchor.empty? and return
83
+ reqt["id"] = Metanorma::Utils::to_ncname(anchor)
75
84
  end
76
85
 
77
86
  def requirement_target_identifiers(reqt)
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  class Requirements
3
- VERSION = "0.3.6".freeze
3
+ VERSION = "0.3.7".freeze
4
4
  end
5
5
  end
@@ -27,12 +27,13 @@ Gem::Specification.new do |spec|
27
27
 
28
28
  # precise version is on relaton-render
29
29
  spec.add_dependency "isodoc-i18n", ">= 1.1.0"
30
+ spec.add_dependency "metanorma-utils", ">= 0.7.7"
30
31
 
31
32
  spec.add_development_dependency "debug"
32
33
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
33
34
  spec.add_development_dependency "guard", "~> 2.14"
34
35
  spec.add_development_dependency "guard-rspec", "~> 4.7"
35
- spec.add_development_dependency "metanorma-standoc", ">= 2.7.2"
36
+ spec.add_development_dependency "metanorma-standoc", ">= 2.8.0"
36
37
  spec.add_development_dependency "rake", "~> 13.0"
37
38
  spec.add_development_dependency "rspec", "~> 3.6"
38
39
  spec.add_development_dependency "rubocop", "~> 1.5.2"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mn-requirements
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-13 00:00:00.000000000 Z
11
+ date: 2024-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: isodoc-i18n
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.1.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: metanorma-utils
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.7.7
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 0.7.7
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: debug
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +100,14 @@ dependencies:
86
100
  requirements:
87
101
  - - ">="
88
102
  - !ruby/object:Gem::Version
89
- version: 2.7.2
103
+ version: 2.8.0
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
108
  - - ">="
95
109
  - !ruby/object:Gem::Version
96
- version: 2.7.2
110
+ version: 2.8.0
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: rake
99
113
  requirement: !ruby/object:Gem::Requirement
@@ -236,7 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
236
250
  - !ruby/object:Gem::Version
237
251
  version: '0'
238
252
  requirements: []
239
- rubygems_version: 3.3.26
253
+ rubygems_version: 3.3.27
240
254
  signing_key:
241
255
  specification_version: 4
242
256
  summary: Requirements processing and rendering according to different models