sts 0.3.2 → 0.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.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop-https---raw-githubusercontent-com-riboseinc-oss-guides-master-ci-rubocop-yml +471 -0
  3. data/.rubocop.yml +1 -0
  4. data/.rubocop_todo.yml +27 -0
  5. data/lib/sts/niso_sts/adoption.rb +4 -4
  6. data/lib/sts/niso_sts/app.rb +8 -8
  7. data/lib/sts/niso_sts/app_group.rb +2 -2
  8. data/lib/sts/niso_sts/back.rb +2 -2
  9. data/lib/sts/niso_sts/body.rb +2 -2
  10. data/lib/sts/niso_sts/caption.rb +3 -3
  11. data/lib/sts/niso_sts/custom_meta.rb +5 -5
  12. data/lib/sts/niso_sts/custom_meta_group.rb +2 -2
  13. data/lib/sts/niso_sts/def.rb +2 -2
  14. data/lib/sts/niso_sts/def_item.rb +3 -3
  15. data/lib/sts/niso_sts/def_list.rb +5 -5
  16. data/lib/sts/niso_sts/display_formula.rb +3 -5
  17. data/lib/sts/niso_sts/document_identification.rb +8 -8
  18. data/lib/sts/niso_sts/ext_link.rb +5 -5
  19. data/lib/sts/niso_sts/figure.rb +6 -6
  20. data/lib/sts/niso_sts/fn.rb +3 -3
  21. data/lib/sts/niso_sts/fn_group.rb +2 -2
  22. data/lib/sts/niso_sts/front.rb +2 -2
  23. data/lib/sts/niso_sts/graphic.rb +3 -3
  24. data/lib/sts/niso_sts/inline_formula.rb +2 -4
  25. data/lib/sts/niso_sts/label.rb +3 -3
  26. data/lib/sts/niso_sts/list.rb +4 -6
  27. data/lib/sts/niso_sts/list_item.rb +4 -4
  28. data/lib/sts/niso_sts/meta_date.rb +4 -4
  29. data/lib/sts/niso_sts/meta_note.rb +7 -6
  30. data/lib/sts/niso_sts/metadata_iso.rb +10 -10
  31. data/lib/sts/niso_sts/metadata_std.rb +12 -12
  32. data/lib/sts/niso_sts/mixed_citation.rb +8 -8
  33. data/lib/sts/niso_sts/non_normative_example.rb +5 -5
  34. data/lib/sts/niso_sts/non_normative_note.rb +5 -5
  35. data/lib/sts/niso_sts/object_id.rb +4 -4
  36. data/lib/sts/niso_sts/page_count.rb +3 -3
  37. data/lib/sts/niso_sts/paragraph.rb +12 -12
  38. data/lib/sts/niso_sts/permissions.rb +5 -5
  39. data/lib/sts/niso_sts/reference.rb +3 -5
  40. data/lib/sts/niso_sts/reference_list.rb +5 -7
  41. data/lib/sts/niso_sts/reference_standard.rb +7 -7
  42. data/lib/sts/niso_sts/section.rb +8 -8
  43. data/lib/sts/niso_sts/section_array.rb +3 -3
  44. data/lib/sts/niso_sts/standard.rb +6 -8
  45. data/lib/sts/niso_sts/standard_identification.rb +9 -9
  46. data/lib/sts/niso_sts/standard_ref.rb +4 -4
  47. data/lib/sts/niso_sts/std_cross_reference.rb +3 -3
  48. data/lib/sts/niso_sts/std_id.rb +6 -6
  49. data/lib/sts/niso_sts/std_id_group.rb +2 -2
  50. data/lib/sts/niso_sts/term_display.rb +2 -2
  51. data/lib/sts/niso_sts/term_section.rb +5 -5
  52. data/lib/sts/niso_sts/title.rb +4 -4
  53. data/lib/sts/niso_sts/title_wrap.rb +11 -9
  54. data/lib/sts/tbx_iso_tml/bold.rb +3 -3
  55. data/lib/sts/tbx_iso_tml/caption.rb +3 -3
  56. data/lib/sts/tbx_iso_tml/col.rb +6 -6
  57. data/lib/sts/tbx_iso_tml/definition.rb +5 -7
  58. data/lib/sts/tbx_iso_tml/entailed_term.rb +6 -6
  59. data/lib/sts/tbx_iso_tml/example.rb +6 -8
  60. data/lib/sts/tbx_iso_tml/external_graphic.rb +3 -3
  61. data/lib/sts/tbx_iso_tml/external_source.rb +4 -4
  62. data/lib/sts/tbx_iso_tml/fn.rb +3 -5
  63. data/lib/sts/tbx_iso_tml/fn_group.rb +2 -2
  64. data/lib/sts/tbx_iso_tml/geographical_usage.rb +3 -3
  65. data/lib/sts/tbx_iso_tml/grammatical_gender.rb +4 -4
  66. data/lib/sts/tbx_iso_tml/grammatical_number.rb +4 -4
  67. data/lib/sts/tbx_iso_tml/italic.rb +5 -5
  68. data/lib/sts/tbx_iso_tml/lang_set.rb +9 -9
  69. data/lib/sts/tbx_iso_tml/math.rb +12 -12
  70. data/lib/sts/tbx_iso_tml/mfenced.rb +10 -10
  71. data/lib/sts/tbx_iso_tml/mfrac.rb +8 -8
  72. data/lib/sts/tbx_iso_tml/mi.rb +3 -3
  73. data/lib/sts/tbx_iso_tml/mrow.rb +11 -11
  74. data/lib/sts/tbx_iso_tml/mspace.rb +3 -3
  75. data/lib/sts/tbx_iso_tml/mstyle.rb +8 -8
  76. data/lib/sts/tbx_iso_tml/msub.rb +7 -7
  77. data/lib/sts/tbx_iso_tml/msup.rb +5 -5
  78. data/lib/sts/tbx_iso_tml/munder.rb +3 -3
  79. data/lib/sts/tbx_iso_tml/munderover.rb +5 -5
  80. data/lib/sts/tbx_iso_tml/named_content.rb +4 -4
  81. data/lib/sts/tbx_iso_tml/normative_authorization.rb +4 -4
  82. data/lib/sts/tbx_iso_tml/note.rb +8 -8
  83. data/lib/sts/tbx_iso_tml/part_of_speech.rb +4 -4
  84. data/lib/sts/tbx_iso_tml/see.rb +4 -4
  85. data/lib/sts/tbx_iso_tml/semantics.rb +6 -5
  86. data/lib/sts/tbx_iso_tml/source.rb +4 -6
  87. data/lib/sts/tbx_iso_tml/sup.rb +4 -6
  88. data/lib/sts/tbx_iso_tml/table.rb +6 -6
  89. data/lib/sts/tbx_iso_tml/table_break.rb +10 -0
  90. data/lib/sts/tbx_iso_tml/table_wrap.rb +6 -6
  91. data/lib/sts/tbx_iso_tml/table_wrap_foot.rb +2 -2
  92. data/lib/sts/tbx_iso_tml/tbody.rb +5 -5
  93. data/lib/sts/tbx_iso_tml/td.rb +17 -15
  94. data/lib/sts/tbx_iso_tml/term.rb +10 -10
  95. data/lib/sts/tbx_iso_tml/term_entry.rb +4 -4
  96. data/lib/sts/tbx_iso_tml/term_information_group.rb +6 -6
  97. data/lib/sts/tbx_iso_tml/term_type.rb +4 -12
  98. data/lib/sts/tbx_iso_tml/th.rb +17 -16
  99. data/lib/sts/tbx_iso_tml/thead.rb +6 -6
  100. data/lib/sts/tbx_iso_tml/tr.rb +2 -2
  101. data/lib/sts/tbx_iso_tml/xref.rb +5 -7
  102. data/lib/sts/version.rb +1 -1
  103. data/lib/sts.rb +6 -4
  104. data/sts.gemspec +4 -1
  105. metadata +22 -5
  106. data/lib/sts/mapper.rb +0 -442
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 874171d2c8d09599ece44c447261d6f3c0f64f7d68f037998daba9c480d8171d
4
- data.tar.gz: ce825d2d2949b41131a23dfa17c56bc4eddccb817ce1f0edea7d6d86f3cf482b
3
+ metadata.gz: bc24ac782acd2343da8180b1a4474170d1f54559aa20afbe791dba3a3dd6af59
4
+ data.tar.gz: 2b52bdbbfe5511afc17fef573d1f330ebfab4337a91f4f29cf6ea66a29fe44de
5
5
  SHA512:
