druid-tools 1.0.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.rubocop.yml +6 -6
- data/.rubocop_todo.yml +11 -307
- data/.travis.yml +3 -5
- data/Gemfile +7 -5
- data/README.md +1 -2
- data/Rakefile +4 -2
- data/VERSION +1 -1
- data/druid-tools.gemspec +6 -6
- data/lib/druid-tools.rb +3 -1
- data/lib/druid_tools.rb +2 -0
- data/lib/druid_tools/access_druid.rb +4 -7
- data/lib/druid_tools/druid.rb +42 -110
- data/lib/druid_tools/exceptions.rb +6 -4
- data/lib/druid_tools/version.rb +2 -0
- data/spec/druid_tools/purl_druid_spec.rb +27 -0
- data/spec/druid_tools_spec.rb +356 -0
- data/spec/spec_helper.rb +3 -1
- metadata +24 -24
- data/spec/access_druid_spec.rb +0 -28
- data/spec/druid_spec.rb +0 -470
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f669f7b8429c7d0d95c9b7e8715afc362924911005504f75e8c9c6e9addee306
|
4
|
+
data.tar.gz: dedef2151df6f1e7ca40ea664834218634e61a44190a17069a6d62973bc9f03d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a288b3e8ba6a1db699ce7737c196d65859c28f7e52513d0d32a421e39ca30702184e2c2b38eefc5a2d34665dffcc0ea75d85a88d7115989bb9689e865c1c6335
|
7
|
+
data.tar.gz: 64ac1bdaa0b1c7bfc3a85f0480dca6b1387c76d47635f4a3823be95595303373d0d1d8e4bfd00f95c04ab4186ba7bc24f20fa7464b41f0c91f4f9e0f47facb3a
|
data/.rubocop.yml
CHANGED
@@ -5,8 +5,8 @@ require: rubocop-rspec
|
|
5
5
|
|
6
6
|
AllCops:
|
7
7
|
DisplayCopNames: true
|
8
|
-
Include:
|
9
|
-
- 'Rakefile'
|
8
|
+
# Include:
|
9
|
+
# - 'Rakefile'
|
10
10
|
Exclude:
|
11
11
|
- 'Gemfile.lock'
|
12
12
|
- '**/*.md'
|
@@ -22,6 +22,10 @@ AllCops:
|
|
22
22
|
Metrics/LineLength:
|
23
23
|
Max: 167 # would like to reduce this to 120
|
24
24
|
|
25
|
+
Metrics/BlockLength:
|
26
|
+
Exclude:
|
27
|
+
- 'spec/**/*_spec.rb'
|
28
|
+
|
25
29
|
# --- Naming ---
|
26
30
|
|
27
31
|
Naming/FileName:
|
@@ -35,7 +39,3 @@ Naming/FileName:
|
|
35
39
|
# --- RSpec ---
|
36
40
|
|
37
41
|
# --- Style ---
|
38
|
-
|
39
|
-
# because ' vs " isn't a big deal for readability or maintainability or execution time
|
40
|
-
Style/StringLiterals:
|
41
|
-
Enabled: false
|
data/.rubocop_todo.yml
CHANGED
@@ -1,258 +1,67 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2019-05-24 07:28:47 -0400 using RuboCop version 0.70.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
|
-
# Cop supports --auto-correct.
|
11
|
-
# Configuration parameters: Include, TreatCommentsAsGroupSeparators.
|
12
|
-
# Include: **/Gemfile, **/gems.rb
|
13
|
-
Bundler/OrderedGems:
|
14
|
-
Exclude:
|
15
|
-
- 'Gemfile'
|
16
|
-
|
17
|
-
# Offense count: 6
|
18
|
-
# Cop supports --auto-correct.
|
19
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
20
|
-
# SupportedStyles: empty_lines, no_empty_lines
|
21
|
-
Layout/EmptyLinesAroundBlockBody:
|
22
|
-
Exclude:
|
23
|
-
- 'spec/access_druid_spec.rb'
|
24
|
-
- 'spec/druid_spec.rb'
|
25
|
-
|
26
|
-
# Offense count: 4
|
27
|
-
# Cop supports --auto-correct.
|
28
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
29
|
-
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
|
30
|
-
Layout/EmptyLinesAroundClassBody:
|
31
|
-
Exclude:
|
32
|
-
- 'lib/druid_tools/access_druid.rb'
|
33
|
-
- 'lib/druid_tools/druid.rb'
|
34
|
-
|
35
|
-
# Offense count: 2
|
36
|
-
# Cop supports --auto-correct.
|
37
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
38
|
-
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
|
39
|
-
Layout/EmptyLinesAroundModuleBody:
|
40
|
-
Exclude:
|
41
|
-
- 'lib/druid_tools/access_druid.rb'
|
42
|
-
|
43
|
-
# Offense count: 2
|
44
|
-
# Cop supports --auto-correct.
|
45
|
-
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
|
46
|
-
Layout/ExtraSpacing:
|
47
|
-
Exclude:
|
48
|
-
- 'lib/druid_tools/druid.rb'
|
49
|
-
- 'spec/druid_spec.rb'
|
50
|
-
|
51
|
-
# Offense count: 1
|
52
|
-
# Cop supports --auto-correct.
|
53
|
-
# Configuration parameters: Width, IgnoredPatterns.
|
54
|
-
Layout/IndentationWidth:
|
55
|
-
Exclude:
|
56
|
-
- 'spec/access_druid_spec.rb'
|
57
|
-
|
58
|
-
# Offense count: 44
|
59
|
-
# Cop supports --auto-correct.
|
60
|
-
Layout/LeadingCommentSpace:
|
61
|
-
Exclude:
|
62
|
-
- 'lib/druid_tools/druid.rb'
|
63
|
-
- 'spec/druid_spec.rb'
|
64
|
-
- 'spec/spec_helper.rb'
|
65
|
-
|
66
|
-
# Offense count: 13
|
67
|
-
# Cop supports --auto-correct.
|
68
|
-
Layout/SpaceAfterComma:
|
69
|
-
Exclude:
|
70
|
-
- 'lib/druid_tools/access_druid.rb'
|
71
|
-
- 'lib/druid_tools/druid.rb'
|
72
|
-
- 'spec/access_druid_spec.rb'
|
73
|
-
|
74
|
-
# Offense count: 11
|
75
|
-
# Cop supports --auto-correct.
|
76
|
-
# Configuration parameters: SupportedStyles.
|
77
|
-
# SupportedStyles: space, no_space
|
78
|
-
Layout/SpaceAroundEqualsInParameterDefault:
|
79
|
-
EnforcedStyle: no_space
|
80
|
-
|
81
|
-
# Offense count: 3
|
82
|
-
# Cop supports --auto-correct.
|
83
|
-
Layout/SpaceAroundKeyword:
|
84
|
-
Exclude:
|
85
|
-
- 'lib/druid_tools/druid.rb'
|
86
|
-
|
87
|
-
# Offense count: 2
|
88
|
-
# Cop supports --auto-correct.
|
89
|
-
# Configuration parameters: AllowForAlignment.
|
90
|
-
Layout/SpaceAroundOperators:
|
91
|
-
Exclude:
|
92
|
-
- 'lib/druid_tools/druid.rb'
|
93
|
-
|
94
|
-
# Offense count: 4
|
95
|
-
# Cop supports --auto-correct.
|
96
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, SupportedStylesForEmptyBraces.
|
97
|
-
# SupportedStyles: space, no_space
|
98
|
-
# SupportedStylesForEmptyBraces: space, no_space
|
99
|
-
Layout/SpaceBeforeBlockBraces:
|
100
|
-
Exclude:
|
101
|
-
- 'druid-tools.gemspec'
|
102
|
-
- 'spec/druid_spec.rb'
|
103
|
-
|
104
|
-
# Offense count: 8
|
105
|
-
# Cop supports --auto-correct.
|
106
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces, SpaceBeforeBlockParameters.
|
107
|
-
# SupportedStyles: space, no_space
|
108
|
-
# SupportedStylesForEmptyBraces: space, no_space
|
109
|
-
Layout/SpaceInsideBlockBraces:
|
110
|
-
Exclude:
|
111
|
-
- 'spec/druid_spec.rb'
|
112
|
-
|
113
|
-
# Offense count: 2
|
114
|
-
# Cop supports --auto-correct.
|
115
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
116
|
-
# SupportedStyles: final_newline, final_blank_line
|
117
|
-
Layout/TrailingBlankLines:
|
118
|
-
Exclude:
|
119
|
-
- 'lib/druid-tools.rb'
|
120
|
-
- 'lib/druid_tools/exceptions.rb'
|
121
|
-
|
122
|
-
# Offense count: 21
|
123
|
-
# Cop supports --auto-correct.
|
124
|
-
Lint/DeprecatedClassMethods:
|
125
|
-
Exclude:
|
126
|
-
- 'lib/druid_tools/access_druid.rb'
|
127
|
-
- 'lib/druid_tools/druid.rb'
|
128
|
-
- 'spec/druid_spec.rb'
|
129
|
-
|
130
|
-
# Offense count: 3
|
131
|
-
# Cop supports --auto-correct.
|
132
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
133
|
-
# SupportedStyles: runtime_error, standard_error
|
134
|
-
Lint/InheritException:
|
135
|
-
Exclude:
|
136
|
-
- 'lib/druid_tools/exceptions.rb'
|
137
|
-
|
138
|
-
# Offense count: 1
|
139
|
-
Lint/UselessAssignment:
|
140
|
-
Exclude:
|
141
|
-
- 'spec/druid_spec.rb'
|
142
|
-
|
143
9
|
# Offense count: 1
|
144
10
|
Metrics/AbcSize:
|
145
11
|
Max: 21
|
146
12
|
|
147
|
-
# Offense count: 8
|
148
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
149
|
-
Metrics/BlockLength:
|
150
|
-
Max: 371
|
151
|
-
|
152
13
|
# Offense count: 1
|
153
14
|
# Configuration parameters: CountComments.
|
154
15
|
Metrics/ClassLength:
|
155
|
-
Max:
|
16
|
+
Max: 140
|
156
17
|
|
157
18
|
# Offense count: 1
|
158
|
-
# Configuration parameters: CountComments.
|
19
|
+
# Configuration parameters: CountComments, ExcludedMethods.
|
159
20
|
Metrics/MethodLength:
|
160
21
|
Max: 12
|
161
22
|
|
162
23
|
# Offense count: 1
|
163
24
|
# Configuration parameters: Blacklist.
|
164
|
-
# Blacklist:
|
25
|
+
# Blacklist: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
|
165
26
|
Naming/HeredocDelimiterNaming:
|
166
27
|
Exclude:
|
167
28
|
- 'lib/druid_tools/druid.rb'
|
168
29
|
|
169
|
-
# Offense count: 2
|
170
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
171
|
-
# SupportedStyles: snake_case, normalcase, non_integer
|
172
|
-
Naming/VariableNumber:
|
173
|
-
Exclude:
|
174
|
-
- 'spec/druid_spec.rb'
|
175
|
-
|
176
30
|
# Offense count: 2
|
177
31
|
RSpec/BeforeAfterAll:
|
178
32
|
Exclude:
|
179
33
|
- 'spec/spec_helper.rb'
|
180
34
|
- 'spec/rails_helper.rb'
|
181
35
|
- 'spec/support/**/*.rb'
|
182
|
-
- 'spec/
|
183
|
-
|
184
|
-
# Offense count: 36
|
185
|
-
# Configuration parameters: SkipBlocks, EnforcedStyle, SupportedStyles.
|
186
|
-
# SupportedStyles: described_class, explicit
|
187
|
-
RSpec/DescribedClass:
|
188
|
-
Exclude:
|
189
|
-
- 'spec/access_druid_spec.rb'
|
190
|
-
- 'spec/druid_spec.rb'
|
36
|
+
- 'spec/druid_tools_spec.rb'
|
191
37
|
|
192
38
|
# Offense count: 10
|
193
39
|
# Configuration parameters: Max.
|
194
40
|
RSpec/ExampleLength:
|
195
41
|
Exclude:
|
196
|
-
- 'spec/
|
42
|
+
- 'spec/druid_tools_spec.rb'
|
197
43
|
|
198
|
-
# Offense count:
|
44
|
+
# Offense count: 1
|
199
45
|
# Configuration parameters: CustomTransform, IgnoreMethods.
|
200
46
|
RSpec/FilePath:
|
201
47
|
Exclude:
|
202
|
-
- 'spec/
|
203
|
-
- 'spec/druid_spec.rb'
|
204
|
-
|
205
|
-
# Offense count: 6
|
206
|
-
# Configuration parameters: SupportedStyles.
|
207
|
-
# SupportedStyles: implicit, each, example
|
208
|
-
RSpec/HookArgument:
|
209
|
-
EnforcedStyle: each
|
48
|
+
- 'spec/druid_tools_spec.rb'
|
210
49
|
|
211
50
|
# Offense count: 22
|
51
|
+
# Configuration parameters: AggregateFailuresByDefault.
|
212
52
|
RSpec/MultipleExpectations:
|
213
53
|
Max: 11
|
214
54
|
|
215
|
-
# Offense count: 8
|
216
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
217
|
-
# SupportedStyles: not_to, to_not
|
218
|
-
RSpec/NotToNot:
|
219
|
-
Exclude:
|
220
|
-
- 'spec/access_druid_spec.rb'
|
221
|
-
- 'spec/druid_spec.rb'
|
222
|
-
|
223
|
-
# Offense count: 22
|
224
|
-
# Configuration parameters: Strict, EnforcedStyle, SupportedStyles.
|
225
|
-
# SupportedStyles: inflected, explicit
|
226
|
-
RSpec/PredicateMatcher:
|
227
|
-
Exclude:
|
228
|
-
- 'spec/druid_spec.rb'
|
229
|
-
|
230
55
|
# Offense count: 2
|
231
56
|
RSpec/RepeatedExample:
|
232
57
|
Exclude:
|
233
|
-
- 'spec/
|
234
|
-
|
235
|
-
# Offense count: 3
|
236
|
-
# Cop supports --auto-correct.
|
237
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
238
|
-
# SupportedStyles: always, conditionals
|
239
|
-
Style/AndOr:
|
240
|
-
Exclude:
|
241
|
-
- 'lib/druid_tools/access_druid.rb'
|
242
|
-
- 'lib/druid_tools/druid.rb'
|
58
|
+
- 'spec/druid_tools_spec.rb'
|
243
59
|
|
244
60
|
# Offense count: 1
|
245
61
|
Style/ClassVars:
|
246
62
|
Exclude:
|
247
63
|
- 'lib/druid_tools/druid.rb'
|
248
64
|
|
249
|
-
# Offense count: 4
|
250
|
-
# Cop supports --auto-correct.
|
251
|
-
Style/ColonMethodCall:
|
252
|
-
Exclude:
|
253
|
-
- 'lib/druid_tools/druid.rb'
|
254
|
-
- 'spec/druid_spec.rb'
|
255
|
-
|
256
65
|
# Offense count: 2
|
257
66
|
Style/Documentation:
|
258
67
|
Exclude:
|
@@ -262,111 +71,6 @@ Style/Documentation:
|
|
262
71
|
- 'lib/druid_tools/druid.rb'
|
263
72
|
|
264
73
|
# Offense count: 1
|
265
|
-
|
266
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, AutoCorrectEncodingComment.
|
267
|
-
# SupportedStyles: when_needed, always, never
|
268
|
-
Style/Encoding:
|
269
|
-
Exclude:
|
270
|
-
- 'druid-tools.gemspec'
|
271
|
-
|
272
|
-
# Offense count: 8
|
273
|
-
# Cop supports --auto-correct.
|
274
|
-
# Configuration parameters: SupportedStyles, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
275
|
-
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
276
|
-
Style/HashSyntax:
|
277
|
-
EnforcedStyle: hash_rockets
|
278
|
-
|
279
|
-
# Offense count: 1
|
280
|
-
# Cop supports --auto-correct.
|
281
|
-
Style/MethodCallWithoutArgsParentheses:
|
282
|
-
Exclude:
|
283
|
-
- 'spec/druid_spec.rb'
|
284
|
-
|
285
|
-
# Offense count: 1
|
286
|
-
# Cop supports --auto-correct.
|
287
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
288
|
-
# SupportedStyles: both, prefix, postfix
|
289
|
-
Style/NegatedIf:
|
290
|
-
Exclude:
|
291
|
-
- 'lib/druid_tools/druid.rb'
|
292
|
-
|
293
|
-
# Offense count: 2
|
294
|
-
# Cop supports --auto-correct.
|
295
|
-
Style/Not:
|
296
|
-
Exclude:
|
297
|
-
- 'lib/druid_tools/access_druid.rb'
|
298
|
-
- 'lib/druid_tools/druid.rb'
|
299
|
-
|
300
|
-
# Offense count: 1
|
301
|
-
# Cop supports --auto-correct.
|
302
|
-
# Configuration parameters: AutoCorrect, EnforcedStyle, SupportedStyles.
|
303
|
-
# SupportedStyles: predicate, comparison
|
304
|
-
Style/NumericPredicate:
|
305
|
-
Exclude:
|
306
|
-
- 'spec/**/*'
|
307
|
-
- 'lib/druid_tools/druid.rb'
|
308
|
-
|
309
|
-
# Offense count: 1
|
310
|
-
# Cop supports --auto-correct.
|
311
|
-
# Configuration parameters: PreferredDelimiters.
|
312
|
-
Style/PercentLiteralDelimiters:
|
313
|
-
Exclude:
|
314
|
-
- 'spec/druid_spec.rb'
|
315
|
-
|
316
|
-
# Offense count: 2
|
317
|
-
# Cop supports --auto-correct.
|
318
|
-
Style/RedundantParentheses:
|
319
|
-
Exclude:
|
320
|
-
- 'lib/druid_tools/access_druid.rb'
|
321
|
-
- 'lib/druid_tools/druid.rb'
|
322
|
-
|
323
|
-
# Offense count: 4
|
324
|
-
# Cop supports --auto-correct.
|
325
|
-
# Configuration parameters: AllowMultipleReturnValues.
|
326
|
-
Style/RedundantReturn:
|
327
|
-
Exclude:
|
328
|
-
- 'lib/druid_tools/druid.rb'
|
329
|
-
|
330
|
-
# Offense count: 11
|
331
|
-
# Cop supports --auto-correct.
|
332
|
-
Style/RedundantSelf:
|
333
|
-
Exclude:
|
334
|
-
- 'lib/druid_tools/druid.rb'
|
335
|
-
|
336
|
-
# Offense count: 2
|
337
|
-
# Cop supports --auto-correct.
|
338
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
|
339
|
-
# SupportedStyles: slashes, percent_r, mixed
|
340
|
-
Style/RegexpLiteral:
|
341
|
-
Exclude:
|
342
|
-
- 'spec/access_druid_spec.rb'
|
343
|
-
- 'spec/druid_spec.rb'
|
344
|
-
|
345
|
-
# Offense count: 1
|
346
|
-
# Cop supports --auto-correct.
|
347
|
-
# Configuration parameters: SupportedStyles.
|
348
|
-
# SupportedStyles: use_perl_names, use_english_names
|
349
|
-
Style/SpecialGlobalVars:
|
350
|
-
EnforcedStyle: use_perl_names
|
351
|
-
|
352
|
-
# Offense count: 3
|
353
|
-
# Cop supports --auto-correct.
|
354
|
-
# Configuration parameters: MinSize, SupportedStyles.
|
355
|
-
# SupportedStyles: percent, brackets
|
356
|
-
Style/SymbolArray:
|
357
|
-
EnforcedStyle: brackets
|
358
|
-
|
359
|
-
# Offense count: 2
|
360
|
-
# Cop supports --auto-correct.
|
361
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, MinSize, WordRegex.
|
362
|
-
# SupportedStyles: percent, brackets
|
363
|
-
Style/WordArray:
|
364
|
-
Exclude:
|
365
|
-
- 'spec/access_druid_spec.rb'
|
366
|
-
- 'spec/druid_spec.rb'
|
367
|
-
|
368
|
-
# Offense count: 2
|
369
|
-
# Cop supports --auto-correct.
|
370
|
-
Style/ZeroLengthPredicate:
|
74
|
+
Style/EvalWithLocation:
|
371
75
|
Exclude:
|
372
76
|
- 'lib/druid_tools/druid.rb'
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -1,11 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source 'https://rubygems.org'
|
2
4
|
|
3
5
|
group :development do
|
4
|
-
gem
|
5
|
-
gem
|
6
|
-
gem
|
7
|
-
gem
|
8
|
-
gem
|
6
|
+
gem 'debugger', platform: :ruby_19
|
7
|
+
gem 'pry-debugger', platform: :ruby_19
|
8
|
+
gem 'rcov', platform: :ruby_18
|
9
|
+
gem 'ruby-debug', platform: :ruby_18
|
10
|
+
gem 'simplecov', platform: %i[ruby_19 ruby_20]
|
9
11
|
end
|
10
12
|
|
11
13
|
gemspec
|