plurimath 0.11.0 → 0.11.1

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 (44) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +354 -34
  3. data/Gemfile +2 -2
  4. data/README.adoc +49 -9
  5. data/lib/plurimath/deprecation.rb +2 -1
  6. data/lib/plurimath/errors/configuration_error.rb +5 -1
  7. data/lib/plurimath/errors/deprecation_error.rb +2 -1
  8. data/lib/plurimath/errors/invalid_number.rb +17 -0
  9. data/lib/plurimath/errors/unsupported_base.rb +18 -0
  10. data/lib/plurimath/errors/{formatter/unsupported_locale.rb → unsupported_locale.rb} +1 -1
  11. data/lib/plurimath/errors.rb +8 -0
  12. data/lib/plurimath/formatter/numbers/base_notation.rb +7 -2
  13. data/lib/plurimath/formatter/numbers/format_options.rb +123 -17
  14. data/lib/plurimath/formatter/numbers/fraction.rb +7 -16
  15. data/lib/plurimath/formatter/numbers/integer.rb +3 -0
  16. data/lib/plurimath/formatter/numbers/notation_renderer.rb +35 -6
  17. data/lib/plurimath/formatter/numbers/number_renderer.rb +16 -4
  18. data/lib/plurimath/formatter/numbers/precision_resolver.rb +16 -3
  19. data/lib/plurimath/formatter/numbers/sign_renderer.rb +2 -1
  20. data/lib/plurimath/formatter/numbers/significant.rb +4 -2
  21. data/lib/plurimath/formatter/numbers/source.rb +18 -3
  22. data/lib/plurimath/formatter/standard.rb +6 -0
  23. data/lib/plurimath/formatter/supported_locales.rb +1 -1
  24. data/lib/plurimath/formatter.rb +0 -2
  25. data/lib/plurimath/html/transform.rb +24 -12
  26. data/lib/plurimath/math/core.rb +17 -14
  27. data/lib/plurimath/math/function/overleftrightarrow.rb +2 -2
  28. data/lib/plurimath/math/number.rb +11 -1
  29. data/lib/plurimath/math.rb +4 -1
  30. data/lib/plurimath/number_formatter.rb +45 -4
  31. data/lib/plurimath/omml/formula_transformation.rb +2 -1
  32. data/lib/plurimath/omml/translator.rb +4 -1
  33. data/lib/plurimath/unicode_math/parse.rb +93 -53
  34. data/lib/plurimath/unicode_math/parser.rb +7 -4
  35. data/lib/plurimath/unicode_math/parsing_rules/absence_rules.rb +33 -21
  36. data/lib/plurimath/unicode_math/parsing_rules/common_rules.rb +28 -16
  37. data/lib/plurimath/unicode_math/parsing_rules/constants_rules.rb +18 -7
  38. data/lib/plurimath/unicode_math/parsing_rules/masked.rb +35 -15
  39. data/lib/plurimath/unicode_math/parsing_rules/sub_sup.rb +98 -72
  40. data/lib/plurimath/unicode_math/transform.rb +755 -468
  41. data/lib/plurimath/version.rb +1 -1
  42. data/lib/plurimath.rb +1 -0
  43. metadata +5 -4
  44. data/lib/plurimath/errors/formatter/unsupported_base.rb +0 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 491d902bc67711ebd59f8672b39e4e4df629f43da99961b12102d0ce583fec52
4
- data.tar.gz: 1badba8cd9e0c28519d0b728e05697f007f4ad55b2be8ac718dd11e5c076a6c9
3
+ metadata.gz: fa0df74a0b5161e4e9550aa4e16cd63d693c223ca3d2c3458bc4523978fbb399
4
+ data.tar.gz: 911b97a2e968e530817baaeb4b6ca547e30a15ff1baf8a0345b5e0b79f705fb9
5
5
  SHA512:
6
- metadata.gz: b659162129f8ef784da6cde0c87a7f9dec93fa3b117634de09f9c8aae676607ed2036900fbcbe1fdca19296cc7dedb05ca02a65fff08c7dbfe9e37f73b498428
7
- data.tar.gz: d24cfd8c30c2e0f6d2497d957a98d36759668369f1a760abd0e3a5da63fadb2ed6cdd9e9b3b94451f739da86fe745be77bb2a2b6c8550e323c8e9d75898a5d90
6
+ metadata.gz: 168b5906f33a0077e101eaafce29679432b9ec7d0df521f08d32e30f5ab194ab5326e6fadb9d6fce33486cb98a18ce229b28784e8cfe0944dc6cbdc2ec982907
7
+ data.tar.gz: b2c6f1da78545d427630cb536cc183552f917a646f3c97d15effa301b54f7fc961d4a49f62cf274f62e9254109c15f24e02ecf299b6fac693efc4eafe3050bf3
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2026-05-02 05:09:58 UTC using RuboCop version 1.86.1.
3
+ # on 2026-06-21 10:02:00 UTC using RuboCop version 1.86.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -11,35 +11,90 @@ Gemspec/RequiredRubyVersion:
11
11
  Exclude:
12
12
  - 'plurimath.gemspec'
13
13
 
14
- # Offense count: 2
14
+ # Offense count: 279
15
15
  # This cop supports safe autocorrection (--autocorrect).
16
16
  # Configuration parameters: EnforcedStyle, IndentationWidth.
17
17
  # SupportedStyles: with_first_argument, with_fixed_indentation
18
18
  Layout/ArgumentAlignment:
19
+ Enabled: false
20
+
21
+ # Offense count: 29
22
+ # This cop supports safe autocorrection (--autocorrect).
23
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
24
+ # SupportedStyles: with_first_element, with_fixed_indentation
25
+ Layout/ArrayAlignment:
19
26
  Exclude:
20
- - 'lib/plurimath/math/function/overleftrightarrow.rb'
27
+ - 'lib/plurimath/formatter/numbers/notation_renderer.rb'
28
+ - 'lib/plurimath/formatter/numbers/precision_resolver.rb'
29
+ - 'lib/plurimath/unicode_math/transform.rb'
30
+ - 'spec/plurimath/latex/parser_spec.rb'
31
+ - 'spec/plurimath/mathml/parser_spec.rb'
32
+ - 'spec/plurimath/number_formatter_spec.rb'
21
33
 
22
- # Offense count: 5
34
+ # Offense count: 11
35
+ # This cop supports safe autocorrection (--autocorrect).
36
+ # Configuration parameters: IndentationWidth.
37
+ Layout/AssignmentIndentation:
38
+ Exclude:
39
+ - 'lib/plurimath/unicode_math/parser.rb'
40
+ - 'lib/plurimath/unicode_math/transform.rb'
41
+
42
+ # Offense count: 100
23
43
  # This cop supports safe autocorrection (--autocorrect).
24
44
  # Configuration parameters: EnforcedStyleAlignWith.
25
45
  # SupportedStylesAlignWith: either, start_of_block, start_of_line
26
46
  Layout/BlockAlignment:
27
47
  Exclude:
28
48
  - 'lib/plurimath/math/core.rb'
49
+ - 'lib/plurimath/unicode_math/parse.rb'
50
+ - 'lib/plurimath/unicode_math/parser.rb'
51
+ - 'lib/plurimath/unicode_math/parsing_rules/absence_rules.rb'
52
+ - 'lib/plurimath/unicode_math/parsing_rules/common_rules.rb'
53
+ - 'lib/plurimath/unicode_math/parsing_rules/constants_rules.rb'
54
+ - 'lib/plurimath/unicode_math/parsing_rules/masked.rb'
55
+ - 'lib/plurimath/unicode_math/parsing_rules/sub_sup.rb'
29
56
  - 'lib/plurimath/unicode_math/transform.rb'
57
+ - 'spec/plurimath/formatter/numbers/format_options_spec.rb'
58
+ - 'spec/plurimath/formatter/numbers/fraction_spec.rb'
59
+ - 'spec/plurimath/formatter/numbers/integer_spec.rb'
60
+ - 'spec/plurimath/formatter/numbers/significant_spec.rb'
61
+ - 'spec/plurimath/html/parser_spec.rb'
62
+ - 'spec/plurimath/number_formatter_spec.rb'
30
63
 