6
- metadata.gz: 5e86b4888c609215a18d3483a2fb19a344b4173f48f62420ea75c9a155d7b2670f9363937f7cd49fd13e9a75eea953b6c479849b92d19a5b46e102ec5ac0534b
7
- data.tar.gz: 6dfbb2ed795043813a3acf051e00e2020e64a95dac81cad28a8d885491704be8c35210b9bffa26549724c5724732d5e6f529d52a884b2f7103277f3f969a3120
6
+ metadata.gz: a15aec03e61e5cba62d00ca58d217f0cadfa9d0d0630770024da4363f76513ab51403fefb884b6b64c0b9de8e625d790613b3ab5cc27d111d89e32e4f96d1c27
7
+ data.tar.gz: f94ddf2eb409f3a09dc281b3b962083b1ae67fb573b951d70980c1e27dc6240cd6d084114597fabbafa0e297a45ffe83c6216100ec552d43096571901c2c6eac
@@ -0,0 +1,471 @@
1
+ ############################################
2
+ # This file is auto-generated. #
3
+ # DO NOT EDIT DIRECTLY #
4
+ # OR YOUR CHANGES MAY BE OVERWRITTEN #
5
+ # Edit source files instead. #
6
+ # See README for details. #
7
+ ############################################
8
+ #
9
+ # Source files:
10
+ # - src/rubocop/rubocop.tb.yml
11
+ # - src/rubocop/rubocop.ribose.yml
12
+ #
13
+ ############################################
14
+ ---
15
+ AllCops:
16
+ Exclude:
17
+ - db/**/*
18
+ - tmp/**/*
19
+ - vendor/**/*
20
+ DisplayCopNames: false
21
+ StyleGuideCopsOnly: false
22
+ TargetRubyVersion: 3.1
23
+ require:
24
+ - rubocop-performance
25
+ Naming/AccessorMethodName:
26
+ Description: Check the naming of accessor methods for get_/set_.
27
+ Enabled: false
28
+ Style/Alias:
29
+ Description: Use alias_method instead of alias.
30
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
31
+ Enabled: false
32
+ Style/ArrayJoin:
33
+ Description: Use Array#join instead of Array#*.
34
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
35
+ Enabled: false
36
+ Style/AsciiComments:
37
+ Description: Use only ascii symbols in comments.
38
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
39
+ Enabled: false
40
+ Naming/AsciiIdentifiers:
41
+ Description: Use only ascii symbols in identifiers.
42
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
43
+ Enabled: false
44
+ Style/Attr:
45
+ Description: Checks for uses of Module#attr.
46
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
47
+ Enabled: false
48
+ Metrics/BlockNesting:
49
+ Description: Avoid excessive block nesting
50
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
51
+ Enabled: true
52
+ Max: 3
53
+ Style/CaseEquality:
54
+ Description: Avoid explicit use of the case equality operator(===).
55
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
56
+ Enabled: false
57
+ Style/CharacterLiteral:
58
+ Description: Checks for uses of character literals.
59
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
60
+ Enabled: false
61
+ Style/ClassAndModuleChildren:
62
+ Description: Checks style of children classes and modules.
63
+ Enabled: true
64
+ EnforcedStyle: nested
65
+ Metrics/ClassLength:
66
+ Description: Avoid classes longer than 100 lines of code.
67
+ Enabled: false
68
+ CountComments: false
69
+ Max: 100
70
+ Metrics/ModuleLength:
71
+ Description: Avoid modules longer than 100 lines of code.
72
+ Enabled: false
73
+ Style/ClassVars:
74
+ Description: Avoid the use of class variables.
75
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
76
+ Enabled: false
77
+ Style/CollectionMethods:
78
+ Enabled: false
79
+ PreferredMethods:
80
+ find: detect
81
+ inject: reduce
82
+ collect: map
83
+ find_all: select
84
+ Style/ColonMethodCall:
85
+ Description: 'Do not use :: for method call.'
86
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
87
+ Enabled: false
88
+ Style/CommentAnnotation:
89
+ Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK,
90
+ REVIEW).
91
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
92
+ Enabled: false
93
+ Metrics/AbcSize:
94
+ Description: A calculated magnitude based on number of assignments, branches, and
95
+ conditions.
96
+ Enabled: true
97
+ Max: 15
98
+ Metrics/BlockLength:
99
+ CountComments: true
100
+ Max: 25
101
+ Exclude:
102
+ - spec/**/*
103
+ Metrics/CyclomaticComplexity:
104
+ Description: A complexity metric that is strongly correlated to the number of test
105
+ cases needed to validate a method.
106
+ Enabled: true
107
+ Max: 6
108
+ Style/PreferredHashMethods:
109
+ Description: Checks use of `has_key?` and `has_value?` Hash methods.
110
+ StyleGuide: "#hash-key"
111
+ Enabled: false
112
+ Style/Documentation:
113
+ Description: Document classes and non-namespace modules.
114
+ Enabled: false
115
+ Style/DoubleNegation:
116
+ Description: Checks for uses of double negation (!!).
117
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
118
+ Enabled: false
119
+ Style/EachWithObject:
120
+ Description: Prefer `each_with_object` over `inject` or `reduce`.
121
+ Enabled: false
122
+ Style/EmptyLiteral:
123
+ Description: Prefer literals to Array.new/Hash.new/String.new.
124
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
125
+ Enabled: false
126
+ Style/Encoding:
127
+ Enabled: false
128
+ Style/EvenOdd:
129
+ Description: Favor the use of Fixnum#even? && Fixnum#odd?
130
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
131
+ Enabled: false
132
+ Naming/FileName:
133
+ Description: Use snake_case for source file names.
134
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
135
+ Enabled: false
136
+ Style/FrozenStringLiteralComment:
137
+ Description: Add the frozen_string_literal comment to the top of files to help transition
138
+ from Ruby 2.3.0 to Ruby 3.0.
139
+ Enabled: false
140
+ Lint/FlipFlop:
141
+ Description: Checks for flip flops
142
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
143
+ Enabled: false
144
+ Style/FormatString:
145
+ Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
146
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
147
+ Enabled: false
148
+ Style/GlobalVars:
149
+ Description: Do not introduce global variables.
150
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
151
+ Reference: http://www.zenspider.com/Languages/Ruby/QuickRef.html
152
+ Enabled: false
153
+ Style/GuardClause:
154
+ Description: Check for conditionals that can be replaced with guard clauses
155
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
156
+ Enabled: false
157
+ Style/IfUnlessModifier:
158
+ Description: Favor modifier if/unless usage when you have a single-line body.
159
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
160
+ Enabled: false
161
+ Style/IfWithSemicolon:
162
+ Description: Do not use if x; .... Use the ternary operator instead.
163
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
164
+ Enabled: false
165
+ Style/InlineComment:
166
+ Description: Avoid inline comments.
167
+ Enabled: false
168
+ Style/Lambda:
169
+ Description: Use the new lambda literal syntax for single-line blocks.
170
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
171
+ Enabled: false
172
+ Style/LambdaCall:
173
+ Description: Use lambda.call(...) instead of lambda.(...).
174
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
175
+ Enabled: false
176
+ Style/LineEndConcatenation:
177
+ Description: Use \ instead of + or << to concatenate two string literals at line
178
+ end.
179
+ Enabled: false
180
+ Metrics/MethodLength:
181
+ Description: Avoid methods longer than 10 lines of code.
182
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
183
+ Enabled: true
184
+ CountComments: true
185
+ Max: 10
186
+ Exclude:
187
+ - spec/**/*
188
+ CountAsOne:
189
+ - array
190
+ - heredoc
191
+ Style/ModuleFunction:
192
+ Description: Checks for usage of `extend self` in modules.
193
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
194
+ Enabled: false
195
+ Style/MultilineBlockChain:
196
+ Description: Avoid multi-line chains of blocks.
197
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
198
+ Enabled: false
199
+ Style/NegatedIf:
200
+ Description: Favor unless over if for negative conditions (or control flow or).
201
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
202
+ Enabled: false
203
+ Style/NegatedWhile:
204
+ Description: Favor until over while for negative conditions.
205
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
206
+ Enabled: false
207
+ Style/Next:
208
+ Description: Use `next` to skip iteration instead of a condition at the end.
209
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
210
+ Enabled: false
211
+ Style/NilComparison:
212
+ Description: Prefer x.nil? to x == nil.
213
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
214
+ Enabled: false
215
+ Style/Not:
216
+ Description: Use ! instead of not.
217
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bang-not-not
218
+ Enabled: false
219
+ Style/NumericLiterals:
220
+ Description: Add underscores to large numeric literals to improve their readability.
221
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
222
+ Enabled: false
223
+ Style/OneLineConditional:
224
+ Description: Favor the ternary operator(?:) over if/then/else/end constructs.
225
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
226
+ Enabled: false
227
+ Naming/BinaryOperatorParameterName:
228
+ Description: When defining binary operators, name the argument other.
229
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
230
+ Enabled: false
231
+ Metrics/ParameterLists:
232
+ Description: Avoid long parameter lists.
233
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
234
+ Enabled: true
235
+ Max: 5
236
+ CountKeywordArgs: true
237
+ Style/PercentLiteralDelimiters:
238
+ Description: Use `%`-literal delimiters consistently
239
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
240
+ Enabled: false
241
+ Style/PerlBackrefs:
242
+ Description: Avoid Perl-style regex back references.
243
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
244
+ Enabled: false
245
+ Naming/PredicateName:
246
+ Description: Check the names of predicate methods.
247
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
248
+ ForbiddenPrefixes:
249
+ - is_
250
+ Exclude:
251
+ - spec/**/*
252
+ Style/Proc:
253
+ Description: Use proc instead of Proc.new.
254
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
255
+ Enabled: false
256
+ Style/RaiseArgs:
257
+ Description: Checks the arguments passed to raise/fail.
258
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
259
+ Enabled: false
260
+ Style/RegexpLiteral:
261
+ Description: Use / or %r around regular expressions.
262
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
263
+ Enabled: false
264
+ Style/Sample:
265
+ Description: Use `sample` instead of `shuffle.first`, `shuffle.last`, and `shuffle[Fixnum]`.
266
+ Reference: https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code
267
+ Enabled: false
268
+ Style/SelfAssignment:
269
+ Description: Checks for places where self-assignment shorthand should have been
270
+ used.
271
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
272
+ Enabled: false
273
+ Style/SingleLineBlockParams:
274
+ Description: Enforces the names of some block params.
275
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
276
+ Enabled: false
277
+ Style/SingleLineMethods:
278
+ Description: Avoid single-line methods.
279
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
280
+ Enabled: false
281
+ Style/SignalException:
282
+ Description: Checks for proper usage of fail and raise.
283
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
284
+ Enabled: false
285
+ Style/SpecialGlobalVars:
286
+ Description: Avoid Perl-style global variables.
287
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
288
+ Enabled: false
289
+ Style/StringLiterals:
290
+ Description: Checks if uses of quotes match the configured preference.
291
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
292
+ EnforcedStyle: double_quotes
293
+ Enabled: true
294
+ Style/TrailingCommaInArguments:
295
+ Description: Checks for trailing comma in argument lists.
296
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
297
+ EnforcedStyleForMultiline: comma
298
+ SupportedStylesForMultiline:
299
+ - comma
300
+ - consistent_comma
301
+ - no_comma
302
+ Enabled: true
303
+ Style/TrailingCommaInArrayLiteral:
304
+ Description: Checks for trailing comma in array literals.
305
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
306
+ EnforcedStyleForMultiline: comma
307
+ SupportedStylesForMultiline:
308
+ - comma
309
+ - consistent_comma
310
+ - no_comma
311
+ Enabled: true
312
+ Style/TrailingCommaInHashLiteral:
313
+ Description: Checks for trailing comma in hash literals.
314
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
315
+ EnforcedStyleForMultiline: comma
316
+ SupportedStylesForMultiline:
317
+ - comma
318
+ - consistent_comma
319
+ - no_comma
320
+ Enabled: true
321
+ Style/TrivialAccessors:
322
+ Description: Prefer attr_* methods to trivial readers/writers.
323
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family
324
+ Enabled: false
325
+ Style/VariableInterpolation:
326
+ Description: Don't interpolate global, instance and class variables directly in
327
+ strings.
328
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
329
+ Enabled: false
330
+ Style/WhenThen:
331
+ Description: Use when x then ... for one-line cases.
332
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
333
+ Enabled: false
334
+ Style/WhileUntilModifier:
335
+ Description: Favor modifier while/until usage when you have a single-line body.
336
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
337
+ Enabled: false
338
+ Style/WordArray:
339
+ Description: Use %w or %W for arrays of words.
340
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
341
+ Enabled: false
342
+ Layout/ParameterAlignment:
343
+ Description: Here we check if the parameters on a multi-line method call or definition
344
+ are aligned.
345
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
346
+ Enabled: false
347
+ Layout/ConditionPosition:
348
+ Description: Checks for condition placed in a confusing position relative to the
349
+ keyword.
350
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
351
+ Enabled: false
352
+ Layout/DotPosition:
353
+ Description: Checks the position of the dot in multi-line method calls.
354
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
355
+ EnforcedStyle: leading
356
+ Layout/ExtraSpacing:
357
+ Description: Do not use unnecessary spacing.
358
+ Enabled: true
359
+ Layout/MultilineOperationIndentation:
360
+ Description: Checks indentation of binary operations that span more than one line.
361
+ Enabled: true
362
+ EnforcedStyle: indented
363
+ Layout/MultilineMethodCallIndentation:
364
+ Description: Checks indentation of method calls with the dot operator that span
365
+ more than one line.
366
+ Enabled: true
367
+ EnforcedStyle: indented
368
+ Layout/InitialIndentation:
369
+ Description: Checks the indentation of the first non-blank non-comment line in a
370
+ file.
371
+ Enabled: false
372
+ Layout/LineLength:
373
+ Description: Limit lines to 80 characters.
374
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
375
+ Max: 80
376
+ Enabled: true
377
+ AllowURI: true
378
+ URISchemes:
379
+ - http
380
+ - https
381
+ Lint/AmbiguousOperator:
382
+ Description: Checks for ambiguous operators in the first argument of a method invocation
383
+ without parentheses.
384
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args
385
+ Enabled: false
386
+ Lint/AmbiguousRegexpLiteral:
387
+ Description: Checks for ambiguous regexp literals in the first argument of a method
388
+ invocation without parenthesis.
389
+ Enabled: false
390
+ Lint/AssignmentInCondition:
391
+ Description: Don't use assignment in conditions.
392
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
393
+ Enabled: false
394
+ Lint/CircularArgumentReference:
395
+ Description: Don't refer to the keyword argument in the default value.
396
+ Enabled: false
397
+ Lint/DeprecatedClassMethods:
398
+ Description: Check for deprecated class method calls.
399
+ Enabled: false
400
+ Lint/DuplicateHashKey:
401
+ Description: Check for duplicate keys in hash literals.
402
+ Enabled: false
403
+ Lint/DuplicateRegexpCharacterClassElement:
404
+ Description: Checks for duplicate elements in Regexp character classes.
405
+ Enabled: true
406
+ Lint/EachWithObjectArgument:
407
+ Description: Check for immutable argument given to each_with_object.
408
+ Enabled: false
409
+ Lint/ElseLayout:
410
+ Description: Check for odd code arrangement in an else block.
411
+ Enabled: false
412
+ Lint/FormatParameterMismatch:
413
+ Description: The number of parameters to format/sprint must match the fields.
414
+ Enabled: false
415
+ Lint/SuppressedException:
416
+ Description: Don't suppress exception.
417
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
418
+ Enabled: false
419
+ Lint/LiteralAsCondition:
420
+ Description: Checks of literals used in conditions.
421
+ Enabled: false
422
+ Lint/LiteralInInterpolation:
423
+ Description: Checks for literals used in interpolation.
424
+ Enabled: false
425
+ Lint/Loop:
426
+ Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
427
+ for post-loop tests.
428
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
429
+ Enabled: false
430
+ Lint/NestedMethodDefinition:
431
+ Description: Do not use nested method definitions.
432
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-methods
433
+ Enabled: false
434
+ Lint/NonLocalExitFromIterator:
435
+ Description: Do not use return in iterator to cause non-local exit.
436
+ Enabled: false
437
+ Lint/ParenthesesAsGroupedExpression:
438
+ Description: Checks for method calls with a space before the opening parenthesis.
439
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
440
+ Enabled: false
441
+ Lint/RequireParentheses:
442
+ Description: Use parentheses in the method call to avoid confusion about precedence.
443
+ Enabled: false
444
+ Lint/UnderscorePrefixedVariableName:
445
+ Description: Do not use prefix `_` for a variable that is used.
446
+ Enabled: false
447
+ Lint/RedundantCopDisableDirective:
448
+ Description: 'Checks for rubocop:disable comments that can be removed. Note: this
449
+ cop is not disabled when disabling all cops. It must be explicitly disabled.'
450
+ Enabled: false
451
+ Lint/Void:
452
+ Description: Possible use of operator/literal/variable in void context.
453
+ Enabled: false
454
+ Performance/ConstantRegexp:
455
+ Description: Finds regular expressions with dynamic components that are all constants.
456
+ Enabled: true
457
+ Lint/ShadowedArgument:
458
+ Enabled: true
459
+ IgnoreImplicitReferences: true
460
+ Metrics/PerceivedComplexity:
461
+ Description: A complexity metric geared towards measuring complexity for a human
462
+ reader.
463
+ Enabled: true
464
+ Max: 7
465
+ Style/CollectionCompact:
466
+ Description: Checks for places where custom logic on rejection nils from arrays
467
+ and hashes can be replaced with {Array,Hash}#{compact,compact!}.
468
+ StyleGuide: https://docs.rubocop.org/rubocop/cops_style.html#stylecollectioncompact
469
+ Enabled: true
470
+ Style/ArgumentsForwarding:
471
+ Enabled: true
data/.rubocop.yml CHANGED
@@ -1,4 +1,5 @@
1
1
  inherit_from:
