arxutils_sqlite3 0.1.53 → 0.1.55

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bd619405f651016b19a09bb7dc65fe14eed439e25a419a24784774c3675f88a7
4
- data.tar.gz: 2abf287f96ca75b75a41da86d74bf9269acb76ac380f7c55f9668093a4d4ccad
3
+ metadata.gz: 5088d67aaf0d344baa38409d59917374132f161d7e3f9f24d4e947dfe83ae4ce
4
+ data.tar.gz: 405fdb8388ab606d8c2036f26966707bf05dddc498cc50ebb4730d0fcf03f73a
5
5
  SHA512:
6
- metadata.gz: 23faf1f7084d060cf94778f3fcaeb4a3f2fd5f55d40607dd3133a032549140b30f02a50c65a2319a696c5324c4752dfa48e35041e90e3e4be3250c6d1d4ba37e
7
- data.tar.gz: 662f292981fb7e3749c90d11f5ef29122491bff8b37b83dc0b03f66cf73f81db178179d3c41a1a24c82066181f6c2e772cdb4101aae8fb7ef79167f00696de3a
6
+ metadata.gz: 48294fc512c0ea001f5f4e2f2adba8c4e8aea126c921fcdc0e769c70fce1530cf084778b65133cd0402b8c2ca728e8bf971f364f6d7f51451785e41d8808b7e8
7
+ data.tar.gz: 8a0a987962aad35da0c289b4f716abf70f626b35ad5b5c739981240cebbab08d68f98c9ac61c4c22bd1a1b89da195abae806642a48cfd6e39e56df007c9a7bd2
data/.rubocop_todo.yml CHANGED
@@ -1,319 +1,64 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2022-09-15 09:40:53 UTC using RuboCop version 1.36.0.
3
+ # on 2022-09-23 07:28:29 UTC using RuboCop version 1.36.0.
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
8
 
9
- # Offense count: 2
10
- # This cop supports safe autocorrection (--autocorrect).
11
- # Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
12
- # Include: **/*.gemspec
13
- Gemspec/OrderedDependencies:
14
- Exclude:
15
- #- 'arxutils_sqlite3.gemspec'
16
-
17
- # Offense count: 1
18
- # Configuration parameters: Include.
19
- # Include: **/*.gemspec
20
- Gemspec/RequiredRubyVersion:
21
- Exclude:
22
- #- 'arxutils_sqlite3.gemspec'
23
-
24
- # Offense count: 2
25
- # This cop supports safe autocorrection (--autocorrect).
26
- # Configuration parameters: EnforcedStyle, IndentationWidth.
27
- # SupportedStyles: with_first_element, with_fixed_indentation
28
- Layout/ArrayAlignment:
29
- Exclude:
30
- #- 'lib/arxutils_sqlite3/migrate.rb'
31
-
32
- # Offense count: 1
33
- # This cop supports safe autocorrection (--autocorrect).
34
- Layout/BlockEndNewline:
35
- Exclude:
36
- #- 'lib/arxutils_sqlite3/migrate.rb'
37
-
38
- # Offense count: 1
39
- # This cop supports safe autocorrection (--autocorrect).
40
- # Configuration parameters: EnforcedStyle, IndentOneStep, IndentationWidth.
41
- # SupportedStyles: case, end
42
- Layout/CaseIndentation:
43
- Exclude:
44
- #- 'lib/arxutils_sqlite3/migrate.rb'
45
-
46
- # Offense count: 1
47
- # This cop supports safe autocorrection (--autocorrect).
48
- Layout/ClosingParenthesisIndentation:
49
- Exclude:
50
- #- 'lib/arxutils_sqlite3/migrate.rb'
51
-
52
- # Offense count: 4
53
- # This cop supports safe autocorrection (--autocorrect).
54
- # Configuration parameters: AllowForAlignment.
55
- Layout/CommentIndentation:
56
- Exclude:
57
- #- 'Gemfile'
58
- #- 'lib/arxutils_sqlite3/migrate.rb'
59
-
60
- # Offense count: 1
61
- # This cop supports safe autocorrection (--autocorrect).
62
- # Configuration parameters: AllowBorderComment, AllowMarginComment.
63
- Layout/EmptyComment:
64
- Exclude:
65
- # - 'lib/arxutils_sqlite3/dbutil.rb'
66
-
67
- # Offense count: 1
68
- # This cop supports safe autocorrection (--autocorrect).
69
- Layout/EmptyLineAfterMagicComment:
70
- Exclude:
71
- # - 'lib/arxutils_sqlite3.rb'
72
-
73
- # Offense count: 1
74
- # This cop supports safe autocorrection (--autocorrect).
75
- # Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
76
- Layout/EmptyLineBetweenDefs:
77
- Exclude:
78
- # - 'lib/arxutils_sqlite3/config.rb'
79
-
80
- # Offense count: 2
81
- # This cop supports safe autocorrection (--autocorrect).
82
- Layout/EmptyLines:
83
- Exclude:
84
- # - 'lib/arxutils_sqlite3_rake_task.rb'
85
-
86
- # Offense count: 1
87
- # This cop supports safe autocorrection (--autocorrect).
88
- # Configuration parameters: AllowAliasSyntax, AllowedMethods.
89
- # AllowedMethods: alias_method, public, protected, private
90
- Layout/EmptyLinesAroundAttributeAccessor:
91
- Exclude:
92
- # - 'lib/arxutils_sqlite3/migrate.rb'
93
-
94
- # Offense count: 1
95
- # This cop supports safe autocorrection (--autocorrect).
96
- # Configuration parameters: EnforcedStyle.
97
- # SupportedStyles: empty_lines, no_empty_lines
98
- Layout/EmptyLinesAroundBlockBody:
99
- Exclude:
100
- # - 'Gemfile'
101
-
102
9
  # Offense count: 1
103
10
  # This cop supports safe autocorrection (--autocorrect).
104
11
  # Configuration parameters: EnforcedStyle.
105
12
  # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
106
13
  Layout/EmptyLinesAroundModuleBody:
107
14
  Exclude:
108
- # - 'lib/dbacrecord.rb'
109
-
110
- # Offense count: 1
111
- # This cop supports safe autocorrection (--autocorrect).
112
- # Configuration parameters: EnforcedStyleAlignWith, Severity.
113
- # SupportedStylesAlignWith: keyword, variable, start_of_line
114
- Layout/EndAlignment:
115
- Exclude:
116
- # - 'lib/arxutils_sqlite3/migrate.rb'
117
-
118
- # Offense count: 3
119
- # This cop supports safe autocorrection (--autocorrect).
120
- # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
121
- Layout/ExtraSpacing:
122
- Exclude:
123
- # - 'lib/arxutils_sqlite3/config.rb'
15
+ - 'lib/dbacrecord.rb'
124
16
 