31
- # Offense count: 5
64
+ # Offense count: 94
65
+ # This cop supports safe autocorrection (--autocorrect).
66
+ Layout/BlockEndNewline:
67
+ Exclude:
68
+ - 'lib/plurimath/unicode_math/parse.rb'
69
+ - 'lib/plurimath/unicode_math/parser.rb'
70
+ - 'lib/plurimath/unicode_math/parsing_rules/absence_rules.rb'
71
+ - 'lib/plurimath/unicode_math/parsing_rules/common_rules.rb'
72
+ - 'lib/plurimath/unicode_math/parsing_rules/constants_rules.rb'
73
+ - 'lib/plurimath/unicode_math/parsing_rules/masked.rb'
74
+ - 'lib/plurimath/unicode_math/parsing_rules/sub_sup.rb'
75
+ - 'lib/plurimath/unicode_math/transform.rb'
76
+ - 'spec/plurimath/formatter/numbers/format_options_spec.rb'
77
+ - 'spec/plurimath/formatter/numbers/fraction_spec.rb'
78
+ - 'spec/plurimath/formatter/numbers/integer_spec.rb'
79
+ - 'spec/plurimath/formatter/numbers/significant_spec.rb'
80
+ - 'spec/plurimath/html/parser_spec.rb'
81
+ - 'spec/plurimath/number_formatter_spec.rb'
82
+
83
+ # Offense count: 29
32
84
  # This cop supports safe autocorrection (--autocorrect).
33
85
  Layout/ClosingParenthesisIndentation:
34
86
  Exclude:
87
+ - 'lib/plurimath/formatter/numbers/notation_renderer.rb'
35
88
  - 'lib/plurimath/math/core.rb'
89
+ - 'lib/plurimath/unicode_math/transform.rb'
90
+ - 'spec/plurimath/deprecation_spec.rb'
36
91
 
37
- # Offense count: 10
92
+ # Offense count: 19
38
93
  # This cop supports safe autocorrection (--autocorrect).
39
94
  Layout/ElseAlignment:
40
95
  Exclude:
96
+ - 'lib/plurimath/formatter/numbers/base_notation.rb'
41
97
  - 'lib/plurimath/unicode_math/transform.rb'
42
- - 'lib/plurimath/utility.rb'
43
98
 
44
99
  # Offense count: 1
45
100
  # This cop supports safe autocorrection (--autocorrect).
@@ -55,7 +110,16 @@ Layout/EmptyLinesAroundClassBody:
55
110
  Exclude:
56
111
  - 'lib/plurimath/unicode_math/transform.rb'
57
112
 
58
- # Offense count: 4
113
+ # Offense count: 11
114
+ # This cop supports safe autocorrection (--autocorrect).
115
+ # Configuration parameters: EnforcedStyleAlignWith.
116
+ # SupportedStylesAlignWith: keyword, variable, start_of_line
117
+ Layout/EndAlignment:
118
+ Exclude:
119
+ - 'lib/plurimath/formatter/numbers/base_notation.rb'
120
+ - 'lib/plurimath/unicode_math/transform.rb'
121
+
122
+ # Offense count: 5
59
123
  # This cop supports safe autocorrection (--autocorrect).
60
124
  # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
61
125
  Layout/ExtraSpacing:
@@ -64,39 +128,96 @@ Layout/ExtraSpacing:
64
128
  - 'lib/plurimath/unicode_math/parsing_rules/common_rules.rb'
65
129
  - 'lib/plurimath/unicode_math/parsing_rules/masked.rb'
66
130
 
67
- # Offense count: 9
131
+ # Offense count: 24
68
132
  # This cop supports safe autocorrection (--autocorrect).
69
133
  # Configuration parameters: EnforcedStyle, IndentationWidth.
70
134
  # SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
71
135
  Layout/FirstArgumentIndentation:
72
136
  Exclude:
137
+ - 'lib/plurimath/formatter/numbers/notation_renderer.rb'
73
138
  - 'lib/plurimath/unicode_math/transform.rb'
139
+ - 'spec/plurimath/deprecation_spec.rb'
74
140
 
75
- # Offense count: 14
141
+ # Offense count: 20
76
142
  # This cop supports safe autocorrection (--autocorrect).
77
143
  # Configuration parameters: EnforcedStyle, IndentationWidth.
78
144
  # SupportedStyles: special_inside_parentheses, consistent, align_brackets
79
145
  Layout/FirstArrayElementIndentation:
80
146
  Exclude:
81
147
  - 'lib/plurimath/unicode_math/transform.rb'
148
+ - 'spec/plurimath/latex/parser_spec.rb'
149
+ - 'spec/plurimath/mathml/parser_spec.rb'
82
150
 
