mistral_translator 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 73a244fe12fa2b20b8541ae5fda6ad872072b39494a4df7898eeaef52463ecda
4
+ data.tar.gz: d2542178c4b3bea537b3d2737341809457141fea38f3a6354c7ccf6c0feb86e2
5
+ SHA512:
6
+ metadata.gz: 4c307437bb32492e4a428eb1f37b868306e48f9c90229aab59565226199c322a8a142ecb41da83ce5c99d6c807c47dc85281ee4e2b09a51870cdba72405ed94e
7
+ data.tar.gz: aa2153e0a4f70459e2983c13c4cb529e836aff7262cc7d9411b9a43c685a105a47ba9961180188f87fe84eb6b7dd2563da6c653611ab4e843a5eeb032f738159
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,493 @@
1
+ AllCops:
2
+ TargetRubyVersion: 3.2
3
+ NewCops: enable
4
+ SuggestExtensions: false
5
+
6
+ plugins:
7
+ - rubocop-rake
8
+ - rubocop-rspec
9
+
10
+ Style/StringLiterals:
11
+ EnforcedStyle: double_quotes
12
+
13
+ Style/StringLiteralsInInterpolation:
14
+ EnforcedStyle: double_quotes
15
+
16
+ # Configuration pour les métriques
17
+ Metrics/ClassLength:
18
+ Max: 200
19
+
20
+ Metrics/ModuleLength:
21
+ Max: 250
22
+
23
+ Metrics/MethodLength:
24
+ Max: 35
25
+
26
+ Metrics/BlockLength:
27
+ Max: 150
28
+
29
+ Metrics/AbcSize:
30
+ Max: 35
31
+
32
+ Metrics/CyclomaticComplexity:
33
+ Max: 15
34
+
35
+ # Configuration pour la documentation
36
+ Style/Documentation:
37
+ Enabled: false
38
+
39
+ # Configuration pour les permissions de script
40
+ Lint/ScriptPermission:
41
+ Enabled: false
42
+
43
+ # Configuration pour les tests RSpec
44
+ RSpec/ExampleLength:
45
+ Max: 35
46
+
47
+ RSpec/MultipleExpectations:
48
+ Max: 10
49
+
50
+ RSpec/NestedGroups:
51
+ Max: 8
52
+
53
+ RSpec/MultipleDescribes:
54
+ Enabled: false
55
+
56
+ RSpec/DescribeClass:
57
+ Enabled: false
58
+
59
+ RSpec/VerifiedDoubles:
60
+ Enabled: false
61
+
62
+ RSpec/StubbedMock:
63
+ Enabled: false
64
+
65
+ RSpec/MessageSpies:
66
+ Enabled: false
67
+
68
+ RSpec/MultipleMemoizedHelpers:
69
+ Max: 8
70
+
71
+ # Nouveaux cops ajoutés dans RuboCop
72
+ Gemspec/AddRuntimeDependency:
73
+ Enabled: true
74
+
75
+ Gemspec/AttributeAssignment:
76
+ Enabled: true
77
+
78
+ Gemspec/DeprecatedAttributeAssignment:
79
+ Enabled: true
80
+
81
+ Gemspec/DevelopmentDependencies:
82
+ Enabled: false
83
+
84
+ Gemspec/RequireMFA:
85
+ Enabled: true
86
+
87
+ Layout/EmptyLinesAfterModuleInclusion:
88
+ Enabled: true
89
+
90
+ Layout/LineContinuationLeadingSpace:
91
+ Enabled: true
92
+
93
+ Layout/LineContinuationSpacing:
94
+ Enabled: true
95
+
96
+ Layout/LineEndStringConcatenationIndentation:
97
+ Enabled: true
98
+
99
+ Layout/SpaceBeforeBrackets:
100
+ Enabled: true
101
+
102
+ Lint/AmbiguousAssignment:
103
+ Enabled: true
104
+
105
+ Lint/AmbiguousOperatorPrecedence:
106
+ Enabled: true
107
+
108
+ Lint/AmbiguousRange:
109
+ Enabled: true
110
+
111
+ Lint/ArrayLiteralInRegexp:
112
+ Enabled: true
113
+
114
+ Lint/ConstantOverwrittenInRescue:
115
+ Enabled: true
116
+
117
+ Lint/ConstantReassignment:
118
+ Enabled: true
119
+
120
+ Lint/CopDirectiveSyntax:
121
+ Enabled: true
122
+
123
+ Lint/DeprecatedConstants:
124
+ Enabled: true
125
+
126
+ Lint/DuplicateBranch:
127
+ Enabled: true
128
+
129
+ Lint/DuplicateMagicComment:
130
+ Enabled: true
131
+
132
+ Lint/DuplicateMatchPattern:
133
+ Enabled: true
134
+
135
+ Lint/DuplicateRegexpCharacterClassElement:
136
+ Enabled: true
137
+
138
+ Lint/DuplicateSetElement:
139
+ Enabled: true
140
+
141
+ Lint/EmptyBlock:
142
+ Enabled: true
143
+
144
+ Lint/EmptyClass:
145
+ Enabled: true
146
+
147
+ Lint/EmptyInPattern:
148
+ Enabled: true
149
+
150
+ Lint/HashNewWithKeywordArgumentsAsDefault:
151
+ Enabled: true
152
+
153
+ Lint/IncompatibleIoSelectWithFiberScheduler:
154
+ Enabled: true
155
+
156
+ Lint/ItWithoutArgumentsInBlock:
157
+ Enabled: true
158
+
159
+ Lint/LambdaWithoutLiteralBlock:
160
+ Enabled: true
161
+
162
+ Lint/LiteralAssignmentInCondition:
163
+ Enabled: true
164
+
165
+ Lint/MixedCaseRange:
166
+ Enabled: true
167
+
168
+ Lint/NoReturnInBeginEndBlocks:
169
+ Enabled: true
170
+
171
+ Lint/NonAtomicFileOperation:
172
+ Enabled: true
173
+
174
+ Lint/NumberedParameterAssignment:
175
+ Enabled: true
176
+
177
+ Lint/NumericOperationWithConstantResult:
178
+ Enabled: true
179
+
180
+ Lint/OrAssignmentToConstant:
181
+ Enabled: true
182
+
183
+ Lint/RedundantDirGlobSort:
184
+ Enabled: true
185
+
186
+ Lint/RedundantRegexpQuantifiers:
187
+ Enabled: true
188
+
189
+ Lint/RedundantTypeConversion:
190
+ Enabled: true
191
+
192
+ Lint/RefinementImportMethods:
193
+ Enabled: true
194
+
195
+ Lint/RequireRangeParentheses:
196
+ Enabled: true
197
+
198
+ Lint/RequireRelativeSelfPath:
199
+ Enabled: true
200
+
201
+ Lint/SharedMutableDefault:
202
+ Enabled: true
203
+
204
+ Lint/ShadowedException:
205
+ Enabled: false
206
+
207
+ Lint/SuppressedExceptionInNumberConversion:
208
+ Enabled: true
209
+
210
+ Lint/SymbolConversion:
211
+ Enabled: true
212
+
213
+ Lint/ToEnumArguments:
214
+ Enabled: true
215
+
216
+ Lint/TripleQuotes:
217
+ Enabled: true
218
+
219
+ Lint/UnescapedBracketInRegexp:
220
+ Enabled: true
221
+
222
+ Lint/UnexpectedBlockArity:
223
+ Enabled: true
224
+
225
+ Lint/UnmodifiedReduceAccumulator:
226
+ Enabled: true
227
+
228
+ Lint/UselessConstantScoping:
229
+ Enabled: true
230
+
231
+ Lint/UselessDefaultValueArgument:
232
+ Enabled: true
233
+
234
+ Lint/UselessDefined:
235
+ Enabled: true
236
+
237
+ Lint/UselessNumericOperation:
238
+ Enabled: true
239
+
240
+ Lint/UselessOr:
241
+ Enabled: true
242
+
243
+ Lint/UselessRescue:
244
+ Enabled: true
245
+
246
+ Lint/UselessRuby2Keywords:
247
+ Enabled: true
248
+
249
+ Metrics/CollectionLiteralLength:
250
+ Enabled: true
251
+
252
+ Naming/BlockForwarding:
253
+ Enabled: true
254
+
255
+ Naming/PredicateMethod:
256
+ Enabled: true
257
+
258
+ Security/CompoundHash:
259
+ Enabled: true
260
+
261
+ Security/IoMethods:
262
+ Enabled: true
263
+
264
+ Style/AmbiguousEndlessMethodDefinition:
265
+ Enabled: true
266
+
267
+ Style/ArgumentsForwarding:
268
+ Enabled: true
269
+
270
+ Style/ArrayIntersect:
271
+ Enabled: true
272
+
273
+ Style/BitwisePredicate:
274
+ Enabled: true
275
+
276
+ Style/CollectionCompact:
277
+ Enabled: true
278
+
279
+ Style/CollectionQuerying:
280
+ Enabled: true
281
+
282
+ Style/CombinableDefined:
283
+ Enabled: true
284
+
285
+ Style/ComparableBetween:
286
+ Enabled: true
287
+
288
+ Style/ComparableClamp:
289
+ Enabled: true
290
+
291
+ Style/ConcatArrayLiterals:
292
+ Enabled: true
293
+
294
+ Style/DataInheritance:
295
+ Enabled: true
296
+
297
+ Style/DigChain:
298
+ Enabled: true
299
+
300
+ Style/DirEmpty:
301
+ Enabled: true
302
+
303
+ Style/DocumentDynamicEvalDefinition:
304
+ Enabled: true
305
+
306
+ Style/EmptyHeredoc:
307
+ Enabled: true
308
+
309
+ Style/EmptyStringInsideInterpolation:
310
+ Enabled: true
311
+
312
+ Style/EndlessMethod:
313
+ Enabled: true
314
+
315
+ Style/EnvHome:
316
+ Enabled: true
317
+
318
+ Style/ExactRegexpMatch:
319
+ Enabled: true
320
+
321
+ Style/FetchEnvVar:
322
+ Enabled: true
323
+
324
+ Style/FileEmpty:
325
+ Enabled: true
326
+
327
+ Style/FileNull:
328
+ Enabled: true
329
+
330
+ Style/FileRead:
331
+ Enabled: true
332
+
333
+ Style/FileTouch:
334
+ Enabled: true
335
+
336
+ Style/FileWrite:
337
+ Enabled: true
338
+
339
+ Style/HashConversion:
340
+ Enabled: true
341
+
342
+ Style/HashExcept:
343
+ Enabled: true
344
+
345
+ Style/HashFetchChain:
346
+ Enabled: true
347
+
348
+ Style/HashSlice:
349
+ Enabled: true
350
+
351
+ Style/IfWithBooleanLiteralBranches:
352
+ Enabled: true
353
+
354
+ Style/InPatternThen:
355
+ Enabled: true
356
+
357
+ Style/ItAssignment:
358
+ Enabled: true
359
+
360
+ Style/ItBlockParameter:
361
+ Enabled: true
362
+
363
+ Style/KeywordArgumentsMerging:
364
+ Enabled: true
365
+
366
+ Style/MagicCommentFormat:
367
+ Enabled: true
368
+
369
+ Style/MapCompactWithConditionalBlock:
370
+ Enabled: true
371
+
372
+ Style/MapIntoArray:
373
+ Enabled: true
374
+
375
+ Style/MapToHash:
376
+ Enabled: true
377
+
378
+ Style/MapToSet:
379
+ Enabled: true
380
+
381
+ Style/MinMaxComparison:
382
+ Enabled: true
383
+
384
+ Style/MultilineInPatternThen:
385
+ Enabled: true
386
+
387
+ Style/NegatedIfElseCondition:
388
+ Enabled: true
389
+
390
+ Style/NestedFileDirname:
391
+ Enabled: true
392
+
393
+ Style/NilLambda:
394
+ Enabled: true
395
+
396
+ Style/NumberedParameters:
397
+ Enabled: true
398
+
399
+ Style/NumberedParametersLimit:
400
+ Enabled: true
401
+
402
+ Style/ObjectThen:
403
+ Enabled: true
404
+
405
+ Style/OpenStructUse:
406
+ Enabled: true
407
+
408
+ Style/OperatorMethodCall:
409
+ Enabled: true
410
+
411
+ Style/QuotedSymbols:
412
+ Enabled: true
413
+
414
+ Style/RedundantArgument:
415
+ Enabled: true
416
+
417
+ Style/RedundantArrayConstructor:
418
+ Enabled: true
419
+
420
+ Style/RedundantArrayFlatten:
421
+ Enabled: true
422
+
423
+ Style/RedundantConstantBase:
424
+ Enabled: true
425
+
426
+ Style/RedundantCurrentDirectoryInPath:
427
+ Enabled: true
428
+
429
+ Style/RedundantDoubleSplatHashBraces:
430
+ Enabled: true
431
+
432
+ Style/RedundantEach:
433
+ Enabled: true
434
+
435
+ Style/RedundantFilterChain:
436
+ Enabled: true
437
+
438
+ Style/RedundantFormat:
439
+ Enabled: true
440
+
441
+ Style/RedundantHeredocDelimiterQuotes:
442
+ Enabled: true
443
+
444
+ Style/RedundantInitialize:
445
+ Enabled: true
446
+
447
+ Style/RedundantInterpolationUnfreeze:
448
+ Enabled: true
449
+
450
+ Style/RedundantLineContinuation:
451
+ Enabled: true
452
+
453
+ Style/RedundantRegexpArgument:
454
+ Enabled: true
455
+
456
+ Style/RedundantRegexpConstructor:
457
+ Enabled: true
458
+
459
+ Style/RedundantSelfAssignmentBranch:
460
+ Enabled: true
461
+
462
+ Style/RedundantStringEscape:
463
+ Enabled: true
464
+
465
+ Style/ReturnNilInPredicateMethodDefinition:
466
+ Enabled: true
467
+
468
+ Style/SafeNavigationChainLength:
469
+ Enabled: true
470
+
471
+ Style/SelectByRegexp:
472
+ Enabled: true
473
+
474
+ Style/SendWithLiteralMethodName:
475
+ Enabled: true
476
+
477
+ Style/SingleLineDoEndBlock:
478
+ Enabled: true
479
+
480
+ Style/StringChars:
481
+ Enabled: true
482
+
483
+ Style/SuperArguments:
484
+ Enabled: true
485
+
486
+ Style/SuperWithArgsParentheses:
487
+ Enabled: true
488
+
489
+ Style/SwapValues:
490
+ Enabled: true
491
+
492
+ Style/YAMLFileRead:
493
+ Enabled: true
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.4.1
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2025-09-01
4
+
5
+ - Initial release
@@ -0,0 +1,132 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official email address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ [INSERT CONTACT METHOD].
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series of
86
+ actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or permanent
93
+ ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within the
113
+ community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.1, available at
119
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120
+
121
+ Community Impact Guidelines were inspired by
122
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123
+
124
+ For answers to common questions about this code of conduct, see the FAQ at
125
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126
+ [https://www.contributor-covenant.org/translations][translations].
127
+
128
+ [homepage]: https://www.contributor-covenant.org
129
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130
+ [Mozilla CoC]: https://github.com/mozilla/diversity
131
+ [FAQ]: https://www.contributor-covenant.org/faq
132
+ [translations]: https://www.contributor-covenant.org/translations
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 PierreArko
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.