2
+ - .rubocop_todo.yml
2
3
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
3
4
 
4
5
  # local repo-specific modifications
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,27 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2024-09-09 08:39:44 UTC using RuboCop version 1.66.1.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 5
10
+ # This cop supports safe autocorrection (--autocorrect).
11
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
12
+ # SupportedStyles: with_first_argument, with_fixed_indentation
13
+ Layout/ArgumentAlignment:
14
+ Exclude:
15
+ - 'lib/sts/tbx_iso_tml/grammatical_gender.rb'
16
+ - 'lib/sts/tbx_iso_tml/grammatical_number.rb'
17
+ - 'lib/sts/tbx_iso_tml/normative_authorization.rb'
18
+ - 'lib/sts/tbx_iso_tml/part_of_speech.rb'
19
+ - 'lib/sts/tbx_iso_tml/term_type.rb'
20
+
21
+ # Offense count: 1
22
+ # This cop supports safe autocorrection (--autocorrect).
23
+ # Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
24
+ # URISchemes: http, https
25
+ Layout/LineLength:
26
+ Exclude:
27
+ - 'lib/sts/tbx_iso_tml/term_type.rb'
@@ -5,16 +5,16 @@ require_relative "adoption_front"
5
5
 
6
6
  module Sts
7
7
  module NisoSts