125
17
  # Offense count: 1
126
18
  # This cop supports safe autocorrection (--autocorrect).
127
19
  Layout/HeredocIndentation:
128
20
  Exclude:
129
- # - 'db/migrate/050_create_currentennblist.rb'
21
+ - 'db/migrate/050_create_currentxenoplist.rb'
130
22
 
131
23
  # Offense count: 1
132
24
  # This cop supports safe autocorrection (--autocorrect).
133
- # Configuration parameters: IndentationWidth, EnforcedStyle.
134
- # SupportedStyles: spaces, tabs
135
- Layout/IndentationStyle:
136
- Exclude:
137
- # - 'Gemfile'
138
-
139
- # Offense count: 2
140
- # This cop supports safe autocorrection (--autocorrect).
141
25
  # Configuration parameters: Width, AllowedPatterns, IgnoredPatterns.
142
26
  Layout/IndentationWidth:
143
27
  Exclude:
144
- # - 'Gemfile'
145
- # - 'lib/dbacrecord.rb'
146
-
147
- # Offense count: 29
148
- # This cop supports safe autocorrection (--autocorrect).
149
- # Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment.
150
- Layout/LeadingCommentSpace:
151
- Exclude:
152
- # - 'Gemfile'
153
- # - 'Rakefile'
154
- # - 'arxutils_sqlite3.gemspec'
155
- # - 'exe/arxutils_sqlite3'
156
- # - 'lib/arxutils_sqlite3/arx.rb'
157
- # - 'lib/arxutils_sqlite3/cli.rb'
158
- # - 'lib/arxutils_sqlite3/config.rb'
159
- # - 'lib/arxutils_sqlite3/dbutil/dbconnect.rb'
160
- # - 'lib/arxutils_sqlite3/migrate.rb'
161
-
162
- # Offense count: 1
163
- # This cop supports safe autocorrection (--autocorrect).
164
- Layout/LeadingEmptyLines:
165
- Exclude:
166
- # - 'lib/arxutils_sqlite3_rake_task.rb'
167
-
168
- # Offense count: 1
169
- # This cop supports safe autocorrection (--autocorrect).
170
- # Configuration parameters: EnforcedStyle.
171
- # SupportedStyles: symmetrical, new_line, same_line
172
- Layout/MultilineArrayBraceLayout:
173
- Exclude:
174
- # - 'lib/arxutils_sqlite3/migrate.rb'
175
-
176
- # Offense count: 1
177
- # This cop supports safe autocorrection (--autocorrect).
178
- Layout/MultilineBlockLayout:
179
- Exclude:
180
- # - 'lib/arxutils_sqlite3/migrate.rb'
181
-
182
- # Offense count: 2
183
- # This cop supports safe autocorrection (--autocorrect).
184
- # Configuration parameters: EnforcedStyle.
185
- # SupportedStyles: symmetrical, new_line, same_line
186
- Layout/MultilineMethodCallBraceLayout:
187
- Exclude:
188
- # - 'lib/arxutils_sqlite3/migrate.rb'
189
- # - 'lib/arxutils_sqlite3/util.rb'
28
+ - 'lib/dbacrecord.rb'
190
29
 
191
30
  # Offense count: 3
192
31
  # This cop supports safe autocorrection (--autocorrect).
193
- # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
194
- # SupportedStyles: space, no_space
195
- # SupportedStylesForEmptyBraces: space, no_space
196
- Layout/SpaceBeforeBlockBraces:
197
- Exclude:
198
- # - 'lib/arxutils_sqlite3/config.rb'
199
-
200
- # Offense count: 9
201
- # This cop supports safe autocorrection (--autocorrect).
202
32
  Layout/SpaceBeforeComma:
203
33
  Exclude:
204
- # - 'Gemfile'
205
- # - 'arxutils_sqlite3.gemspec'
206
- # - 'lib/arxutils_sqlite3/arx.rb'
207
- # - 'lib/arxutils_sqlite3/config.rb'
208
34
  # - 'lib/dbacrecord.rb'
209
- # - 'spec/arxutils__sqlite3_spec.rb'
210
35
 
211
- # Offense count: 3
212
- # This cop supports safe autocorrection (--autocorrect).
213
- # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
214
- # SupportedStyles: space, no_space
215
- # SupportedStylesForEmptyBraces: space, no_space
216
- Layout/SpaceInsideBlockBraces:
217
- Exclude:
218
- # - 'lib/arxutils_sqlite3/config.rb'
219
-
220
- # Offense count: 4
221
- # This cop supports safe autocorrection (--autocorrect).
222
- # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
223
- # SupportedStyles: space, no_space, compact
224
- # SupportedStylesForEmptyBraces: space, no_space
225
- Layout/SpaceInsideHashLiteralBraces:
226
- Exclude:
227
- # - 'lib/arxutils_sqlite3/config.rb'
228
-
229
- # Offense count: 12
36
+ # Offense count: 2
230
37
  # This cop supports safe autocorrection (--autocorrect).
231
38
  # Configuration parameters: EnforcedStyle.
232
39
  # SupportedStyles: space, compact, no_space
233
40
  Layout/SpaceInsideParens:
234
41
  Exclude:
235
42
  # - 'config/dbsetup.rb'
236
- # - 'lib/arxutils_sqlite3/cli.rb'
237
- # - 'lib/arxutils_sqlite3/config.rb'
238
43
 
239
- # Offense count: 5
240
- # This cop supports safe autocorrection (--autocorrect).
241
- # Configuration parameters: EnforcedStyle.
242
- # SupportedStyles: final_newline, final_blank_line
243
- Layout/TrailingEmptyLines:
244
- Exclude:
245
- # - 'Gemfile'
246
- # - 'Rakefile'
247
- # - 'lib/arxutils_sqlite3.rb'
248
- # - 'lib/arxutils_sqlite3/config.rb'
249
- # - 'lib/arxutils_sqlite3_rake_task.rb'
250
-
251
- # Offense count: 3
44
+ # Offense count: 1
252
45
  # This cop supports safe autocorrection (--autocorrect).
253
46
  # Configuration parameters: AllowInHeredoc.