83
- # Offense count: 9
151
+ # Offense count: 2
152
+ # This cop supports safe autocorrection (--autocorrect).
153
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
154
+ # SupportedStyles: special_inside_parentheses, consistent, align_braces
155
+ Layout/FirstHashElementIndentation:
156
+ Exclude:
157
+ - 'spec/plurimath/number_formatter_spec.rb'
158
+
159
+ # Offense count: 31
160
+ # This cop supports safe autocorrection (--autocorrect).
161
+ # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
162
+ # SupportedHashRocketStyles: key, separator, table
163
+ # SupportedColonStyles: key, separator, table
164
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
165
+ Layout/HashAlignment:
166
+ Exclude:
167
+ - 'lib/plurimath/html/transform.rb'
168
+ - 'lib/plurimath/unicode_math/transform.rb'
169
+ - 'spec/plurimath/formatter/numbers/base_notation_spec.rb'
170
+ - 'spec/plurimath/formatter/numbers/format_options_spec.rb'
171
+ - 'spec/plurimath/formatter/numbers/fraction_spec.rb'
172
+ - 'spec/plurimath/number_formatter_spec.rb'
173
+
174
+ # Offense count: 4
175
+ # This cop supports safe autocorrection (--autocorrect).
176
+ # Configuration parameters: EnforcedStyle.
177
+ # SupportedStyles: normal, indented_internal_methods
178
+ Layout/IndentationConsistency:
179
+ Exclude:
180
+ - 'lib/plurimath/unicode_math/transform.rb'
181
+
182
+ # Offense count: 231
84
183
  # This cop supports safe autocorrection (--autocorrect).
85
184
  # Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
86
185
  # SupportedStylesAlignWith: start_of_line, relative_to_receiver
87
186
  Layout/IndentationWidth:
187
+ Enabled: false
188
+
189
+ # Offense count: 2
190
+ # This cop supports safe autocorrection (--autocorrect).
191
+ # Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment, AllowRBSInlineAnnotation, AllowSteepAnnotation.
192
+ Layout/LeadingCommentSpace:
88
193
  Exclude:
89
- - 'lib/plurimath/math/core.rb'
90
- - 'lib/plurimath/unicode_math/transform.rb'
91
- - 'lib/plurimath/utility.rb'
194
+ - 'Gemfile'
92
195
 
93
- # Offense count: 29312
196
+ # Offense count: 29763
94
197
  # This cop supports safe autocorrection (--autocorrect).
95
198
  # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
96
199
  # URISchemes: http, https
97
200
  Layout/LineLength:
98
201
  Enabled: false
99
202
 
203
+ # Offense count: 1
204
+ # This cop supports safe autocorrection (--autocorrect).
205
+ # Configuration parameters: EnforcedStyle.
206
+ # SupportedStyles: symmetrical, new_line, same_line
207
+ Layout/MultilineHashBraceLayout:
208
+ Exclude:
209
+ - 'spec/plurimath/number_formatter_spec.rb'
210
+
211
+ # Offense count: 9
212
+ # This cop supports safe autocorrection (--autocorrect).
213
+ # Configuration parameters: EnforcedStyle.
214
+ # SupportedStyles: symmetrical, new_line, same_line
215
+ Layout/MultilineMethodCallBraceLayout:
216
+ Exclude:
217
+ - 'lib/plurimath/formatter/numbers/notation_renderer.rb'
218
+ - 'lib/plurimath/unicode_math/transform.rb'
219
+ - 'spec/plurimath/deprecation_spec.rb'
220
+
100
221
  # Offense count: 12
101
222
  # This cop supports safe autocorrection (--autocorrect).
102
223
  # Configuration parameters: EnforcedStyle, IndentationWidth.
@@ -118,6 +239,24 @@ Layout/SpaceAroundOperators:
118
239
  - 'lib/plurimath/unicode_math/parsing_rules/common_rules.rb'
119
240
  - 'lib/plurimath/unicode_math/parsing_rules/masked.rb'
120
241
 
