longleaf 0.1.0 → 0.2.0.pre.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/.editorconfig +13 -0
  3. data/.gitignore +1 -0
  4. data/.rubocop.yml +4 -0
  5. data/.rubocop_todo.yml +755 -0
  6. data/README.md +29 -7
  7. data/lib/longleaf/candidates/file_selector.rb +107 -0
  8. data/lib/longleaf/candidates/service_candidate_filesystem_iterator.rb +99 -0
  9. data/lib/longleaf/candidates/service_candidate_locator.rb +18 -0
  10. data/lib/longleaf/cli.rb +102 -6
  11. data/lib/longleaf/commands/deregister_command.rb +50 -0
  12. data/lib/longleaf/commands/preserve_command.rb +45 -0
  13. data/lib/longleaf/commands/register_command.rb +24 -38
  14. data/lib/longleaf/commands/validate_config_command.rb +6 -2
  15. data/lib/longleaf/commands/validate_metadata_command.rb +49 -0
  16. data/lib/longleaf/errors.rb +19 -0
  17. data/lib/longleaf/events/deregister_event.rb +55 -0
  18. data/lib/longleaf/events/event_names.rb +9 -0
  19. data/lib/longleaf/events/event_status_tracking.rb +59 -0
  20. data/lib/longleaf/events/preserve_event.rb +71 -0
  21. data/lib/longleaf/events/register_event.rb +37 -26
  22. data/lib/longleaf/helpers/digest_helper.rb +50 -0
  23. data/lib/longleaf/helpers/service_date_helper.rb +51 -0
  24. data/lib/longleaf/logging.rb +1 -0
  25. data/lib/longleaf/logging/redirecting_logger.rb +9 -8
  26. data/lib/longleaf/models/app_fields.rb +2 -0
  27. data/lib/longleaf/models/file_record.rb +8 -3
  28. data/lib/longleaf/models/md_fields.rb +1 -0
  29. data/lib/longleaf/models/metadata_record.rb +16 -4
  30. data/lib/longleaf/models/service_definition.rb +4 -3
  31. data/lib/longleaf/models/service_fields.rb +2 -0
  32. data/lib/longleaf/models/service_record.rb +4 -1
  33. data/lib/longleaf/models/storage_location.rb +18 -1
  34. data/lib/longleaf/preservation_services/fixity_check_service.rb +121 -0
  35. data/lib/longleaf/preservation_services/rsync_replication_service.rb +183 -0
  36. data/lib/longleaf/services/application_config_deserializer.rb +4 -6
  37. data/lib/longleaf/services/application_config_manager.rb +4 -2
  38. data/lib/longleaf/services/application_config_validator.rb +1 -1
  39. data/lib/longleaf/services/configuration_validator.rb +1 -0
  40. data/lib/longleaf/services/metadata_deserializer.rb +47 -10
  41. data/lib/longleaf/services/metadata_serializer.rb +42 -6
  42. data/lib/longleaf/services/service_class_cache.rb +112 -0
  43. data/lib/longleaf/services/service_definition_manager.rb +5 -1
  44. data/lib/longleaf/services/service_definition_validator.rb +4 -4
  45. data/lib/longleaf/services/service_manager.rb +72 -9
  46. data/lib/longleaf/services/service_mapping_manager.rb +4 -3
  47. data/lib/longleaf/services/service_mapping_validator.rb +4 -4
  48. data/lib/longleaf/services/storage_location_manager.rb +26 -5
  49. data/lib/longleaf/services/storage_location_validator.rb +1 -1
  50. data/lib/longleaf/services/storage_path_validator.rb +2 -2
  51. data/lib/longleaf/specs/config_builder.rb +9 -5
  52. data/lib/longleaf/specs/custom_matchers.rb +9 -0
  53. data/lib/longleaf/specs/file_helpers.rb +60 -0
  54. data/lib/longleaf/version.rb +1 -1
  55. data/longleaf.gemspec +1 -0
  56. metadata +39 -7
  57. data/lib/longleaf/commands/abstract_command.rb +0 -37
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46460cd1116e97c1d54c4f12ad130a318b79fd9f3db3e5fbec02b4dfe1e65ee9
4
- data.tar.gz: b8270d5fdb29c00c9689e9d5bd6b48530ac35dfd3e99daaa3a5b90803428deca
3
+ metadata.gz: 78716539eb254c041e4b5e4d402f5a3ae0b6d10c7d224c7d8db263b584cf4f1c
4
+ data.tar.gz: e46a9921b40eb7dc3d2e754f16b6711561716abc459f7ad546f4284caed2bf2d
5
5
  SHA512:
6
- metadata.gz: d83b4ee88d75fc45197750e453a3798749a6d27e6b378848d466276c2292a64a7fe472d96913d466dee742b68d9660ed73916d0349cd8065b686b634f589a38a
7
- data.tar.gz: a86bfb33e7decbded01d465f28e0d2123a2c3571339888ffb796c66c4002c9da6574733b31100a10ce00ea474461317661a8470bcf356be807bef61eb6533445
6
+ metadata.gz: 169fd959f7470ff4da6d0ffb2ea68ab797da6932f399d948ed78acbc7e9299f5ec93d1aba85f309b8162b80923a512a2c4141222750473d4e225b87554acea69
7
+ data.tar.gz: 2bfb0b13a223dfe35982b7c40c303cc644c2e7c83267baf3022d44da95bbef099931f500e8d55a617ad52f75de8a64632005d8362b8ae97f5a9335d05c1da4b9
data/.editorconfig ADDED
@@ -0,0 +1,13 @@
1
+ # Taken from https://raw.githubusercontent.com/rubocop-hq/rubocop/master/.editorconfig
2
+ root = true
3
+
4
+ [*]
5
+ indent_style = space
6
+ indent_size = 2
7
+ end_of_line = lf
8
+ charset = utf-8
9
+ trim_trailing_whitespace = true
10
+ insert_final_newline = true
11
+
12
+ [*.md]
13
+ trim_trailing_whitespace = false
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ .idea
data/.rubocop.yml ADDED
@@ -0,0 +1,4 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ inherit_gem:
4
+ bixby: bixby_default.yml
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,755 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2019-02-14 11:35:09 -0500 using RuboCop version 0.63.1.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # Cop supports --auto-correct.
11
+ Layout/AlignArray:
12
+ Exclude:
13
+ - 'lib/longleaf/preservation_services/rsync_replication_service.rb'
14
+
15
+ # Offense count: 41
16
+ # Cop supports --auto-correct.
17
+ # Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
18
+ # SupportedHashRocketStyles: key, separator, table
19
+ # SupportedColonStyles: key, separator, table
20
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
21
+ Layout/AlignHash:
22
+ Exclude:
23
+ - 'lib/longleaf/cli.rb'
24
+ - 'lib/longleaf/commands/register_command.rb'
25
+ - 'lib/longleaf/logging.rb'
26
+ - 'lib/longleaf/preservation_services/rsync_replication_service.rb'
27
+ - 'lib/longleaf/services/metadata_deserializer.rb'
28
+ - 'lib/longleaf/specs/file_helpers.rb'
29
+ - 'spec/longleaf/events/deregister_event_spec.rb'
30
+ - 'spec/longleaf/events/preserve_event_spec.rb'
31
+ - 'spec/longleaf/events/register_event_spec.rb'
32
+ - 'spec/longleaf/services/metadata_serializer_spec.rb'
33
+ - 'spec/longleaf/services/service_definition_manager_spec.rb'
34
+
35
+ # Offense count: 111
36
+ # Cop supports --auto-correct.
37
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
38
+ # SupportedStyles: with_first_parameter, with_fixed_indentation
39
+ Layout/AlignParameters:
40
+ Enabled: false
41
+
42
+ # Offense count: 192
43
+ # Cop supports --auto-correct.
44
+ Layout/BlockEndNewline:
45
+ Enabled: false
46
+
47
+ # Offense count: 1
48
+ # Cop supports --auto-correct.
49
+ Layout/ClosingParenthesisIndentation:
50
+ Exclude:
51
+ - 'spec/longleaf/events/deregister_event_spec.rb'
52
+
53
+ # Offense count: 13
54
+ # Cop supports --auto-correct.
55
+ Layout/EmptyLinesAroundAccessModifier:
56
+ Exclude:
57
+ - 'lib/longleaf/candidates/file_selector.rb'
58
+ - 'lib/longleaf/candidates/service_candidate_filesystem_iterator.rb'
59
+ - 'lib/longleaf/events/register_event.rb'
60
+ - 'lib/longleaf/logging/redirecting_logger.rb'
61
+ - 'lib/longleaf/preservation_services/fixity_check_service.rb'
62
+ - 'lib/longleaf/preservation_services/rsync_replication_service.rb'
63
+ - 'lib/longleaf/services/application_config_deserializer.rb'
64
+ - 'lib/longleaf/services/configuration_validator.rb'
65
+ - 'lib/longleaf/services/service_class_cache.rb'
66
+ - 'lib/longleaf/services/service_mapping_validator.rb'
67
+ - 'lib/longleaf/services/storage_location_validator.rb'
68
+ - 'spec/longleaf/preservation_services/fixity_check_service_spec.rb'
69
+ - 'spec/longleaf/preservation_services/rsync_replication_service_spec.rb'
70
+
71
+ # Offense count: 2
72
+ # Cop supports --auto-correct.
73
+ # Configuration parameters: EnforcedStyle.
74
+ # SupportedStyles: empty_lines, no_empty_lines
75
+ Layout/EmptyLinesAroundBlockBody:
76
+ Exclude:
77
+ - 'spec/longleaf/models/service_definition_spec.rb'
78
+ - 'spec/longleaf/models/storage_location_spec.rb'
79
+
80
+ # Offense count: 3
81
+ # Cop supports --auto-correct.
82
+ # Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
83
+ Layout/ExtraSpacing:
84
+ Exclude:
85
+ - 'spec/longleaf/models/metadata_record_spec.rb'
86
+
87
+ # Offense count: 28
88
+ # Cop supports --auto-correct.
89
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
90
+ # SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
91
+ Layout/FirstParameterIndentation:
92
+ Exclude:
93
+ - 'lib/longleaf/candidates/service_candidate_filesystem_iterator.rb'
94
+ - 'lib/longleaf/services/application_config_deserializer.rb'
95
+ - 'lib/longleaf/services/application_config_manager.rb'
96
+ - 'lib/longleaf/services/metadata_deserializer.rb'
97
+ - 'lib/longleaf/services/service_definition_manager.rb'
98
+ - 'lib/longleaf/services/storage_location_validator.rb'
99
+ - 'spec/features/deregister_command_spec.rb'
100
+ - 'spec/features/register_command_spec.rb'
101
+ - 'spec/features/validate_application_config_spec.rb'
102
+ - 'spec/longleaf/candidates/file_selector_spec.rb'
103
+ - 'spec/longleaf/logging/redirecting_logger_spec.rb'
104
+ - 'spec/longleaf/services/metadata_serializer_spec.rb'
105
+
106
+ # Offense count: 10
107
+ # Cop supports --auto-correct.
108
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
109
+ # SupportedStyles: special_inside_parentheses, consistent, align_braces
110
+ Layout/IndentHash:
111
+ Exclude:
112
+ - 'spec/longleaf/candidates/service_candidate_filesystem_iterator_spec.rb'
113
+ - 'spec/longleaf/preservation_services/fixity_check_service_spec.rb'
114
+ - 'spec/longleaf/preservation_services/rsync_replication_service_spec.rb'
115
+
116
+ # Offense count: 1
117
+ # Cop supports --auto-correct.
118
+ # Configuration parameters: EnforcedStyle.
119
+ # SupportedStyles: normal, rails
120
+ Layout/IndentationConsistency:
121
+ Exclude:
122
+ - 'spec/longleaf/services/application_config_deserializer_spec.rb'
123
+
124
+ # Offense count: 13
125
+ # Cop supports --auto-correct.
126
+ # Configuration parameters: Width, IgnoredPatterns.
127
+ Layout/IndentationWidth:
128
+ Exclude:
129
+ - 'lib/longleaf/candidates/file_selector.rb'
130
+ - 'lib/longleaf/candidates/service_candidate_filesystem_iterator.rb'
131
+ - 'lib/longleaf/events/register_event.rb'
132
+ - 'lib/longleaf/logging/redirecting_logger.rb'
133
+ - 'lib/longleaf/preservation_services/fixity_check_service.rb'
134
+ - 'lib/longleaf/preservation_services/rsync_replication_service.rb'
135
+ - 'lib/longleaf/services/application_config_deserializer.rb'
136
+ - 'lib/longleaf/services/configuration_validator.rb'
137
+ - 'lib/longleaf/services/service_class_cache.rb'
138
+ - 'lib/longleaf/services/service_mapping_validator.rb'
139
+ - 'lib/longleaf/services/storage_location_validator.rb'
140
+ - 'spec/longleaf/preservation_services/fixity_check_service_spec.rb'
141
+ - 'spec/longleaf/preservation_services/rsync_replication_service_spec.rb'
142
+
143
+ # Offense count: 192
144
+ # Cop supports --auto-correct.
145
+ Layout/MultilineBlockLayout:
146
+ Enabled: false
147
+
148
+ # Offense count: 2
149
+ # Cop supports --auto-correct.
150
+ # Configuration parameters: EnforcedStyle.
151
+ # SupportedStyles: symmetrical, new_line, same_line
152
+ Layout/MultilineHashBraceLayout:
153
+ Exclude:
154
+ - 'spec/longleaf/preservation_services/fixity_check_service_spec.rb'
155
+ - 'spec/longleaf/preservation_services/rsync_replication_service_spec.rb'
156
+
157
+ # Offense count: 31
158
+ # Cop supports --auto-correct.
159
+ # Configuration parameters: EnforcedStyle.
160
+ # SupportedStyles: symmetrical, new_line, same_line
161
+ Layout/MultilineMethodCallBraceLayout:
162
+ Exclude:
163
+ - 'lib/longleaf/candidates/service_candidate_filesystem_iterator.rb'
164
+ - 'lib/longleaf/services/application_config_deserializer.rb'
165
+ - 'lib/longleaf/services/application_config_manager.rb'
166
+ - 'lib/longleaf/services/metadata_deserializer.rb'
167
+ - 'lib/longleaf/services/service_definition_manager.rb'
168
+ - 'lib/longleaf/services/storage_location_validator.rb'
169
+ - 'spec/features/deregister_command_spec.rb'
170
+ - 'spec/features/register_command_spec.rb'
171
+ - 'spec/features/validate_application_config_spec.rb'
172
+ - 'spec/longleaf/events/deregister_event_spec.rb'
173
+ - 'spec/longleaf/logging/redirecting_logger_spec.rb'
174
+ - 'spec/longleaf/services/metadata_serializer_spec.rb'
175
+
176
+ # Offense count: 261
177
+ # Cop supports --auto-correct.
178
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
179
+ # SupportedStyles: aligned, indented, indented_relative_to_receiver
180
+ Layout/MultilineMethodCallIndentation:
181
+ Enabled: false
182
+
183
+ # Offense count: 18
184
+ # Cop supports --auto-correct.
185
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
186
+ # SupportedStyles: space, no_space
187
+ # SupportedStylesForEmptyBraces: space, no_space
188
+ Layout/SpaceBeforeBlockBraces:
189
+ Exclude:
190
+ - 'lib/longleaf/services/service_manager.rb'
191
+ - 'spec/longleaf/candidates/file_selector_spec.rb'
192
+ - 'spec/longleaf/helpers/service_date_helper_spec.rb'
193
+ - 'spec/longleaf/services/service_class_cache_spec.rb'
194
+ - 'spec/longleaf/services/service_manager_spec.rb'
195
+
196
+ # Offense count: 14
197
+ # Cop supports --auto-correct.
198
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
199
+ # SupportedStyles: space, no_space
200
+ # SupportedStylesForEmptyBraces: space, no_space
201
+ Layout/SpaceInsideBlockBraces:
202
+ Exclude:
203
+ - 'spec/longleaf/candidates/file_selector_spec.rb'
204
+ - 'spec/longleaf/logging/redirecting_logger_spec.rb'
205
+ - 'spec/longleaf/models/metadata_record_spec.rb'
206
+ - 'spec/longleaf/models/storage_location_spec.rb'
207
+ - 'spec/longleaf/services/metadata_serializer_spec.rb'
208
+ - 'spec/longleaf/services/service_class_cache_spec.rb'
209
+ - 'spec/longleaf/services/service_manager_spec.rb'
210
+
211
+ # Offense count: 23
212
+ # Cop supports --auto-correct.
213
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
214
+ # SupportedStyles: space, no_space, compact
215
+ # SupportedStylesForEmptyBraces: space, no_space
216
+ Layout/SpaceInsideHashLiteralBraces:
217
+ Exclude:
218
+ - 'spec/longleaf/candidates/service_candidate_filesystem_iterator_spec.rb'
219
+ - 'spec/longleaf/models/metadata_record_spec.rb'
220
+ - 'spec/longleaf/models/service_record_spec.rb'
221
+ - 'spec/longleaf/preservation_services/fixity_check_service_spec.rb'
222
+ - 'spec/longleaf/services/metadata_serializer_spec.rb'
223
+
224
+ # Offense count: 38
225
+ # Cop supports --auto-correct.
226
+ # Configuration parameters: EnforcedStyle.
227
+ # SupportedStyles: space, no_space
228
+ Layout/SpaceInsideParens:
229
+ Exclude:
230
+ - 'spec/longleaf/events/deregister_event_spec.rb'
231
+ - 'spec/longleaf/events/preserve_event_spec.rb'
232
+ - 'spec/longleaf/events/register_event_spec.rb'
233
+ - 'spec/longleaf/models/metadata_record_spec.rb'
234
+ - 'spec/longleaf/models/service_definition_spec.rb'
235
+ - 'spec/longleaf/models/service_record_spec.rb'
236
+ - 'spec/longleaf/preservation_services/fixity_check_service_spec.rb'
237
+ - 'spec/longleaf/preservation_services/rsync_replication_service_spec.rb'
238
+ - 'spec/longleaf/services/metadata_serializer_spec.rb'
239
+ - 'spec/longleaf/services/service_definition_validator_spec.rb'
240
+ - 'spec/longleaf/services/storage_location_validator_spec.rb'
241
+
242
+ # Offense count: 70
243
+ # Cop supports --auto-correct.
244
+ # Configuration parameters: EnforcedStyle.
245
+ # SupportedStyles: final_newline, final_blank_line
246
+ Layout/TrailingBlankLines:
247
+ Enabled: false
248
+
249
+ # Offense count: 1158
250
+ # Cop supports --auto-correct.
251
+ # Configuration parameters: AllowInHeredoc.
252
+ Layout/TrailingWhitespace:
253
+ Enabled: false
254
+
255
+ # Offense count: 4
256
+ Lint/IneffectiveAccessModifier:
257
+ Exclude:
258
+ - 'lib/longleaf/services/application_config_deserializer.rb'
259
+ - 'lib/longleaf/services/configuration_validator.rb'
260
+ - 'lib/longleaf/services/service_mapping_validator.rb'
261
+ - 'lib/longleaf/services/storage_location_validator.rb'
262
+
263
+ # Offense count: 1
264
+ Lint/ParenthesesAsGroupedExpression:
265
+ Exclude:
266
+ - 'spec/longleaf/models/metadata_record_spec.rb'
267
+
268
+ # Offense count: 2
269
+ # Cop supports --auto-correct.
270
+ Lint/StringConversionInInterpolation:
271
+ Exclude:
272
+ - 'lib/longleaf/logging/redirecting_logger.rb'
273
+ - 'lib/longleaf/preservation_services/fixity_check_service.rb'
274
+
275
+ # Offense count: 7
276
+ # Cop supports --auto-correct.
277
+ # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
278
+ Lint/UnusedBlockArgument:
279
+ Exclude:
280
+ - 'lib/longleaf/commands/validate_config_command.rb'
281
+ - 'lib/longleaf/logging/redirecting_logger.rb'
282
+ - 'lib/longleaf/services/service_mapping_manager.rb'
283
+ - 'lib/longleaf/services/storage_location_manager.rb'
284
+
285
+ # Offense count: 3
286
+ # Cop supports --auto-correct.
287
+ # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
288
+ Lint/UnusedMethodArgument:
289
+ Exclude:
290
+ - 'lib/longleaf/preservation_services/fixity_check_service.rb'
291
+ - 'lib/longleaf/preservation_services/rsync_replication_service.rb'
292
+
293
+ # Offense count: 4
294
+ # Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
295
+ Lint/UselessAccessModifier:
296
+ Exclude:
297
+ - 'lib/longleaf/services/application_config_deserializer.rb'
298
+ - 'lib/longleaf/services/configuration_validator.rb'
299
+ - 'lib/longleaf/services/service_mapping_validator.rb'
300
+ - 'lib/longleaf/services/storage_location_validator.rb'
301
+
302
+ # Offense count: 11
303
+ Lint/UselessAssignment:
304
+ Exclude:
305
+ - 'lib/longleaf/cli.rb'
306
+ - 'lib/longleaf/commands/preserve_command.rb'
307
+ - 'lib/longleaf/preservation_services/rsync_replication_service.rb'
308
+ - 'lib/longleaf/services/application_config_deserializer.rb'
309
+ - 'lib/longleaf/services/service_class_cache.rb'
310
+ - 'lib/longleaf/services/service_definition_validator.rb'
311
+ - 'lib/longleaf/services/service_mapping_validator.rb'
312
+ - 'spec/longleaf/events/register_event_spec.rb'
313
+
314
+ # Offense count: 6
315
+ Metrics/AbcSize:
316
+ Max: 43
317
+
318
+ # Offense count: 88
319
+ # Configuration parameters: CountComments, ExcludedMethods.
320
+ # ExcludedMethods: refine
321
+ Metrics/BlockLength:
322
+ Max: 309
323
+
324
+ # Offense count: 1
325
+ # Configuration parameters: CountBlocks.
326
+ Metrics/BlockNesting:
327
+ Max: 4
328
+
329
+ # Offense count: 2
330
+ # Configuration parameters: CountComments.
331
+ Metrics/ClassLength:
332
+ Max: 118
333
+
334
+ # Offense count: 13
335
+ Metrics/CyclomaticComplexity:
336
+ Max: 10
337
+
338
+ # Offense count: 2
339
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
340
+ # URISchemes: http, https
341
+ Metrics/LineLength:
342
+ Max: 249
343
+
344
+ # Offense count: 21
345
+ # Configuration parameters: CountComments, ExcludedMethods.
346
+ Metrics/MethodLength:
347
+ Max: 38
348
+
349
+ # Offense count: 7
350
+ # Configuration parameters: CountKeywordArgs.
351
+ Metrics/ParameterLists:
352
+ Max: 7
353
+
354
+ # Offense count: 8
355
+ Metrics/PerceivedComplexity:
356
+ Max: 12
357
+
358
+ # Offense count: 2
359
+ # Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
360
+ # NamePrefix: is_, has_, have_
361
+ # NamePrefixBlacklist: is_, has_, have_
362
+ # NameWhitelist: is_a?
363
+ # MethodDefinitionMacros: define_method, define_singleton_method
364
+ Naming/PredicateName:
365
+ Exclude:
366
+ - 'spec/**/*'
367
+ - 'lib/longleaf/preservation_services/fixity_check_service.rb'
368
+ - 'lib/longleaf/preservation_services/rsync_replication_service.rb'
369
+
370
+ # Offense count: 4
371
+ # Configuration parameters: EnforcedStyle.
372
+ # SupportedStyles: snake_case, camelCase
373
+ Naming/VariableName:
374
+ Exclude:
375
+ - 'lib/longleaf/logging/redirecting_logger.rb'
376
+
377
+ # Offense count: 1
378
+ # Cop supports --auto-correct.
379
+ Performance/RedundantMatch:
380
+ Exclude:
381
+ - 'lib/longleaf/cli.rb'
382
+
383
+ # Offense count: 1
384
+ # Cop supports --auto-correct.
385
+ Performance/ReverseEach:
386
+ Exclude:
387
+ - 'lib/longleaf/candidates/file_selector.rb'
388
+
389
+ # Offense count: 4
390
+ RSpec/DescribeClass:
391
+ Exclude:
392
+ - 'spec/features/deregister_command_spec.rb'
393
+ - 'spec/features/preserve_command_spec.rb'
394
+ - 'spec/features/register_command_spec.rb'
395
+ - 'spec/features/validate_application_config_spec.rb'
396
+
397
+ # Offense count: 49
398
+ # Cop supports --auto-correct.
399
+ # Configuration parameters: SkipBlocks, EnforcedStyle.
400
+ # SupportedStyles: described_class, explicit
401
+ RSpec/DescribedClass:
402
+ Enabled: false
403
+
404
+ # Offense count: 18
405
+ # Configuration parameters: Max.
406
+ RSpec/ExampleLength:
407
+ Exclude:
408
+ - 'spec/features/deregister_command_spec.rb'
409
+ - 'spec/longleaf/events/deregister_event_spec.rb'
410
+ - 'spec/longleaf/events/preserve_event_spec.rb'
411
+ - 'spec/longleaf/events/register_event_spec.rb'
412
+ - 'spec/longleaf/logging/redirecting_logger_spec.rb'
413
+ - 'spec/longleaf/preservation_services/rsync_replication_service_spec.rb'
414
+ - 'spec/longleaf/services/metadata_deserializer_spec.rb'
415
+ - 'spec/longleaf/services/metadata_serializer_spec.rb'
416
+ - 'spec/longleaf/services/service_definition_manager_spec.rb'
417
+
418
+ # Offense count: 14
419
+ # Cop supports --auto-correct.
420
+ # Configuration parameters: EnforcedStyle.
421
+ # SupportedStyles: implicit, each, example
422
+ RSpec/HookArgument:
423
+ Exclude:
424
+ - 'spec/longleaf/models/storage_location_spec.rb'
425
+ - 'spec/longleaf/preservation_services/rsync_replication_service_spec.rb'
426
+ - 'spec/longleaf/services/application_config_deserializer_spec.rb'
427
+ - 'spec/longleaf/services/application_config_validator_spec.rb'
428
+ - 'spec/longleaf/services/metadata_deserializer_spec.rb'
429
+ - 'spec/longleaf/services/service_manager_spec.rb'
430
+
431
+ # Offense count: 8
432
+ RSpec/LetSetup:
433
+ Exclude:
434
+ - 'spec/features/preserve_command_spec.rb'
435
+ - 'spec/longleaf/candidates/service_candidate_filesystem_iterator_spec.rb'
436
+
437
+ # Offense count: 4
438
+ # Configuration parameters: .
439
+ # SupportedStyles: have_received, receive
440
+ RSpec/MessageSpies:
441
+ EnforcedStyle: receive
442
+
443
+ # Offense count: 63
444
+ # Cop supports --auto-correct.
445
+ # Configuration parameters: EnforcedStyle.
446
+ # SupportedStyles: not_to, to_not
447
+ RSpec/NotToNot:
448
+ Enabled: false
449
+
450
+ # Offense count: 3
451
+ # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
452
+ RSpec/VerifiedDoubles:
453
+ Exclude:
454
+ - 'spec/longleaf/preservation_services/fixity_check_service_spec.rb'
455
+ - 'spec/longleaf/services/service_class_cache_spec.rb'
456
+ - 'spec/longleaf/services/service_manager_spec.rb'
457
+
458
+ # Offense count: 7
459
+ # Configuration parameters: Include.
460
+ # Include: app/**/*.rb, config/**/*.rb, lib/**/*.rb
461
+ Rails/Exit:
462
+ Exclude:
463
+ - 'lib/**/*.rake'
464
+ - 'lib/longleaf/cli.rb'
465
+
466
+ # Offense count: 8
467
+ # Configuration parameters: EnforcedStyle.
468
+ # SupportedStyles: strict, flexible
469
+ Rails/TimeZone:
470
+ Exclude:
471
+ - 'lib/longleaf/helpers/service_date_helper.rb'
472
+ - 'spec/features/preserve_command_spec.rb'
473
+ - 'spec/longleaf/events/deregister_event_spec.rb'
474
+ - 'spec/longleaf/events/preserve_event_spec.rb'
475
+ - 'spec/longleaf/logging/redirecting_logger_spec.rb'
476
+ - 'spec/longleaf/models/metadata_record_spec.rb'
477
+
478
+ # Offense count: 1
479
+ # Cop supports --auto-correct.
480
+ # Configuration parameters: EnforcedStyle.
481
+ # SupportedStyles: always, conditionals
482
+ Style/AndOr:
483
+ Exclude:
484
+ - 'lib/longleaf/candidates/file_selector.rb'
485
+
486
+ # Offense count: 1
487
+ # Cop supports --auto-correct.
488
+ # Configuration parameters: EnforcedStyle.
489
+ # SupportedStyles: percent_q, bare_percent
490
+ Style/BarePercentLiterals:
491
+ Exclude:
492
+ - 'lib/longleaf/specs/file_helpers.rb'
493
+
494
+ # Offense count: 1
495
+ # Cop supports --auto-correct.
496
+ Style/BlockComments:
497
+ Exclude:
498
+ - 'spec/spec_helper.rb'
499
+
500
+ # Offense count: 134
501
+ # Cop supports --auto-correct.
502
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods.
503
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining
504
+ # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
505
+ # FunctionalMethods: let, let!, subject, watch
506
+ # IgnoredMethods: lambda, proc, it
507
+ Style/BlockDelimiters:
508
+ Enabled: false
509
+
510
+ # Offense count: 66
511
+ # Cop supports --auto-correct.
512
+ Style/ColonMethodCall:
513
+ Exclude:
514
+ - 'lib/longleaf/events/deregister_event.rb'
515
+ - 'lib/longleaf/events/preserve_event.rb'
516
+ - 'lib/longleaf/events/register_event.rb'
517
+ - 'lib/longleaf/models/storage_location.rb'
518
+ - 'lib/longleaf/services/application_config_validator.rb'
519
+ - 'lib/longleaf/services/storage_location_validator.rb'
520
+ - 'spec/features/deregister_command_spec.rb'
521
+ - 'spec/features/register_command_spec.rb'
522
+ - 'spec/longleaf/events/register_event_spec.rb'
523
+ - 'spec/longleaf/services/application_config_deserializer_spec.rb'
524
+ - 'spec/longleaf/services/application_config_validator_spec.rb'
525
+ - 'spec/longleaf/services/service_definition_validator_spec.rb'
526
+ - 'spec/longleaf/services/service_mapping_validator_spec.rb'
527
+ - 'spec/longleaf/services/storage_location_validator_spec.rb'
528
+ - 'spec/longleaf/services/storage_path_validator_spec.rb'
529
+
530
+ # Offense count: 4
531
+ # Cop supports --auto-correct.
532
+ # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
533
+ # SupportedStyles: assign_to_condition, assign_inside_condition
534
+ Style/ConditionalAssignment:
535
+ Exclude:
536
+ - 'lib/longleaf/events/event_status_tracking.rb'
537
+ - 'lib/longleaf/logging/redirecting_logger.rb'
538
+ - 'lib/longleaf/preservation_services/rsync_replication_service.rb'
539
+
540
+ # Offense count: 41
541
+ # Cop supports --auto-correct.
542
+ Style/EmptyLiteral:
543
+ Enabled: false
544
+
545
+ # Offense count: 1
546
+ # Cop supports --auto-correct.
547
+ # Configuration parameters: EnforcedStyle.
548
+ # SupportedStyles: format, sprintf, percent
549
+ Style/FormatString:
550
+ Exclude:
551
+ - 'lib/longleaf/logging/redirecting_logger.rb'
552
+
553
+ # Offense count: 93
554
+ # Cop supports --auto-correct.
555
+ # Configuration parameters: EnforcedStyle.
556
+ # SupportedStyles: when_needed, always, never
557
+ Style/FrozenStringLiteralComment:
558
+ Enabled: false
559
+
560
+ # Offense count: 8
561
+ # Configuration parameters: MinBodyLength.
562
+ Style/GuardClause:
563
+ Exclude:
564
+ - 'lib/longleaf/candidates/file_selector.rb'
565
+ - 'lib/longleaf/cli.rb'
566
+ - 'lib/longleaf/helpers/service_date_helper.rb'
567
+ - 'lib/longleaf/preservation_services/fixity_check_service.rb'
568
+ - 'lib/longleaf/services/storage_location_manager.rb'
569
+
570
+ # Offense count: 50
571
+ # Cop supports --auto-correct.
572
+ # Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
573
+ # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
574
+ Style/HashSyntax:
575
+ Exclude:
576
+ - 'Rakefile'
577
+ - 'lib/longleaf/cli.rb'
578
+ - 'lib/longleaf/logging/redirecting_logger.rb'
579
+ - 'spec/features/deregister_command_spec.rb'
580
+ - 'spec/features/preserve_command_spec.rb'
581
+ - 'spec/features/register_command_spec.rb'
582
+ - 'spec/features/validate_application_config_spec.rb'
583
+ - 'spec/longleaf/events/preserve_event_spec.rb'
584
+ - 'spec/longleaf/services/metadata_serializer_spec.rb'
585
+
586
+ # Offense count: 3
587
+ Style/IfInsideElse:
588
+ Exclude:
589
+ - 'lib/longleaf/preservation_services/fixity_check_service.rb'
590
+ - 'lib/longleaf/preservation_services/rsync_replication_service.rb'
591
+
592
+ # Offense count: 23
593
+ # Cop supports --auto-correct.
594
+ Style/IfUnlessModifier:
595
+ Exclude:
596
+ - 'lib/longleaf/candidates/file_selector.rb'
597
+ - 'lib/longleaf/candidates/service_candidate_filesystem_iterator.rb'
598
+ - 'lib/longleaf/cli.rb'
599
+ - 'lib/longleaf/commands/deregister_command.rb'
600
+ - 'lib/longleaf/events/deregister_event.rb'
601
+ - 'lib/longleaf/events/preserve_event.rb'
602
+ - 'lib/longleaf/events/register_event.rb'
603
+ - 'lib/longleaf/preservation_services/fixity_check_service.rb'
604
+ - 'lib/longleaf/preservation_services/rsync_replication_service.rb'
605
+ - 'lib/longleaf/services/metadata_deserializer.rb'
606
+ - 'lib/longleaf/services/service_class_cache.rb'
607
+
608
+ # Offense count: 3
609
+ # Cop supports --auto-correct.
610
+ # Configuration parameters: IgnoredMethods.
611
+ Style/MethodCallWithoutArgsParentheses:
612
+ Exclude:
613
+ - 'spec/longleaf/candidates/file_selector_spec.rb'
614
+ - 'spec/longleaf/services/metadata_deserializer_spec.rb'
615
+
616
+ # Offense count: 2
617
+ # Cop supports --auto-correct.
618
+ Style/MultilineIfModifier:
619
+ Exclude:
620
+ - 'lib/longleaf/preservation_services/rsync_replication_service.rb'
621
+
622
+ # Offense count: 48
623
+ # Cop supports --auto-correct.
624
+ Style/MutableConstant:
625
+ Exclude:
626
+ - 'lib/longleaf/events/event_names.rb'
627
+ - 'lib/longleaf/models/app_fields.rb'
628
+ - 'lib/longleaf/models/md_fields.rb'
629
+ - 'lib/longleaf/models/service_fields.rb'
630
+ - 'lib/longleaf/preservation_services/fixity_check_service.rb'
631
+ - 'lib/longleaf/preservation_services/rsync_replication_service.rb'
632
+ - 'lib/longleaf/services/service_class_cache.rb'
633
+ - 'lib/longleaf/version.rb'
634
+ - 'spec/longleaf/preservation_services/fixity_check_service_spec.rb'
635
+
636
+ # Offense count: 4
637
+ # Cop supports --auto-correct.
638
+ # Configuration parameters: EnforcedStyle.
639
+ # SupportedStyles: both, prefix, postfix
640
+ Style/NegatedIf:
641
+ Exclude:
642
+ - 'lib/longleaf/candidates/service_candidate_filesystem_iterator.rb'
643
+ - 'lib/longleaf/cli.rb'
644
+ - 'lib/longleaf/preservation_services/rsync_replication_service.rb'
645
+ - 'lib/longleaf/services/service_class_cache.rb'
646
+
647
+ # Offense count: 1
648
+ # Cop supports --auto-correct.
649
+ # Configuration parameters: EnforcedStyle, MinBodyLength.
650
+ # SupportedStyles: skip_modifier_ifs, always
651
+ Style/Next:
652
+ Exclude:
653
+ - 'lib/longleaf/services/storage_location_validator.rb'
654
+
655
+ # Offense count: 3
656
+ # Cop supports --auto-correct.
657
+ # Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
658
+ # SupportedStyles: predicate, comparison
659
+ Style/NumericPredicate:
660
+ Exclude:
661
+ - 'spec/**/*'
662
+ - 'lib/longleaf/candidates/service_candidate_filesystem_iterator.rb'
663
+ - 'lib/longleaf/events/event_status_tracking.rb'
664
+
665
+ # Offense count: 3
666
+ # Cop supports --auto-correct.
667
+ # Configuration parameters: PreferredDelimiters.
668
+ Style/PercentLiteralDelimiters:
669
+ Exclude:
670
+ - 'lib/longleaf/cli.rb'
671
+ - 'longleaf.gemspec'
672
+
673
+ # Offense count: 2
674
+ # Cop supports --auto-correct.
675
+ Style/PerlBackrefs:
676
+ Exclude:
677
+ - 'lib/longleaf/helpers/service_date_helper.rb'
678
+
679
+ # Offense count: 72
680
+ # Cop supports --auto-correct.
681
+ # Configuration parameters: .
682
+ # SupportedStyles: compact, exploded
683
+ Style/RaiseArgs:
684
+ EnforcedStyle: compact
685
+
686
+ # Offense count: 2
687
+ # Cop supports --auto-correct.
688
+ Style/RedundantBegin:
689
+ Exclude:
690
+ - 'lib/longleaf/cli.rb'
691
+ - 'lib/longleaf/services/application_config_deserializer.rb'
692
+
693
+ # Offense count: 1
694
+ # Cop supports --auto-correct.
695
+ Style/RedundantParentheses:
696
+ Exclude:
697
+ - 'spec/longleaf/models/metadata_record_spec.rb'
698
+
699
+ # Offense count: 6
700
+ # Cop supports --auto-correct.
701
+ # Configuration parameters: AllowMultipleReturnValues.
702
+ Style/RedundantReturn:
703
+ Exclude:
704
+ - 'lib/longleaf/preservation_services/fixity_check_service.rb'
705
+ - 'lib/longleaf/specs/file_helpers.rb'
706
+
707
+ # Offense count: 3
708
+ # Cop supports --auto-correct.
709
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.
710
+ # Whitelist: present?, blank?, presence, try, try!
711
+ Style/SafeNavigation:
712
+ Exclude:
713
+ - 'lib/longleaf/cli.rb'
714
+ - 'lib/longleaf/services/metadata_deserializer.rb'
715
+ - 'spec/longleaf/candidates/service_candidate_filesystem_iterator_spec.rb'
716
+
717
+ # Offense count: 2
718
+ # Cop supports --auto-correct.
719
+ Style/SelfAssignment:
720
+ Exclude:
721
+ - 'lib/longleaf/logging/redirecting_logger.rb'
722
+ - 'lib/longleaf/preservation_services/rsync_replication_service.rb'
723
+
724
+ # Offense count: 1
725
+ # Cop supports --auto-correct.
726
+ # Configuration parameters: EnforcedStyle.
727
+ # SupportedStyles: single_quotes, double_quotes
728
+ Style/StringLiteralsInInterpolation:
729
+ Exclude:
730
+ - 'lib/longleaf/preservation_services/rsync_replication_service.rb'
731
+
732
+ # Offense count: 3
733
+ # Cop supports --auto-correct.
734
+ Style/UnneededInterpolation:
735
+ Exclude:
736
+ - 'lib/longleaf/logging/redirecting_logger.rb'
737
+
738
+ # Offense count: 3
739
+ # Cop supports --auto-correct.
740
+ Style/UnneededPercentQ:
741
+ Exclude:
742
+ - 'lib/longleaf/specs/file_helpers.rb'
743
+ - 'longleaf.gemspec'
744
+
745
+ # Offense count: 1
746
+ # Cop supports --auto-correct.
747
+ Style/WhileUntilDo:
748
+ Exclude:
749
+ - 'lib/longleaf/candidates/file_selector.rb'
750
+
751
+ # Offense count: 1
752
+ # Cop supports --auto-correct.
753
+ Style/ZeroLengthPredicate:
754
+ Exclude:
755
+ - 'lib/longleaf/candidates/service_candidate_filesystem_iterator.rb'