254
47
  Layout/TrailingWhitespace:
255
48
  Exclude:
256
- # - 'db/migrate/050_create_currentennblist.rb'
257
- # - 'lib/arxutils_sqlite3/config.rb'
258
- # - 'spec/arxutils__sqlite3_spec.rb'
259
-
260
- # Offense count: 1
261
- # Configuration parameters: AllowComments, AllowEmptyLambdas.
262
- Lint/EmptyBlock:
263
- Exclude:
264
- # - 'Gemfile'
265
-
266
- # Offense count: 1
267
- Lint/NestedPercentLiteral:
268
- Exclude:
269
- # - 'lib/template/acrecord/db_scheme/opts.rb'
270
-
271
- # Offense count: 1
272
- # This cop supports safe autocorrection (--autocorrect).
273
- Lint/ScriptPermission:
274
- Exclude:
275
- # - 'lib/arxutils_sqlite3/dbutil/dbconnect.rb'
276
-
277
- # Offense count: 1
278
- # This cop supports safe autocorrection (--autocorrect).
279
- # Configuration parameters: EnforcedStyle.
280
- # SupportedStyles: strict, consistent
281
- Lint/SymbolConversion:
282
- Exclude:
283
- # - 'lib/arxutils_sqlite3/config.rb'
284
-
285
- # Offense count: 2
286
- # This cop supports safe autocorrection (--autocorrect).
287
- # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
288
- Lint/UnusedMethodArgument:
289
- Exclude:
290
- # - 'lib/arxutils_sqlite3/cli.rb'
291
-
292
- # Offense count: 13
293
- Lint/UselessAssignment:
294
- Exclude:
295
- # - 'exe/arxutils_sqlite3'
296
- # - 'lib/arxutils_sqlite3/cli.rb'
297
- # - 'lib/arxutils_sqlite3/config.rb'
298
- # - 'lib/arxutils_sqlite3/hier.rb'
299
- # - 'spec/arxutils__sqlite3_spec.rb'
49
+ - 'db/migrate/050_create_currentxenoplist.rb'
300
50
 
301
51
  # Offense count: 4
302
52
  # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes.
303
53
  Metrics/AbcSize:
304
- Max: 27
54
+ Max: 23
305
55
 
306
56
  # Offense count: 3
307
57
  # Configuration parameters: CountComments, CountAsOne.
308
58
  Metrics/ClassLength:
309
- Max: 173
310
-
311
- # Offense count: 1
312
- # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
313
- Metrics/CyclomaticComplexity:
314
- Max: 8
59
+ Max: 192
315
60
 
316
- # Offense count: 12
61
+ # Offense count: 11
317
62
  # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
318
63
  Metrics/MethodLength:
319
64
  Max: 49
@@ -328,11 +73,6 @@ Metrics/ParameterLists:
328
73
  Metrics/PerceivedComplexity:
329
74
  Max: 10
330
75
 
331
- # Offense count: 10
332
- Naming/AccessorMethodName:
333
- Exclude:
334
- - 'lib/arxutils_sqlite3/config.rb'
335
-
336
76
  # Offense count: 11
337
77
  # Configuration parameters: AllowedNames.
338
78
  # AllowedNames: module_parent
@@ -350,27 +90,10 @@ Naming/ClassAndModuleCamelCase:
350
90
  - 'lib/arxutils_sqlite3/util.rb'
351
91
  - 'lib/arxutils_sqlite3/version.rb'
352
92
 
353
- # Offense count: 4
354
- # This cop supports safe autocorrection (--autocorrect).
355
- # Configuration parameters: PreferredName.
356
- Naming/RescuedExceptionsVariableName:
357
- Exclude:
358
- - 'exe/arxutils_sqlite3'
359
- - 'lib/arxutils_sqlite3/config.rb'
360
- - 'lib/arxutils_sqlite3/dbutil/dbconnect.rb'
361
-
362
93
  # Offense count: 1
363
- # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
364
- # SupportedStyles: snake_case, normalcase, non_integer
365
- # AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339
366
- Naming/VariableNumber:
367
- Exclude:
368
- # - 'lib/arxutils_sqlite3/config.rb'
369
-
370
- # Offense count: 2
371
- # Configuration parameters: CountAsOne.
372
- RSpec/ExampleLength:
373
- Max: 7
94
+ # Configuration parameters: AllowSubject.
95
+ RSpec/MultipleMemoizedHelpers:
96
+ Max: 11
374
97
 
375
98
  # Offense count: 1
376
99
  # This cop supports safe autocorrection (--autocorrect).
@@ -378,18 +101,6 @@ Style/BlockComments:
378
101
  Exclude:
379
102
  # - 'config/dbsetup.rb'
380
103
 
381
- # Offense count: 4
382
- # This cop supports safe autocorrection (--autocorrect).
383
- # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
384
- # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
385
- # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
386
- # FunctionalMethods: let, let!, subject, watch
387
- # AllowedMethods: lambda, proc, it
388
- Style/BlockDelimiters:
389
- Exclude:
390
- # - 'lib/arxutils_sqlite3/config.rb'
391
- # - 'lib/arxutils_sqlite3/migrate.rb'
392
-
393
104
  # Offense count: 7
394
105
  # Configuration parameters: AllowedConstants.
395
106
  Style/Documentation:
@@ -398,17 +109,17 @@ Style/Documentation:
398
109
  - 'test/**/*'
399
110
  - 'config/dbsetup.rb'
400
111
  - 'db/migrate/010_create_countdatetime.rb'
401
- - 'db/migrate/020_create_evnb.rb'
402
- - 'db/migrate/030_create_ennblist.rb'
403
- - 'db/migrate/040_create_invalidennblist.rb'
404
- - 'db/migrate/050_create_currentennblist.rb'
112
+ - 'db/migrate/020_create_xenop.rb'
113
+ - 'db/migrate/030_create_xenoplist.rb'
114
+ - 'db/migrate/040_create_invalidxenoplist.rb'
115
+ - 'db/migrate/050_create_currentxenoplist.rb'
405
116
  - 'lib/arxutils_sqlite3/util.rb'
406
117
 
407
- # Offense count: 3
118
+ # Offense count: 2
408
119
  # This cop supports safe autocorrection (--autocorrect).
409
- Style/FileWrite:
120
+ Style/EmptyLiteral:
410
121
  Exclude:
411
- # - 'lib/arxutils_sqlite3/config.rb'
122
+ # - 'config/dbsetup.rb'
412
123
 