242
+ # Offense count: 315
243
+ # This cop supports safe autocorrection (--autocorrect).
244
+ # Configuration parameters: AllowInHeredoc.
245
+ Layout/TrailingWhitespace:
246
+ Enabled: false
247
+
248
+ # Offense count: 118
249
+ # This cop supports safe autocorrection (--autocorrect).
250
+ Lint/AmbiguousOperatorPrecedence:
251
+ Exclude:
252
+ - 'lib/plurimath/unicode_math/parse.rb'
253
+ - 'lib/plurimath/unicode_math/parsing_rules/absence_rules.rb'
254
+ - 'lib/plurimath/unicode_math/parsing_rules/common_rules.rb'
255
+ - 'lib/plurimath/unicode_math/parsing_rules/constants_rules.rb'
256
+ - 'lib/plurimath/unicode_math/parsing_rules/masked.rb'
257
+ - 'lib/plurimath/unicode_math/parsing_rules/sub_sup.rb'
258
+ - 'lib/plurimath/unicode_math/transform.rb'
259
+
121
260
  # Offense count: 1
122
261
  # Configuration parameters: AllowedMethods.
123
262
  # AllowedMethods: enums
@@ -137,10 +276,9 @@ Lint/DuplicateBranch:
137
276
  - 'lib/plurimath/unicode_math/transform.rb'
138
277
  - 'lib/plurimath/xml_engine/oga/dumper.rb'
139
278
 
140
- # Offense count: 7
279
+ # Offense count: 6
141
280
  Lint/DuplicateMethods:
142
281
  Exclude:
143
- - 'lib/plurimath/formatter/numeric_formatter.rb'
144
282
  - 'lib/plurimath/math/function/td.rb'
145
283
  - 'lib/plurimath/math/number.rb'
146
284
  - 'lib/plurimath/math/symbols/symbol.rb'
@@ -165,11 +303,10 @@ Lint/IneffectiveAccessModifier:
165
303
  Exclude:
166
304
  - 'lib/plurimath/math/symbols/symbol.rb'
167
305
 
168
- # Offense count: 11
306
+ # Offense count: 10
169
307
  # Configuration parameters: AllowedParentClasses.
170
308
  Lint/MissingSuper:
171
309
  Exclude:
172
- - 'lib/plurimath/errors/formatter/unsupported_base.rb'
173
310
  - 'lib/plurimath/math/formula.rb'
174
311
  - 'lib/plurimath/math/function/binary_function.rb'
175
312
  - 'lib/plurimath/math/function/linebreak.rb'
@@ -181,6 +318,20 @@ Lint/MissingSuper:
181
318
  - 'lib/plurimath/math/number.rb'
182
319
  - 'lib/plurimath/math/symbols/symbol.rb'
183
320
 
321
+ # Offense count: 1
322
+ # This cop supports unsafe autocorrection (--autocorrect-all).
323
+ Lint/PercentStringArray:
324
+ Exclude:
325
+ - 'lib/plurimath/unicode_math/constants.rb'
326
+
327
+ # Offense count: 45
328
+ # This cop supports safe autocorrection (--autocorrect).
329
+ # Configuration parameters: EnforcedStyle.
330
+ # SupportedStyles: strict, consistent
331
+ Lint/SymbolConversion:
332
+ Exclude:
333
+ - 'lib/plurimath/unicode_math/constants.rb'
334
+
184
335
  # Offense count: 4
185
336
  Lint/UnmodifiedReduceAccumulator:
186
337
  Exclude:
@@ -193,44 +344,51 @@ Lint/UnmodifiedReduceAccumulator:
193
344
  # NotImplementedExceptions: NotImplementedError
194
345
  Lint/UnusedMethodArgument:
195
346
  Exclude:
196
- - 'lib/plurimath/formatter/numeric_formatter.rb'
197
347
  - 'lib/plurimath/math/formula.rb'
198
348
  - 'lib/plurimath/math/function/left.rb'
349
+ - 'lib/plurimath/unicode_math/parsing_rules/constants_rules.rb'
199
350
  - 'lib/plurimath/utility.rb'
200
351
 
201
- # Offense count: 151
352
+ # Offense count: 3
353
+ # This cop supports safe autocorrection (--autocorrect).
354
+ Lint/UselessAssignment:
355
+ Exclude:
356
+ - 'lib/plurimath/unicode_math/parser.rb'
357
+ - 'lib/plurimath/unicode_math/transform.rb'
358
+
359
+ # Offense count: 154
202
360
  # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
203
361
  Metrics/AbcSize:
204
362
  Enabled: false
205
363
 
206
- # Offense count: 4
364
+ # Offense count: 9
207
365
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
208
366
  # AllowedMethods: refine
