defmastership 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9dd61d32bacab380bbfc110df15fd6617b38540aa5bc8eb14bd5b2736e657b7c
|
|
4
|
+
data.tar.gz: 1ec7bc921411173863b71ba0c3f4164829ac2efbe0689c321830f632a3333f64
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e8dcebcb309fd755a339ab702f7c07c65387e5a961400518661d70e9421911630652855a10ad647ac6155b9686665927fde8315a8efb71e3a2913a8db32fbcd5
|
|
7
|
+
data.tar.gz: 83e28e54b372de48cc554b8f532e659817453e905f3c6634071b3e280f23fba2431119353af9bdd6b23b97a6d6bf8a2b9a261b39e70591f27be45a3b04dce19b
|
|
@@ -242,3 +242,57 @@ Feature: definition checksum
|
|
|
242
242
|
"""
|
|
243
243
|
And the stdout should not contain anything
|
|
244
244
|
And the stderr should not contain anything
|
|
245
|
+
|
|
246
|
+
Scenario: Checksum keep explicit version in ref modification
|
|
247
|
+
Given a file named "modifications.yml" with:
|
|
248
|
+
"""
|
|
249
|
+
---
|
|
250
|
+
:update_requirement_checksum:
|
|
251
|
+
:type: update_def_checksum
|
|
252
|
+
:config:
|
|
253
|
+
:def_type: requirement
|
|
254
|
+
"""
|
|
255
|
+
And a file named "thedoc.adoc" with:
|
|
256
|
+
"""
|
|
257
|
+
[define, requirement, TOTO-TEMP-XXX1(toto~abcd1234)]
|
|
258
|
+
--
|
|
259
|
+
the requirement value.
|
|
260
|
+
--
|
|
261
|
+
"""
|
|
262
|
+
When I successfully run `defmastership modify --modifications update_requirement_checksum thedoc.adoc`
|
|
263
|
+
Then the stdout should not contain anything
|
|
264
|
+
And the stderr should not contain anything
|
|
265
|
+
And the file "thedoc.adoc" should contain:
|
|
266
|
+
"""
|
|
267
|
+
[define, requirement, TOTO-TEMP-XXX1(toto~244eed18)]
|
|
268
|
+
--
|
|
269
|
+
the requirement value.
|
|
270
|
+
--
|
|
271
|
+
"""
|
|
272
|
+
|
|
273
|
+
Scenario: Checksum keep explicit version in ref setting
|
|
274
|
+
Given a file named "modifications.yml" with:
|
|
275
|
+
"""
|
|
276
|
+
---
|
|
277
|
+
:update_requirement_checksum:
|
|
278
|
+
:type: update_def_checksum
|
|
279
|
+
:config:
|
|
280
|
+
:def_type: requirement
|
|
281
|
+
"""
|
|
282
|
+
And a file named "thedoc.adoc" with:
|
|
283
|
+
"""
|
|
284
|
+
[define, requirement, TOTO-TEMP-XXX1(toto)]
|
|
285
|
+
--
|
|
286
|
+
the requirement value.
|
|
287
|
+
--
|
|
288
|
+
"""
|
|
289
|
+
When I successfully run `defmastership modify --modifications update_requirement_checksum thedoc.adoc`
|
|
290
|
+
Then the stdout should not contain anything
|
|
291
|
+
And the stderr should not contain anything
|
|
292
|
+
And the file "thedoc.adoc" should contain:
|
|
293
|
+
"""
|
|
294
|
+
[define, requirement, TOTO-TEMP-XXX1(toto~244eed18)]
|
|
295
|
+
--
|
|
296
|
+
the requirement value.
|
|
297
|
+
--
|
|
298
|
+
"""
|
|
@@ -23,9 +23,8 @@ module DefMastership
|
|
|
23
23
|
return line unless match
|
|
24
24
|
return line unless match[:type] == def_type
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"#{match[:reference]}(#{@document.ref_to_def(match[:reference]).sha256})"
|
|
26
|
+
line.gsub(Regexp.new("#{match[:reference]}#{DMRegexp::DEF_VERSION_AND_CHECKSUM}")) do
|
|
27
|
+
"#{match[:reference]}(#{match[:explicit_version]}#{@document.ref_to_def(match[:reference]).sha256})"
|
|
29
28
|
end
|
|
30
29
|
end
|
|
31
30
|
|
|
@@ -63,6 +63,16 @@ RSpec.describe(DefMastership::UpdateDefChecksumLineModifier) do
|
|
|
63
63
|
expect(linemodifier.replace('[define,requirement,REFERENCE(~bad)]'))
|
|
64
64
|
.to(eq('[define,requirement,REFERENCE(~abcd1234)]'))
|
|
65
65
|
end
|
|
66
|
+
|
|
67
|
+
it do
|
|
68
|
+
expect(linemodifier.replace('[define,requirement,REFERENCE(toto~bad)]'))
|
|
69
|
+
.to(eq('[define,requirement,REFERENCE(toto~abcd1234)]'))
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
it do
|
|
73
|
+
expect(linemodifier.replace('[define,requirement,REFERENCE(toto)]'))
|
|
74
|
+
.to(eq('[define,requirement,REFERENCE(toto~abcd1234)]'))
|
|
75
|
+
end
|
|
66
76
|
end
|
|
67
77
|
end
|
|
68
78
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: defmastership
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jérôme Arbez-Gindre
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-03-
|
|
11
|
+
date: 2021-03-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aruba
|