413
124
  # Offense count: 5
414
125
  # This cop supports safe autocorrection (--autocorrect).
@@ -424,12 +135,6 @@ Style/FormatStringToken:
424
135
  Style/FrozenStringLiteralComment:
425
136
  Enabled: false
426
137
 
427
- # Offense count: 5
428
- # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
429
- Style/GuardClause:
430
- Exclude:
431
- # - 'lib/arxutils_sqlite3/config.rb'
432
-
433
138
  # Offense count: 10
434
139
  # This cop supports safe autocorrection (--autocorrect).
435
140
  # Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
@@ -438,50 +143,15 @@ Style/GuardClause:
438
143
  Style/HashSyntax:
439
144
  Exclude:
440
145
  # - 'db/migrate/010_create_countdatetime.rb'
441
- # - 'db/migrate/020_create_evnb.rb'
442
- # - 'db/migrate/030_create_ennblist.rb'
443
- # - 'db/migrate/040_create_invalidennblist.rb'
146
+ # - 'db/migrate/020_create_xenop.rb'
147
+ # - 'db/migrate/030_create_xenoplist.rb'
148
+ # - 'db/migrate/040_create_invalidxenoplist.rb'
444
149
 
445
- # Offense count: 2
446
- # This cop supports safe autocorrection (--autocorrect).
447
- Style/IfUnlessModifier:
448
- Exclude:
449
- # - 'lib/arxutils_sqlite3/config.rb'
450
-
451
- # Offense count: 3
452
- # This cop supports safe autocorrection (--autocorrect).
453
- # Configuration parameters: EnforcedStyle.
454
- # SupportedStyles: both, prefix, postfix
455
- Style/NegatedIf:
456
- Exclude:
457
- # - 'lib/arxutils_sqlite3/config.rb'
458
-
459
- # Offense count: 1
460
- # This cop supports safe autocorrection (--autocorrect).
461
- Style/RedundantCondition:
462
- Exclude:
463
- # - 'exe/arxutils_sqlite3'
464
-
465
- # Offense count: 1
466
- # This cop supports unsafe autocorrection (--autocorrect-all).
467
- Style/RedundantInterpolation:
468
- Exclude:
469
- # - 'exe/arxutils_sqlite3'
470
-
471
- # Offense count: 1
472
- # This cop supports safe autocorrection (--autocorrect).
473
- # Configuration parameters: EnforcedStyle.
474
- # SupportedStyles: implicit, explicit
475
- Style/RescueStandardError:
476
- Exclude:
477
- # - 'lib/arxutils_sqlite3/dbutil/dbconnect.rb'
478
-
479
- # Offense count: 5
150
+ # Offense count: 4
480
151
  # This cop supports safe autocorrection (--autocorrect).
481
152
  # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
482
153
  # SupportedStyles: single_quotes, double_quotes
483
154
  Style/StringLiterals:
484
155
  Exclude:
485
- # - 'Rakefile'
156
+ # - 'config/dbsetup.rb'
486
157
  # - 'lib/dbacrecord.rb'
487
- # - 'spec/arxutils__sqlite3_spec.rb'
data/Gemfile CHANGED
@@ -12,7 +12,7 @@ gem "simpleoptparse"
12
12
  # gem "ykutils" , :github => "ykominami/ykutils"
13
13
  gem "ykutils", "> 0.1.3"
14
14
  gem "ykxutils", "> 0.1.0"
15
- # gem "ykxutils", :path => "../ykxutils"
15
+ # gem "ykxutils", path: "../ykxutils"
16
16
 
17
17
  gem "activesupport"
18
18
  # spec.add_runtime_dependency "erb"
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- arxutils_sqlite3 (0.1.53)
4
+ arxutils_sqlite3 (0.1.55)
5
5
  activerecord (~> 6.1)
6
6
  activesupport
7
7
  simpleoptparse
@@ -70,7 +70,7 @@ GEM
70
70
  parser (>= 3.1.1.0)
71
71
  rubocop-rake (0.6.0)
72
72
  rubocop (~> 1.0)
73
- rubocop-rspec (2.13.1)
73
+ rubocop-rspec (2.13.2)
74
74
  rubocop (~> 1.33)
75
75
  ruby-progressbar (1.11.0)
76
76
  simpleoptparse (0.1.2)
@@ -86,7 +86,7 @@ GEM
86
86
  erubi
87
87
  filex
88
88
  tilt
89
- ykxutils (0.1.5)
89
+ ykxutils (0.1.7)
90
90
  zeitwerk (2.6.0)
91
91
 
92
92
  PLATFORMS
data/config/setting.yml CHANGED
@@ -1,2 +1,2 @@
1
1
  ---
2
- :klass: Enop
2
+ :klass: Xenop
data/exe/arxutils_sqlite3 CHANGED
@@ -8,38 +8,18 @@ require "ykxutils"
8
8
 
9
9
  config = Arxutils_Sqlite3::Config.new
10
10
 
11
- config.require_opts_file
11
+ opts, klass = config.setupx(self)
12
+ # p opts
13
+ # p klass
14
+ # exit
12
15
 
13
- opts = @opts || {}
14
-
15
- acrecord = opts[:acrecord]
16
- if acrecord
17
- filename = acrecord[:filename]
18
- basename = File.basename(filename)
19
-
20
- begin
21
- require basename.to_s
22
- rescue LoadError
23
- # pp ex.message
24
- end
25
- end
26
-
27
- opts[:db_dir] = Arxutils_Sqlite3::Config::DB_DIR
28
-
29
- setting = config.load_setting_yaml_file
30
- klass = setting[:klass]
31
-
32
- # DBセットアップクラス
33
- config.require_dbsetup_file
34
-
35
- banner = "Usage: bundle exec arxutils_sqlite3 --cmd=(s|cds|co|c|f|m|a|d|b) -y yaml_file --klass=class"
16
+ banner = "Usage: bundle exec arxutils_sqlite3 --cmd=(s|cds|co|c|f|m|a|d|b|y) -y yaml_file --klass=class"
36
17
 
37
18
  Simpleoptparse::Simpleoptparse.parse(ARGV, opts, banner, Arxutils_Sqlite3::VERSION, nil) do |parser|
38
- parser.on("--cmd X", %w[s cds co c f m a d b]) { |x| opts["cmd"] = x }
19
+ parser.on("--cmd X", %w[s cds co c f m a d b y]) { |x| opts["cmd"] = x }
39
20
  parser.on("-y yaml_file", "--yaml yaml_file") { |x| opts["yaml"] = x }
