jkf 0.5.0 → 0.5.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.
- checksums.yaml +4 -4
- data/.rubocop.yml +57 -0
- data/.rubocop_todo.yml +1 -454
- data/CHANGELOG.md +17 -0
- data/Gemfile +11 -11
- data/Guardfile +3 -3
- data/README.en.md +3 -4
- data/README.md +4 -2
- data/Rakefile +4 -4
- data/bench.rb +12 -0
- data/bin/console +4 -4
- data/jkf.gemspec +12 -13
- data/lib/jkf/converter/base.rb +12 -10
- data/lib/jkf/converter/csa.rb +141 -150
- data/lib/jkf/converter/ki2.rb +93 -91
- data/lib/jkf/converter/kif.rb +105 -99
- data/lib/jkf/converter/kifuable.rb +160 -160
- data/lib/jkf/converter.rb +6 -8
- data/lib/jkf/parser/base.rb +81 -95
- data/lib/jkf/parser/csa.rb +651 -654
- data/lib/jkf/parser/ki2.rb +331 -333
- data/lib/jkf/parser/kif.rb +467 -468
- data/lib/jkf/parser/kifuable.rb +511 -517
- data/lib/jkf/parser.rb +5 -7
- data/lib/jkf/version.rb +1 -2
- data/lib/jkf.rb +6 -6
- data/manifest.scm +1 -0
- data/po/all.pot +31 -25
- data/po/en.po +36 -37
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10de9aac464bd36cb02f25fe54861977cef819870cfe2b35d8f9741b119c3165
|
4
|
+
data.tar.gz: 9a9271b5bf437c8d3a493732046ee3b86c50a4c26313c975a0041e9d8d91e290
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 778bd58dffa3e570cb4f9a4f235518d402f8e135b1a33f7e3f3758d71807b3a6e0b9f77bda86ec6da478da9932a0dc242e3a979a2318f02c47dcd3023b899615
|
7
|
+
data.tar.gz: 9f52cef3917dc571e3edd7bad14b6e3d8a3debd7da08dfa480f7b3861db7fbe23c63a4b7eb06c11f7322eec7176a7f08dcee29e216d5b7d6a51ef96ea484d470
|
data/.rubocop.yml
CHANGED
@@ -2,7 +2,64 @@ inherit_from: .rubocop_todo.yml
|
|
2
2
|
|
3
3
|
AllCops:
|
4
4
|
NewCops: enable
|
5
|
+
DisabledByDefault: true
|
5
6
|
|
6
7
|
require:
|
7
8
|
- rubocop-rake
|
8
9
|
- rubocop-rspec
|
10
|
+
|
11
|
+
Style/FrozenStringLiteralComment:
|
12
|
+
Enabled: true
|
13
|
+
EnforcedStyle: never
|
14
|
+
|
15
|
+
Layout/HashAlignment:
|
16
|
+
Enabled: true
|
17
|
+
EnforcedHashRocketStyle: key # キーが全角文字の場合が多いため
|
18
|
+
|
19
|
+
Lint/AssignmentInCondition:
|
20
|
+
Enabled: true
|
21
|
+
|
22
|
+
Lint/DuplicateBranch:
|
23
|
+
Enabled: false # FIXME
|
24
|
+
|
25
|
+
Lint/UnderscorePrefixedVariableName:
|
26
|
+
Enabled: true
|
27
|
+
|
28
|
+
Naming/AccessorMethodName:
|
29
|
+
Enabled: true
|
30
|
+
|
31
|
+
RSpec/DescribedClass:
|
32
|
+
Enabled: true
|
33
|
+
|
34
|
+
Style/ClassAndModuleChildren:
|
35
|
+
Enabled: true
|
36
|
+
|
37
|
+
Style/Encoding:
|
38
|
+
Enabled: true
|
39
|
+
|
40
|
+
Style/ExpandPathArguments:
|
41
|
+
Enabled: true
|
42
|
+
|
43
|
+
Style/HashLikeCase:
|
44
|
+
Enabled: true
|
45
|
+
|
46
|
+
Style/NegatedIf:
|
47
|
+
Enabled: true
|
48
|
+
|
49
|
+
Style/RedundantAssignment:
|
50
|
+
Enabled: true
|
51
|
+
|
52
|
+
Style/RedundantReturn:
|
53
|
+
Enabled: true
|
54
|
+
|
55
|
+
Style/RescueStandardError:
|
56
|
+
Enabled: true
|
57
|
+
|
58
|
+
Style/SafeNavigation:
|
59
|
+
Enabled: true
|
60
|
+
|
61
|
+
Style/StringLiterals:
|
62
|
+
Enabled: true
|
63
|
+
|
64
|
+
Style/GuardClause:
|
65
|
+
Enabled: true
|
data/.rubocop_todo.yml
CHANGED
@@ -1,460 +1,7 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2023-06-18 08:39:04 UTC using RuboCop version 1.48.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
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
|
-
|
9
|
-
# Offense count: 3
|
10
|
-
# This cop supports safe autocorrection (--autocorrect).
|
11
|
-
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
|
12
|
-
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
|
13
|
-
Bundler/OrderedGems:
|
14
|
-
Exclude:
|
15
|
-
- 'Gemfile'
|
16
|
-
|
17
|
-
# Offense count: 5
|
18
|
-
# This cop supports safe autocorrection (--autocorrect).
|
19
|
-
Layout/EmptyLineAfterGuardClause:
|
20
|
-
Exclude:
|
21
|
-
- 'lib/jkf.rb'
|
22
|
-
- 'lib/jkf/converter/csa.rb'
|
23
|
-
- 'lib/jkf/parser/base.rb'
|
24
|
-
- 'lib/jkf/parser/ki2.rb'
|
25
|
-
- 'lib/jkf/parser/kif.rb'
|
26
|
-
|
27
|
-
# Offense count: 1
|
28
|
-
# This cop supports safe autocorrection (--autocorrect).
|
29
|
-
Layout/EmptyLineAfterMagicComment:
|
30
|
-
Exclude:
|
31
|
-
- 'jkf.gemspec'
|
32
|
-
|
33
|
-
# Offense count: 2
|
34
|
-
# This cop supports safe autocorrection (--autocorrect).
|
35
|
-
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
36
|
-
# SupportedHashRocketStyles: key, separator, table
|
37
|
-
# SupportedColonStyles: key, separator, table
|
38
|
-
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
39
|
-
Layout/HashAlignment:
|
40
|
-
Exclude:
|
41
|
-
- 'spec/jkf/converter/kif_spec.rb'
|
42
|
-
|
43
|
-
# Offense count: 35
|
44
|
-
# This cop supports safe autocorrection (--autocorrect).
|
45
|
-
Layout/HeredocIndentation:
|
46
|
-
Exclude:
|
47
|
-
- 'spec/jkf/converter/kif_spec.rb'
|
48
|
-
- 'spec/jkf/parser/csa_spec.rb'
|
49
|
-
- 'spec/jkf/parser/ki2_spec.rb'
|
50
|
-
- 'spec/jkf/parser/kif_spec.rb'
|
51
|
-
|
52
|
-
# Offense count: 2
|
53
|
-
# This cop supports safe autocorrection (--autocorrect).
|
54
|
-
# Configuration parameters: EnforcedStyle.
|
55
|
-
# SupportedStyles: symmetrical, new_line, same_line
|
56
|
-
Layout/MultilineHashBraceLayout:
|
57
|
-
Exclude:
|
58
|
-
- 'spec/jkf/parser/ki2_spec.rb'
|
59
|
-
- 'spec/jkf/parser/kif_spec.rb'
|
60
|
-
|
61
|
-
# Offense count: 10
|
62
|
-
# This cop supports safe autocorrection (--autocorrect).
|
63
|
-
# Configuration parameters: EnforcedStyle.
|
64
|
-
# SupportedStyles: require_no_space, require_space
|
65
|
-
Layout/SpaceInLambdaLiteral:
|
66
|
-
Exclude:
|
67
|
-
- 'lib/jkf/parser/csa.rb'
|
68
|
-
- 'lib/jkf/parser/ki2.rb'
|
69
|
-
|
70
|
-
# Offense count: 58
|
71
|
-
# This cop supports safe autocorrection (--autocorrect).
|
72
|
-
# Configuration parameters: AllowInHeredoc.
|
73
|
-
Layout/TrailingWhitespace:
|
74
|
-
Exclude:
|
75
|
-
- 'lib/jkf/converter/base.rb'
|
76
|
-
- 'lib/jkf/parser/kifuable.rb'
|
77
|
-
- 'spec/jkf/converter/kif_spec.rb'
|
78
|
-
- 'spec/jkf/parser/csa_spec.rb'
|
79
|
-
- 'spec/jkf/parser/kif_spec.rb'
|
80
|
-
|
81
|
-
# Offense count: 2
|
82
|
-
# Configuration parameters: AllowSafeAssignment.
|
83
|
-
Lint/AssignmentInCondition:
|
84
|
-
Exclude:
|
85
|
-
- 'lib/jkf/converter/kifuable.rb'
|
86
|
-
- 'lib/jkf/parser/base.rb'
|
87
|
-
|
88
|
-
# Offense count: 22
|
89
|
-
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
|
90
|
-
Lint/DuplicateBranch:
|
91
|
-
Exclude:
|
92
|
-
- 'lib/jkf/parser/csa.rb'
|
93
|
-
- 'lib/jkf/parser/ki2.rb'
|
94
|
-
- 'lib/jkf/parser/kif.rb'
|
95
|
-
- 'lib/jkf/parser/kifuable.rb'
|
96
|
-
|
97
|
-
# Offense count: 2
|
98
|
-
# Configuration parameters: AllowKeywordBlockArguments.
|
99
|
-
Lint/UnderscorePrefixedVariableName:
|
100
|
-
Exclude:
|
101
|
-
- 'lib/jkf/parser/kif.rb'
|
102
|
-
- 'lib/jkf/parser/kifuable.rb'
|
103
|
-
|
104
|
-
# Offense count: 1
|
105
|
-
# This cop supports safe autocorrection (--autocorrect).
|
106
|
-
Lint/UnifiedInteger:
|
107
|
-
Exclude:
|
108
|
-
- 'lib/jkf/parser/kif.rb'
|
109
|
-
|
110
|
-
# Offense count: 51
|
111
|
-
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
|
112
|
-
Metrics/AbcSize:
|
113
|
-
Max: 50
|
114
|
-
|
115
|
-
# Offense count: 13
|
116
|
-
# Configuration parameters: CountBlocks.
|
117
|
-
Metrics/BlockNesting:
|
118
|
-
Max: 8
|
119
|
-
|
120
|
-
# Offense count: 5
|
121
|
-
# Configuration parameters: CountComments, CountAsOne.
|
122
|
-
Metrics/ClassLength:
|
123
|
-
Max: 738
|
124
|
-
|
125
|
-
# Offense count: 21
|
126
|
-
# Configuration parameters: IgnoredMethods.
|
127
|
-
Metrics/CyclomaticComplexity:
|
128
|
-
Max: 18
|
129
|
-
|
130
|
-
# Offense count: 91
|
131
|
-
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
132
|
-
Metrics/MethodLength:
|
133
|
-
Max: 64
|
134
|
-
|
135
|
-
# Offense count: 2
|
136
|
-
# Configuration parameters: CountComments, CountAsOne.
|
137
|
-
Metrics/ModuleLength:
|
138
|
-
Max: 558
|
139
|
-
|
140
|
-
# Offense count: 1
|
141
|
-
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
|
142
|
-
Metrics/ParameterLists:
|
143
|
-
Max: 6
|
144
|
-
|
145
|
-
# Offense count: 31
|
146
|
-
# Configuration parameters: IgnoredMethods.
|
147
|
-
Metrics/PerceivedComplexity:
|
148
|
-
Max: 24
|
149
|
-
|
150
|
-
# Offense count: 1
|
151
|
-
Naming/AccessorMethodName:
|
152
|
-
Exclude:
|
153
|
-
- 'lib/jkf/parser/csa.rb'
|
154
|
-
|
155
|
-
# Offense count: 34
|
156
|
-
# Configuration parameters: ForbiddenDelimiters.
|
157
|
-
# ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
|
158
|
-
Naming/HeredocDelimiterNaming:
|
159
|
-
Exclude:
|
160
|
-
- 'spec/jkf/parser/csa_spec.rb'
|
161
|
-
- 'spec/jkf/parser/ki2_spec.rb'
|
162
|
-
- 'spec/jkf/parser/kif_spec.rb'
|
163
|
-
|
164
|
-
# Offense count: 17
|
165
|
-
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
166
|
-
# AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
|
167
|
-
Naming/MethodParameterName:
|
168
|
-
Exclude:
|
169
|
-
- 'lib/jkf/converter/kif.rb'
|
170
|
-
- 'lib/jkf/converter/kifuable.rb'
|
171
|
-
- 'lib/jkf/parser/ki2.rb'
|
172
|
-
- 'lib/jkf/parser/kif.rb'
|
173
|
-
- 'lib/jkf/parser/kifuable.rb'
|
174
|
-
- 'spec/spec_helper.rb'
|
175
|
-
|
176
|
-
# Offense count: 43
|
177
|
-
# Configuration parameters: Prefixes.
|
178
|
-
# Prefixes: when, with, without
|
179
|
-
RSpec/ContextWording:
|
180
|
-
Exclude:
|
181
|
-
- 'spec/jkf/parser/csa_spec.rb'
|
182
|
-
- 'spec/jkf/parser/ki2_spec.rb'
|
183
|
-
- 'spec/jkf/parser/kif_spec.rb'
|
184
|
-
|
185
|
-
# Offense count: 8
|
186
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
187
|
-
# Configuration parameters: SkipBlocks, EnforcedStyle.
|
188
|
-
# SupportedStyles: described_class, explicit
|
189
|
-
RSpec/DescribedClass:
|
190
|
-
Exclude:
|
191
|
-
- 'spec/jkf/converter/csa_spec.rb'
|
192
|
-
- 'spec/jkf/converter/ki2_spec.rb'
|
193
|
-
- 'spec/jkf/converter/kif_spec.rb'
|
194
|
-
- 'spec/jkf/parser/csa_spec.rb'
|
195
|
-
- 'spec/jkf/parser/ki2_spec.rb'
|
196
|
-
- 'spec/jkf/parser/kif_spec.rb'
|
197
|
-
- 'spec/jkf_spec.rb'
|
198
|
-
|
199
|
-
# Offense count: 45
|
200
|
-
# Configuration parameters: CountAsOne.
|
201
|
-
RSpec/ExampleLength:
|
202
|
-
Max: 51
|
203
|
-
|
204
|
-
# Offense count: 1
|
205
|
-
RSpec/MultipleExpectations:
|
206
|
-
Max: 2
|
207
|
-
|
208
|
-
# Offense count: 1
|
209
|
-
# Configuration parameters: AllowSubject.
|
210
|
-
RSpec/MultipleMemoizedHelpers:
|
211
|
-
Max: 6
|
212
|
-
|
213
|
-
# Offense count: 48
|
214
|
-
# Configuration parameters: IgnoreSharedExamples.
|
215
|
-
RSpec/NamedSubject:
|
216
|
-
Exclude:
|
217
|
-
- 'spec/jkf/converter/kif_spec.rb'
|
218
|
-
- 'spec/jkf/parser/csa_spec.rb'
|
219
|
-
- 'spec/jkf/parser/ki2_spec.rb'
|
220
|
-
- 'spec/jkf/parser/kif_spec.rb'
|
221
|
-
- 'spec/jkf_spec.rb'
|
222
|
-
|
223
|
-
# Offense count: 8
|
224
|
-
RSpec/NestedGroups:
|
225
|
-
Max: 4
|
226
|
-
|
227
|
-
# Offense count: 2
|
228
|
-
# This cop supports safe autocorrection (--autocorrect).
|
229
|
-
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
|
230
|
-
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
|
231
|
-
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
232
|
-
# FunctionalMethods: let, let!, subject, watch
|
233
|
-
# IgnoredMethods: lambda, proc, it
|
234
|
-
Style/BlockDelimiters:
|
235
|
-
Exclude:
|
236
|
-
- 'spec/jkf/converter/kif_spec.rb'
|
237
|
-
|
238
|
-
# Offense count: 10
|
239
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
240
|
-
# Configuration parameters: EnforcedStyle.
|
241
|
-
# SupportedStyles: nested, compact
|
242
|
-
Style/ClassAndModuleChildren:
|
243
|
-
Exclude:
|
244
|
-
- 'lib/jkf/converter/base.rb'
|
245
|
-
- 'lib/jkf/converter/csa.rb'
|
246
|
-
- 'lib/jkf/converter/ki2.rb'
|
247
|
-
- 'lib/jkf/converter/kif.rb'
|
248
|
-
- 'lib/jkf/converter/kifuable.rb'
|
249
|
-
- 'lib/jkf/parser/base.rb'
|
250
|
-
- 'lib/jkf/parser/csa.rb'
|
251
|
-
- 'lib/jkf/parser/ki2.rb'
|
252
|
-
- 'lib/jkf/parser/kif.rb'
|
253
|
-
- 'lib/jkf/parser/kifuable.rb'
|
254
|
-
|
255
|
-
# Offense count: 1
|
256
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
257
|
-
# Configuration parameters: EnforcedStyle.
|
258
|
-
# SupportedStyles: allowed_in_returns, forbidden
|
259
|
-
Style/DoubleNegation:
|
260
|
-
Exclude:
|
261
|
-
- 'lib/jkf/parser/kif.rb'
|
262
|
-
|
263
|
-
# Offense count: 4
|
264
|
-
# This cop supports safe autocorrection (--autocorrect).
|
265
|
-
Style/Encoding:
|
266
|
-
Exclude:
|
267
|
-
- 'jkf.gemspec'
|
268
|
-
- 'lib/jkf/parser/csa.rb'
|
269
|
-
- 'lib/jkf/parser/ki2.rb'
|
270
|
-
- 'lib/jkf/parser/kif.rb'
|
271
|
-
|
272
|
-
# Offense count: 2
|
273
|
-
# This cop supports safe autocorrection (--autocorrect).
|
274
|
-
Style/ExpandPathArguments:
|
275
|
-
Exclude:
|
276
|
-
- 'jkf.gemspec'
|
277
|
-
- 'spec/spec_helper.rb'
|
278
|
-
|
279
|
-
# Offense count: 6
|
280
|
-
# This cop supports safe autocorrection (--autocorrect).
|
281
|
-
# Configuration parameters: EnforcedStyle.
|
282
|
-
# SupportedStyles: format, sprintf, percent
|
283
|
-
Style/FormatString:
|
284
|
-
Exclude:
|
285
|
-
- 'lib/jkf/converter/csa.rb'
|
286
|
-
- 'lib/jkf/converter/kif.rb'
|
287
|
-
- 'lib/jkf/converter/kifuable.rb'
|
288
|
-
|
289
|
-
# Offense count: 9
|
290
|
-
# This cop supports safe autocorrection (--autocorrect).
|
291
|
-
# Configuration parameters: MaxUnannotatedPlaceholdersAllowed, IgnoredMethods.
|
292
|
-
# SupportedStyles: annotated, template, unannotated
|
293
|
-
Style/FormatStringToken:
|
294
|
-
EnforcedStyle: unannotated
|
295
|
-
|
296
|
-
# Offense count: 27
|
297
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
298
|
-
# Configuration parameters: EnforcedStyle.
|
299
|
-
# SupportedStyles: always, always_true, never
|
300
|
-
Style/FrozenStringLiteralComment:
|
301
|
-
Enabled: false
|
302
|
-
|
303
|
-
# Offense count: 1
|
304
|
-
# Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
|
305
|
-
Style/GuardClause:
|
306
|
-
Exclude:
|
307
|
-
- 'lib/jkf/parser/base.rb'
|
308
|
-
|
309
|
-
# Offense count: 3
|
310
|
-
# Configuration parameters: MinBranchesCount.
|
311
|
-
Style/HashLikeCase:
|
312
|
-
Exclude:
|
313
|
-
- 'lib/jkf/converter/csa.rb'
|
314
|
-
- 'lib/jkf/converter/kif.rb'
|
315
|
-
- 'lib/jkf/converter/kifuable.rb'
|
316
|
-
|
317
|
-
# Offense count: 4
|
318
|
-
# This cop supports safe autocorrection (--autocorrect).
|
319
|
-
Style/IfUnlessModifier:
|
320
|
-
Exclude:
|
321
|
-
- 'lib/jkf/converter/csa.rb'
|
322
|
-
- 'lib/jkf/parser/kif.rb'
|
323
|
-
|
324
|
-
# Offense count: 10
|
325
|
-
# This cop supports safe autocorrection (--autocorrect).
|
326
|
-
# Configuration parameters: EnforcedStyle.
|
327
|
-
# SupportedStyles: line_count_dependent, lambda, literal
|
328
|
-
Style/Lambda:
|
329
|
-
Exclude:
|
330
|
-
- 'lib/jkf/parser/csa.rb'
|
331
|
-
- 'lib/jkf/parser/ki2.rb'
|
332
|
-
|
333
|
-
# Offense count: 6
|
334
|
-
# This cop supports safe autocorrection (--autocorrect).
|
335
|
-
# Configuration parameters: EnforcedStyle.
|
336
|
-
# SupportedStyles: both, prefix, postfix
|
337
|
-
Style/NegatedIf:
|
338
|
-
Exclude:
|
339
|
-
- 'lib/jkf/converter/ki2.rb'
|
340
|
-
- 'lib/jkf/converter/kif.rb'
|
341
|
-
- 'lib/jkf/parser/csa.rb'
|
342
|
-
- 'lib/jkf/parser/ki2.rb'
|
343
|
-
- 'lib/jkf/parser/kif.rb'
|
344
|
-
|
345
|
-
# Offense count: 1
|
346
|
-
# This cop supports safe autocorrection (--autocorrect).
|
347
|
-
# Configuration parameters: EnforcedStyle, MinBodyLength.
|
348
|
-
# SupportedStyles: skip_modifier_ifs, always
|
349
|
-
Style/Next:
|
350
|
-
Exclude:
|
351
|
-
- 'lib/jkf/converter/kifuable.rb'
|
352
|
-
|
353
|
-
# Offense count: 10
|
354
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
355
|
-
# Configuration parameters: EnforcedStyle, IgnoredMethods.
|
356
|
-
# SupportedStyles: predicate, comparison
|
357
|
-
Style/NumericPredicate:
|
358
|
-
Exclude:
|
359
|
-
- 'spec/**/*'
|
360
|
-
- 'lib/jkf/converter/csa.rb'
|
361
|
-
- 'lib/jkf/converter/ki2.rb'
|
362
|
-
- 'lib/jkf/converter/kifuable.rb'
|
363
|
-
- 'lib/jkf/parser/base.rb'
|
364
|
-
- 'lib/jkf/parser/csa.rb'
|
365
|
-
|
366
|
-
# Offense count: 3
|
367
|
-
# This cop supports safe autocorrection (--autocorrect).
|
368
|
-
# Configuration parameters: PreferredDelimiters.
|
369
|
-
Style/PercentLiteralDelimiters:
|
370
|
-
Exclude:
|
371
|
-
- 'Guardfile'
|
372
|
-
- 'lib/jkf/parser/kifuable.rb'
|
373
|
-
|
374
|
-
# Offense count: 5
|
375
|
-
# This cop supports safe autocorrection (--autocorrect).
|
376
|
-
Style/RedundantAssignment:
|
377
|
-
Exclude:
|
378
|
-
- 'lib/jkf/parser/csa.rb'
|
379
|
-
- 'lib/jkf/parser/ki2.rb'
|
380
|
-
- 'lib/jkf/parser/kif.rb'
|
381
|
-
|
382
|
-
# Offense count: 1
|
383
|
-
# This cop supports safe autocorrection (--autocorrect).
|
384
|
-
# Configuration parameters: AllowMultipleReturnValues.
|
385
|
-
Style/RedundantReturn:
|
386
|
-
Exclude:
|
387
|
-
- 'lib/jkf/parser/base.rb'
|
388
|
-
|
389
|
-
# Offense count: 1
|
390
|
-
# This cop supports safe autocorrection (--autocorrect).
|
391
|
-
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
|
392
|
-
# SupportedStyles: slashes, percent_r, mixed
|
393
|
-
Style/RegexpLiteral:
|
394
|
-
Exclude:
|
395
|
-
- 'Guardfile'
|
396
|
-
|
397
|
-
# Offense count: 1
|
398
|
-
# This cop supports safe autocorrection (--autocorrect).
|
399
|
-
# Configuration parameters: EnforcedStyle.
|
400
|
-
# SupportedStyles: implicit, explicit
|
401
|
-
Style/RescueStandardError:
|
402
|
-
Exclude:
|
403
|
-
- 'lib/jkf.rb'
|
404
|
-
|
405
|
-
# Offense count: 2
|
406
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
407
|
-
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
|
408
|
-
# AllowedMethods: present?, blank?, presence, try, try!
|
409
|
-
Style/SafeNavigation:
|
410
|
-
Exclude:
|
411
|
-
- 'lib/jkf/converter/kifuable.rb'
|
412
|
-
- 'lib/jkf/parser/kif.rb'
|
413
|
-
|
414
|
-
# Offense count: 1
|
415
|
-
# This cop supports safe autocorrection (--autocorrect).
|
416
|
-
# Configuration parameters: AllowIfMethodIsEmpty.
|
417
|
-
Style/SingleLineMethods:
|
418
|
-
Exclude:
|
419
|
-
- 'lib/jkf/parser/base.rb'
|
420
|
-
|
421
|
-
# Offense count: 4
|
422
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
423
|
-
Style/SlicingWithRange:
|
424
|
-
Exclude:
|
425
|
-
- 'lib/jkf/parser/ki2.rb'
|
426
|
-
- 'lib/jkf/parser/kif.rb'
|
427
|
-
|
428
|
-
# Offense count: 14
|
429
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
430
|
-
# Configuration parameters: Mode.
|
431
|
-
Style/StringConcatenation:
|
432
|
-
Exclude:
|
433
|
-
- 'lib/jkf/converter/csa.rb'
|
434
|
-
- 'lib/jkf/converter/ki2.rb'
|
435
|
-
- 'lib/jkf/converter/kif.rb'
|
436
|
-
- 'lib/jkf/converter/kifuable.rb'
|
437
|
-
- 'lib/jkf/parser/kif.rb'
|
438
|
-
- 'spec/jkf/converter/csa_spec.rb'
|
439
|
-
|
440
|
-
# Offense count: 4001
|
441
|
-
# This cop supports safe autocorrection (--autocorrect).
|
442
|
-
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
443
|
-
# SupportedStyles: single_quotes, double_quotes
|
444
|
-
Style/StringLiterals:
|
445
|
-
Enabled: false
|
446
|
-
|
447
|
-
# Offense count: 5
|
448
|
-
# This cop supports safe autocorrection (--autocorrect).
|
449
|
-
# Configuration parameters: WordRegex.
|
450
|
-
# SupportedStyles: percent, brackets
|
451
|
-
Style/WordArray:
|
452
|
-
EnforcedStyle: percent
|
453
|
-
MinSize: 3
|
454
|
-
|
455
|
-
# Offense count: 16
|
456
|
-
# This cop supports safe autocorrection (--autocorrect).
|
457
|
-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
|
458
|
-
# URISchemes: http, https
|
459
|
-
Layout/LineLength:
|
460
|
-
Max: 122
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [0.5.1] - 2023-06-24
|
11
|
+
|
12
|
+
### Changed
|
13
|
+
|
14
|
+
* Update required Ruby version to 3.0 (security fix only stable
|
15
|
+
version), although the library itself might works with older Ruby
|
16
|
+
versions.
|
17
|
+
|
18
|
+
### Others
|
19
|
+
|
20
|
+
* Refactor parser with StringScanner. This makes parser approx. 5x
|
21
|
+
faster.
|
22
|
+
* Fixed link to json-kifu-format
|
23
|
+
* Remove Inch CI link on readmes
|
24
|
+
* Lint Ruby sources
|
25
|
+
* Add benchmark script
|
26
|
+
|
10
27
|
## [0.5.0] - 2023-06-18
|
11
28
|
|
12
29
|
### Changed
|
data/Gemfile
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
source
|
1
|
+
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
gem
|
5
|
+
gem 'rake'
|
6
6
|
|
7
7
|
group :development do
|
8
|
-
gem
|
9
|
-
gem
|
8
|
+
gem 'redcarpet', require: false
|
9
|
+
gem 'yard', require: false
|
10
10
|
|
11
|
-
gem
|
12
|
-
gem
|
13
|
-
gem
|
14
|
-
gem
|
11
|
+
gem 'guard-rubocop', require: false
|
12
|
+
gem 'rubocop', '~> 1.32.0', require: false
|
13
|
+
gem 'rubocop-rake', '~> 0.6.0', require: false
|
14
|
+
gem 'rubocop-rspec', '~> 2.12', require: false
|
15
15
|
end
|
16
16
|
|
17
17
|
group :test do
|
18
|
-
gem
|
19
|
-
gem
|
20
|
-
gem
|
18
|
+
gem 'guard-rspec', require: false
|
19
|
+
gem 'rspec', '~> 3.0', require: false
|
20
|
+
gem 'simplecov', require: false
|
21
21
|
end
|
data/Guardfile
CHANGED
@@ -3,8 +3,8 @@ scope(groups: %w(specs))
|
|
3
3
|
directories %w(spec lib)
|
4
4
|
|
5
5
|
group :specs, halt_on_fail: true do
|
6
|
-
guard :rspec, cmd:
|
7
|
-
require
|
6
|
+
guard :rspec, cmd: 'bundle exec rspec', failed_mode: :keep do
|
7
|
+
require 'guard/rspec/dsl'
|
8
8
|
dsl = Guard::RSpec::Dsl.new(self)
|
9
9
|
|
10
10
|
# RSpec files
|
@@ -18,7 +18,7 @@ group :specs, halt_on_fail: true do
|
|
18
18
|
dsl.watch_spec_files_for(ruby.lib_files)
|
19
19
|
end
|
20
20
|
|
21
|
-
guard :rubocop, all_on_start: false, cli:
|
21
|
+
guard :rubocop, all_on_start: false, cli: '--rails' do
|
22
22
|
watch(%r{.+\.rb$}) { |m| m[0] }
|
23
23
|
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
|
24
24
|
end
|
data/README.en.md
CHANGED
@@ -4,14 +4,13 @@ Version](https://badge.fury.io/rb/jkf.svg)](https://badge.fury.io/rb/jkf)
|
|
4
4
|
[](https://travis-ci.org/iyuuya/jkf)
|
6
6
|
[](https://github.com/iyuuya/jkf/actions/workflows/ci.yml)
|
7
|
-
[](http://inch-ci.org/github/iyuuya/jkf)
|
9
7
|
|
10
|
-
jkf is a Ruby port of
|
11
|
-
[json-kifu-format](https://github.com/na2hiro/json-kifu-format).
|
8
|
+
jkf is a Ruby port of [json-kifu-format][jkf].
|
12
9
|
It supports both of the conversion from KIF, KI2, or CSA to jkf, and the one
|
13
10
|
from jkf to KIF, KI2, or CSA.
|
14
11
|
|
12
|
+
[jkf]:https://github.com/na2hiro/Kifu-for-JS/tree/master/packages/json-kifu-format
|
13
|
+
|
15
14
|
## Installation
|
16
15
|
|
17
16
|
If you install this gem to your application (with Bundler), add this to
|
data/README.md
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
# Jkf
|
2
|
-
[](https://badge.fury.io/rb/jkf) [](https://travis-ci.org/iyuuya/jkf) [](https://github.com/iyuuya/jkf/actions/workflows/ci.yml)
|
2
|
+
[](https://badge.fury.io/rb/jkf) [](https://travis-ci.org/iyuuya/jkf) [](https://github.com/iyuuya/jkf/actions/workflows/ci.yml)
|
3
3
|
|
4
|
-
jkfはJSON棋譜フォーマット(
|
4
|
+
jkfは[JSON棋譜フォーマット (JKF)][jkf]をRubyに移植したものです。
|
5
5
|
KIF, KI2, CSAをパースしJKFへ変換、JKFからKIF, KI2, CSAへの変換に対応しています。
|
6
6
|
|
7
|
+
[jkf]: https://github.com/na2hiro/Kifu-for-JS/tree/master/packages/json-kifu-format
|
8
|
+
|
7
9
|
## Installation
|
8
10
|
|
9
11
|
アプリケーションにインストールする場合(bundlerを使用する場合)、Gemfileに以下のように記述してください。
|
data/Rakefile
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rspec/core/rake_task'
|
3
3
|
|
4
4
|
RSpec::Core::RakeTask.new(:spec)
|
5
5
|
|
6
6
|
task default: :spec
|
7
7
|
|
8
|
-
desc
|
8
|
+
desc 'translate documents'
|
9
9
|
task :translate do
|
10
|
-
sh
|
10
|
+
sh 'po4a po4a.cfg'
|
11
11
|
end
|
data/bench.rb
ADDED