dim-toolkit 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bin/dim +9 -0
- data/lib/dim/commands/check.rb +13 -0
- data/lib/dim/commands/export.rb +145 -0
- data/lib/dim/commands/format.rb +198 -0
- data/lib/dim/commands/stats.rb +64 -0
- data/lib/dim/consistency.rb +187 -0
- data/lib/dim/dimmain.rb +28 -0
- data/lib/dim/encoding.rb +4 -0
- data/lib/dim/exit_helper.rb +23 -0
- data/lib/dim/exporter/csv.rb +25 -0
- data/lib/dim/exporter/exporterInterface.rb +37 -0
- data/lib/dim/exporter/json.rb +32 -0
- data/lib/dim/exporter/rst.rb +142 -0
- data/lib/dim/ext/psych.rb +63 -0
- data/lib/dim/ext/string.rb +85 -0
- data/lib/dim/globals.rb +12 -0
- data/lib/dim/helpers/attribute_helper.rb +126 -0
- data/lib/dim/helpers/file_helper.rb +25 -0
- data/lib/dim/loader.rb +581 -0
- data/lib/dim/options.rb +116 -0
- data/lib/dim/requirement.rb +236 -0
- data/lib/dim/ver.rb +7 -0
- data/lib/dim.rb +1 -0
- data/license.txt +205 -0
- data/version.txt +1 -0
- metadata +98 -0
data/lib/dim/options.rb
ADDED
@@ -0,0 +1,116 @@
|
|
1
|
+
require 'optparse'
|
2
|
+
|
3
|
+
require_relative 'globals'
|
4
|
+
require_relative 'exit_helper'
|
5
|
+
|
6
|
+
module Dim
|
7
|
+
class Options
|
8
|
+
MAX_COUNT = 10
|
9
|
+
|
10
|
+
def self.reset
|
11
|
+
OPTIONS[:filter] = ''
|
12
|
+
OPTIONS[:title] = 'Requirements - Draft'
|
13
|
+
OPTIONS[:folder] = nil
|
14
|
+
OPTIONS[:input] = nil
|
15
|
+
OPTIONS[:attributes] = nil
|
16
|
+
OPTIONS[:config] = nil
|
17
|
+
OPTIONS[:allow_missing] = false
|
18
|
+
OPTIONS[:output_format] = 'in-place'
|
19
|
+
OPTIONS[:type] = nil
|
20
|
+
OPTIONS[:no_check_enclosed] = false
|
21
|
+
OPTIONS[:silent] = nil
|
22
|
+
end
|
23
|
+
reset
|
24
|
+
|
25
|
+
def self.parse(args = ARGV)
|
26
|
+
op = OptionParser.new do |opts|
|
27
|
+
opts.banner = "Usage: dim.rb <#{SUBCOMMANDS.keys.join('|')}> [options]"
|
28
|
+
opts.separator "\nGeneral options:"
|
29
|
+
opts.on('-h', '--help', 'prints this help') do
|
30
|
+
Dim::ExitHelper.exit(code: 0, msg: opts)
|
31
|
+
end
|
32
|
+
opts.on('-v', '--version', 'prints version') do
|
33
|
+
Dim::ExitHelper.exit(code: 0, msg: Dim::Ver.sion)
|
34
|
+
end
|
35
|
+
opts.on('-l', '--license', 'prints license') do
|
36
|
+
Dim::ExitHelper.exit(code: 0, msg: File.read(File.dirname(__FILE__) + '/../../license.txt'))
|
37
|
+
end
|
38
|
+
|
39
|
+
opts.separator "\nFor check, export, stats, format:"
|
40
|
+
opts.on('-i FILENAME', '--input FILENAME', 'input file or config') do |i|
|
41
|
+
OPTIONS[:input] = i.gsub('\\', '/')
|
42
|
+
end
|
43
|
+
opts.on('-a FILENAME', '--attributes FILENAME', 'file for custom attributes') do |i|
|
44
|
+
OPTIONS[:attributes] = i.gsub('\\', '/')
|
45
|
+
end
|
46
|
+
opts.on('--allow-missing', 'Missing references are ignored') do |_m|
|
47
|
+
OPTIONS[:allow_missing] = true
|
48
|
+
end
|
49
|
+
opts.on('--no-check-enclosed', 'Skip enclosed file check') do |_|
|
50
|
+
OPTIONS[:no_check_enclosed] = true
|
51
|
+
end
|
52
|
+
opts.on('--silent', 'Silent information log') do |_|
|
53
|
+
OPTIONS[:silent] = true
|
54
|
+
end
|
55
|
+
|
56
|
+
opts.separator "\nFor export:"
|
57
|
+
opts.on('--filter FILTER', 'searches for this string in all fields with enums') do |p|
|
58
|
+
OPTIONS[:filter] = p
|
59
|
+
end
|
60
|
+
|
61
|
+
opts.separator "\nFor export:"
|
62
|
+
opts.on('-o FOLDER', '--output FOLDER', 'output folder') do |p|
|
63
|
+
OPTIONS[:folder] = p
|
64
|
+
end
|
65
|
+
opts.on('-f FORMAT', '--format FORMAT', 'output format',
|
66
|
+
"allowed values: #{EXPORTER.keys.join(', ')}") do |p|
|
67
|
+
OPTIONS[:type] =
|
68
|
+
p
|
69
|
+
end
|
70
|
+
|
71
|
+
opts.separator "\nFor format:"
|
72
|
+
opts.on('--output-format FORMAT', 'in-place (default): files will be changed if not already formatted correctly',
|
73
|
+
'extra: output is written into "<original filename>.formatted"',
|
74
|
+
'check-only: no changes to files',
|
75
|
+
'stdout: For IDE format support; will work with STDIN/STDOUT; no file input required') do |p|
|
76
|
+
OPTIONS[:output_format] = p
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
begin
|
81
|
+
op.parse!(args)
|
82
|
+
rescue OptionParser::InvalidOption => e
|
83
|
+
Dim::ExitHelper.exit(code: 1, msg: e.message)
|
84
|
+
end
|
85
|
+
|
86
|
+
Dim::ExitHelper.exit(code: 1, msg: op) if args.empty? || !SUBCOMMANDS.keys.include?(args[0])
|
87
|
+
OPTIONS[:subcommand] = args[0]
|
88
|
+
|
89
|
+
Dim::ExitHelper.exit(code: 1, msg: 'no input file specified.') if OPTIONS[:input].nil? && OPTIONS[:output_format] != 'stdout'
|
90
|
+
|
91
|
+
if OPTIONS[:subcommand] == 'export'
|
92
|
+
Dim::ExitHelper.exit(code: 1, msg: 'specify output folder') if OPTIONS[:folder].nil?
|
93
|
+
if OPTIONS[:type].nil?
|
94
|
+
Dim::ExitHelper.exit(code: 1, msg: "export format not specified, must be one of: #{EXPORTER.keys.join(', ')}")
|
95
|
+
end
|
96
|
+
unless EXPORTER.keys.include?(OPTIONS[:type])
|
97
|
+
Dim::ExitHelper.exit(code: 1, msg: "export format must be one of: #{EXPORTER.keys.join(', ')}")
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
if OPTIONS[:output_format] == 'stdout'
|
102
|
+
OPTIONS[:silent] = true
|
103
|
+
OPTIONS[:no_check_enclosed] = true
|
104
|
+
OPTIONS[:allow_missing] = true
|
105
|
+
end
|
106
|
+
|
107
|
+
if OPTIONS[:subcommand] == 'format'
|
108
|
+
OPTIONS[:allow_missing] = true
|
109
|
+
|
110
|
+
return if %w[in-place extra check-only stdout].include?(OPTIONS[:output_format])
|
111
|
+
|
112
|
+
Dim::ExitHelper.exit(code: 1, msg: 'output-format must be in-place, extra or check-only')
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
@@ -0,0 +1,236 @@
|
|
1
|
+
require 'set'
|
2
|
+
|
3
|
+
require_relative 'globals'
|
4
|
+
require_relative 'exit_helper'
|
5
|
+
require_relative 'ext/string'
|
6
|
+
|
7
|
+
module Dim
|
8
|
+
class Requirement
|
9
|
+
attr_accessor :data, :moduleName, :document, :depth, :id, :origin, :loader, :existingRefs, :backwardRefs, :filename,
|
10
|
+
:category, :line_number, :all_attributes, :upstreamRefs, :downstreamRefs, :category_level
|
11
|
+
|
12
|
+
# rubocop:disable Layout/LineLength, Layout/HashAlignment
|
13
|
+
SYNTAX = {
|
14
|
+
'type' => { check: :check_single_enum, format_style: :single, format_shift: 0, default: 'requirement',
|
15
|
+
allowed: %w[requirement information heading_<level>] },
|
16
|
+
'text' => { check: nil, format_style: :text, format_shift: 28, default: '', allowed: nil },
|
17
|
+
'verification_criteria' => { check: nil, format_style: :text, format_shift: 32, default: '', allowed: nil },
|
18
|
+
'feature' => { check: nil, format_style: :text, format_shift: 0, default: '', allowed: nil },
|
19
|
+
'change_request' => { check: nil, format_style: :text, format_shift: 0, default: '', allowed: nil },
|
20
|
+
'tags' => { check: nil, format_style: :list, format_shift: 0, default: '', allowed: nil },
|
21
|
+
'asil' => { check: :check_single_enum, format_style: :single, format_shift: 0, default: 'not_set',
|
22
|
+
allowed: %w[not_set
|
23
|
+
QM QM(A) QM(B) QM(C) QM(D)
|
24
|
+
ASIL_A ASIL_A(A) ASIL_A(B) ASIL_A(C) ASIL_A(D)
|
25
|
+
ASIL_B ASIL_B(B) ASIL_B(C) ASIL_B(D)
|
26
|
+
ASIL_C ASIL_C(C) ASIL_C(D)
|
27
|
+
ASIL_D ASIL_D(D)] },
|
28
|
+
'cal' => { check: :check_single_enum, format_style: :single, format_shift: 0, default: 'not_set',
|
29
|
+
allowed: %w[QM CAL_1 CAL_2 CAL_3 CAL_4 not_set] },
|
30
|
+
'developer' => { check: nil, format_style: :list, format_shift: 0, default: nil, allowed: nil },
|
31
|
+
'tester' => { check: nil, format_style: :list, format_shift: 0, default: nil, allowed: nil },
|
32
|
+
'test_setups' => { check: :check_multi_enum, format_style: :multi, format_shift: 0, default: nil,
|
33
|
+
allowed: %w[none off_target on_target manual] },
|
34
|
+
'verification_methods' => { check: :check_multi_enum, format_style: :multi, format_shift: 0, default: nil,
|
35
|
+
allowed: %w[none off_target on_target manual] },
|
36
|
+
'status' => { check: :check_single_enum, format_style: :single, format_shift: 0, default: nil,
|
37
|
+
allowed: %w[valid draft invalid] },
|
38
|
+
'review_status' => { check: :check_single_enum, format_style: :single, format_shift: 0, default: nil,
|
39
|
+
allowed: %w[accepted unclear rejected not_reviewed not_relevant] },
|
40
|
+
'comment' => { check: nil, format_style: :text, format_shift: 0, default: '', allowed: nil },
|
41
|
+
'miscellaneous' => { check: nil, format_style: :text, format_shift: 0, default: '', allowed: nil },
|
42
|
+
'sources' => { check: nil, format_style: :split, format_shift: 0, default: '', allowed: nil },
|
43
|
+
'refs' => { check: nil, format_style: :split, format_shift: 0, default: '', allowed: nil }
|
44
|
+
}
|
45
|
+
# rubocop:enable Layout/LineLength, Layout/HashAlignment
|
46
|
+
|
47
|
+
# this allows easy access to attribute names
|
48
|
+
SYNTAX.each_key do |k|
|
49
|
+
if %i[list multi split].include?(SYNTAX[k][:format_style])
|
50
|
+
define_method(k) do
|
51
|
+
@data[k].cleanUniqArray
|
52
|
+
end
|
53
|
+
else
|
54
|
+
define_method(k) do
|
55
|
+
@data[k]
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
def safety_relevant?
|
61
|
+
!%w[QM not_set].include?(@data['asil'])
|
62
|
+
end
|
63
|
+
|
64
|
+
def security_relevant?
|
65
|
+
!%w[QM not_set].include?(@data['cal'])
|
66
|
+
end
|
67
|
+
|
68
|
+
# this allows writing enum values without " in filter
|
69
|
+
alias method_missing_org method_missing
|
70
|
+
def method_missing(sym, *_args)
|
71
|
+
str = sym.to_s
|
72
|
+
return str if /\Aheading_(\d+)\z/ === str
|
73
|
+
return str if SYNTAX.any? { |_name, attr| attr[:allowed].is_a?(Array) && attr[:allowed].include?(str) }
|
74
|
+
return str if %w[input software architecture module system].include?(str)
|
75
|
+
|
76
|
+
Dim::ExitHelper.exit(code: 1, msg: "\"#{str}\" is not a requirement attribute")
|
77
|
+
end
|
78
|
+
|
79
|
+
def filter(str)
|
80
|
+
eval(str)
|
81
|
+
end
|
82
|
+
|
83
|
+
def initialize(id, document, filename, attr, origin, loader, category, line_number, all_attributes)
|
84
|
+
@id = id
|
85
|
+
@moduleName = document
|
86
|
+
@document = document
|
87
|
+
@filename = filename
|
88
|
+
@data = attr
|
89
|
+
@origin = origin
|
90
|
+
@existingRefs = [] # needed later for "missing links" feature
|
91
|
+
@backwardRefs = []
|
92
|
+
@upstreamRefs = []
|
93
|
+
@downstreamRefs = []
|
94
|
+
@loader = loader
|
95
|
+
@category = category
|
96
|
+
@category_level = CATEGORY_ORDER[category] || 0
|
97
|
+
@line_number = line_number
|
98
|
+
@all_attributes = all_attributes
|
99
|
+
|
100
|
+
define_custom_attribute_methods
|
101
|
+
calc_depth
|
102
|
+
|
103
|
+
check_unknown_keys
|
104
|
+
check_invalid_values
|
105
|
+
# TODO: Remove after completely removing test_setups
|
106
|
+
merge_test_setups_and_verification_methods
|
107
|
+
check_verification_methods
|
108
|
+
end
|
109
|
+
|
110
|
+
def define_custom_attribute_methods
|
111
|
+
new_attributes = @all_attributes.keys - SYNTAX.keys
|
112
|
+
new_attributes.each do |k|
|
113
|
+
define_singleton_method(k) do
|
114
|
+
@data[k]
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
def calc_depth
|
120
|
+
@depth = 1
|
121
|
+
hres = @data['type']&.scan(/^heading_(\d+)$/) || ''
|
122
|
+
return unless hres.length > 0
|
123
|
+
|
124
|
+
dep = hres[0][0].to_i
|
125
|
+
return unless dep > 1
|
126
|
+
|
127
|
+
if dep > 100
|
128
|
+
Dim::ExitHelper.exit(
|
129
|
+
code: 1,
|
130
|
+
filename: filename,
|
131
|
+
msg: "heading level above 100 is not allowed and makes absolutely no sense: #{@data['type']}"
|
132
|
+
)
|
133
|
+
end
|
134
|
+
|
135
|
+
@depth = dep
|
136
|
+
end
|
137
|
+
|
138
|
+
def check_single_enum(elem, key, value)
|
139
|
+
unless !elem[:allowed].include?(value) && !(elem[:allowed].include?('heading_<level>') && /\Aheading_\d+\Z/ === value)
|
140
|
+
return
|
141
|
+
end
|
142
|
+
|
143
|
+
allowed_values = elem[:allowed].reject{ |a| a.nil? || a.empty? }.map { |e| "\"#{e}\"" }.join(', ')
|
144
|
+
Dim::ExitHelper.exit(
|
145
|
+
code: 1,
|
146
|
+
filename: filename,
|
147
|
+
msg: "attribute \"#{key}\" must not be \"#{value}\" (id: #{@id}). \"#{key}\" must be exactly " \
|
148
|
+
"one of #{allowed_values}. #{"Default is \"#{elem[:default]}\"" if elem[:default]}."
|
149
|
+
)
|
150
|
+
end
|
151
|
+
|
152
|
+
def check_multi_enum(element, key, value)
|
153
|
+
value_array = value.cleanArray
|
154
|
+
value_array = [''] if value == ''
|
155
|
+
value_array.each do |v|
|
156
|
+
next if element[:allowed].include?(v)
|
157
|
+
|
158
|
+
allowed_values = element[:allowed].reject{ |a| a.nil? || a.empty? }.map { |e| "\"#{e}\"" }.join(', ')
|
159
|
+
Dim::ExitHelper.exit(
|
160
|
+
code: 1,
|
161
|
+
filename: filename,
|
162
|
+
msg: "attribute \"#{key}\" is invalid: \"#{v}\" (id: #{@id}). \"#{key}\" must be one or " \
|
163
|
+
"more of #{allowed_values}."
|
164
|
+
)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
def check_unknown_keys
|
169
|
+
ks = @all_attributes.keys
|
170
|
+
# sort reverse so that language keys are inserted into Requirement::SYNTAX in alphabetical order
|
171
|
+
@data.keys.sort.reverse.each do |k|
|
172
|
+
if /\A(text_|verification_criteria_|comment_)./ === k
|
173
|
+
unless @all_attributes.include?(k)
|
174
|
+
reference_key = k.gsub(/(text|verification_criteria|comment).*/, '\\1')
|
175
|
+
reference_settings = @all_attributes[reference_key]
|
176
|
+
# rebuild the hash to change the iteration order for later processing like formatting
|
177
|
+
tmp = @all_attributes.dup
|
178
|
+
@all_attributes.clear
|
179
|
+
tmp.each do |key, value|
|
180
|
+
@all_attributes[key] = value
|
181
|
+
next unless key == reference_key
|
182
|
+
|
183
|
+
@all_attributes[k] = {
|
184
|
+
check: nil,
|
185
|
+
new: '',
|
186
|
+
default: '',
|
187
|
+
allowed: nil,
|
188
|
+
format_style: reference_settings[:format_style],
|
189
|
+
format_shift: reference_settings[:format_shift]
|
190
|
+
}
|
191
|
+
end
|
192
|
+
loader.requirements.each { |_id, r| r.data[k] = '' }
|
193
|
+
Dim::Requirement.define_method(k) do
|
194
|
+
@data[k]
|
195
|
+
end
|
196
|
+
end
|
197
|
+
next
|
198
|
+
end
|
199
|
+
|
200
|
+
Dim::ExitHelper.exit(code: 1, filename: filename, msg: "attribute #{k} not allowed") unless ks.include?(k)
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
def check_invalid_values
|
205
|
+
@data.each do |k, v|
|
206
|
+
if @all_attributes.key?(k) && (@all_attributes[k][:check])
|
207
|
+
send(@all_attributes[k][:check], @all_attributes[k], k, v)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
212
|
+
def merge_test_setups_and_verification_methods
|
213
|
+
# Given verification_methods is empty
|
214
|
+
# Given test_setups contains None
|
215
|
+
# Then return None
|
216
|
+
ts = @data['test_setups']&.cleanArray || []
|
217
|
+
vm = @data['verification_methods']&.cleanArray || []
|
218
|
+
|
219
|
+
return if vm.empty? && ts.empty?
|
220
|
+
|
221
|
+
merged = ts.union(vm).join(', ')
|
222
|
+
@data['test_setups'] = merged
|
223
|
+
@data['verification_methods'] = merged
|
224
|
+
end
|
225
|
+
|
226
|
+
def check_verification_methods
|
227
|
+
vm = @data['verification_methods']&.cleanArray || []
|
228
|
+
return unless vm.include?('none') && vm.length > 1
|
229
|
+
|
230
|
+
vm.delete('none')
|
231
|
+
Dim::ExitHelper.exit(code: 1,
|
232
|
+
filename: filename,
|
233
|
+
msg: "verification_methods or test_setups for \"#{@id}\" can't include 'none' along with #{vm.join(', ')}.")
|
234
|
+
end
|
235
|
+
end
|
236
|
+
end
|
data/lib/dim/ver.rb
ADDED
data/lib/dim.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'dim/dimmain'
|
data/license.txt
ADDED
@@ -0,0 +1,205 @@
|
|
1
|
+
Code and documentation Copyright (C) 2024 Accenture.
|
2
|
+
Code released under the Apache v2 License:
|
3
|
+
|
4
|
+
|
5
|
+
Apache License
|
6
|
+
Version 2.0, January 2004
|
7
|
+
http://www.apache.org/licenses/
|
8
|
+
|
9
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
10
|
+
|
11
|
+
1. Definitions.
|
12
|
+
|
13
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
14
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
15
|
+
|
16
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
17
|
+
the copyright owner that is granting the License.
|
18
|
+
|
19
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
20
|
+
other entities that control, are controlled by, or are under common
|
21
|
+
control with that entity. For the purposes of this definition,
|
22
|
+
"control" means (i) the power, direct or indirect, to cause the
|
23
|
+
direction or management of such entity, whether by contract or
|
24
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
25
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
26
|
+
|
27
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
28
|
+
exercising permissions granted by this License.
|
29
|
+
|
30
|
+
"Source" form shall mean the preferred form for making modifications,
|
31
|
+
including but not limited to software source code, documentation
|
32
|
+
source, and configuration files.
|
33
|
+
|
34
|
+
"Object" form shall mean any form resulting from mechanical
|
35
|
+
transformation or translation of a Source form, including but
|
36
|
+
not limited to compiled object code, generated documentation,
|
37
|
+
and conversions to other media types.
|
38
|
+
|
39
|
+
"Work" shall mean the work of authorship, whether in Source or
|
40
|
+
Object form, made available under the License, as indicated by a
|
41
|
+
copyright notice that is included in or attached to the work
|
42
|
+
(an example is provided in the Appendix below).
|
43
|
+
|
44
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
45
|
+
form, that is based on (or derived from) the Work and for which the
|
46
|
+
editorial revisions, annotations, elaborations, or other modifications
|
47
|
+
represent, as a whole, an original work of authorship. For the purposes
|
48
|
+
of this License, Derivative Works shall not include works that remain
|
49
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
50
|
+
the Work and Derivative Works thereof.
|
51
|
+
|
52
|
+
"Contribution" shall mean any work of authorship, including
|
53
|
+
the original version of the Work and any modifications or additions
|
54
|
+
to that Work or Derivative Works thereof, that is intentionally
|
55
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
56
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
57
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
58
|
+
means any form of electronic, verbal, or written communication sent
|
59
|
+
to the Licensor or its representatives, including but not limited to
|
60
|
+
communication on electronic mailing lists, source code control systems,
|
61
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
62
|
+
Licensor for the purpose of discussing and improving the Work, but
|
63
|
+
excluding communication that is conspicuously marked or otherwise
|
64
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
65
|
+
|
66
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
67
|
+
on behalf of whom a Contribution has been received by Licensor and
|
68
|
+
subsequently incorporated within the Work.
|
69
|
+
|
70
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
71
|
+
this License, each Contributor hereby grants to You a perpetual,
|
72
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
73
|
+
copyright license to reproduce, prepare Derivative Works of,
|
74
|
+
publicly display, publicly perform, sublicense, and distribute the
|
75
|
+
Work and such Derivative Works in Source or Object form.
|
76
|
+
|
77
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
78
|
+
this License, each Contributor hereby grants to You a perpetual,
|
79
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
80
|
+
(except as stated in this section) patent license to make, have made,
|
81
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
82
|
+
where such license applies only to those patent claims licensable
|
83
|
+
by such Contributor that are necessarily infringed by their
|
84
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
85
|
+
with the Work to which such Contribution(s) was submitted. If You
|
86
|
+
institute patent litigation against any entity (including a
|
87
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
88
|
+
or a Contribution incorporated within the Work constitutes direct
|
89
|
+
or contributory patent infringement, then any patent licenses
|
90
|
+
granted to You under this License for that Work shall terminate
|
91
|
+
as of the date such litigation is filed.
|
92
|
+
|
93
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
94
|
+
Work or Derivative Works thereof in any medium, with or without
|
95
|
+
modifications, and in Source or Object form, provided that You
|
96
|
+
meet the following conditions:
|
97
|
+
|
98
|
+
(a) You must give any other recipients of the Work or
|
99
|
+
Derivative Works a copy of this License; and
|
100
|
+
|
101
|
+
(b) You must cause any modified files to carry prominent notices
|
102
|
+
stating that You changed the files; and
|
103
|
+
|
104
|
+
(c) You must retain, in the Source form of any Derivative Works
|
105
|
+
that You distribute, all copyright, patent, trademark, and
|
106
|
+
attribution notices from the Source form of the Work,
|
107
|
+
excluding those notices that do not pertain to any part of
|
108
|
+
the Derivative Works; and
|
109
|
+
|
110
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
111
|
+
distribution, then any Derivative Works that You distribute must
|
112
|
+
include a readable copy of the attribution notices contained
|
113
|
+
within such NOTICE file, excluding those notices that do not
|
114
|
+
pertain to any part of the Derivative Works, in at least one
|
115
|
+
of the following places: within a NOTICE text file distributed
|
116
|
+
as part of the Derivative Works; within the Source form or
|
117
|
+
documentation, if provided along with the Derivative Works; or,
|
118
|
+
within a display generated by the Derivative Works, if and
|
119
|
+
wherever such third-party notices normally appear. The contents
|
120
|
+
of the NOTICE file are for informational purposes only and
|
121
|
+
do not modify the License. You may add Your own attribution
|
122
|
+
notices within Derivative Works that You distribute, alongside
|
123
|
+
or as an addendum to the NOTICE text from the Work, provided
|
124
|
+
that such additional attribution notices cannot be construed
|
125
|
+
as modifying the License.
|
126
|
+
|
127
|
+
You may add Your own copyright statement to Your modifications and
|
128
|
+
may provide additional or different license terms and conditions
|
129
|
+
for use, reproduction, or distribution of Your modifications, or
|
130
|
+
for any such Derivative Works as a whole, provided Your use,
|
131
|
+
reproduction, and distribution of the Work otherwise complies with
|
132
|
+
the conditions stated in this License.
|
133
|
+
|
134
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
135
|
+
any Contribution intentionally submitted for inclusion in the Work
|
136
|
+
by You to the Licensor shall be under the terms and conditions of
|
137
|
+
this License, without any additional terms or conditions.
|
138
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
139
|
+
the terms of any separate license agreement you may have executed
|
140
|
+
with Licensor regarding such Contributions.
|
141
|
+
|
142
|
+
6. Trademarks. This License does not grant permission to use the trade
|
143
|
+
names, trademarks, service marks, or product names of the Licensor,
|
144
|
+
except as required for reasonable and customary use in describing the
|
145
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
146
|
+
|
147
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
148
|
+
agreed to in writing, Licensor provides the Work (and each
|
149
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
150
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
151
|
+
implied, including, without limitation, any warranties or conditions
|
152
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
153
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
154
|
+
appropriateness of using or redistributing the Work and assume any
|
155
|
+
risks associated with Your exercise of permissions under this License.
|
156
|
+
|
157
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
158
|
+
whether in tort (including negligence), contract, or otherwise,
|
159
|
+
unless required by applicable law (such as deliberate and grossly
|
160
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
161
|
+
liable to You for damages, including any direct, indirect, special,
|
162
|
+
incidental, or consequential damages of any character arising as a
|
163
|
+
result of this License or out of the use or inability to use the
|
164
|
+
Work (including but not limited to damages for loss of goodwill,
|
165
|
+
work stoppage, computer failure or malfunction, or any and all
|
166
|
+
other commercial damages or losses), even if such Contributor
|
167
|
+
has been advised of the possibility of such damages.
|
168
|
+
|
169
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
170
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
171
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
172
|
+
or other liability obligations and/or rights consistent with this
|
173
|
+
License. However, in accepting such obligations, You may act only
|
174
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
175
|
+
of any other Contributor, and only if You agree to indemnify,
|
176
|
+
defend, and hold each Contributor harmless for any liability
|
177
|
+
incurred by, or claims asserted against, such Contributor by reason
|
178
|
+
of your accepting any such warranty or additional liability.
|
179
|
+
|
180
|
+
END OF TERMS AND CONDITIONS
|
181
|
+
|
182
|
+
APPENDIX: How to apply the Apache License to your work.
|
183
|
+
|
184
|
+
To apply the Apache License to your work, attach the following
|
185
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
186
|
+
replaced with your own identifying information. (Don't include
|
187
|
+
the brackets!) The text should be enclosed in the appropriate
|
188
|
+
comment syntax for the file format. We also recommend that a
|
189
|
+
file or class name and description of purpose be included on the
|
190
|
+
same "printed page" as the copyright notice for easier
|
191
|
+
identification within third-party archives.
|
192
|
+
|
193
|
+
Copyright [yyyy] [name of copyright owner]
|
194
|
+
|
195
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
196
|
+
you may not use this file except in compliance with the License.
|
197
|
+
You may obtain a copy of the License at
|
198
|
+
|
199
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
200
|
+
|
201
|
+
Unless required by applicable law or agreed to in writing, software
|
202
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
203
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
204
|
+
See the License for the specific language governing permissions and
|
205
|
+
limitations under the License.
|
data/version.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.1.0
|
metadata
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: dim-toolkit
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Accenture
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-10-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rspec
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.10.0
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.10.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: simplecov
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.22.0
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.22.0
|
41
|
+
description: Creating, maintaining and exporting of requirements.
|
42
|
+
email:
|
43
|
+
executables:
|
44
|
+
- dim
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- bin/dim
|
49
|
+
- lib/dim.rb
|
50
|
+
- lib/dim/commands/check.rb
|
51
|
+
- lib/dim/commands/export.rb
|
52
|
+
- lib/dim/commands/format.rb
|
53
|
+
- lib/dim/commands/stats.rb
|
54
|
+
- lib/dim/consistency.rb
|
55
|
+
- lib/dim/dimmain.rb
|
56
|
+
- lib/dim/encoding.rb
|
57
|
+
- lib/dim/exit_helper.rb
|
58
|
+
- lib/dim/exporter/csv.rb
|
59
|
+
- lib/dim/exporter/exporterInterface.rb
|
60
|
+
- lib/dim/exporter/json.rb
|
61
|
+
- lib/dim/exporter/rst.rb
|
62
|
+
- lib/dim/ext/psych.rb
|
63
|
+
- lib/dim/ext/string.rb
|
64
|
+
- lib/dim/globals.rb
|
65
|
+
- lib/dim/helpers/attribute_helper.rb
|
66
|
+
- lib/dim/helpers/file_helper.rb
|
67
|
+
- lib/dim/loader.rb
|
68
|
+
- lib/dim/options.rb
|
69
|
+
- lib/dim/requirement.rb
|
70
|
+
- lib/dim/ver.rb
|
71
|
+
- license.txt
|
72
|
+
- version.txt
|
73
|
+
homepage: https://github.com/esrlabs/dox
|
74
|
+
licenses:
|
75
|
+
- Apache-2.0
|
76
|
+
metadata: {}
|
77
|
+
post_install_message:
|
78
|
+
rdoc_options:
|
79
|
+
- "-x"
|
80
|
+
- doc
|
81
|
+
require_paths:
|
82
|
+
- lib
|
83
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - ">="
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '2.7'
|
88
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0'
|
93
|
+
requirements: []
|
94
|
+
rubygems_version: 3.5.11
|
95
|
+
signing_key:
|
96
|
+
specification_version: 4
|
97
|
+
summary: Requirements tooling
|
98
|
+
test_files: []
|