40
21
  parser.on("--klass klass") { |x| opts["klass"] = x }
41
22
  end
42
- klass = opts["klass"] if opts["klass"]
43
23
 
44
24
  dbconfig = Arxutils_Sqlite3::Config::DBCONFIG_SQLITE3
45
25
  env = ENV.fetch("ENV", nil)
@@ -93,6 +73,9 @@ when "b"
93
73
  db_scheme_ary = nil
94
74
  acrecord = opts["acrecord"]
95
75
  cli.delete_db(db_scheme_ary, acrecord)
76
+
77
+ when "y"
78
+ cli.delete_setting_yaml
96
79
  else
97
80
  puts "Invalid command(#{opts["cmd"]}) specified!!"
98
81
  end
@@ -11,7 +11,7 @@ module Arxutils_Sqlite3
11
11
  # p "make_config_directory"
12
12
  @config.make_config_directory
13
13
  # p "setup_db_scheme_file"
14
- @config.setup_db_scheme_file
14
+ @config.setup_db_scheme_file(klass)
15
15
  # p "setup_opts_file(#{klass})"
16
16
  @config.setup_opts_file(klass)
17
17
  # p "setup_setting_yaml_file(#{klass})"
@@ -41,7 +41,7 @@ module Arxutils_Sqlite3
41
41
  db_scheme_ary = YAML.load_file(yaml_pn)
42
42
  dbconfig_path = @config.make_dbconfig_path(@dbconfig)
43
43
 
44
- dest_dbsetup_file = @config.get_dest_dbsetup_file
44
+ dest_dbsetup_file = @config.dest_dbsetup_file
45
45
  @config.make_dbsetup_file(db_scheme_ary, acrecord, klass, dest_dbsetup_file)
46
46
 
47
47
  # マイグレーション用スクリプトの生成、acrecordのクラス定義ファイルの生成
@@ -49,10 +49,12 @@ module Arxutils_Sqlite3
49
49
  mig.output
50
50
  end
51
51
 
52
+ # マイグレーション実行
52
53
  def migrate
53
54
  # migrate用スクリプトの出力先ディレクトリ名
54
- migrate_dir = @config.get_migrate_dir
55
+ migrate_dir = @config.migrate_dir
55
56
 
57
+ # DB接続
56
58
  Arxutils_Sqlite3::Dbutil::Dbconnect.db_connect(@config, @dbconfig, @env)
57
59
 
58
60
  # マイグレーション実行
@@ -60,25 +62,38 @@ module Arxutils_Sqlite3
60
62
  end
61
63
 
62
64
  def acr
65
+ # DB接続
63
66
  connect_time = Arxutils_Sqlite3::Dbutil::Dbconnect.db_connect(@config, @dbconfig, @env)
64
- Dbsetup.new(connect_time)
67
+ # `s` is a variable that is being used to store the value of the `gets` method.
68
+ ret = :SUCCESS
69
+ begin
70
+ Dbsetup.new(connect_time)
71
+ rescue StandardError
72
+ ret = :StandardError
73
+ end
74
+
75
+ ret
65
76
  end
66
77
 
67
78
  def delete(db_scheme_ary, acrecord)
68
- config_dir = @config.get_config_dir
79
+ config_dir = @config.config_dir
69
80
  dbconfig_path = Arxutils_Sqlite3::Util.make_dbconfig_path(config_dir, @dbconfig)
70
81
  mig = @config.prepare_for_migrate(db_scheme_ary, dbconfig_path, @dbconfig, acrecord)
71
82
  mig.delete_migrate_and_config_and_db
72
83
  end
73
84
 
74
85
  def delete_db(db_scheme_ary, acrecord)
75
- config_dir = @config.get_config_dir
86
+ config_dir = @config.config_dir
76
87
  dbconfig_path = Arxutils_Sqlite3::Util.make_dbconfig_path(config_dir, @dbconfig)
77
88
  mig = @config.prepare_for_migrate(db_scheme_ary, dbconfig_path, @dbconfig, acrecord)
78
89
  # mig.delete_migrate_config_and_db
79
90
  mig.delete_db
80
91
  end
81
92
 
93
+ def delete_setting_yaml
94
+ FileUtils.rm_f(@config.setting_yaml_file)
95
+ end
96
+
82
97
  def rm_dbconfig
83
98
  dbconfig_path = @config.make_dbconfig_path(@dbconfig)
84
99
  # p dbconfig_path
@@ -58,25 +58,68 @@ module Arxutils_Sqlite3
58
58
  # migrateディレクトリへのパス
59
59
  MIGRATE_DIR = DB_PN.join(MIGRATE_BASE_DIR)
60
60
 
61
+ # 削除しないファイル群
61
62
  EXCLUDE_FILES = %w[SETTING_YAML_FILE_NAME].freeze
62
- DEFAULT_KLASS = "Enop"
63
+ # 作成対象のActiveRecordの子クラスのデフォルトクラス名
64
+ DEFAULT_KLASS = "Xenop".freeze
63
65
 
64
66
  def default_klass
65
67
  DEFAULT_KLASS
66
68
  end
67
69
 
70
+ def setting_yaml_file
71
+ SETTING_YAML_FILE
72
+ end
73
+
74
+ def dest_dbsetup_file_b
75
+ DEST_DBSETUP_FILE_B
76
+ end
77
+
78
+ def setupx(toplevel)
79
+ require_opts_file
80
+
81
+ opts = toplevel.instance_variable_get(:@opts) || {}
82
+
83
+ acrecord = opts[:acrecord]
84
+ if acrecord
85
+ filename = acrecord[:filename]
86
+ basename = File.basename(filename)
87
+
88
+ begin
89
+ require basename.to_s
90
+ rescue LoadError
91
+ # pp ex.message
92
+ end
93
+ end
94
+ opts[:db_dir] = Arxutils_Sqlite3::Config::DB_DIR
95
+
96
+ setting = load_setting_yaml_file
97
+ # p "setting=#{setting}"
98
+ klass = setting[:klass]
99
+ klass ||= DEFAULT_KLASS
100
+
101
+ # DBセットアップクラス
102
+ require_dbsetup_file
103
+
104
+ [opts, klass]
105
+ end
106
+
68
107
  # DB構成ファイル格納ディレクトリの作成
69
108
  def make_config_directory
70
109
  # p "config make_config_directory"
71
110
  FileUtils.mkdir_p(CONFIG_DIR)
