stanford-mods 2.4.0 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +364 -139
- data/Rakefile +0 -1
- data/lib/stanford-mods/date_parsing.rb +1 -1
- data/lib/stanford-mods/version.rb +1 -1
- data/spec/date_parsing_spec.rb +8 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47fe846bf178ebeb8b887a6a7bcf0d8abdf6bd6c
|
4
|
+
data.tar.gz: 37b1c64b6a63de0b9bb2eec908660eec5d85618b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c0ab1ef1f3e8d1c28d11f8d38c212acae65095d97e679af85d2fa4d15616c085a76f1ddebd04cedd9396224195871339d6da78ba695e8ef866db7064dc0dc81
|
7
|
+
data.tar.gz: e0ed0da17dc77b75d6c80334bef6a2e578e7ddb5f103049d0b005409883f707981824e06f57a6bcaf7f213a2cb0b697a42251694f2a1e7a67d7f202d5f74acdb
|
data/.rubocop_todo.yml
CHANGED
@@ -1,14 +1,153 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2017-11-16 11:34:11 -0800 using RuboCop version 0.51.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:
|
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: 1
|
18
|
+
# Cop supports --auto-correct.
|
19
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
|
20
|
+
# SupportedStyles: outdent, indent
|
21
|
+
Layout/AccessModifierIndentation:
|
22
|
+
Exclude:
|
23
|
+
- 'lib/stanford-mods/origin_info.rb'
|
24
|
+
|
25
|
+
# Offense count: 27
|
26
|
+
# Cop supports --auto-correct.
|
27
|
+
Layout/AlignArray:
|
28
|
+
Exclude:
|
29
|
+
- 'lib/stanford-mods/searchworks.rb'
|
30
|
+
- 'spec/imprint_spec.rb'
|
31
|
+
|
32
|
+
# Offense count: 4
|
33
|
+
# Cop supports --auto-correct.
|
34
|
+
# Configuration parameters: EnforcedHashRocketStyle, SupportedHashRocketStyles, EnforcedColonStyle, SupportedColonStyles, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles.
|
35
|
+
# SupportedHashRocketStyles: key, separator, table
|
36
|
+
# SupportedColonStyles: key, separator, table
|
37
|
+
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
38
|
+
Layout/AlignHash:
|
39
|
+
Exclude:
|
40
|
+
- 'spec/fixtures/searchworks_imprint_data.rb'
|
41
|
+
- 'spec/fixtures/searchworks_pub_date_data.rb'
|
42
|
+
- 'spec/fixtures/spotlight_pub_date_data.rb'
|
43
|
+
|
44
|
+
# Offense count: 12
|
45
|
+
# Cop supports --auto-correct.
|
46
|
+
Layout/BlockEndNewline:
|
47
|
+
Exclude:
|
48
|
+
- 'spec/name_spec.rb'
|
49
|
+
|
50
|
+
# Offense count: 20
|
51
|
+
# Cop supports --auto-correct.
|
52
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentOneStep, IndentationWidth.
|
53
|
+
# SupportedStyles: case, end
|
54
|
+
Layout/CaseIndentation:
|
55
|
+
Exclude:
|
56
|
+
- 'lib/stanford-mods/searchworks.rb'
|
57
|
+
|
58
|
+
# Offense count: 6
|
59
|
+
# Cop supports --auto-correct.
|
60
|
+
Layout/CommentIndentation:
|
61
|
+
Exclude:
|
62
|
+
- 'lib/stanford-mods/origin_info.rb'
|
63
|
+
- 'spec/fixtures/searchworks_imprint_data.rb'
|
64
|
+
- 'spec/fixtures/searchworks_pub_date_data.rb'
|
65
|
+
- 'spec/fixtures/spotlight_pub_date_data.rb'
|
66
|
+
|
67
|
+
# Offense count: 17
|
68
|
+
# Cop supports --auto-correct.
|
69
|
+
Layout/EmptyLineAfterMagicComment:
|
70
|
+
Enabled: false
|
71
|
+
|
72
|
+
# Offense count: 1
|
73
|
+
# Cop supports --auto-correct.
|
74
|
+
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
|
75
|
+
Layout/ExtraSpacing:
|
76
|
+
Exclude:
|
77
|
+
- 'lib/stanford-mods/searchworks.rb'
|
78
|
+
|
79
|
+
# Offense count: 6
|
80
|
+
# Cop supports --auto-correct.
|
81
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
82
|
+
# SupportedStyles: symmetrical, new_line, same_line
|
83
|
+
Layout/MultilineArrayBraceLayout:
|
84
|
+
Exclude:
|
85
|
+
- 'lib/stanford-mods/searchworks.rb'
|
86
|
+
- 'spec/imprint_spec.rb'
|
87
|
+
|
88
|
+
# Offense count: 12
|
89
|
+
# Cop supports --auto-correct.
|
90
|
+
Layout/MultilineBlockLayout:
|
91
|
+
Exclude:
|
92
|
+
- 'spec/name_spec.rb'
|
93
|
+
|
94
|
+
# Offense count: 5
|
95
|
+
# Cop supports --auto-correct.
|
96
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
|
97
|
+
# SupportedStyles: aligned, indented, indented_relative_to_receiver
|
98
|
+
Layout/MultilineMethodCallIndentation:
|
99
|
+
Exclude:
|
100
|
+
- 'spec/date_parsing_spec.rb'
|
101
|
+
|
102
|
+
# Offense count: 882
|
103
|
+
# Cop supports --auto-correct.
|
104
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
|
105
|
+
# SupportedStyles: aligned, indented
|
106
|
+
Layout/MultilineOperationIndentation:
|
107
|
+
Exclude:
|
108
|
+
- 'lib/stanford-mods/name.rb'
|
109
|
+
- 'lib/stanford-mods/searchworks.rb'
|
110
|
+
- 'spec/fixtures/searchworks_imprint_data.rb'
|
111
|
+
- 'spec/fixtures/searchworks_pub_date_data.rb'
|
112
|
+
- 'spec/fixtures/spotlight_pub_date_data.rb'
|
113
|
+
- 'spec/origin_info_spec.rb'
|
114
|
+
|
115
|
+
# Offense count: 1
|
116
|
+
# Cop supports --auto-correct.
|
117
|
+
# Configuration parameters: AllowForAlignment.
|
118
|
+
Layout/SpaceAroundOperators:
|
119
|
+
Exclude:
|
120
|
+
- 'lib/stanford-mods/searchworks.rb'
|
121
|
+
|
122
|
+
# Offense count: 2
|
123
|
+
# Cop supports --auto-correct.
|
124
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces, SpaceBeforeBlockParameters.
|
125
|
+
# SupportedStyles: space, no_space
|
126
|
+
# SupportedStylesForEmptyBraces: space, no_space
|
127
|
+
Layout/SpaceInsideBlockBraces:
|
128
|
+
Exclude:
|
129
|
+
- 'lib/stanford-mods/searchworks.rb'
|
130
|
+
|
131
|
+
# Offense count: 11
|
132
|
+
# Cop supports --auto-correct.
|
133
|
+
Layout/TrailingWhitespace:
|
134
|
+
Exclude:
|
135
|
+
- 'lib/stanford-mods/searchworks.rb'
|
136
|
+
- 'spec/searchworks_spec.rb'
|
137
|
+
|
138
|
+
# Offense count: 4
|
139
|
+
Lint/RescueWithoutErrorClass:
|
140
|
+
Exclude:
|
141
|
+
- 'lib/stanford-mods/imprint.rb'
|
142
|
+
|
143
|
+
# Offense count: 32
|
10
144
|
Metrics/AbcSize:
|
11
|
-
Max:
|
145
|
+
Max: 51
|
146
|
+
|
147
|
+
# Offense count: 101
|
148
|
+
# Configuration parameters: CountComments, ExcludedMethods.
|
149
|
+
Metrics/BlockLength:
|
150
|
+
Max: 791
|
12
151
|
|
13
152
|
# Offense count: 5
|
14
153
|
# Configuration parameters: CountComments.
|
@@ -19,24 +158,71 @@ Metrics/ClassLength:
|
|
19
158
|
Metrics/CyclomaticComplexity:
|
20
159
|
Max: 26
|
21
160
|
|
22
|
-
# Offense count:
|
23
|
-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
|
161
|
+
# Offense count: 118
|
162
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
24
163
|
# URISchemes: http, https
|
25
164
|
Metrics/LineLength:
|
26
|
-
Max:
|
165
|
+
Max: 199
|
27
166
|
|
28
|
-
# Offense count:
|
167
|
+
# Offense count: 31
|
29
168
|
# Configuration parameters: CountComments.
|
30
169
|
Metrics/MethodLength:
|
31
|
-
Max:
|
170
|
+
Max: 52
|
32
171
|
|
33
172
|
# Offense count: 15
|
34
173
|
Metrics/PerceivedComplexity:
|
35
|
-
Max:
|
174
|
+
Max: 20
|
36
175
|
|
37
|
-
# Offense count:
|
176
|
+
# Offense count: 1
|
177
|
+
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
|
178
|
+
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
|
179
|
+
Naming/FileName:
|
180
|
+
Exclude:
|
181
|
+
- 'lib/stanford-mods.rb'
|
182
|
+
|
183
|
+
# Offense count: 24
|
184
|
+
# Configuration parameters: Blacklist.
|
185
|
+
# Blacklist: END, (?-mix:EO[A-Z]{1})
|
186
|
+
Naming/HeredocDelimiterNaming:
|
187
|
+
Exclude:
|
188
|
+
- 'spec/geo_spatial_spec.rb'
|
189
|
+
- 'spec/name_spec.rb'
|
190
|
+
- 'spec/origin_info_spec.rb'
|
191
|
+
- 'spec/physical_location_spec.rb'
|
192
|
+
- 'spec/searchworks_basic_spec.rb'
|
193
|
+
|
194
|
+
# Offense count: 3
|
195
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
196
|
+
# SupportedStyles: snake_case, camelCase
|
197
|
+
Naming/MethodName:
|
198
|
+
Exclude:
|
199
|
+
- 'lib/stanford-mods/origin_info.rb'
|
200
|
+
- 'lib/stanford-mods/searchworks.rb'
|
201
|
+
|
202
|
+
# Offense count: 2
|
203
|
+
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
|
204
|
+
# NamePrefix: is_, has_, have_
|
205
|
+
# NamePrefixBlacklist: is_, has_, have_
|
206
|
+
# NameWhitelist: is_a?
|
207
|
+
# MethodDefinitionMacros: define_method, define_singleton_method
|
208
|
+
Naming/PredicateName:
|
209
|
+
Exclude:
|
210
|
+
- 'spec/**/*'
|
211
|
+
- 'lib/stanford-mods/origin_info.rb'
|
212
|
+
|
213
|
+
# Offense count: 8
|
214
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
215
|
+
# SupportedStyles: snake_case, camelCase
|
216
|
+
Naming/VariableName:
|
217
|
+
Exclude:
|
218
|
+
- 'lib/stanford-mods/imprint.rb'
|
219
|
+
- 'lib/stanford-mods/origin_info.rb'
|
220
|
+
- 'lib/stanford-mods/searchworks.rb'
|
221
|
+
|
222
|
+
# Offense count: 11
|
38
223
|
# Cop supports --auto-correct.
|
39
|
-
|
224
|
+
# Configuration parameters: AutoCorrect.
|
225
|
+
Performance/HashEachMethods:
|
40
226
|
Exclude:
|
41
227
|
- 'spec/date_parsing_spec.rb'
|
42
228
|
|
@@ -45,7 +231,40 @@ RSpec/AnyInstance:
|
|
45
231
|
Exclude:
|
46
232
|
- 'spec/date_parsing_spec.rb'
|
47
233
|
|
48
|
-
# Offense count:
|
234
|
+
# Offense count: 14
|
235
|
+
RSpec/BeforeAfterAll:
|
236
|
+
Exclude:
|
237
|
+
- 'spec/spec_helper.rb'
|
238
|
+
- 'spec/rails_helper.rb'
|
239
|
+
- 'spec/support/**/*.rb'
|
240
|
+
- 'spec/physical_location_spec.rb'
|
241
|
+
- 'spec/searchworks_format_spec.rb'
|
242
|
+
- 'spec/searchworks_spec.rb'
|
243
|
+
- 'spec/searchworks_subject_raw_spec.rb'
|
244
|
+
- 'spec/searchworks_subject_spec.rb'
|
245
|
+
- 'spec/searchworks_title_spec.rb'
|
246
|
+
|
247
|
+
# Offense count: 142
|
248
|
+
# Configuration parameters: Prefixes.
|
249
|
+
# Prefixes: when, with, without
|
250
|
+
RSpec/ContextWording:
|
251
|
+
Exclude:
|
252
|
+
- 'spec/date_parsing_spec.rb'
|
253
|
+
- 'spec/geo_spatial_spec.rb'
|
254
|
+
- 'spec/imprint_spec.rb'
|
255
|
+
- 'spec/lib/stanford-mods/coordinate_spec.rb'
|
256
|
+
- 'spec/name_spec.rb'
|
257
|
+
- 'spec/origin_info_spec.rb'
|
258
|
+
- 'spec/physical_location_spec.rb'
|
259
|
+
- 'spec/searchworks_format_spec.rb'
|
260
|
+
- 'spec/searchworks_pub_dates_spec.rb'
|
261
|
+
- 'spec/searchworks_spec.rb'
|
262
|
+
- 'spec/searchworks_subject_raw_spec.rb'
|
263
|
+
- 'spec/searchworks_subject_spec.rb'
|
264
|
+
- 'spec/searchworks_title_spec.rb'
|
265
|
+
- 'spec/sw_publication_spec.rb'
|
266
|
+
|
267
|
+
# Offense count: 14
|
49
268
|
RSpec/DescribeClass:
|
50
269
|
Exclude:
|
51
270
|
- 'spec/date_parsing_spec.rb'
|
@@ -62,10 +281,19 @@ RSpec/DescribeClass:
|
|
62
281
|
- 'spec/searchworks_title_spec.rb'
|
63
282
|
- 'spec/sw_publication_spec.rb'
|
64
283
|
|
65
|
-
# Offense count:
|
284
|
+
# Offense count: 14
|
285
|
+
RSpec/EmptyLineAfterFinalLet:
|
286
|
+
Exclude:
|
287
|
+
- 'spec/name_spec.rb'
|
288
|
+
- 'spec/origin_info_spec.rb'
|
289
|
+
- 'spec/physical_location_spec.rb'
|
290
|
+
- 'spec/sw_publication_spec.rb'
|
291
|
+
|
292
|
+
# Offense count: 147
|
66
293
|
# Configuration parameters: Max.
|
67
294
|
RSpec/ExampleLength:
|
68
295
|
Exclude:
|
296
|
+
- 'spec/date_parsing_spec.rb'
|
69
297
|
- 'spec/imprint_spec.rb'
|
70
298
|
- 'spec/name_spec.rb'
|
71
299
|
- 'spec/origin_info_spec.rb'
|
@@ -76,24 +304,32 @@ RSpec/ExampleLength:
|
|
76
304
|
- 'spec/searchworks_subject_spec.rb'
|
77
305
|
- 'spec/searchworks_title_spec.rb'
|
78
306
|
|
79
|
-
# Offense count:
|
307
|
+
# Offense count: 114
|
80
308
|
# Configuration parameters: CustomTransform, IgnoredWords.
|
81
309
|
RSpec/ExampleWording:
|
82
310
|
Exclude:
|
83
311
|
- 'spec/searchworks_basic_spec.rb'
|
312
|
+
- 'spec/searchworks_format_spec.rb'
|
84
313
|
- 'spec/searchworks_spec.rb'
|
85
314
|
- 'spec/searchworks_subject_raw_spec.rb'
|
86
315
|
- 'spec/searchworks_subject_spec.rb'
|
87
316
|
- 'spec/searchworks_title_spec.rb'
|
88
317
|
|
89
318
|
# Offense count: 2
|
90
|
-
# Configuration parameters: CustomTransform.
|
319
|
+
# Configuration parameters: CustomTransform, IgnoreMethods.
|
91
320
|
RSpec/FilePath:
|
92
321
|
Exclude:
|
93
322
|
- 'spec/imprint_spec.rb'
|
94
323
|
- 'spec/lib/stanford-mods/coordinate_spec.rb'
|
95
324
|
|
96
|
-
# Offense count:
|
325
|
+
# Offense count: 2
|
326
|
+
# Configuration parameters: SupportedStyles.
|
327
|
+
# SupportedStyles: implicit, each, example
|
328
|
+
RSpec/HookArgument:
|
329
|
+
EnforcedStyle: each
|
330
|
+
|
331
|
+
# Offense count: 1102
|
332
|
+
# Configuration parameters: AssignmentOnly.
|
97
333
|
RSpec/InstanceVariable:
|
98
334
|
Exclude:
|
99
335
|
- 'spec/physical_location_spec.rb'
|
@@ -104,13 +340,56 @@ RSpec/InstanceVariable:
|
|
104
340
|
- 'spec/searchworks_subject_spec.rb'
|
105
341
|
- 'spec/searchworks_title_spec.rb'
|
106
342
|
|
343
|
+
# Offense count: 2
|
344
|
+
RSpec/LetBeforeExamples:
|
345
|
+
Exclude:
|
346
|
+
- 'spec/origin_info_spec.rb'
|
347
|
+
|
348
|
+
# Offense count: 25
|
349
|
+
# Configuration parameters: SupportedStyles.
|
350
|
+
# SupportedStyles: have_received, receive
|
351
|
+
RSpec/MessageSpies:
|
352
|
+
EnforcedStyle: receive
|
353
|
+
|
107
354
|
# Offense count: 1
|
108
|
-
|
109
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
|
110
|
-
# SupportedStyles: outdent, indent
|
111
|
-
Style/AccessModifierIndentation:
|
355
|
+
RSpec/MultipleDescribes:
|
112
356
|
Exclude:
|
113
|
-
- '
|
357
|
+
- 'spec/geo_spatial_spec.rb'
|
358
|
+
|
359
|
+
# Offense count: 114
|
360
|
+
RSpec/MultipleExpectations:
|
361
|
+
Max: 9
|
362
|
+
|
363
|
+
# Offense count: 2
|
364
|
+
RSpec/NamedSubject:
|
365
|
+
Exclude:
|
366
|
+
- 'spec/lib/stanford-mods/coordinate_spec.rb'
|
367
|
+
|
368
|
+
# Offense count: 38
|
369
|
+
# Configuration parameters: Max.
|
370
|
+
RSpec/NestedGroups:
|
371
|
+
Exclude:
|
372
|
+
- 'spec/origin_info_spec.rb'
|
373
|
+
- 'spec/physical_location_spec.rb'
|
374
|
+
- 'spec/searchworks_format_spec.rb'
|
375
|
+
- 'spec/searchworks_subject_raw_spec.rb'
|
376
|
+
- 'spec/searchworks_subject_spec.rb'
|
377
|
+
- 'spec/searchworks_title_spec.rb'
|
378
|
+
|
379
|
+
# Offense count: 7
|
380
|
+
RSpec/RepeatedExample:
|
381
|
+
Exclude:
|
382
|
+
- 'spec/date_parsing_spec.rb'
|
383
|
+
|
384
|
+
# Offense count: 2
|
385
|
+
RSpec/ScatteredLet:
|
386
|
+
Exclude:
|
387
|
+
- 'spec/origin_info_spec.rb'
|
388
|
+
|
389
|
+
# Offense count: 1
|
390
|
+
RSpec/VoidExpect:
|
391
|
+
Exclude:
|
392
|
+
- 'spec/origin_info_spec.rb'
|
114
393
|
|
115
394
|
# Offense count: 1
|
116
395
|
# Cop supports --auto-correct.
|
@@ -120,24 +399,7 @@ Style/Alias:
|
|
120
399
|
Exclude:
|
121
400
|
- 'lib/stanford-mods/origin_info.rb'
|
122
401
|
|
123
|
-
# Offense count:
|
124
|
-
# Cop supports --auto-correct.
|
125
|
-
Style/AlignArray:
|
126
|
-
Exclude:
|
127
|
-
- 'lib/stanford-mods/searchworks.rb'
|
128
|
-
- 'spec/imprint_spec.rb'
|
129
|
-
|
130
|
-
# Offense count: 4
|
131
|
-
# Cop supports --auto-correct.
|
132
|
-
# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles.
|
133
|
-
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
134
|
-
Style/AlignHash:
|
135
|
-
Exclude:
|
136
|
-
- 'spec/fixtures/searchworks_imprint_data.rb'
|
137
|
-
- 'spec/fixtures/searchworks_pub_date_data.rb'
|
138
|
-
- 'spec/fixtures/spotlight_pub_date_data.rb'
|
139
|
-
|
140
|
-
# Offense count: 33
|
402
|
+
# Offense count: 30
|
141
403
|
# Cop supports --auto-correct.
|
142
404
|
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
|
143
405
|
# SupportedStyles: line_count_based, semantic, braces_for_chaining
|
@@ -152,47 +414,46 @@ Style/BlockDelimiters:
|
|
152
414
|
- 'lib/stanford-mods/searchworks_subjects.rb'
|
153
415
|
- 'spec/name_spec.rb'
|
154
416
|
|
155
|
-
# Offense count:
|
156
|
-
|
157
|
-
Style/BlockEndNewline:
|
158
|
-
Exclude:
|
159
|
-
- 'spec/name_spec.rb'
|
160
|
-
|
161
|
-
# Offense count: 20
|
162
|
-
# Cop supports --auto-correct.
|
163
|
-
# Configuration parameters: IndentWhenRelativeTo, SupportedStyles, IndentOneStep, IndentationWidth.
|
164
|
-
# SupportedStyles: case, end
|
165
|
-
Style/CaseIndentation:
|
166
|
-
Exclude:
|
167
|
-
- 'lib/stanford-mods/searchworks.rb'
|
168
|
-
|
169
|
-
# Offense count: 6
|
170
|
-
# Cop supports --auto-correct.
|
171
|
-
Style/CommentIndentation:
|
417
|
+
# Offense count: 67
|
418
|
+
Style/CommentedKeyword:
|
172
419
|
Exclude:
|
420
|
+
- 'lib/stanford-mods.rb'
|
421
|
+
- 'lib/stanford-mods/name.rb'
|
173
422
|
- 'lib/stanford-mods/origin_info.rb'
|
174
|
-
- '
|
175
|
-
- '
|
176
|
-
- 'spec/
|
423
|
+
- 'lib/stanford-mods/physical_location.rb'
|
424
|
+
- 'lib/stanford-mods/searchworks.rb'
|
425
|
+
- 'spec/geo_spatial_spec.rb'
|
426
|
+
- 'spec/name_spec.rb'
|
427
|
+
- 'spec/physical_location_spec.rb'
|
428
|
+
- 'spec/searchworks_format_spec.rb'
|
429
|
+
- 'spec/searchworks_pub_dates_spec.rb'
|
430
|
+
- 'spec/searchworks_spec.rb'
|
431
|
+
- 'spec/searchworks_subject_raw_spec.rb'
|
432
|
+
- 'spec/searchworks_subject_spec.rb'
|
433
|
+
- 'spec/searchworks_title_spec.rb'
|
177
434
|
|
178
|
-
# Offense count:
|
435
|
+
# Offense count: 2
|
179
436
|
# Cop supports --auto-correct.
|
180
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly.
|
437
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly, IncludeTernaryExpressions.
|
181
438
|
# SupportedStyles: assign_to_condition, assign_inside_condition
|
182
439
|
Style/ConditionalAssignment:
|
183
440
|
Exclude:
|
184
441
|
- 'lib/stanford-mods/imprint.rb'
|
185
|
-
- 'lib/stanford-mods/origin_info.rb'
|
186
442
|
- 'lib/stanford-mods/searchworks.rb'
|
187
443
|
|
188
|
-
# Offense count:
|
444
|
+
# Offense count: 1
|
445
|
+
# Cop supports --auto-correct.
|
446
|
+
Style/Dir:
|
447
|
+
Exclude:
|
448
|
+
- 'Rakefile'
|
449
|
+
|
450
|
+
# Offense count: 4
|
189
451
|
Style/Documentation:
|
190
452
|
Exclude:
|
191
453
|
- 'spec/**/*'
|
192
454
|
- 'test/**/*'
|
193
455
|
- 'lib/stanford-mods/name.rb'
|
194
456
|
- 'lib/stanford-mods/origin_info.rb'
|
195
|
-
- 'lib/stanford-mods/physical_location.rb'
|
196
457
|
- 'lib/stanford-mods/searchworks.rb'
|
197
458
|
- 'lib/stanford-mods/searchworks_subjects.rb'
|
198
459
|
|
@@ -202,84 +463,44 @@ Style/EmptyCaseCondition:
|
|
202
463
|
Exclude:
|
203
464
|
- 'lib/stanford-mods/imprint.rb'
|
204
465
|
|
205
|
-
# Offense count:
|
466
|
+
# Offense count: 18
|
206
467
|
# Cop supports --auto-correct.
|
207
|
-
|
208
|
-
|
209
|
-
Style/EmptyElse:
|
210
|
-
Exclude:
|
211
|
-
- 'lib/stanford-mods/searchworks.rb'
|
468
|
+
Style/Encoding:
|
469
|
+
Enabled: false
|
212
470
|
|
213
|
-
# Offense count:
|
214
|
-
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts.
|
215
|
-
Style/FileName:
|
216
|
-
Exclude:
|
217
|
-
- 'lib/stanford-mods.rb'
|
218
|
-
|
219
|
-
# Offense count: 2
|
471
|
+
# Offense count: 3
|
220
472
|
# Configuration parameters: MinBodyLength.
|
221
473
|
Style/GuardClause:
|
222
474
|
Exclude:
|
223
475
|
- 'lib/stanford-mods/date_parsing.rb'
|
224
|
-
- 'lib/stanford-mods/origin_info.rb'
|
225
476
|
|
226
477
|
# Offense count: 2
|
227
478
|
Style/IdenticalConditionalBranches:
|
228
|
-
Exclude:
|
229
|
-
- 'lib/stanford-mods/origin_info.rb'
|
230
|
-
|
231
|
-
# Offense count: 205
|
232
|
-
# Cop supports --auto-correct.
|
233
|
-
Style/LineEndConcatenation:
|
234
|
-
Exclude:
|
235
|
-
- 'spec/fixtures/searchworks_imprint_data.rb'
|
236
|
-
- 'spec/fixtures/searchworks_pub_date_data.rb'
|
237
|
-
- 'spec/fixtures/spotlight_pub_date_data.rb'
|
238
|
-
- 'spec/origin_info_spec.rb'
|
239
|
-
|
240
|
-
# Offense count: 2
|
241
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
242
|
-
# SupportedStyles: snake_case, camelCase
|
243
|
-
Style/MethodName:
|
244
|
-
Exclude:
|
245
|
-
- 'lib/stanford-mods/origin_info.rb'
|
246
|
-
|
247
|
-
# Offense count: 6
|
248
|
-
# Cop supports --auto-correct.
|
249
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
250
|
-
# SupportedStyles: symmetrical, new_line, same_line
|
251
|
-
Style/MultilineArrayBraceLayout:
|
252
479
|
Exclude:
|
253
480
|
- 'lib/stanford-mods/searchworks.rb'
|
254
|
-
- 'spec/imprint_spec.rb'
|
255
|
-
|
256
|
-
# Offense count: 12
|
257
|
-
# Cop supports --auto-correct.
|
258
|
-
Style/MultilineBlockLayout:
|
259
|
-
Exclude:
|
260
|
-
- 'spec/name_spec.rb'
|
261
481
|
|
262
|
-
# Offense count:
|
482
|
+
# Offense count: 3
|
263
483
|
# Cop supports --auto-correct.
|
264
|
-
# Configuration parameters:
|
265
|
-
|
266
|
-
Style/MultilineMethodCallIndentation:
|
484
|
+
# Configuration parameters: InverseMethods, InverseBlocks.
|
485
|
+
Style/InverseMethods:
|
267
486
|
Exclude:
|
268
|
-
- '
|
487
|
+
- 'lib/stanford-mods/imprint.rb'
|
488
|
+
- 'lib/stanford-mods/searchworks.rb'
|
269
489
|
|
270
|
-
# Offense count:
|
490
|
+
# Offense count: 205
|
271
491
|
# Cop supports --auto-correct.
|
272
|
-
|
273
|
-
# SupportedStyles: aligned, indented
|
274
|
-
Style/MultilineOperationIndentation:
|
492
|
+
Style/LineEndConcatenation:
|
275
493
|
Exclude:
|
276
|
-
- 'lib/stanford-mods/name.rb'
|
277
|
-
- 'lib/stanford-mods/searchworks.rb'
|
278
494
|
- 'spec/fixtures/searchworks_imprint_data.rb'
|
279
495
|
- 'spec/fixtures/searchworks_pub_date_data.rb'
|
280
496
|
- 'spec/fixtures/spotlight_pub_date_data.rb'
|
281
497
|
- 'spec/origin_info_spec.rb'
|
282
498
|
|
499
|
+
# Offense count: 1
|
500
|
+
Style/MultilineTernaryOperator:
|
501
|
+
Exclude:
|
502
|
+
- 'lib/stanford-mods/physical_location.rb'
|
503
|
+
|
283
504
|
# Offense count: 1
|
284
505
|
# Cop supports --auto-correct.
|
285
506
|
# Configuration parameters: EnforcedOctalStyle, SupportedOctalStyles.
|
@@ -294,18 +515,10 @@ Style/PerlBackrefs:
|
|
294
515
|
Exclude:
|
295
516
|
- 'lib/stanford-mods/date_parsing.rb'
|
296
517
|
|
297
|
-
# Offense count: 2
|
298
|
-
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
|
299
|
-
# NamePrefix: is_, has_, have_
|
300
|
-
# NamePrefixBlacklist: is_, has_, have_
|
301
|
-
# NameWhitelist: is_a?
|
302
|
-
Style/PredicateName:
|
303
|
-
Exclude:
|
304
|
-
- 'spec/**/*'
|
305
|
-
- 'lib/stanford-mods/origin_info.rb'
|
306
|
-
|
307
518
|
# Offense count: 3
|
308
519
|
# Cop supports --auto-correct.
|
520
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
521
|
+
# SupportedStyles: short, verbose
|
309
522
|
Style/PreferredHashMethods:
|
310
523
|
Exclude:
|
311
524
|
- 'lib/stanford-mods/searchworks.rb'
|
@@ -341,6 +554,19 @@ Style/SignalException:
|
|
341
554
|
Style/SpecialGlobalVars:
|
342
555
|
EnforcedStyle: use_perl_names
|
343
556
|
|
557
|
+
# Offense count: 2
|
558
|
+
# Cop supports --auto-correct.
|
559
|
+
Style/StderrPuts:
|
560
|
+
Exclude:
|
561
|
+
- 'Rakefile'
|
562
|
+
|
563
|
+
# Offense count: 13
|
564
|
+
# Cop supports --auto-correct.
|
565
|
+
# Configuration parameters: MinSize, SupportedStyles.
|
566
|
+
# SupportedStyles: percent, brackets
|
567
|
+
Style/SymbolArray:
|
568
|
+
EnforcedStyle: brackets
|
569
|
+
|
344
570
|
# Offense count: 4
|
345
571
|
# Cop supports --auto-correct.
|
346
572
|
# Configuration parameters: IgnoredMethods.
|
@@ -350,18 +576,17 @@ Style/SymbolProc:
|
|
350
576
|
- 'lib/stanford-mods/searchworks.rb'
|
351
577
|
- 'lib/stanford-mods/searchworks_subjects.rb'
|
352
578
|
|
353
|
-
# Offense count: 10
|
354
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
355
|
-
# SupportedStyles: snake_case, camelCase
|
356
|
-
Style/VariableName:
|
357
|
-
Exclude:
|
358
|
-
- 'lib/stanford-mods/imprint.rb'
|
359
|
-
- 'lib/stanford-mods/origin_info.rb'
|
360
|
-
- 'lib/stanford-mods/searchworks.rb'
|
361
|
-
|
362
579
|
# Offense count: 125
|
363
580
|
# Cop supports --auto-correct.
|
364
581
|
# Configuration parameters: SupportedStyles, MinSize, WordRegex.
|
365
582
|
# SupportedStyles: percent, brackets
|
366
583
|
Style/WordArray:
|
367
584
|
EnforcedStyle: brackets
|
585
|
+
|
586
|
+
# Offense count: 2
|
587
|
+
# Cop supports --auto-correct.
|
588
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
589
|
+
# SupportedStyles: all_comparison_operators, equality_operators_only
|
590
|
+
Style/YodaCondition:
|
591
|
+
Exclude:
|
592
|
+
- 'lib/stanford-mods/date_parsing.rb'
|
data/Rakefile
CHANGED
@@ -188,7 +188,7 @@ module Stanford
|
|
188
188
|
end
|
189
189
|
|
190
190
|
CENTURY_WORD_REGEXP = Regexp.new('(\d{1,2}).*century')
|
191
|
-
CENTURY_4CHAR_REGEXP = Regexp.new('(\d{1,2})[u\-]{2}')
|
191
|
+
CENTURY_4CHAR_REGEXP = Regexp.new('(\d{1,2})[u\-]{2}([^u\-]|$)')
|
192
192
|
|
193
193
|
# get first year of century (as String) if we have: yyuu, yy--, yy--? or xxth century pattern
|
194
194
|
# note that these are the only century patterns found in our actual date strings in MODS records
|
data/spec/date_parsing_spec.rb
CHANGED
@@ -19,7 +19,8 @@ describe "date parsing methods" do
|
|
19
19
|
'M. D. LXI',
|
20
20
|
'[An 4]',
|
21
21
|
'[s.d.]',
|
22
|
-
'Undated'
|
22
|
+
'Undated',
|
23
|
+
'1uuu'
|
23
24
|
]
|
24
25
|
# example string as key, expected parsed value as value
|
25
26
|
invalid_but_can_get_year = {
|
@@ -468,7 +469,8 @@ describe "date parsing methods" do
|
|
468
469
|
'9999',
|
469
470
|
'2035',
|
470
471
|
'0000-00-00',
|
471
|
-
'uuuu'
|
472
|
+
'uuuu',
|
473
|
+
'1uuu'
|
472
474
|
].each do |example|
|
473
475
|
it "nil for #{example}" do
|
474
476
|
expect(Stanford::Mods::DateParsing.new(example).date_str_for_display).to eq nil
|
@@ -523,7 +525,8 @@ describe "date parsing methods" do
|
|
523
525
|
'9999',
|
524
526
|
'2035',
|
525
527
|
'0000-00-00',
|
526
|
-
'uuuu'
|
528
|
+
'uuuu',
|
529
|
+
'1uuu'
|
527
530
|
].each do |example|
|
528
531
|
it "nil for #{example}" do
|
529
532
|
expect(Stanford::Mods::DateParsing.new(example).year_int_from_date_str).to eq nil
|
@@ -573,7 +576,8 @@ describe "date parsing methods" do
|
|
573
576
|
'9999',
|
574
577
|
'2035',
|
575
578
|
'0000-00-00',
|
576
|
-
'uuuu'
|
579
|
+
'uuuu',
|
580
|
+
'1uuu'
|
577
581
|
].each do |example|
|
578
582
|
it "nil for #{example}" do
|
579
583
|
expect(Stanford::Mods::DateParsing.new(example).sortable_year_string_from_date_str).to eq nil
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stanford-mods
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naomi Dushay
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-11-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mods
|
@@ -177,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
177
|
version: '0'
|
178
178
|
requirements: []
|
179
179
|
rubyforge_project:
|
180
|
-
rubygems_version: 2.
|
180
|
+
rubygems_version: 2.6.11
|
181
181
|
signing_key:
|
182
182
|
specification_version: 4
|
183
183
|
summary: Stanford specific wrangling of MODS metadata
|