8
- class Adoption < Sts::Mapper
8
+ class Adoption < Lutaml::Model::Serializable
9
9
  attribute :front, AdoptionFront
10
10
  attribute :back, Back
11
- attribute :id, Shale::Type::String
12
- attribute :lang, Shale::Type::String
11
+ attribute :id, Lutaml::Model::Type::String
12
+ attribute :lang, Lutaml::Model::Type::String
13
13
  attribute :adoptions, Adoption, collection: true
14
14
  attribute :standard, Standard
15
15
 
16
16
  xml do
17
- root "adoption"
17
+ root "adoption", mixed: true
18
18
 
19
19
  map_attribute "id", to: :id
20
20
  map_attribute "lang", to: :lang,
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "section"
6
6
  require_relative "title"
@@ -12,14 +12,14 @@ require_relative "../tbx_iso_tml/table_wrap"
12
12
 
13
13
  module Sts
14
14
  module NisoSts
15
- class Title < Sts::Mapper; end
16
- class ReferenceList < Sts::Mapper; end
15
+ class Title < Lutaml::Model::Serializable; end
16
+ class ReferenceList < Lutaml::Model::Serializable; end
17
17
 
18
- class App < Sts::Mapper
19
- attribute :id, Shale::Type::String
20
- attribute :content_type, Shale::Type::String
18
+ class App < Lutaml::Model::Serializable
19
+ attribute :id, Lutaml::Model::Type::String
20
+ attribute :content_type, Lutaml::Model::Type::String
21
21
  attribute :label, Label