72
111
  end
73
112
 
74
- # DBスキームファイルのサンプルファイルコピー
75
- def setup_db_scheme_file
113
+ # DBスキームファイルのサンプルファイコピー
114
+ def setup_db_scheme_file(klass)
76
115
  # p "config setup_db_scheme_file"
77
116
  # p "DB_SCHEME_FILE=#{DB_SCHEME_FILE}"
78
117
  # p "SAMPLE_DB_SCHEME_FILE=#{SAMPLE_DB_SCHEME_FILE}"
79
- FileUtils.cp(DB_SCHEME_FILE, SAMPLE_DB_SCHEME_FILE)
118
+ scope = {}
119
+ value_hash = { klass: klass }
120
+ content = Ykutils::Erubyx.erubi_render_with_template_file(DB_SCHEME_FILE, scope, value_hash)
121
+ Ykxutils.yaml_load_compati(content)
122
+ File.write(SAMPLE_DB_SCHEME_FILE, content)
80
123
  end
81
124
 
82
125
  # DBスキームファイルが存在しなければ、サンプルファイルをDBスキームファイルとしてコピー
@@ -107,7 +150,13 @@ module Arxutils_Sqlite3
107
150
  def setup_setting_yaml_file(klass)
108
151
  hash = { klass: klass }
109
152
  content = YAML.dump(hash)
110
- File.write(SETTING_YAML_FILE, content)
153
+ ret = :SUCCESS
154
+ begin
155
+ File.write(SETTING_YAML_FILE, content)
156
+ rescue StandardError
157
+ ret = :StandardError
158
+ end
159
+ ret
111
160
  end
112
161
 
113
162
  # DB構成ファイルの作成
@@ -139,7 +188,7 @@ module Arxutils_Sqlite3
139
188
 
140
189
  # Dbsetupファイル(Rubyスクリプトファイル)のrequire
141
190
  def require_dbsetup_file
142
- dbsetup_file = File.join(".", get_dest_dbsetup_file_b.to_s)
191
+ dbsetup_file = File.join(".", dest_dbsetup_file_b.to_s)
143
192
  begin
144
193
  require dbsetup_file
145
194
  rescue LoadError
@@ -165,66 +214,49 @@ module Arxutils_Sqlite3
165
214
  exit exit_code
166
215
  end
167
216
 
168
- # 変換先optsファイル(Rubyスクリプトファイル)へのパス
169
- def get_dest_opts_file
170
- DEST_OPTS_FILE
171
- end
172
-
173
217
  # DB格納ディレクトリ名
174
- def get_db_dir
218
+ def db_dir
175
219
  DB_DIR
176
220
  end
177
221
 
178
222
  # migrateディレクトリへのパス
179
- def get_migrate_dir
223
+ def migrate_dir
180
224
  MIGRATE_DIR
181
225
  end
182
226
 
183
227
  # コンフィグディレクトリへのパス
184
- def get_config_dir
228
+ def config_dir
185
229
  CONFIG_DIR
186
230
  end
187
231
 
188
232
  # リレーションテンプレートディレクトリへのパス
189
- def get_template_acrecord_dir
233
+ def template_acrecord_dir
190
234
  TEMPLATE_ACRECORD_DIR
191
235
  end
192
236
 
193
237
  # テンプレートディレクトリへのパス
194
- def get_template_config_dir
238
+ def template_config_dir
195
239
  TEMPLATE_CONFIG_DIR
196
240
  end
197
241
 
198
242
  # 変換先Dbsetupクラス定義のRubyスクリプトファイルへのパス
199
- def get_src_dbsetup_file
243
+ def src_dbsetup_file
200
244
  DBSETUP_FILE
201
245
  end
202
246
 
203
247
  # 変換先Dbsetupクラス定義のRubyスクリプトファイルへのパス
204
- def get_dest_dbsetup_file
248
+ def dest_dbsetup_file
205
249
  DEST_DBSETUP_FILE
206
250
  end
207
251
 
208
- # 変換先Dbsetupクラス定義のRubyスクリプトファイル(拡張子無し)へのパス
209
- def get_dest_dbsetup_file_b
210
- DEST_DBSETUP_FILE_B
211
- end
212
-
213
- # 変換後DBスキームファイル名(拡張子無し)
214
- def get_dest_db_scheme_file
215
- DEST_DB_SCHEME_FILE_B
216
- end
217
-
218
252
  # DBログファイルの作成
219
253
  def setup_for_db_log_path(dbconfig)
220
- db_dir = get_db_dir
221
254
  # DBログファイルへのパス
222
255
  Arxutils_Sqlite3::Util.make_log_path(db_dir, dbconfig)
223
256
  end
224
257
 
225
258
  # DB構成ファイルの作成
226
259
  def setup_for_dbconfig_path(dbconfig)
227
- config_dir = get_config_dir
228
260
  # DB構成ファイル名
229
261
  Arxutils_Sqlite3::Util.make_dbconfig_path(config_dir, dbconfig)
230
262
  end
@@ -241,7 +273,7 @@ module Arxutils_Sqlite3
241
273
  # DB構成ファイルの出力先ディレクトリ
242
274
  dbconfig_src_fname = "#{dbconfig}.tmpl"
243
275
  # migrate用スクリプトの出力先ディレクトリ名
244
- migrate_dir = get_migrate_dir
276
+ # migrate_dir = get_migrate_dir
245
277
 
