defmastership 1.3.2 → 1.3.3
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 +4 -4
- data/Guardfile +2 -5
- data/config/mutant.yml +2 -1
- data/config/rubocop.yml +20 -8
- data/defmastership.gemspec +4 -14
- data/features/changeref.feature +78 -0
- data/features/definition_checksum.feature +118 -0
- data/features/definition_version.feature +168 -0
- data/features/export.feature +67 -22
- data/features/external_ref_checksum.feature +169 -0
- data/features/external_ref_version.feature +173 -0
- data/features/internal_ref_checksum.feature +77 -0
- data/features/internal_ref_version.feature +81 -0
- data/features/rename_included_files.feature +28 -0
- data/lib/defmastership/app.rb +5 -6
- data/lib/defmastership/comment_filter.rb +2 -0
- data/lib/defmastership/def_type_list.rb +25 -0
- data/lib/defmastership/definition_parser.rb +2 -6
- data/lib/defmastership/document.rb +6 -9
- data/lib/defmastership/modifier/change_ref.rb +11 -34
- data/lib/defmastership/modifier/factory.rb +5 -1
- data/lib/defmastership/modifier/rename_included_files.rb +9 -0
- data/lib/defmastership/modifier/replacement_formatter.rb +37 -0
- data/lib/defmastership/modifier/update_def.rb +5 -1
- data/lib/defmastership/modifier/update_eref_checksum.rb +46 -0
- data/lib/defmastership/modifier/update_eref_common.rb +77 -0
- data/lib/defmastership/modifier/update_eref_version.rb +46 -0
- data/lib/defmastership/modifier/update_iref_checksum.rb +51 -0
- data/lib/defmastership/modifier/update_iref_common.rb +45 -0
- data/lib/defmastership/modifier/update_iref_version.rb +58 -0
- data/lib/defmastership/version.rb +1 -1
- data/spec/spec_helper.rb +11 -10
- data/spec/unit/defmastership/app_spec.rb +32 -19
- data/spec/unit/defmastership/batch_modifier_spec.rb +9 -7
- data/spec/unit/defmastership/def_type_list_spec.rb +22 -0
- data/spec/unit/defmastership/definition_spec.rb +8 -51
- data/spec/unit/defmastership/document_spec.rb +12 -36
- data/spec/unit/defmastership/export/body_formatter_spec.rb +5 -18
- data/spec/unit/defmastership/export/csv/formatter_spec.rb +1 -0
- data/spec/unit/defmastership/export/header_formatter_spec.rb +2 -6
- data/spec/unit/defmastership/hash_spec.rb +2 -0
- data/spec/unit/defmastership/modifier/change_ref_spec.rb +33 -70
- data/spec/unit/defmastership/modifier/factory_spec.rb +40 -17
- data/spec/unit/defmastership/modifier/modifier_common_spec.rb +2 -0
- data/spec/unit/defmastership/modifier/rename_included_files_spec.rb +62 -46
- data/spec/unit/defmastership/modifier/update_def_checksum_spec.rb +2 -9
- data/spec/unit/defmastership/modifier/update_def_spec.rb +76 -21
- data/spec/unit/defmastership/modifier/update_def_version_spec.rb +6 -32
- data/spec/unit/defmastership/modifier/update_eref_checksum_spec.rb +200 -0
- data/spec/unit/defmastership/modifier/update_eref_version_spec.rb +215 -0
- data/spec/unit/defmastership/modifier/update_iref_checksum_spec.rb +133 -0
- data/spec/unit/defmastership/modifier/update_iref_version_spec.rb +162 -0
- data/tasks/code_quality.rake +1 -8
- data/tasks/test.rake +15 -0
- metadata +34 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 568d3b059a4327d2b486468b9867230d3547f9f499134c85e6c1d013761373a8
|
4
|
+
data.tar.gz: 8b9bf9d9abe528e104a3105a5ebd7c9fc83060282e56b81c7dfab8509eaa3b97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21e893b27a124ae1cdd50fa3312f06fa767d87cd44953f3f5b133e29c7bf6c21bd9f53c5683738c27bafa5050159be2f548068433995d15c45b442df9b136ceb
|
7
|
+
data.tar.gz: d04e16d41f24eee527638d475101080de60115cdaabd8ee48cc2b81084256cb1db6556ca8f5ecf9b123154b45b2b7be77b6af5a8ba56877eaa6ec9338b7d27fe
|
data/Guardfile
CHANGED
@@ -30,15 +30,12 @@ guard :rspec, cmd: 'bundle exec rspec --options config/rspec' do
|
|
30
30
|
dsl.watch_spec_files_for(ruby.lib_files)
|
31
31
|
end
|
32
32
|
|
33
|
-
guard :rubocop,
|
34
|
-
all_on_start: true,
|
35
|
-
cli: ['--display-cop-names', '--config=config/rubocop.yml'] do
|
33
|
+
guard :rubocop, all_on_start: true, cli: ['--display-cop-names', '--config=config/rubocop.yml'] do
|
36
34
|
watch(/.+\.rb$/)
|
37
35
|
watch(%r{(?:.+/)?\.rubocop(?:_todo)?\.yml$}) { |m| File.dirname(m.first) }
|
38
36
|
end
|
39
37
|
|
40
|
-
guard :reek,
|
41
|
-
cli: ['--config config/reek.yml', '--single-line'] do
|
38
|
+
guard :reek, cli: ['--config config/reek.yml', '--single-line'] do
|
42
39
|
watch(/.+\.rb$/)
|
43
40
|
watch('config/reek.yml')
|
44
41
|
end
|
data/config/mutant.yml
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
---
|
2
2
|
usage: opensource
|
3
|
-
# fail_fast: true
|
4
3
|
includes:
|
5
4
|
- lib
|
6
5
|
integration:
|
@@ -8,6 +7,8 @@ integration:
|
|
8
7
|
arguments:
|
9
8
|
- --options=config/rspec
|
10
9
|
- spec
|
10
|
+
environment_variables:
|
11
|
+
CODE_COVERAGE_IN_RSPEC: disabled
|
11
12
|
requires:
|
12
13
|
- defmastership/batch_modifier
|
13
14
|
- defmastership/comment_filter
|
data/config/rubocop.yml
CHANGED
@@ -27,21 +27,25 @@ Style/Copyright:
|
|
27
27
|
Notice: 'Copyright (\(c\) )?202[0-9] Jerome Arbez-Gindre'
|
28
28
|
AutocorrectNotice: '# Copyright (c) 2023 Jerome Arbez-Gindre'
|
29
29
|
|
30
|
-
Lint/ConstantResolution:
|
30
|
+
Lint/ConstantResolution:
|
31
31
|
Enabled: false
|
32
32
|
|
33
33
|
Style/DocumentationMethod:
|
34
|
-
Enabled:
|
34
|
+
Enabled: true
|
35
35
|
|
36
36
|
Style/StringHashKeys :
|
37
37
|
Enabled: true
|
38
38
|
Exclude:
|
39
39
|
- '*.gemspec'
|
40
|
-
-
|
41
|
-
-
|
42
|
-
-
|
43
|
-
-
|
44
|
-
-
|
40
|
+
- spec/unit/defmastership/app_spec.rb
|
41
|
+
- spec/unit/defmastership/batch_modifier_spec.rb
|
42
|
+
- spec/unit/defmastership/modifier/update_def_checksum_spec.rb
|
43
|
+
- spec/unit/defmastership/modifier/update_def_spec.rb
|
44
|
+
- spec/unit/defmastership/modifier/update_def_version_spec.rb
|
45
|
+
- spec/unit/defmastership/modifier/update_eref_checksum_spec.rb
|
46
|
+
- spec/unit/defmastership/modifier/update_eref_version_spec.rb
|
47
|
+
- spec/unit/defmastership/modifier/update_iref_checksum_spec.rb
|
48
|
+
- spec/unit/defmastership/modifier/update_iref_version_spec.rb
|
45
49
|
|
46
50
|
Style/MissingElse:
|
47
51
|
EnforcedStyle: case
|
@@ -72,8 +76,16 @@ RSpec/SpecFilePathSuffix :
|
|
72
76
|
RSpec/NestedGroups:
|
73
77
|
Max: 4
|
74
78
|
|
79
|
+
RSpec/AnyInstance:
|
80
|
+
Enabled: true
|
81
|
+
Exclude:
|
82
|
+
- spec/unit/defmastership/modifier/update_eref_checksum_spec.rb
|
83
|
+
- spec/unit/defmastership/modifier/update_eref_version_spec.rb
|
84
|
+
- spec/unit/defmastership/modifier/update_iref_checksum_spec.rb
|
85
|
+
- spec/unit/defmastership/modifier/update_iref_version_spec.rb
|
86
|
+
|
75
87
|
Layout/RedundantLineBreak:
|
76
|
-
Enabled:
|
88
|
+
Enabled: true
|
77
89
|
|
78
90
|
Style/DisableCopsWithinSourceCodeDirective:
|
79
91
|
Enabled: true
|
data/defmastership.gemspec
CHANGED
@@ -3,21 +3,10 @@
|
|
3
3
|
|
4
4
|
# Ensure we require the local version and not one we might have
|
5
5
|
# installed already
|
6
|
-
require(
|
7
|
-
File.join(
|
8
|
-
[
|
9
|
-
File.dirname(__FILE__),
|
10
|
-
'lib',
|
11
|
-
'defmastership',
|
12
|
-
'version.rb'
|
13
|
-
]
|
14
|
-
)
|
15
|
-
)
|
6
|
+
require(File.join([File.dirname(__FILE__), 'lib', 'defmastership', 'version.rb']))
|
16
7
|
|
17
8
|
Gem::Specification.new do |spec|
|
18
|
-
spec.metadata = {
|
19
|
-
'rubygems_mfa_required' => 'true'
|
20
|
-
}
|
9
|
+
spec.metadata = { 'rubygems_mfa_required' => 'true' }
|
21
10
|
spec.required_ruby_version = '>= 3.0'
|
22
11
|
spec.name = 'defmastership'
|
23
12
|
spec.version = Defmastership::VERSION
|
@@ -34,9 +23,10 @@ Gem::Specification.new do |spec|
|
|
34
23
|
spec.add_dependency('aasm', '~> 5.5')
|
35
24
|
spec.add_dependency('asciidoctor', '~> 2.0')
|
36
25
|
spec.add_dependency('csv', '~> 3.3')
|
37
|
-
spec.add_dependency('defmastership-core', '~> 1.5')
|
26
|
+
spec.add_dependency('defmastership-core', '~> 1.5.3')
|
38
27
|
spec.add_dependency('facets', '~> 3.1')
|
39
28
|
spec.add_dependency('git', '~> 3.1')
|
40
29
|
spec.add_dependency('gli', '~> 2.22')
|
30
|
+
spec.add_dependency('memoist', '~> 0.16')
|
41
31
|
spec.add_dependency('ostruct', '~> 0.6')
|
42
32
|
end
|
data/features/changeref.feature
CHANGED
@@ -383,3 +383,81 @@ Feature: The changeref command
|
|
383
383
|
[define, requirement, TOTO-TEMP-XXX1]
|
384
384
|
....
|
385
385
|
"""
|
386
|
+
|
387
|
+
Scenario: Change a definition if the definitions's type fits with one value
|
388
|
+
Given a file named "modifications.yml" with:
|
389
|
+
"""
|
390
|
+
---
|
391
|
+
:toto:
|
392
|
+
:type: change_ref
|
393
|
+
:config:
|
394
|
+
:def_type: requirement
|
395
|
+
:from_regexp: TOTO-TEMP-[X\d]{4}
|
396
|
+
:to_template: TOTO-%<next_ref>04d
|
397
|
+
:next_ref: 123
|
398
|
+
"""
|
399
|
+
And a file named "thedoc.adoc" with:
|
400
|
+
"""
|
401
|
+
[define, requirement, TOTO-TEMP-XXX1]
|
402
|
+
[define, no_fit, TOTO-TEMP-XXX2]
|
403
|
+
"""
|
404
|
+
When I successfully run `defmastership modify --modifications toto thedoc.adoc`
|
405
|
+
Then the stdout should not contain anything
|
406
|
+
And the file "modifications.yml" should contain:
|
407
|
+
"""
|
408
|
+
---
|
409
|
+
:toto:
|
410
|
+
:type: change_ref
|
411
|
+
:config:
|
412
|
+
:def_type: requirement
|
413
|
+
:from_regexp: TOTO-TEMP-[X\d]{4}
|
414
|
+
:to_template: TOTO-%<next_ref>04d
|
415
|
+
:next_ref: 124
|
416
|
+
"""
|
417
|
+
And the file "thedoc.adoc" should contain:
|
418
|
+
"""
|
419
|
+
[define, requirement, TOTO-0123]
|
420
|
+
[define, no_fit, TOTO-TEMP-XXX2]
|
421
|
+
"""
|
422
|
+
|
423
|
+
Scenario: Change a definition if the definitions's type fits with a liste of values
|
424
|
+
Given a file named "modifications.yml" with:
|
425
|
+
"""
|
426
|
+
---
|
427
|
+
:toto:
|
428
|
+
:type: change_ref
|
429
|
+
:config:
|
430
|
+
:def_type:
|
431
|
+
- requirement
|
432
|
+
- pouet
|
433
|
+
:from_regexp: TOTO-TEMP-[X\d]{4}
|
434
|
+
:to_template: TOTO-%<next_ref>04d
|
435
|
+
:next_ref: 123
|
436
|
+
"""
|
437
|
+
And a file named "thedoc.adoc" with:
|
438
|
+
"""
|
439
|
+
[define, requirement, TOTO-TEMP-XXX1]
|
440
|
+
[define, not_included, TOTO-TEMP-XXX2]
|
441
|
+
[define, pouet, TOTO-TEMP-XXX3]
|
442
|
+
"""
|
443
|
+
When I successfully run `defmastership modify --modifications toto thedoc.adoc`
|
444
|
+
Then the stdout should not contain anything
|
445
|
+
And the file "modifications.yml" should contain:
|
446
|
+
"""
|
447
|
+
---
|
448
|
+
:toto:
|
449
|
+
:type: change_ref
|
450
|
+
:config:
|
451
|
+
:def_type:
|
452
|
+
- requirement
|
453
|
+
- pouet
|
454
|
+
:from_regexp: TOTO-TEMP-[X\d]{4}
|
455
|
+
:to_template: TOTO-%<next_ref>04d
|
456
|
+
:next_ref: 125
|
457
|
+
"""
|
458
|
+
And the file "thedoc.adoc" should contain:
|
459
|
+
"""
|
460
|
+
[define, requirement, TOTO-0123]
|
461
|
+
[define, not_included, TOTO-TEMP-XXX2]
|
462
|
+
[define, pouet, TOTO-0124]
|
463
|
+
"""
|
@@ -372,3 +372,121 @@ Feature: definition checksum
|
|
372
372
|
the requirement value.
|
373
373
|
--
|
374
374
|
"""
|
375
|
+
|
376
|
+
Scenario: Checksum update with not set def_type
|
377
|
+
Given a file named "modifications.yml" with:
|
378
|
+
"""
|
379
|
+
---
|
380
|
+
:update_requirement_checksum:
|
381
|
+
:type: update_def_checksum
|
382
|
+
"""
|
383
|
+
And a file named "thedoc.adoc" with:
|
384
|
+
"""
|
385
|
+
[define, requirement, TOTO-TEMP]
|
386
|
+
--
|
387
|
+
the requirement value.
|
388
|
+
--
|
389
|
+
|
390
|
+
[define, whatever, TUTU-TEMP]
|
391
|
+
--
|
392
|
+
the requirement value.
|
393
|
+
--
|
394
|
+
"""
|
395
|
+
When I successfully run `defmastership modify --modifications update_requirement_checksum thedoc.adoc`
|
396
|
+
Then the stdout should not contain anything
|
397
|
+
And the file "thedoc.adoc" should contain:
|
398
|
+
"""
|
399
|
+
[define, requirement, TOTO-TEMP(~244eed18)]
|
400
|
+
--
|
401
|
+
the requirement value.
|
402
|
+
--
|
403
|
+
|
404
|
+
[define, whatever, TUTU-TEMP(~244eed18)]
|
405
|
+
--
|
406
|
+
the requirement value.
|
407
|
+
--
|
408
|
+
"""
|
409
|
+
|
410
|
+
Scenario: Checksum update with def_type set to all
|
411
|
+
Given a file named "modifications.yml" with:
|
412
|
+
"""
|
413
|
+
---
|
414
|
+
:update_requirement_checksum:
|
415
|
+
:type: update_def_checksum
|
416
|
+
:config:
|
417
|
+
:def_type: all
|
418
|
+
"""
|
419
|
+
And a file named "thedoc.adoc" with:
|
420
|
+
"""
|
421
|
+
[define, requirement, TOTO-TEMP]
|
422
|
+
--
|
423
|
+
the requirement value.
|
424
|
+
--
|
425
|
+
|
426
|
+
[define, whatever, TUTU-TEMP]
|
427
|
+
--
|
428
|
+
the requirement value.
|
429
|
+
--
|
430
|
+
"""
|
431
|
+
When I successfully run `defmastership modify --modifications update_requirement_checksum thedoc.adoc`
|
432
|
+
Then the stdout should not contain anything
|
433
|
+
And the file "thedoc.adoc" should contain:
|
434
|
+
"""
|
435
|
+
[define, requirement, TOTO-TEMP(~244eed18)]
|
436
|
+
--
|
437
|
+
the requirement value.
|
438
|
+
--
|
439
|
+
|
440
|
+
[define, whatever, TUTU-TEMP(~244eed18)]
|
441
|
+
--
|
442
|
+
the requirement value.
|
443
|
+
--
|
444
|
+
"""
|
445
|
+
|
446
|
+
Scenario: Checksum update with def_type set to a list
|
447
|
+
Given a file named "modifications.yml" with:
|
448
|
+
"""
|
449
|
+
---
|
450
|
+
:update_requirement_checksum:
|
451
|
+
:type: update_def_checksum
|
452
|
+
:config:
|
453
|
+
:def_type:
|
454
|
+
- requirement
|
455
|
+
- pouet
|
456
|
+
"""
|
457
|
+
And a file named "thedoc.adoc" with:
|
458
|
+
"""
|
459
|
+
[define, requirement, TOTO-TEMP]
|
460
|
+
--
|
461
|
+
the requirement value.
|
462
|
+
--
|
463
|
+
|
464
|
+
[define, pouet, TITI-TEMP]
|
465
|
+
--
|
466
|
+
the requirement value.
|
467
|
+
--
|
468
|
+
|
469
|
+
[define, whatever, TUTU-TEMP]
|
470
|
+
--
|
471
|
+
the requirement value.
|
472
|
+
--
|
473
|
+
"""
|
474
|
+
When I successfully run `defmastership modify --modifications update_requirement_checksum thedoc.adoc`
|
475
|
+
Then the stdout should not contain anything
|
476
|
+
And the file "thedoc.adoc" should contain:
|
477
|
+
"""
|
478
|
+
[define, requirement, TOTO-TEMP(~244eed18)]
|
479
|
+
--
|
480
|
+
the requirement value.
|
481
|
+
--
|
482
|
+
|
483
|
+
[define, pouet, TITI-TEMP(~244eed18)]
|
484
|
+
--
|
485
|
+
the requirement value.
|
486
|
+
--
|
487
|
+
|
488
|
+
[define, whatever, TUTU-TEMP]
|
489
|
+
--
|
490
|
+
the requirement value.
|
491
|
+
--
|
492
|
+
"""
|
@@ -435,3 +435,171 @@ Feature: definitions version
|
|
435
435
|
--
|
436
436
|
"""
|
437
437
|
|
438
|
+
Scenario: Version update with not set def_type
|
439
|
+
Given a file named "ref_doc.adoc" with:
|
440
|
+
"""
|
441
|
+
[define, requirement, TOTO-0001]
|
442
|
+
--
|
443
|
+
Requirement: initial text.
|
444
|
+
--
|
445
|
+
|
446
|
+
[define, whatever, TOTO-0002]
|
447
|
+
--
|
448
|
+
Whatever: initial text.
|
449
|
+
--
|
450
|
+
|
451
|
+
"""
|
452
|
+
Given a file named "thedoc.adoc" with:
|
453
|
+
"""
|
454
|
+
[define, requirement, TOTO-0001]
|
455
|
+
--
|
456
|
+
Requirement: modified text.
|
457
|
+
--
|
458
|
+
|
459
|
+
[define, whatever, TOTO-0002]
|
460
|
+
--
|
461
|
+
Whatever: modified text.
|
462
|
+
--
|
463
|
+
"""
|
464
|
+
And a file named "modifications.yml" with:
|
465
|
+
"""
|
466
|
+
---
|
467
|
+
:update_requirement_version:
|
468
|
+
:type: update_def_version
|
469
|
+
:config:
|
470
|
+
:first_version: a
|
471
|
+
:ref_document: ./ref_doc.adoc
|
472
|
+
"""
|
473
|
+
When I successfully run `defmastership modify --modifications update_requirement_version thedoc.adoc`
|
474
|
+
And the stdout should not contain anything
|
475
|
+
Then the file "thedoc.adoc" should contain:
|
476
|
+
"""
|
477
|
+
[define, requirement, TOTO-0001(a)]
|
478
|
+
--
|
479
|
+
Requirement: modified text.
|
480
|
+
--
|
481
|
+
|
482
|
+
[define, whatever, TOTO-0002(a)]
|
483
|
+
--
|
484
|
+
Whatever: modified text.
|
485
|
+
--
|
486
|
+
"""
|
487
|
+
|
488
|
+
Scenario: Version update with not set to all
|
489
|
+
Given a file named "ref_doc.adoc" with:
|
490
|
+
"""
|
491
|
+
[define, requirement, TOTO-0001]
|
492
|
+
--
|
493
|
+
Requirement: initial text.
|
494
|
+
--
|
495
|
+
|
496
|
+
[define, whatever, TOTO-0002]
|
497
|
+
--
|
498
|
+
Whatever: initial text.
|
499
|
+
--
|
500
|
+
|
501
|
+
"""
|
502
|
+
Given a file named "thedoc.adoc" with:
|
503
|
+
"""
|
504
|
+
[define, requirement, TOTO-0001]
|
505
|
+
--
|
506
|
+
Requirement: modified text.
|
507
|
+
--
|
508
|
+
|
509
|
+
[define, whatever, TOTO-0002]
|
510
|
+
--
|
511
|
+
Whatever: modified text.
|
512
|
+
--
|
513
|
+
"""
|
514
|
+
And a file named "modifications.yml" with:
|
515
|
+
"""
|
516
|
+
---
|
517
|
+
:update_requirement_version:
|
518
|
+
:type: update_def_version
|
519
|
+
:config:
|
520
|
+
:def_type: all
|
521
|
+
:first_version: a
|
522
|
+
:ref_document: ./ref_doc.adoc
|
523
|
+
"""
|
524
|
+
When I successfully run `defmastership modify --modifications update_requirement_version thedoc.adoc`
|
525
|
+
And the stdout should not contain anything
|
526
|
+
Then the file "thedoc.adoc" should contain:
|
527
|
+
"""
|
528
|
+
[define, requirement, TOTO-0001(a)]
|
529
|
+
--
|
530
|
+
Requirement: modified text.
|
531
|
+
--
|
532
|
+
|
533
|
+
[define, whatever, TOTO-0002(a)]
|
534
|
+
--
|
535
|
+
Whatever: modified text.
|
536
|
+
--
|
537
|
+
"""
|
538
|
+
|
539
|
+
Scenario: Version update with not set to a list
|
540
|
+
Given a file named "ref_doc.adoc" with:
|
541
|
+
"""
|
542
|
+
[define, requirement, TOTO-0001]
|
543
|
+
--
|
544
|
+
Requirement: initial text.
|
545
|
+
--
|
546
|
+
|
547
|
+
[define, pouet, TOTO-0003]
|
548
|
+
--
|
549
|
+
Pouet: initial text.
|
550
|
+
--
|
551
|
+
|
552
|
+
[define, whatever, TOTO-0002]
|
553
|
+
--
|
554
|
+
Whatever: initial text.
|
555
|
+
--
|
556
|
+
|
557
|
+
"""
|
558
|
+
Given a file named "thedoc.adoc" with:
|
559
|
+
"""
|
560
|
+
[define, requirement, TOTO-0001]
|
561
|
+
--
|
562
|
+
Requirement: modified text.
|
563
|
+
--
|
564
|
+
|
565
|
+
[define, pouet, TOTO-0003]
|
566
|
+
--
|
567
|
+
Pouet: modified text.
|
568
|
+
--
|
569
|
+
|
570
|
+
[define, whatever, TOTO-0002]
|
571
|
+
--
|
572
|
+
Whatever: modified text.
|
573
|
+
--
|
574
|
+
"""
|
575
|
+
And a file named "modifications.yml" with:
|
576
|
+
"""
|
577
|
+
---
|
578
|
+
:update_requirement_version:
|
579
|
+
:type: update_def_version
|
580
|
+
:config:
|
581
|
+
:def_type:
|
582
|
+
- requirement
|
583
|
+
- pouet
|
584
|
+
:first_version: a
|
585
|
+
:ref_document: ./ref_doc.adoc
|
586
|
+
"""
|
587
|
+
When I successfully run `defmastership modify --modifications update_requirement_version thedoc.adoc`
|
588
|
+
And the stdout should not contain anything
|
589
|
+
Then the file "thedoc.adoc" should contain:
|
590
|
+
"""
|
591
|
+
[define, requirement, TOTO-0001(a)]
|
592
|
+
--
|
593
|
+
Requirement: modified text.
|
594
|
+
--
|
595
|
+
|
596
|
+
[define, pouet, TOTO-0003(a)]
|
597
|
+
--
|
598
|
+
Pouet: modified text.
|
599
|
+
--
|
600
|
+
|
601
|
+
[define, whatever, TOTO-0002]
|
602
|
+
--
|
603
|
+
Whatever: modified text.
|
604
|
+
--
|
605
|
+
"""
|