sts 0.3.2 → 0.3.4

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