246
278
  Migrate.new(
247
279
  self,
@@ -254,8 +286,6 @@ module Arxutils_Sqlite3
254
286
  end
255
287
 
256
288
  def make_dbsetup_file(db_scheme_ary, acrecord, klass, dest_dbsetup_file)
257
- src_dbsetup_file = get_src_dbsetup_file
258
-
259
289
  scope = Object.new
260
290
  hash0 = { module_name: acrecord[:module].join("::") }
261
291
  hash = db_scheme_ary[0].merge(hash0)
@@ -49,8 +49,8 @@ module Arxutils_Sqlite3
49
49
  ActiveRecord::Base.establish_connection(dbconfig[@env])
50
50
  ActiveRecord::Base.logger = Logger.new(@log_path)
51
51
  @connect_time = DateTime.now.new_offset
52
- rescue StandardError => ex
53
- p ex.message
52
+ rescue StandardError => e
53
+ p e.message
54
54
  end
55
55
  end
56
56
  @connect_time
@@ -30,18 +30,18 @@ module Arxutils_Sqlite3
30
30
  # アプリ構成情報
31
31
  @config = config
32
32
  # DB格納ディレクトリ名
33
- @db_dir = config.get_db_dir
33
+ @db_dir = config.db_dir
34
34
  # DB構成ファイルの出力先ディレクトリ
35
- @dest_config_dir = config.get_config_dir
35
+ @dest_config_dir = config.config_dir
36
36
  # 生成するDB構成情報ファイルパス
37
37
  @dbconfig_dest_path = dbconfig_dest_path
38
38
  # 参照用DB構成情報ファイル名
39
39
  @dbconfig_src_fname = dbconfig_src_fname
40
40
 
41
41
  # テンプレートファイル格納ディレクトリ名
42
- @src_path = config.get_template_acrecord_dir
42
+ @src_path = config.template_acrecord_dir
43
43
  # 構成ファイル格納ディレクトリ
44
- @src_config_path = config.get_template_config_dir
44
+ @src_config_path = config.template_config_dir
45
45
  # @src_config_path = Arxutils_Sqlite3::TEMPLATE_CONFIG_DIR
46
46
  # データベーススキーマ定義配列
47
47
  @db_scheme_ary = db_scheme_ary
@@ -215,14 +215,21 @@ module Arxutils_Sqlite3
215
215
  dir = acrecord_config[:dir]
216
216
  fname = acrecord_config[:filename]
217
217
  fpath = File.join(dir, fname)
218
- File.open(fpath, "w") do |file|
219
- acrecord_config[:module].map { |mod| file.puts("module #{mod}") }
220
- content_array.map do |x|
221
- file.puts x
222
- file.puts ""
218
+ ret = :SUCCESS
219
+ begin
220
+ File.open(fpath, "w") do |file|
221
+ acrecord_config[:module].map { |mod| file.puts("module #{mod}") }
222
+ content_array.map do |x|
223
+ file.puts x
224
+ file.puts ""
225
+ end
226
+ acrecord_config[:module].map { |_mod| file.puts("end") }
223
227
  end
224
- acrecord_config[:module].map { |_mod| file.puts("end") }
228
+ rescue StandardError
229
+ ret = :StandardError
225
230
  end
231
+
232
+ ret
226
233
  end
227
234
  end
228
235
  end
@@ -7,9 +7,14 @@ setting = config.load_setting_yaml_file
7
7
  klass = setting[:klass]
8
8
  klass = config.default_klass if klass.nil?
9
9
 
10
- desc "setup copy_db_scheme copy_opts makeconfig make_migrate_script migrate acr"
10
+ desc_arxutils_sqlite3 = "setup copy_db_scheme copy_opts makeconfig make_migrate_script migrate acr"
11
+
12
+ desc desc_arxutils_sqlite3.to_s
11
13
  task arxutils_sqlite3: %w[arx:setup arx:copy_db_scheme arx:copy_opts arx:makeconfig arx:make_migrate_script arx:migrate arx:acr]
12
14
 
15
+ desc desc_arxutils_sqlite3.to_s
16
+ task "arx:arxutils_sqlite3": %w[arxutils_sqlite3]
17
+
13
18
  desc "delete setup copy_db_scheme copy_opts makeconfig make_migrate_script migrate acr"
14
19
  task "arx:bootstrap": %w[arx:delete arxutils_sqlite3]
15
20
 
@@ -19,6 +24,9 @@ task "arx:ma": %w[arx:migrate arx:acr]
19
24
  desc "delete_db"
20
25
  task "arx:b": %w[arx:delete_db]
21
26
 
27
+ desc "delete setting.yaml"
28
+ task "arx:ds": %w[arx:delete_setting]
29
+
22
30
  # コマンドラインで指定したクラス名を含むオプション指定用ハッシュの定義を含むRubyスクリ
23
31
  # プトファイルの生成
24
32
  desc "produce setting.yml, db_scheme.yml.sample and opts.rb.sample with class name #{klass}"
@@ -68,4 +76,7 @@ task "arx:delete_db" do
68
76
  sh "bundle exec arxutils_sqlite3 --cmd=b"
69
77
  end
70
78
 
71
-
79
+ desc "delete setting yaml"
80
+ task "arx:delete_setting" do
81
+ sh "bundle exec arxutils_sqlite3 --cmd=y"
82
+ end
@@ -1,4 +1,4 @@
1
1
  module Arxutils_Sqlite3
2
2
  # バージョン番号
3
- VERSION = "0.1.53".freeze
3
+ VERSION = "0.1.55".freeze
4
4
  end
data/lib/dbacrecord.rb CHANGED
@@ -1,25 +1,25 @@
1
- module Enop
1
+ module Xenop
2
2
  module Dbutil
3
3
  class Count < ActiveRecord::Base
4
- has_many :invalidxennblists
4
+ has_many :invalidxenoplists
5
5
  end
6
6
 
7
7
  class Countdatetime < ActiveRecord::Base
8
8
  end
9
9
 
10
- class Xevnb < ActiveRecord::Base
10
+ class Xenop < ActiveRecord::Base
11
11
  end
12
12
 
13
- class Xennblist < ActiveRecord::Base
13
+ class Xenoplist < ActiveRecord::Base
14
14
  end
15
15
 
16
- class Invalidxennblist < ActiveRecord::Base
17
- belongs_to :xennblist , foreign_key: 'org_id'
18
- belongs_to :count , foreign_key: ''
16
+ class Invalidxenoplist < ActiveRecord::Base
17
+ belongs_to :xenoplist, foreign_key: 'org_id'
18
+ belongs_to :count, foreign_key: ''
19
19
  end
20
20
 
21
- class Currentxennblist < ActiveRecord::Base
22
- belongs_to :xennblist , foreign_key: 'org_id'
21
+ class Currentxenoplist < ActiveRecord::Base
22
+ belongs_to :xenoplist , foreign_key: 'org_id'
23
23
  end
24
24
 
25
25
  end
@@ -1,3 +1,3 @@
1
1
  class Current<%= @data[:classname_downcase] %> < ActiveRecord::Base
2
- belongs_to :<%= @data[:classname_downcase] %> , foreign_key: 'org_id'
2
+ belongs_to :<%= @data[:classname_downcase] %>, foreign_key: "org_id"
3
3
  end
@@ -1,4 +1,4 @@
1
1
  class Invalid<%= @data[:classname_downcase] %> < ActiveRecord::Base
2
- belongs_to :<%= @data[:classname_downcase] %> , foreign_key: 'org_id'
3
- belongs_to :<%= @data[:count_classname_downcase] %> , foreign_key: '<%= @data[:count_field] %>'
2
+ belongs_to :<%= @data[:classname_downcase] %>, foreign_key: "org_id"
3
+ belongs_to :<%= @data[:count_classname_downcase] %>, foreign_key: "<%= @data[:count_field] %>"
4
4
  end
@@ -1,7 +1,7 @@
1
1
  class Create<%= @data[:classname] %> < ActiveRecord::Migration[<%= @data[:ar_version] %>]
2
2
  def self.up
3
3
  create_table :<%= @data[:plural] %> do |t|
4
- <% @data[:ary].each do |x| %>
4
+ <% @data[:ary].each do |x| %>
5
5
  t.column :<%= x.name %>, :<%= x.type %>, :null => <%= x.null %>
6
6
  <% end %>
7
7
  t.timestamps null: false
@@ -2,7 +2,7 @@ class CreateCurrent<%= @data[:classname_downcase] %> < ActiveRecord::Migration[<
2
2
  def self.up
3
3
  execute <<-SQL
4
4
  CREATE VIEW current<%= @data[:plural] %> AS SELECT id as org_id,
5
- <%= @data[:ary].map{|x| x.name }.join(" , ") %>
5
+ <%= @data[:ary].map{|x| x.name }.join(" , ") %>
6
6
  FROM <%= @data[:plural] %> where not exists (select * from invalid<%= @data[:plural] %> where invalid<%= @data[:plural] %>.org_id = <%= @data[:plural] %>.id )
7
7
  SQL
8
8
  end
@@ -11,8 +11,8 @@
11
11
  :ar_version: 6.0
12
12
  - :flist:
13
13
  - noitem
14
- :classname: Xevnb
15
- :classname_downcase: xevnb
14
+ :classname: <%= klass %>
15
+ :classname_downcase: <%= klass.downcase %>
16
16
  :items:
17
17
  - - time_id
18
18
  - integer
@@ -20,14 +20,14 @@
20
20
  - - ennb_id
21
21
  - integer
22
22
  - 'false'
23
- :plural: xevnbs
23
+ :plural: <%= klass.downcase %>s
24
24
  :ar_version: 6.0
25
25
  - :flist:
26
26
  - noitem
27
27
  - invalid
28
28
  - current
29
- :classname: Xennblist
30
- :classname_downcase: xennblist
29
+ :classname: <%= klass %>list
30
+ :classname_downcase: <%= klass.downcase %>list
31
31
  :items:
32
32
  - - stack
33
33
  - string
@@ -44,5 +44,5 @@
44
44
  - - start_datetime
45
45
  - datetime
46
46
  - 'false'
47
- :plural: xennblists
47
+ :plural: <%= klass.downcase %>lists
48
48
  :ar_version: 6.0
@@ -1,11 +1,11 @@
1
- require_relative '../lib/dbacrecord'
1
+ require_relative "../lib/dbacrecord"
2
2
 
3
3
  class Dbsetup
4
4
  def initialize(connect_time)
5
5
  @connect_time = connect_time
6
- @ct = <%= klass %>::Dbutil::Countdatetime.create( countdatetime: @connect_time )
7
- @hs_by_notebook = Hash.new
8
- @hs_by_id = Hash.new
6
+ @ct = <%= klass %>::Dbutil::Countdatetime.create(countdatetime: @connect_time)
7
+ @hs_by_notebook = {}
8
+ @hs_by_id = {}
9
9
  end
10
10
  =begin
11
11
  # 指定stack(文字列)にノートブック(文字列)、ノートブック数、タグ数を追加
@@ -1,6 +1,6 @@
1
1
  @opts = {
2
2
  acrecord: {
3
- module: %w[Enop Dbutil],
3
+ module: %w[<%= klass %> Dbutil],
4
4
  filename: "dbacrecord.rb",
5
5
  dir: "lib"
6
6
  }
@@ -1,9 +1,9 @@
1
1
  class Create<%= @data[:classname] %> < ActiveRecord::Migration[<%= @data[:ar_version] %>]
2
2
  def self.up
3
3
  create_table :<%= @data[:plural] %> do |t|
4
- <% @data[:ary].each do |x| %>
4
+ <% @data[:ary].each do |x| %>
5
5
  t.column :<%= x.name %>, :<%= x.type %>, :null => <%= x.null %>
6
- <% end %>
6
+ <% end %>
7
7
  end
8
8
  end
9
9
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arxutils_sqlite3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.53
4
+ version: 0.1.55
5
5
  platform: ruby
6
6
  authors:
7
7
  - yasuo kominami
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-09-22 00:00:00.000000000 Z
11
+ date: 2022-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -236,7 +236,6 @@ files:
236
236
  - lib/template/acrecord/base.tmpl
237
237
  - lib/template/acrecord/current.tmpl
238
238
  - lib/template/acrecord/db_scheme/db_scheme.yml
239
- - lib/template/acrecord/db_scheme/db_scheme.yml.sample
240
239
  - lib/template/acrecord/db_scheme/dbsetup.tmpl
241
240
  - lib/template/acrecord/db_scheme/opts.rb.sample
242
241
  - lib/template/acrecord/db_scheme/opts.tmpl
@@ -1,48 +0,0 @@
1
- ---
2
- - :flist:
3
- - noitem
4
- :classname: Countdatetime
5
- :classname_downcase: countdatetime
6
- :items:
7
- - - countdatetime
8
- - datetime
9
- - 'false'
10
- :plural: countdatetimes
11
- :ar_version: 6.0
12
- - :flist:
13
- - noitem
14
- :classname: Evnb
15
- :classname_downcase: evnb
16
- :items:
17
- - - time_id
18
- - integer
19
- - 'false'
20
- - - ennb_id
21
- - integer
22
- - 'false'
23
- :plural: evnbs
24
- :ar_version: 6.0
25
- - :flist:
26
- - noitem
27
- - invalid
28
- - current
29
- :classname: Ennblist
30
- :classname_downcase: ennblist
31
- :items:
32
- - - stack
33
- - string
34
- - 'false'
35
- - - notebook
36
- - string
37
- - 'false'
38
- - - count
39
- - integer
40
- - 'false'
41
- - - tag_count
42
- - integer
43
- - 'false'
44
- - - start_datetime
45
- - datetime
46
- - 'false'
47
- :plural: ennblists
48
- :ar_version: 6.0