209
367
  Metrics/BlockLength:
210
368
  Max: 57
211
369
 
212
- # Offense count: 3
370
+ # Offense count: 2
213
371
  # Configuration parameters: CountBlocks, CountModifierForms.
214
372
  Metrics/BlockNesting:
215
373
  Max: 4
216
374
 
217
- # Offense count: 111
375
+ # Offense count: 104
218
376
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
219
377
  Metrics/CyclomaticComplexity:
220
378
  Enabled: false
221
379
 
222
- # Offense count: 161
380
+ # Offense count: 162
223
381
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
224
382
  Metrics/MethodLength:
225
383
  Max: 50
226
384
 
227
- # Offense count: 12
385
+ # Offense count: 13
228
386
  # Configuration parameters: CountKeywordArgs.
229
387
  Metrics/ParameterLists:
230
388
  Max: 6
231
389
  MaxOptionalParameters: 5
232
390
 
233
- # Offense count: 84
391
+ # Offense count: 78
234
392
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
235
393
  Metrics/PerceivedComplexity:
236
394
  Enabled: false
@@ -243,7 +401,7 @@ Naming/MethodParameterName:
243
401
  - 'lib/plurimath/math/function/mlabeledtr.rb'
244
402
  - 'lib/plurimath/mathml/translator.rb'
245
403
 
246
- # Offense count: 46
404
+ # Offense count: 47
247
405
  # Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates.
248
406
  # AllowedMethods: call
249
407
  # WaywardPredicates: infinite?, nonzero?
@@ -280,13 +438,19 @@ Performance/CollectionLiteralInLoop:
280
438
  - 'lib/plurimath/utility/intent_encoding.rb'
281
439
  - 'spec/plurimath/formatter/numbers/fraction_spec.rb'
282
440
 
283
- # Offense count: 4593
441
+ # Offense count: 4649
284
442
  # Configuration parameters: Prefixes, AllowedPatterns.
285
443
  # Prefixes: when, with, without
286
444
  RSpec/ContextWording:
287
445
  Enabled: false
288
446
 
289
- # Offense count: 1452
447
+ # Offense count: 1
448
+ # This cop supports safe autocorrection (--autocorrect).
449
+ RSpec/EmptyLineAfterSubject:
450
+ Exclude:
451
+ - 'spec/plurimath/math/number_spec.rb'
452
+
453
+ # Offense count: 1581
290
454
  # Configuration parameters: CountAsOne.
291
455
  RSpec/ExampleLength:
292
456
  Max: 394
@@ -315,16 +479,21 @@ RSpec/LeakyLocalVariable:
315
479
  - 'spec/plurimath/unicode_math/plurimath/unicodemath_tests_spec.rb'
316
480
  - 'spec/plurimath/unicode_math/plurimath/unicodemath_transform_spec.rb'
317
481
 
318
- # Offense count: 408
482
+ # Offense count: 1
483
+ RSpec/MultipleDescribes:
484
+ Exclude:
485
+ - 'spec/plurimath/deprecation_spec.rb'
486
+
487
+ # Offense count: 470
319
488
  RSpec/MultipleExpectations:
320
489
  Max: 12
321
490
 
322
- # Offense count: 11
491
+ # Offense count: 12
323
492
  # Configuration parameters: AllowSubject.
324
493
  RSpec/MultipleMemoizedHelpers:
325
494
  Max: 11
326
495
 
327
- # Offense count: 51
496
+ # Offense count: 93
328
497
  # Configuration parameters: AllowedGroups.
329
498
  RSpec/NestedGroups:
330
499
  Max: 5
@@ -350,12 +519,85 @@ RSpec/RepeatedExampleGroupBody:
350
519
  RSpec/RepeatedExampleGroupDescription:
351
520
  Enabled: false
352
521
 
353
- # Offense count: 25
522
+ # Offense count: 26
354
523
  # Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata, InflectorPath, EnforcedInflector.
355
524
  # SupportedInflectors: default, active_support
356
525
  RSpec/SpecFilePathFormat:
357
526
  Enabled: false
358
527
 
