mods_display 1.0.0.alpha4 → 1.0.0.alpha5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +42 -0
- data/.rubocop_todo.yml +72 -401
- data/Gemfile +4 -1
- data/Rakefile +8 -6
- data/app/components/mods_display/field_component.rb +2 -0
- data/app/components/mods_display/list_field_component.rb +2 -0
- data/app/components/mods_display/record_component.rb +2 -0
- data/app/helpers/mods_display/record_helper.rb +4 -7
- data/app/models/mods_display/record.rb +2 -1
- data/config.ru +2 -2
- data/lib/mods_display/country_codes.rb +2 -1
- data/lib/mods_display/fields/abstract.rb +2 -0
- data/lib/mods_display/fields/access_condition.rb +7 -4
- data/lib/mods_display/fields/audience.rb +2 -0
- data/lib/mods_display/fields/cartographics.rb +8 -1
- data/lib/mods_display/fields/collection.rb +6 -2
- data/lib/mods_display/fields/contact.rb +2 -0
- data/lib/mods_display/fields/contents.rb +2 -0
- data/lib/mods_display/fields/description.rb +3 -2
- data/lib/mods_display/fields/extent.rb +3 -0
- data/lib/mods_display/fields/field.rb +6 -9
- data/lib/mods_display/fields/form.rb +3 -0
- data/lib/mods_display/fields/genre.rb +2 -0
- data/lib/mods_display/fields/geo.rb +5 -2
- data/lib/mods_display/fields/identifier.rb +20 -17
- data/lib/mods_display/fields/imprint.rb +168 -217
- data/lib/mods_display/fields/language.rb +5 -1
- data/lib/mods_display/fields/location.rb +4 -1
- data/lib/mods_display/fields/name.rb +35 -19
- data/lib/mods_display/fields/nested_related_item.rb +12 -2
- data/lib/mods_display/fields/note.rb +9 -7
- data/lib/mods_display/fields/related_item.rb +12 -9
- data/lib/mods_display/fields/resource_type.rb +2 -0
- data/lib/mods_display/fields/sub_title.rb +2 -0
- data/lib/mods_display/fields/subject.rb +17 -50
- data/lib/mods_display/fields/title.rb +37 -26
- data/lib/mods_display/fields/values.rb +2 -0
- data/lib/mods_display/html.rb +4 -3
- data/lib/mods_display/related_item_concerns.rb +4 -2
- data/lib/mods_display/relator_codes.rb +2 -0
- data/lib/mods_display/version.rb +3 -1
- data/lib/mods_display.rb +5 -3
- data/mods_display.gemspec +1 -1
- metadata +12 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee420c061ed577ae40b3acdf90215a8261ba96d63c53c96ed9d021ab3446fd31
|
4
|
+
data.tar.gz: cec3558b7a3886f25968aec482b1126e04f7f10132382cb787f5895666b37e62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b1a7cdb7e7f48cfd746e694577ceab478564d465416beab8cb9e307e70d0018fb06b17cf72a5be768ee7fbbf3e224b55c6bdbcada67779fb524633f750d8f08
|
7
|
+
data.tar.gz: 15002dc0bea304a8d933f89e0d99116b0804ddb5fd3f6f4ec104dd890406d596c3d5694d38ccb73707d4c3cb644fa29186f91e17a444635a0d2615930aac9825
|
data/.rubocop.yml
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
inherit_from: .rubocop_todo.yml
|
2
2
|
|
3
|
+
require: rubocop-rspec
|
4
|
+
|
3
5
|
AllCops:
|
4
6
|
Exclude:
|
5
7
|
- '*.gemspec'
|
@@ -8,10 +10,50 @@ AllCops:
|
|
8
10
|
- 'spec/fixtures/**/*'
|
9
11
|
- 'vendor/**/*'
|
10
12
|
TargetRubyVersion: 2.7
|
13
|
+
NewCops: enable
|
11
14
|
|
15
|
+
# Warn only for long lines
|
12
16
|
Layout/LineLength:
|
13
17
|
Max: 120
|
18
|
+
Severity: warning
|
14
19
|
|
20
|
+
# Use single-quoted strings where possible
|
15
21
|
Style/StringLiterals:
|
16
22
|
Enabled: true
|
17
23
|
EnforcedStyle: single_quotes
|
24
|
+
|
25
|
+
# Prevent false positives because we have fields named "subject"
|
26
|
+
RSpec/SubjectDeclaration:
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
RSpec/NamedSubject:
|
30
|
+
Enabled: false
|
31
|
+
|
32
|
+
# Allow long test blocks with multiple expectations
|
33
|
+
RSpec/MultipleExpectations:
|
34
|
+
Enabled: false
|
35
|
+
|
36
|
+
RSpec/ExampleLength:
|
37
|
+
Enabled: false
|
38
|
+
|
39
|
+
# Warn only for complexity-related metrics
|
40
|
+
Metrics/MethodLength:
|
41
|
+
Severity: warning
|
42
|
+
|
43
|
+
Metrics/ClassLength:
|
44
|
+
Severity: warning
|
45
|
+
|
46
|
+
Metrics/BlockLength:
|
47
|
+
Severity: warning
|
48
|
+
|
49
|
+
Metrics/ModuleLength:
|
50
|
+
Severity: warning
|
51
|
+
|
52
|
+
Metrics/PerceivedComplexity:
|
53
|
+
Severity: warning
|
54
|
+
|
55
|
+
Metrics/CyclomaticComplexity:
|
56
|
+
Severity: warning
|
57
|
+
|
58
|
+
Metrics/AbcSize:
|
59
|
+
Severity: warning
|
data/.rubocop_todo.yml
CHANGED
@@ -1,217 +1,51 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2022-01-
|
3
|
+
# on 2022-01-24 23:44:41 UTC using RuboCop version 1.25.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: 5
|
10
|
-
# Cop supports --auto-correct.
|
11
|
-
# Configuration parameters: EnforcedStyle, IndentOneStep, IndentationWidth.
|
12
|
-
# SupportedStyles: case, end
|
13
|
-
Layout/CaseIndentation:
|
14
|
-
Exclude:
|
15
|
-
- 'lib/mods_display/fields/title.rb'
|
16
|
-
|
17
|
-
# Offense count: 43
|
18
|
-
# Cop supports --auto-correct.
|
19
|
-
Layout/EmptyLineAfterGuardClause:
|
20
|
-
Enabled: false
|
21
|
-
|
22
|
-
# Offense count: 3
|
23
|
-
# Cop supports --auto-correct.
|
24
|
-
Layout/EmptyLineAfterMagicComment:
|
25
|
-
Exclude:
|
26
|
-
- 'lib/mods_display/country_codes.rb'
|
27
|
-
- 'lib/mods_display/fields/field.rb'
|
28
|
-
- 'spec/integration/html_spec.rb'
|
29
|
-
|
30
|
-
# Offense count: 1
|
31
|
-
# Cop supports --auto-correct.
|
32
|
-
# Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
|
33
|
-
Layout/EmptyLineBetweenDefs:
|
34
|
-
Exclude:
|
35
|
-
- 'spec/fake_app.rb'
|
36
|
-
|
37
|
-
# Offense count: 2
|
38
|
-
# Cop supports --auto-correct.
|
39
|
-
# Configuration parameters: AllowAliasSyntax, AllowedMethods.
|
40
|
-
# AllowedMethods: alias_method, public, protected, private
|
41
|
-
Layout/EmptyLinesAroundAttributeAccessor:
|
42
|
-
Exclude:
|
43
|
-
- 'lib/mods_display/fields/name.rb'
|
44
|
-
- 'spec/spec_helper.rb'
|
45
|
-
|
46
|
-
# Offense count: 1
|
47
|
-
# Cop supports --auto-correct.
|
48
|
-
# Configuration parameters: EnforcedStyle.
|
49
|
-
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
|
50
|
-
Layout/EmptyLinesAroundModuleBody:
|
51
|
-
Exclude:
|
52
|
-
- 'app/helpers/mods_display/record_helper.rb'
|
53
|
-
|
54
|
-
# Offense count: 1
|
55
|
-
# Cop supports --auto-correct.
|
56
|
-
# Configuration parameters: EnforcedStyleAlignWith, Severity.
|
57
|
-
# SupportedStylesAlignWith: keyword, variable, start_of_line
|
58
|
-
Layout/EndAlignment:
|
59
|
-
Exclude:
|
60
|
-
- 'lib/mods_display/fields/title.rb'
|
61
|
-
|
62
|
-
# Offense count: 1
|
63
|
-
# Cop supports --auto-correct.
|
64
|
-
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
|
65
|
-
Layout/ExtraSpacing:
|
66
|
-
Exclude:
|
67
|
-
- 'lib/mods_display/fields/name.rb'
|
68
|
-
|
69
|
-
# Offense count: 1
|
70
|
-
# Cop supports --auto-correct.
|
71
|
-
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
72
|
-
# SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
|
73
|
-
Layout/FirstArgumentIndentation:
|
74
|
-
Exclude:
|
75
|
-
- 'spec/fields/contents_spec.rb'
|
76
|
-
|
77
9
|
# Offense count: 28
|
78
10
|
# Cop supports --auto-correct.
|
79
|
-
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
80
|
-
# SupportedHashRocketStyles: key, separator, table
|
81
|
-
# SupportedColonStyles: key, separator, table
|
82
|
-
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
83
|
-
Layout/HashAlignment:
|
84
|
-
Exclude:
|
85
|
-
- 'lib/mods_display/fields/access_condition.rb'
|
86
|
-
- 'lib/mods_display/fields/identifier.rb'
|
87
|
-
- 'lib/mods_display/fields/note.rb'
|
88
|
-
- 'lib/mods_display/fields/title.rb'
|
89
|
-
|
90
|
-
# Offense count: 1
|
91
|
-
# Cop supports --auto-correct.
|
92
|
-
# Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment.
|
93
|
-
Layout/LeadingCommentSpace:
|
94
|
-
Exclude:
|
95
|
-
- 'lib/mods_display.rb'
|
96
|
-
|
97
|
-
# Offense count: 9
|
98
|
-
# Cop supports --auto-correct.
|
99
11
|
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
100
12
|
# URISchemes: http, https
|
101
13
|
Layout/LineLength:
|
102
14
|
Max: 255
|
103
15
|
|
104
|
-
# Offense count: 1
|
105
|
-
# Cop supports --auto-correct.
|
106
|
-
# Configuration parameters: EnforcedStyle.
|
107
|
-
# SupportedStyles: symmetrical, new_line, same_line
|
108
|
-
Layout/MultilineArrayBraceLayout:
|
109
|
-
Exclude:
|
110
|
-
- 'lib/mods_display/html.rb'
|
111
|
-
|
112
|
-
# Offense count: 5
|
113
|
-
# Cop supports --auto-correct.
|
114
|
-
# Configuration parameters: EnforcedStyle.
|
115
|
-
# SupportedStyles: symmetrical, new_line, same_line
|
116
|
-
Layout/MultilineHashBraceLayout:
|
117
|
-
Exclude:
|
118
|
-
- 'lib/mods_display/fields/access_condition.rb'
|
119
|
-
- 'lib/mods_display/fields/description.rb'
|
120
|
-
- 'lib/mods_display/fields/imprint.rb'
|
121
|
-
- 'lib/mods_display/fields/note.rb'
|
122
|
-
- 'lib/mods_display/html.rb'
|
123
|
-
|
124
|
-
# Offense count: 3
|
125
|
-
# Cop supports --auto-correct.
|
126
|
-
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
127
|
-
# SupportedStyles: aligned, indented
|
128
|
-
Layout/MultilineOperationIndentation:
|
129
|
-
Exclude:
|
130
|
-
- 'lib/mods_display/fields/name.rb'
|
131
|
-
- 'lib/mods_display/related_item_concerns.rb'
|
132
|
-
|
133
|
-
# Offense count: 1
|
134
|
-
# Cop supports --auto-correct.
|
135
|
-
# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
|
136
|
-
# SupportedStylesForExponentOperator: space, no_space
|
137
|
-
Layout/SpaceAroundOperators:
|
138
|
-
Exclude:
|
139
|
-
- 'lib/mods_display/fields/name.rb'
|
140
|
-
|
141
|
-
# Offense count: 1
|
142
|
-
# Cop supports --auto-correct.
|
143
|
-
# Configuration parameters: EnforcedStyle.
|
144
|
-
# SupportedStyles: final_newline, final_blank_line
|
145
|
-
Layout/TrailingEmptyLines:
|
146
|
-
Exclude:
|
147
|
-
- 'Gemfile'
|
148
|
-
|
149
|
-
# Offense count: 15
|
150
|
-
# Cop supports --auto-correct.
|
151
|
-
Lint/AmbiguousRegexpLiteral:
|
152
|
-
Exclude:
|
153
|
-
- 'spec/helpers/record_helper_spec.rb'
|
154
|
-
|
155
|
-
# Offense count: 1
|
156
|
-
Lint/MissingSuper:
|
157
|
-
Exclude:
|
158
|
-
- 'app/components/mods_display/field_component.rb'
|
159
|
-
|
160
|
-
# Offense count: 1
|
161
|
-
# Cop supports --auto-correct.
|
162
|
-
Lint/NonDeterministicRequireOrder:
|
163
|
-
Exclude:
|
164
|
-
- 'spec/spec_helper.rb'
|
165
|
-
|
166
16
|
# Offense count: 2
|
167
|
-
#
|
168
|
-
Lint/
|
17
|
+
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
|
18
|
+
Lint/DuplicateBranch:
|
169
19
|
Exclude:
|
170
|
-
- 'lib/mods_display.rb'
|
171
|
-
- 'lib/mods_display/railtie.rb'
|
20
|
+
- 'lib/mods_display/fields/title.rb'
|
172
21
|
|
173
22
|
# Offense count: 1
|
174
23
|
Lint/ShadowingOuterLocalVariable:
|
175
24
|
Exclude:
|
176
25
|
- 'spec/helpers/record_helper_spec.rb'
|
177
26
|
|
178
|
-
# Offense count:
|
179
|
-
# Cop supports --auto-correct.
|
180
|
-
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
|
181
|
-
Lint/UnusedMethodArgument:
|
182
|
-
Exclude:
|
183
|
-
- 'app/components/mods_display/field_component.rb'
|
184
|
-
- 'app/helpers/mods_display/record_helper.rb'
|
185
|
-
|
186
|
-
# Offense count: 1
|
187
|
-
# Cop supports --auto-correct.
|
188
|
-
# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
|
189
|
-
Lint/UselessAccessModifier:
|
190
|
-
Exclude:
|
191
|
-
- 'lib/mods_display/controller_extension.rb'
|
192
|
-
|
193
|
-
# Offense count: 26
|
27
|
+
# Offense count: 18
|
194
28
|
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
|
195
29
|
Metrics/AbcSize:
|
196
30
|
Max: 48
|
197
31
|
|
198
|
-
# Offense count:
|
32
|
+
# Offense count: 37
|
199
33
|
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
200
34
|
# IgnoredMethods: refine
|
201
35
|
Metrics/BlockLength:
|
202
|
-
Max:
|
36
|
+
Max: 257
|
203
37
|
|
204
|
-
# Offense count:
|
38
|
+
# Offense count: 3
|
205
39
|
# Configuration parameters: CountComments, CountAsOne.
|
206
40
|
Metrics/ClassLength:
|
207
|
-
Max:
|
41
|
+
Max: 298
|
208
42
|
|
209
|
-
# Offense count:
|
43
|
+
# Offense count: 11
|
210
44
|
# Configuration parameters: IgnoredMethods.
|
211
45
|
Metrics/CyclomaticComplexity:
|
212
|
-
Max:
|
46
|
+
Max: 18
|
213
47
|
|
214
|
-
# Offense count:
|
48
|
+
# Offense count: 21
|
215
49
|
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
216
50
|
Metrics/MethodLength:
|
217
51
|
Max: 378
|
@@ -221,21 +55,19 @@ Metrics/MethodLength:
|
|
221
55
|
Metrics/ModuleLength:
|
222
56
|
Max: 380
|
223
57
|
|
224
|
-
# Offense count:
|
58
|
+
# Offense count: 8
|
225
59
|
# Configuration parameters: IgnoredMethods.
|
226
60
|
Metrics/PerceivedComplexity:
|
227
|
-
Max:
|
61
|
+
Max: 20
|
228
62
|
|
229
|
-
# Offense count:
|
63
|
+
# Offense count: 1
|
230
64
|
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
|
231
65
|
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
|
232
66
|
Naming/MemoizedInstanceVariableName:
|
233
67
|
Exclude:
|
234
|
-
- 'app/models/mods_display/model.rb'
|
235
|
-
- 'lib/mods_display/configuration.rb'
|
236
68
|
- 'lib/mods_display/fields/geo.rb'
|
237
69
|
|
238
|
-
# Offense count:
|
70
|
+
# Offense count: 7
|
239
71
|
# Configuration parameters: EnforcedStyle, IgnoredPatterns.
|
240
72
|
# SupportedStyles: snake_case, camelCase
|
241
73
|
Naming/MethodName:
|
@@ -248,102 +80,83 @@ Naming/MethodName:
|
|
248
80
|
- 'lib/mods_display/fields/resource_type.rb'
|
249
81
|
- 'lib/mods_display/fields/subject.rb'
|
250
82
|
|
251
|
-
# Offense count:
|
252
|
-
|
253
|
-
Style/CaseLikeIf:
|
254
|
-
Exclude:
|
255
|
-
- 'lib/mods_display/fields/field.rb'
|
256
|
-
- 'lib/mods_display/fields/imprint.rb'
|
257
|
-
|
258
|
-
# Offense count: 6
|
259
|
-
# Cop supports --auto-correct.
|
260
|
-
# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
|
261
|
-
# SupportedStyles: assign_to_condition, assign_inside_condition
|
262
|
-
Style/ConditionalAssignment:
|
263
|
-
Exclude:
|
264
|
-
- 'lib/mods_display/fields/field.rb'
|
265
|
-
- 'lib/mods_display/fields/subject.rb'
|
266
|
-
|
267
|
-
# Offense count: 47
|
268
|
-
# Configuration parameters: AllowedConstants.
|
269
|
-
Style/Documentation:
|
83
|
+
# Offense count: 19
|
84
|
+
RSpec/BeforeAfterAll:
|
270
85
|
Enabled: false
|
271
86
|
|
272
|
-
# Offense count:
|
273
|
-
#
|
274
|
-
|
87
|
+
# Offense count: 2
|
88
|
+
# Configuration parameters: Prefixes.
|
89
|
+
# Prefixes: when, with, without
|
90
|
+
RSpec/ContextWording:
|
275
91
|
Exclude:
|
276
|
-
- '
|
277
|
-
- '
|
278
|
-
- 'lib/mods_display/fields/title.rb'
|
92
|
+
- 'spec/fields/contents_spec.rb'
|
93
|
+
- 'spec/fields/form_spec.rb'
|
279
94
|
|
280
|
-
# Offense count:
|
281
|
-
#
|
282
|
-
|
95
|
+
# Offense count: 1
|
96
|
+
# Configuration parameters: IgnoredMetadata.
|
97
|
+
RSpec/DescribeClass:
|
283
98
|
Exclude:
|
284
|
-
- '
|
285
|
-
- '
|
99
|
+
- '**/spec/features/**/*'
|
100
|
+
- '**/spec/requests/**/*'
|
101
|
+
- '**/spec/routing/**/*'
|
102
|
+
- '**/spec/system/**/*'
|
103
|
+
- '**/spec/views/**/*'
|
286
104
|
- 'spec/integration/html_spec.rb'
|
287
105
|
|
288
|
-
# Offense count:
|
106
|
+
# Offense count: 1
|
289
107
|
# Cop supports --auto-correct.
|
290
|
-
|
108
|
+
RSpec/ExpectActual:
|
291
109
|
Exclude:
|
292
|
-
- '
|
293
|
-
- 'spec/
|
110
|
+
- 'spec/routing/**/*'
|
111
|
+
- 'spec/fields/name_spec.rb'
|
294
112
|
|
295
|
-
# Offense count:
|
296
|
-
#
|
297
|
-
#
|
298
|
-
|
299
|
-
Style/FrozenStringLiteralComment:
|
113
|
+
# Offense count: 25
|
114
|
+
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
|
115
|
+
# Include: **/*_spec*rb*, **/spec/**/*
|
116
|
+
RSpec/FilePath:
|
300
117
|
Enabled: false
|
301
118
|
|
302
|
-
# Offense count:
|
303
|
-
# Configuration parameters:
|
304
|
-
|
305
|
-
|
306
|
-
- 'lib/mods_display/fields/related_item.rb'
|
119
|
+
# Offense count: 111
|
120
|
+
# Configuration parameters: AssignmentOnly.
|
121
|
+
RSpec/InstanceVariable:
|
122
|
+
Enabled: false
|
307
123
|
|
308
124
|
# Offense count: 2
|
309
|
-
|
310
|
-
# Configuration parameters: AllowedReceivers.
|
311
|
-
Style/HashEachMethods:
|
125
|
+
RSpec/IteratedExpectation:
|
312
126
|
Exclude:
|
313
|
-
- '
|
314
|
-
- 'spec/
|
127
|
+
- 'spec/helpers/record_helper_spec.rb'
|
128
|
+
- 'spec/integration/html_spec.rb'
|
315
129
|
|
316
130
|
# Offense count: 1
|
317
|
-
#
|
318
|
-
#
|
319
|
-
|
320
|
-
|
321
|
-
- 'lib/mods_display/fields/subject.rb'
|
131
|
+
# Configuration parameters: .
|
132
|
+
# SupportedStyles: have_received, receive
|
133
|
+
RSpec/MessageSpies:
|
134
|
+
EnforcedStyle: receive
|
322
135
|
|
323
|
-
# Offense count:
|
324
|
-
#
|
325
|
-
|
326
|
-
|
327
|
-
- 'app/helpers/mods_display/record_helper.rb'
|
328
|
-
- 'lib/mods_display.rb'
|
329
|
-
- 'lib/mods_display/controller_extension.rb'
|
330
|
-
- 'lib/mods_display/fields/imprint.rb'
|
331
|
-
- 'lib/mods_display/fields/name.rb'
|
332
|
-
- 'lib/mods_display/fields/subject.rb'
|
333
|
-
- 'lib/mods_display/html.rb'
|
136
|
+
# Offense count: 4
|
137
|
+
# Configuration parameters: AllowSubject.
|
138
|
+
RSpec/MultipleMemoizedHelpers:
|
139
|
+
Max: 6
|
334
140
|
|
335
|
-
# Offense count:
|
336
|
-
|
337
|
-
|
338
|
-
|
141
|
+
# Offense count: 2
|
142
|
+
RSpec/NestedGroups:
|
143
|
+
Max: 4
|
144
|
+
|
145
|
+
# Offense count: 2
|
146
|
+
RSpec/RepeatedExampleGroupDescription:
|
339
147
|
Exclude:
|
340
|
-
- '
|
341
|
-
- 'lib/mods_display/fields/subject.rb'
|
148
|
+
- 'spec/integration/html_spec.rb'
|
342
149
|
|
343
150
|
# Offense count: 1
|
344
|
-
|
151
|
+
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
|
152
|
+
RSpec/VerifiedDoubles:
|
345
153
|
Exclude:
|
346
|
-
- '
|
154
|
+
- 'spec/helpers/record_helper_spec.rb'
|
155
|
+
|
156
|
+
# Offense count: 35
|
157
|
+
# Configuration parameters: AllowedConstants.
|
158
|
+
Style/Documentation:
|
159
|
+
Enabled: false
|
347
160
|
|
348
161
|
# Offense count: 4
|
349
162
|
Style/MixinUsage:
|
@@ -358,154 +171,12 @@ Style/MultilineBlockChain:
|
|
358
171
|
Exclude:
|
359
172
|
- 'lib/mods_display/fields/imprint.rb'
|
360
173
|
|
361
|
-
# Offense count: 2
|
362
|
-
# Cop supports --auto-correct.
|
363
|
-
Style/MultilineIfModifier:
|
364
|
-
Exclude:
|
365
|
-
- 'lib/mods_display/fields/imprint.rb'
|
366
|
-
- 'lib/mods_display/fields/name.rb'
|
367
|
-
|
368
|
-
# Offense count: 1
|
369
|
-
# Cop supports --auto-correct.
|
370
|
-
# Configuration parameters: EnforcedStyle.
|
371
|
-
# SupportedStyles: literals, strict
|
372
|
-
Style/MutableConstant:
|
373
|
-
Exclude:
|
374
|
-
- 'lib/mods_display/version.rb'
|
375
|
-
|
376
174
|
# Offense count: 10
|
377
|
-
|
378
|
-
# Configuration parameters: EnforcedStyle, IgnoredMethods.
|
379
|
-
# SupportedStyles: predicate, comparison
|
380
|
-
Style/NumericPredicate:
|
381
|
-
Exclude:
|
382
|
-
- 'spec/**/*'
|
383
|
-
- 'lib/mods_display/fields/cartographics.rb'
|
384
|
-
- 'lib/mods_display/fields/collection.rb'
|
385
|
-
- 'lib/mods_display/fields/imprint.rb'
|
386
|
-
- 'lib/mods_display/fields/name.rb'
|
387
|
-
- 'lib/mods_display/fields/related_item.rb'
|
388
|
-
|
389
|
-
# Offense count: 1
|
390
|
-
# Configuration parameters: AllowedMethods.
|
391
|
-
# AllowedMethods: respond_to_missing?
|
392
|
-
Style/OptionalBooleanParameter:
|
393
|
-
Exclude:
|
394
|
-
- 'lib/mods_display/configuration/subject.rb'
|
395
|
-
|
396
|
-
# Offense count: 1
|
397
|
-
# Cop supports --auto-correct.
|
398
|
-
# Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions.
|
399
|
-
Style/ParenthesesAroundCondition:
|
400
|
-
Exclude:
|
401
|
-
- 'lib/mods_display/html.rb'
|
402
|
-
|
403
|
-
# Offense count: 11
|
404
|
-
# Cop supports --auto-correct.
|
405
|
-
# Configuration parameters: PreferredDelimiters.
|
406
|
-
Style/PercentLiteralDelimiters:
|
175
|
+
Style/OpenStructUse:
|
407
176
|
Exclude:
|
408
|
-
- 'lib/mods_display/fields/imprint.rb'
|
409
|
-
- 'lib/mods_display/fields/name.rb'
|
410
|
-
- 'spec/fields/identifier_spec.rb'
|
411
|
-
- 'spec/fields/language_spec.rb'
|
412
177
|
- 'spec/helpers/record_helper_spec.rb'
|
413
178
|
|
414
|
-
# Offense count:
|
415
|
-
# Cop supports --auto-correct.
|
416
|
-
Style/RedundantParentheses:
|
417
|
-
Exclude:
|
418
|
-
- 'lib/mods_display/html.rb'
|
419
|
-
|
420
|
-
# Offense count: 5
|
421
|
-
# Cop supports --auto-correct.
|
422
|
-
Style/RedundantRegexpEscape:
|
423
|
-
Exclude:
|
424
|
-
- 'lib/mods_display/fields/field.rb'
|
425
|
-
- 'spec/helpers/record_helper_spec.rb'
|
426
|
-
|
427
|
-
# Offense count: 1
|
428
|
-
# Cop supports --auto-correct.
|
429
|
-
# Configuration parameters: AllowMultipleReturnValues.
|
430
|
-
Style/RedundantReturn:
|
431
|
-
Exclude:
|
432
|
-
- 'lib/mods_display/fields/related_item.rb'
|
433
|
-
|
434
|
-
# Offense count: 1
|
435
|
-
# Cop supports --auto-correct.
|
436
|
-
Style/RedundantSelf:
|
437
|
-
Exclude:
|
438
|
-
- 'lib/mods_display/fields/subject.rb'
|
439
|
-
|
440
|
-
# Offense count: 12
|
441
|
-
# Cop supports --auto-correct.
|
442
|
-
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
|
443
|
-
# SupportedStyles: slashes, percent_r, mixed
|
444
|
-
Style/RegexpLiteral:
|
445
|
-
Exclude:
|
446
|
-
- 'spec/helpers/record_helper_spec.rb'
|
447
|
-
|
448
|
-
# Offense count: 3
|
449
|
-
# Cop supports --auto-correct.
|
450
|
-
# Configuration parameters: EnforcedStyle.
|
451
|
-
# SupportedStyles: implicit, explicit
|
452
|
-
Style/RescueStandardError:
|
453
|
-
Exclude:
|
454
|
-
- 'lib/mods_display/fields/imprint.rb'
|
455
|
-
- 'lib/mods_display/html.rb'
|
456
|
-
|
457
|
-
# Offense count: 7
|
458
|
-
# Cop supports --auto-correct.
|
459
|
-
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
|
460
|
-
# AllowedMethods: present?, blank?, presence, try, try!
|
461
|
-
Style/SafeNavigation:
|
462
|
-
Exclude:
|
463
|
-
- 'lib/mods_display/fields/field.rb'
|
464
|
-
- 'lib/mods_display/fields/imprint.rb'
|
465
|
-
- 'lib/mods_display/fields/subject.rb'
|
466
|
-
- 'lib/mods_display/fields/title.rb'
|
467
|
-
|
468
|
-
# Offense count: 1
|
469
|
-
# Cop supports --auto-correct.
|
470
|
-
# Configuration parameters: Mode.
|
471
|
-
Style/StringConcatenation:
|
472
|
-
Exclude:
|
473
|
-
- 'lib/mods_display/fields/name.rb'
|
474
|
-
|
475
|
-
# Offense count: 1
|
476
|
-
# Cop supports --auto-correct.
|
477
|
-
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
478
|
-
# SupportedStyles: single_quotes, double_quotes
|
479
|
-
Style/StringLiterals:
|
480
|
-
Exclude:
|
481
|
-
- 'spec/fields/name_spec.rb'
|
482
|
-
|
483
|
-
# Offense count: 6
|
484
|
-
# Cop supports --auto-correct.
|
485
|
-
# Configuration parameters: MinSize.
|
486
|
-
# SupportedStyles: percent, brackets
|
487
|
-
Style/SymbolArray:
|
488
|
-
EnforcedStyle: brackets
|
489
|
-
|
490
|
-
# Offense count: 1
|
491
|
-
# Cop supports --auto-correct.
|
492
|
-
# Configuration parameters: EnforcedStyle, MinSize, WordRegex.
|
493
|
-
# SupportedStyles: percent, brackets
|
494
|
-
Style/WordArray:
|
495
|
-
Exclude:
|
496
|
-
- 'spec/fields/name_spec.rb'
|
497
|
-
|
498
|
-
# Offense count: 11
|
499
|
-
# Cop supports --auto-correct.
|
500
|
-
Style/ZeroLengthPredicate:
|
501
|
-
Exclude:
|
502
|
-
- 'lib/mods_display/fields/cartographics.rb'
|
503
|
-
- 'lib/mods_display/fields/collection.rb'
|
504
|
-
- 'lib/mods_display/fields/imprint.rb'
|
505
|
-
- 'lib/mods_display/fields/name.rb'
|
506
|
-
- 'lib/mods_display/fields/related_item.rb'
|
507
|
-
|
508
|
-
# Offense count: 9
|
179
|
+
# Offense count: 28
|
509
180
|
# Cop supports --auto-correct.
|
510
181
|
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
511
182
|
# URISchemes: http, https
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -1,16 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'bundler/gem_tasks'
|
2
4
|
require 'rspec/core/rake_task'
|
3
5
|
require 'rubocop/rake_task'
|
4
6
|
|
5
|
-
RuboCop::RakeTask.new
|
7
|
+
RuboCop::RakeTask.new do |task|
|
8
|
+
task.requires << 'rubocop-rspec'
|
9
|
+
task.options = ['--fail-level', 'error']
|
10
|
+
end
|
11
|
+
|
6
12
|
RSpec::Core::RakeTask.new(:spec)
|
7
13
|
|
8
14
|
task :ci do
|
9
|
-
|
10
|
-
# because TravisCI is not respecting the .rubocop_todo.yml
|
11
|
-
# You can and should still run rubocop in your editor or
|
12
|
-
# from the command line manually.
|
13
|
-
# Rake::Task['rubocop'].invoke
|
15
|
+
Rake::Task['rubocop'].invoke
|
14
16
|
Rake::Task['spec'].invoke
|
15
17
|
end
|
16
18
|
|