22
- attribute :annex_type, Shale::Type::String
22
+ attribute :annex_type, Lutaml::Model::Type::String
23
23
  attribute :title, Title
24
24
  attribute :fig, Figure, collection: true
25
25
  attribute :sec, Section, collection: true
@@ -29,7 +29,7 @@ module Sts
29
29
  attribute :table_wrap, Sts::TbxIsoTml::TableWrap, collection: true
30
30
 
31
31
  xml do
32
- root "app"
32
+ root "app", mixed: true
33
33
 
34
34
  map_attribute "id", to: :id
35
35
  map_attribute "content-type", to: :content_type
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "app"
6
6
 
7
7
  module Sts
8
8
  module NisoSts
9
- class AppGroup < Sts::Mapper
9
+ class AppGroup < Lutaml::Model::Serializable
10
10
  attribute :app, Sts::NisoSts::App, collection: true
11
11
 
12
12
  xml do
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "reference_list"
6
6
  require_relative "section"
@@ -9,7 +9,7 @@ require_relative "fn_group"
9
9
 
10
10
  module Sts
11
11
  module NisoSts
12
- class Back < Sts::Mapper
12
+ class Back < Lutaml::Model::Serializable
13
13
  attribute :ref_list, ReferenceList
14
14
  attribute :app_group, AppGroup