528
+ # Offense count: 170
529
+ # This cop supports safe autocorrection (--autocorrect).
530
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
531
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
532
+ # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
533
+ # FunctionalMethods: let, let!, subject, watch
534
+ # AllowedMethods: lambda, proc, it
535
+ Style/BlockDelimiters:
536
+ Exclude:
537
+ - 'lib/plurimath/math/core.rb'
538
+ - 'lib/plurimath/unicode_math/parse.rb'
539
+ - 'lib/plurimath/unicode_math/parser.rb'
540
+ - 'lib/plurimath/unicode_math/parsing_rules/absence_rules.rb'
541
+ - 'lib/plurimath/unicode_math/parsing_rules/common_rules.rb'
542
+ - 'lib/plurimath/unicode_math/parsing_rules/constants_rules.rb'
543
+ - 'lib/plurimath/unicode_math/parsing_rules/masked.rb'
544
+ - 'lib/plurimath/unicode_math/parsing_rules/sub_sup.rb'
545
+ - 'lib/plurimath/unicode_math/transform.rb'
546
+ - 'spec/plurimath/formatter/numbers/format_options_spec.rb'
547
+ - 'spec/plurimath/formatter/numbers/fraction_spec.rb'
548
+ - 'spec/plurimath/formatter/numbers/integer_spec.rb'
549
+ - 'spec/plurimath/formatter/numbers/significant_spec.rb'
550
+ - 'spec/plurimath/html/parser_spec.rb'
551
+ - 'spec/plurimath/number_formatter_spec.rb'
552
+
553
+ # Offense count: 3
554
+ # This cop supports unsafe autocorrection (--autocorrect-all).
555
+ # Configuration parameters: MinBranchesCount.
556
+ Style/CaseLikeIf:
557
+ Exclude:
558
+ - 'lib/plurimath/unicode_math/transform.rb'
559
+
560
+ # Offense count: 1
561
+ # This cop supports unsafe autocorrection (--autocorrect-all).
562
+ Style/ConcatArrayLiterals:
563
+ Exclude:
564
+ - 'lib/plurimath/unicode_math/transform.rb'
565
+
566
+ # Offense count: 2
567
+ # This cop supports safe autocorrection (--autocorrect).
568
+ # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
569
+ # SupportedStyles: assign_to_condition, assign_inside_condition
570
+ Style/ConditionalAssignment:
571
+ Exclude:
572
+ - 'lib/plurimath/unicode_math/transform.rb'
573
+
574
+ # Offense count: 24
575
+ # This cop supports safe autocorrection (--autocorrect).
576
+ # Configuration parameters: AllowIfModifier.
577
+ Style/IfInsideElse:
578
+ Exclude:
579
+ - 'lib/plurimath/unicode_math/transform.rb'
580
+
581
+ # Offense count: 47
582
+ # This cop supports safe autocorrection (--autocorrect).
583
+ Style/MultilineIfModifier:
584
+ Exclude:
585
+ - 'lib/plurimath/formatter/numbers/format_options.rb'
586
+ - 'lib/plurimath/formatter/numbers/fraction.rb'
587
+ - 'lib/plurimath/formatter/numbers/notation_renderer.rb'
588
+ - 'lib/plurimath/formatter/numbers/precision_resolver.rb'
589
+ - 'lib/plurimath/math.rb'
590
+ - 'lib/plurimath/math/core.rb'
591
+ - 'lib/plurimath/omml/translator.rb'
592
+ - 'lib/plurimath/unicode_math/transform.rb'
593
+
594
+ # Offense count: 31
595
+ # This cop supports safe autocorrection (--autocorrect).
596
+ Style/MultilineTernaryOperator:
597
+ Exclude:
598
+ - 'lib/plurimath/formatter/numbers/base_notation.rb'
599
+ - 'lib/plurimath/unicode_math/transform.rb'
600
+
359
601
  # Offense count: 39
360
602
  Style/OptionalArguments:
361
603
  Exclude:
@@ -376,6 +618,43 @@ Style/OptionalArguments:
376
618
  Style/OptionalBooleanParameter:
377
619
  Enabled: false
378
620
 
621
+ # Offense count: 5
622
+ # This cop supports safe autocorrection (--autocorrect).
623
+ # Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions.
624
+ Style/ParenthesesAroundCondition:
625
+ Exclude:
626
+ - 'lib/plurimath/unicode_math/transform.rb'
627
+
628
+ # Offense count: 78
629
+ # This cop supports safe autocorrection (--autocorrect).
630
+ # Configuration parameters: EnforcedStyle.
631
+ # SupportedStyles: same_as_string_literals, single_quotes, double_quotes
632
+ Style/QuotedSymbols:
633
+ Exclude:
634
+ - 'lib/plurimath/unicode_math/constants.rb'
635
+
636
+ # Offense count: 86
637
+ # This cop supports safe autocorrection (--autocorrect).
638
+ Style/RedundantParentheses:
639
+ Exclude:
640
+ - 'lib/plurimath/unicode_math/parse.rb'
641
+ - 'lib/plurimath/unicode_math/parsing_rules/common_rules.rb'
642
+ - 'lib/plurimath/unicode_math/parsing_rules/masked.rb'
643
+ - 'lib/plurimath/unicode_math/parsing_rules/sub_sup.rb'
644
+ - 'lib/plurimath/unicode_math/transform.rb'
645
+
646
+ # Offense count: 1
647
+ # This cop supports safe autocorrection (--autocorrect).
648
+ Style/RedundantRegexpArgument:
649
+ Exclude:
650
+ - 'lib/plurimath/unicode_math/parser.rb'
651
+
652
+ # Offense count: 1
653
+ # This cop supports safe autocorrection (--autocorrect).
654
+ Style/RedundantRegexpEscape:
655
+ Exclude:
656
+ - 'lib/plurimath/unicode_math/constants.rb'
657
+
379
658
  # Offense count: 13
380
659
  # Configuration parameters: Max.
381
660
  Style/SafeNavigationChainLength:
@@ -387,3 +666,44 @@ Style/SafeNavigationChainLength:
387
666
  - 'lib/plurimath/math/function/table.rb'
388
667
  - 'lib/plurimath/utility.rb'
389
668
  - 'lib/plurimath/utility/intent_encoding.rb'
669
+
670
+ # Offense count: 75
671
+ # This cop supports safe autocorrection (--autocorrect).
672
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
673
+ # SupportedStyles: single_quotes, double_quotes
674
+ Style/StringLiterals:
675
+ Exclude:
676
+ - 'lib/plurimath/unicode_math/constants.rb'
677
+
678
+ # Offense count: 44
679
+ # This cop supports safe autocorrection (--autocorrect).
680
+ # Configuration parameters: EnforcedStyleForMultiline.
681
+ # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
682
+ Style/TrailingCommaInArguments:
683
+ Exclude:
684
+ - 'lib/plurimath/unicode_math/transform.rb'
685
+
686
+ # Offense count: 4
687
+ # This cop supports safe autocorrection (--autocorrect).
688
+ # Configuration parameters: EnforcedStyleForMultiline.
689
+ # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
690
+ Style/TrailingCommaInArrayLiteral:
691
+ Exclude:
692
+ - 'lib/plurimath/unicode_math/transform.rb'
693
+
694
+ # Offense count: 7
695
+ # This cop supports safe autocorrection (--autocorrect).
696
+ # Configuration parameters: EnforcedStyleForMultiline.
697
+ # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
698
+ Style/TrailingCommaInHashLiteral:
699
+ Exclude:
700
+ - 'lib/plurimath/unicode_math/constants.rb'
701
+ - 'lib/plurimath/unicode_math/parser.rb'
702
+
703
+ # Offense count: 15
704
+ # This cop supports unsafe autocorrection (--autocorrect-all).
705
+ # Configuration parameters: EnforcedStyle.
706
+ # SupportedStyles: forbid_for_all_comparison_operators, forbid_for_equality_operators_only, require_for_all_comparison_operators, require_for_equality_operators_only
707
+ Style/YodaCondition:
708
+ Exclude:
709
+ - 'lib/plurimath/unicode_math/transform.rb'
data/Gemfile CHANGED
@@ -4,9 +4,9 @@ source "https://rubygems.org"
4
4
  gemspec
5
5
 
6
6
  gem "canon"
7
- #gem "lutaml-model", github: "lutaml/lutaml-model", branch: "main"
7
+ # gem "lutaml-model", github: "lutaml/lutaml-model", branch: "main"
8
8
  gem "oga"
9
- #gem "omml", github: "plurimath/omml", branch: "main"
9
+ # gem "omml", github: "plurimath/omml", branch: "main"
10
10
  gem "opal-rspec", "~> 1.1.0a"
11
11
  gem "ox"
12
12
  gem "rake", "~> 12.0"