15
15
  attribute :sec, Section
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "section"
6
6
 
7
7
  module Sts
8
8
  module NisoSts
9
- class Body < Sts::Mapper
9
+ class Body < Lutaml::Model::Serializable
10
10
  attribute :sec, Section, collection: true
11
11
 
12
12
  xml do
@@ -1,4 +1,4 @@
1
- require_relative "../mapper"
1
+ require "lutaml/model"
2
2
 
3
3
  require_relative "paragraph"
4
4
  require_relative "title"
@@ -30,13 +30,13 @@ require_relative "non_normative_note"
30
30
 
31
31
  module Sts
32
32
  module NisoSts
33
- class Caption < Sts::Mapper
33
+ class Caption < Lutaml::Model::Serializable
34
34
  attribute :title, Title
35
35
  attribute :paragraphs, Paragraph, collection: true
36
36
  attribute :non_normative_note, NonNormativeNote, collection: true
37
37
 
38
38
  xml do
39
- root "caption"
39
+ root "caption", mixed: true
40
40
 
41
41
  map_element "p", to: :paragraphs
42
42
  map_element "non-normative-note", to: :non_normative_note
@@ -1,13 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  module Sts
6
6
  module NisoSts
7
- class CustomMeta < Sts::Mapper
8
- attribute :lang, Shale::Type::String
9
- attribute :meta_name, Shale::Type::String
10
- attribute :meta_value, Shale::Type::String
7
+ class CustomMeta < Lutaml::Model::Serializable
8
+ attribute :lang, Lutaml::Model::Type::String
9
+ attribute :meta_name, Lutaml::Model::Type::String
10
+ attribute :meta_value, Lutaml::Model::Type::String
11
11
 
12
12
  xml do
13
13
  root "custom-meta"
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../mapper"
3
+ require "lutaml/model"
4
4
 
5
5
  require_relative "custom_meta"
6
6
 
7
7
  module Sts
8
8
  module NisoSts
9
- class CustomMetaGroup < Sts::Mapper
9
+ class CustomMetaGroup < Lutaml::Model::Serializable
10
10
  attribute :custom_meta, CustomMeta, collection: true
11
11
 
12
12
  xml do