europeana-blacklight 0.4.5 → 0.4.6
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 +4 -4
- data/.ruby-style.yml +47 -852
- data/Gemfile +1 -1
- data/lib/europeana/blacklight/search_builder.rb +13 -6
- data/lib/europeana/blacklight/version.rb +1 -1
- 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: e166c3c202f34d6a93e54f4d9bf517c37fa76813
|
4
|
+
data.tar.gz: 4488748195c67c33a7681a4822ecfea47f5b29af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11475f94a1b36aac024c95b177045bfc14bfc028fefaf2978b7bb9b3699afe6d15b5a1f5e49144c93dc2bf8fe016eee565dc120ac1b4b830c5b515bd9b7022b8
|
7
|
+
data.tar.gz: e685911087ef087575b8bd123485b4c436bf8ca04a56fdd7880f3800463b4c578ed9bf956d2b3b5f96a41a9004671a5d758cf886ee36468aef9fc3223961eefd
|
data/.ruby-style.yml
CHANGED
@@ -1,89 +1,9 @@
|
|
1
1
|
AllCops:
|
2
|
-
Include:
|
3
|
-
- "**/*.rake"
|
4
|
-
- "**/Gemfile"
|
5
|
-
- "**/Rakefile"
|
6
2
|
Exclude:
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
DisplayCopNames: false
|
12
|
-
StyleGuideCopsOnly: false
|
13
|
-
Style/AccessModifierIndentation:
|
14
|
-
Description: Check indentation of private/protected visibility modifiers.
|
15
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
|
16
|
-
Enabled: true
|
17
|
-
EnforcedStyle: indent
|
18
|
-
SupportedStyles:
|
19
|
-
- outdent
|
20
|
-
- indent
|
21
|
-
Style/AlignHash:
|
22
|
-
Description: Align the elements of a hash literal if they span more than one line.
|
23
|
-
Enabled: true
|
24
|
-
EnforcedHashRocketStyle: key
|
25
|
-
EnforcedColonStyle: key
|
26
|
-
EnforcedLastArgumentHashStyle: always_inspect
|
27
|
-
SupportedLastArgumentHashStyles:
|
28
|
-
- always_inspect
|
29
|
-
- always_ignore
|
30
|
-
- ignore_implicit
|
31
|
-
- ignore_explicit
|
32
|
-
Style/AlignParameters:
|
33
|
-
Description: Align the parameters of a method call if they span more than one line.
|
34
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
|
35
|
-
Enabled: true
|
36
|
-
EnforcedStyle: with_first_parameter
|
37
|
-
SupportedStyles:
|
38
|
-
- with_first_parameter
|
39
|
-
- with_fixed_indentation
|
40
|
-
Style/AndOr:
|
41
|
-
Description: Use &&/|| instead of and/or.
|
42
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
|
43
|
-
Enabled: true
|
44
|
-
EnforcedStyle: always
|
45
|
-
SupportedStyles:
|
46
|
-
- always
|
47
|
-
- conditionals
|
48
|
-
Style/BarePercentLiterals:
|
49
|
-
Description: Checks if usage of %() or %Q() matches configuration.
|
50
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand
|
51
|
-
Enabled: true
|
52
|
-
EnforcedStyle: bare_percent
|
53
|
-
SupportedStyles:
|
54
|
-
- percent_q
|
55
|
-
- bare_percent
|
56
|
-
Style/BracesAroundHashParameters:
|
57
|
-
Description: Enforce braces style around hash parameters.
|
58
|
-
Enabled: true
|
59
|
-
EnforcedStyle: no_braces
|
60
|
-
SupportedStyles:
|
61
|
-
- braces
|
62
|
-
- no_braces
|
63
|
-
- context_dependent
|
64
|
-
Style/CaseIndentation:
|
65
|
-
Description: Indentation of when in a case/when/[else/]end.
|
66
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
|
67
|
-
Enabled: true
|
68
|
-
IndentWhenRelativeTo: case
|
69
|
-
SupportedStyles:
|
70
|
-
- case
|
71
|
-
- end
|
72
|
-
IndentOneStep: false
|
73
|
-
Style/ClassAndModuleChildren:
|
74
|
-
Description: Checks style of children classes and modules.
|
75
|
-
Enabled: false
|
76
|
-
EnforcedStyle: nested
|
77
|
-
SupportedStyles:
|
78
|
-
- nested
|
79
|
-
- compact
|
80
|
-
Style/ClassCheck:
|
81
|
-
Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
|
82
|
-
Enabled: true
|
83
|
-
EnforcedStyle: is_a?
|
84
|
-
SupportedStyles:
|
85
|
-
- is_a?
|
86
|
-
- kind_of?
|
3
|
+
- "vendor/**/*"
|
4
|
+
- "db/schema.rb"
|
5
|
+
UseCache: false
|
6
|
+
TargetRubyVersion: 2.3
|
87
7
|
Style/CollectionMethods:
|
88
8
|
Description: Preferred collection methods.
|
89
9
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
|
@@ -91,21 +11,9 @@ Style/CollectionMethods:
|
|
91
11
|
PreferredMethods:
|
92
12
|
collect: map
|
93
13
|
collect!: map!
|
94
|
-
inject: reduce
|
95
|
-
detect: find
|
96
|
-
find_all: select
|
97
14
|
find: detect
|
98
|
-
|
99
|
-
|
100
|
-
REVIEW).
|
101
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
|
102
|
-
Enabled: false
|
103
|
-
Keywords:
|
104
|
-
- TODO
|
105
|
-
- FIXME
|
106
|
-
- OPTIMIZE
|
107
|
-
- HACK
|
108
|
-
- REVIEW
|
15
|
+
find_all: select
|
16
|
+
reduce: inject
|
109
17
|
Style/DotPosition:
|
110
18
|
Description: Checks the position of the dot in multi-line method calls.
|
111
19
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
|
@@ -114,161 +22,24 @@ Style/DotPosition:
|
|
114
22
|
SupportedStyles:
|
115
23
|
- leading
|
116
24
|
- trailing
|
117
|
-
Style/EmptyLineBetweenDefs:
|
118
|
-
Description: Use empty lines between defs.
|
119
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
|
120
|
-
Enabled: true
|
121
|
-
AllowAdjacentOneLineDefs: false
|
122
|
-
Style/EmptyLinesAroundBlockBody:
|
123
|
-
Description: Keeps track of empty lines around block bodies.
|
124
|
-
Enabled: true
|
125
|
-
EnforcedStyle: no_empty_lines
|
126
|
-
SupportedStyles:
|
127
|
-
- empty_lines
|
128
|
-
- no_empty_lines
|
129
|
-
Style/EmptyLinesAroundClassBody:
|
130
|
-
Description: Keeps track of empty lines around class bodies.
|
131
|
-
Enabled: true
|
132
|
-
EnforcedStyle: no_empty_lines
|
133
|
-
SupportedStyles:
|
134
|
-
- empty_lines
|
135
|
-
- no_empty_lines
|
136
|
-
Style/EmptyLinesAroundModuleBody:
|
137
|
-
Description: Keeps track of empty lines around module bodies.
|
138
|
-
Enabled: true
|
139
|
-
EnforcedStyle: no_empty_lines
|
140
|
-
SupportedStyles:
|
141
|
-
- empty_lines
|
142
|
-
- no_empty_lines
|
143
|
-
Style/Encoding:
|
144
|
-
Description: Use UTF-8 as the source file encoding.
|
145
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#utf-8
|
146
|
-
Enabled: false
|
147
|
-
EnforcedStyle: always
|
148
|
-
SupportedStyles:
|
149
|
-
- when_needed
|
150
|
-
- always
|
151
25
|
Style/FileName:
|
152
26
|
Description: Use snake_case for source file names.
|
153
27
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
154
28
|
Enabled: false
|
155
29
|
Exclude: []
|
156
|
-
Style/FirstParameterIndentation:
|
157
|
-
Description: Checks the indentation of the first parameter in a method call.
|
158
|
-
Enabled: true
|
159
|
-
EnforcedStyle: special_for_inner_method_call_in_parentheses
|
160
|
-
SupportedStyles:
|
161
|
-
- consistent
|
162
|
-
- special_for_inner_method_call
|
163
|
-
- special_for_inner_method_call_in_parentheses
|
164
|
-
Style/For:
|
165
|
-
Description: Checks use of for or each in multiline loops.
|
166
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-for-loops
|
167
|
-
Enabled: true
|
168
|
-
EnforcedStyle: each
|
169
|
-
SupportedStyles:
|
170
|
-
- for
|
171
|
-
- each
|
172
|
-
Style/FormatString:
|
173
|
-
Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
|
174
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
|
175
|
-
Enabled: false
|
176
|
-
EnforcedStyle: format
|
177
|
-
SupportedStyles:
|
178
|
-
- format
|
179
|
-
- sprintf
|
180
|
-
- percent
|
181
|
-
Style/GlobalVars:
|
182
|
-
Description: Do not introduce global variables.
|
183
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
|
184
|
-
Enabled: false
|
185
|
-
AllowedVariables: []
|
186
30
|
Style/GuardClause:
|
187
31
|
Description: Check for conditionals that can be replaced with guard clauses
|
188
32
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
189
33
|
Enabled: false
|
190
34
|
MinBodyLength: 1
|
191
|
-
Style/HashSyntax:
|
192
|
-
Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a =>
|
193
|
-
1, :b => 2 }.'
|
194
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals
|
195
|
-
Enabled: true
|
196
|
-
EnforcedStyle: ruby19
|
197
|
-
SupportedStyles:
|
198
|
-
- ruby19
|
199
|
-
- hash_rockets
|
200
35
|
Style/IfUnlessModifier:
|
201
36
|
Description: Favor modifier if/unless usage when you have a single-line body.
|
202
37
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
203
38
|
Enabled: false
|
204
39
|
MaxLineLength: 80
|
205
|
-
Style/
|
206
|
-
Description:
|
207
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
208
|
-
Enabled: true
|
209
|
-
Width: 2
|
210
|
-
Style/IndentHash:
|
211
|
-
Description: Checks the indentation of the first key in a hash literal.
|
212
|
-
Enabled: true
|
213
|
-
EnforcedStyle: special_inside_parentheses
|
214
|
-
SupportedStyles:
|
215
|
-
- special_inside_parentheses
|
216
|
-
- consistent
|
217
|
-
Style/LambdaCall:
|
218
|
-
Description: Use lambda.call(...) instead of lambda.(...).
|
219
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
|
220
|
-
Enabled: false
|
221
|
-
EnforcedStyle: call
|
222
|
-
SupportedStyles:
|
223
|
-
- call
|
224
|
-
- braces
|
225
|
-
Style/Next:
|
226
|
-
Description: Use `next` to skip iteration instead of a condition at the end.
|
227
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
228
|
-
Enabled: false
|
229
|
-
EnforcedStyle: skip_modifier_ifs
|
230
|
-
MinBodyLength: 3
|
231
|
-
SupportedStyles:
|
232
|
-
- skip_modifier_ifs
|
233
|
-
- always
|
234
|
-
Style/NonNilCheck:
|
235
|
-
Description: Checks for redundant nil checks.
|
236
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks
|
237
|
-
Enabled: true
|
238
|
-
IncludeSemanticChanges: false
|
239
|
-
Style/MethodDefParentheses:
|
240
|
-
Description: Checks if the method definitions have or don't have parentheses.
|
241
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
|
242
|
-
Enabled: true
|
243
|
-
EnforcedStyle: require_parentheses
|
244
|
-
SupportedStyles:
|
245
|
-
- require_parentheses
|
246
|
-
- require_no_parentheses
|
247
|
-
Style/MethodName:
|
248
|
-
Description: Use the configured style when naming methods.
|
249
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
250
|
-
Enabled: true
|
251
|
-
EnforcedStyle: snake_case
|
252
|
-
SupportedStyles:
|
253
|
-
- snake_case
|
254
|
-
- camelCase
|
255
|
-
Style/MultilineOperationIndentation:
|
256
|
-
Description: Checks indentation of binary operations that span more than one line.
|
257
|
-
Enabled: true
|
258
|
-
EnforcedStyle: indented
|
259
|
-
SupportedStyles:
|
260
|
-
- aligned
|
261
|
-
- indented
|
262
|
-
Style/NumericLiterals:
|
263
|
-
Description: Add underscores to large numeric literals to improve their readability.
|
264
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
|
40
|
+
Style/OptionHash:
|
41
|
+
Description: Don't use option hashes when you can use keyword arguments.
|
265
42
|
Enabled: false
|
266
|
-
MinDigits: 5
|
267
|
-
Style/ParenthesesAroundCondition:
|
268
|
-
Description: Don't use parentheses around the condition of an if/unless/while.
|
269
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-if
|
270
|
-
Enabled: true
|
271
|
-
AllowSafeAssignment: true
|
272
43
|
Style/PercentLiteralDelimiters:
|
273
44
|
Description: Use `%`-literal delimiters consistently
|
274
45
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
|
@@ -283,13 +54,6 @@ Style/PercentLiteralDelimiters:
|
|
283
54
|
"%w": "()"
|
284
55
|
"%W": "()"
|
285
56
|
"%x": "()"
|
286
|
-
Style/PercentQLiterals:
|
287
|
-
Description: Checks if uses of %Q/%q match the configured preference.
|
288
|
-
Enabled: true
|
289
|
-
EnforcedStyle: lower_case_q
|
290
|
-
SupportedStyles:
|
291
|
-
- lower_case_q
|
292
|
-
- upper_case_q
|
293
57
|
Style/PredicateName:
|
294
58
|
Description: Check the names of predicate methods.
|
295
59
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
|
@@ -300,6 +64,8 @@ Style/PredicateName:
|
|
300
64
|
- have_
|
301
65
|
NamePrefixBlacklist:
|
302
66
|
- is_
|
67
|
+
Exclude:
|
68
|
+
- spec/**/*
|
303
69
|
Style/RaiseArgs:
|
304
70
|
Description: Checks the arguments passed to raise/fail.
|
305
71
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
|
@@ -308,23 +74,6 @@ Style/RaiseArgs:
|
|
308
74
|
SupportedStyles:
|
309
75
|
- compact
|
310
76
|
- exploded
|
311
|
-
Style/RedundantReturn:
|
312
|
-
Description: Don't use return where it's not required.
|
313
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-return
|
314
|
-
Enabled: true
|
315
|
-
AllowMultipleReturnValues: false
|
316
|
-
Style/RegexpLiteral:
|
317
|
-
Description: Use %r for regular expressions matching more than `MaxSlashes` '/'
|
318
|
-
characters. Use %r only for regular expressions matching more than `MaxSlashes`
|
319
|
-
'/' character.
|
320
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
|
321
|
-
Enabled: false
|
322
|
-
MaxSlashes: 1
|
323
|
-
Style/Semicolon:
|
324
|
-
Description: Don't use semicolons to terminate expressions.
|
325
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon
|
326
|
-
Enabled: true
|
327
|
-
AllowAsExpressionSeparator: false
|
328
77
|
Style/SignalException:
|
329
78
|
Description: Checks for proper usage of fail and raise.
|
330
79
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
|
@@ -366,239 +115,77 @@ Style/StringLiteralsInInterpolation:
|
|
366
115
|
SupportedStyles:
|
367
116
|
- single_quotes
|
368
117
|
- double_quotes
|
369
|
-
Style/
|
370
|
-
Description: Checks
|
371
|
-
|
372
|
-
EnforcedStyleInsidePipes: no_space
|
373
|
-
SupportedStyles:
|
374
|
-
- space
|
375
|
-
- no_space
|
376
|
-
Style/SpaceAroundEqualsInParameterDefault:
|
377
|
-
Description: Checks that the equals signs in parameter default assignments have
|
378
|
-
or don't have surrounding space depending on configuration.
|
379
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
|
380
|
-
Enabled: true
|
381
|
-
EnforcedStyle: space
|
382
|
-
SupportedStyles:
|
383
|
-
- space
|
384
|
-
- no_space
|
385
|
-
Style/SpaceBeforeBlockBraces:
|
386
|
-
Description: Checks that the left block brace has or doesn't have space before it.
|
387
|
-
Enabled: true
|
388
|
-
EnforcedStyle: space
|
389
|
-
SupportedStyles:
|
390
|
-
- space
|
391
|
-
- no_space
|
392
|
-
Style/SpaceInsideBlockBraces:
|
393
|
-
Description: Checks that block braces have or don't have surrounding space. For
|
394
|
-
blocks taking parameters, checks that the left brace has or doesn't have trailing
|
395
|
-
space.
|
396
|
-
Enabled: true
|
397
|
-
EnforcedStyle: space
|
398
|
-
SupportedStyles:
|
399
|
-
- space
|
400
|
-
- no_space
|
401
|
-
EnforcedStyleForEmptyBraces: no_space
|
402
|
-
SpaceBeforeBlockParameters: true
|
403
|
-
Style/SpaceInsideHashLiteralBraces:
|
404
|
-
Description: Use spaces inside hash literal braces - or don't.
|
405
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
406
|
-
Enabled: true
|
407
|
-
EnforcedStyle: space
|
408
|
-
EnforcedStyleForEmptyBraces: no_space
|
409
|
-
SupportedStyles:
|
410
|
-
- space
|
411
|
-
- no_space
|
412
|
-
Style/SymbolProc:
|
413
|
-
Description: Use symbols as procs instead of blocks when possible.
|
414
|
-
Enabled: true
|
415
|
-
IgnoredMethods:
|
416
|
-
- respond_to
|
417
|
-
Style/TrailingBlankLines:
|
418
|
-
Description: Checks trailing blank lines and final newline.
|
419
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
|
420
|
-
Enabled: true
|
421
|
-
EnforcedStyle: final_newline
|
422
|
-
SupportedStyles:
|
423
|
-
- final_newline
|
424
|
-
- final_blank_line
|
425
|
-
Style/TrailingComma:
|
426
|
-
Description: Checks for trailing comma in parameter lists and literals.
|
427
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
|
118
|
+
Style/TrailingCommaInArguments:
|
119
|
+
Description: 'Checks for trailing comma in argument lists.'
|
120
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
428
121
|
Enabled: false
|
429
122
|
EnforcedStyleForMultiline: no_comma
|
430
123
|
SupportedStyles:
|
431
124
|
- comma
|
125
|
+
- consistent_comma
|
432
126
|
- no_comma
|
433
|
-
Style/
|
434
|
-
Description:
|
435
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
127
|
+
Style/TrailingCommaInLiteral:
|
128
|
+
Description: 'Checks for trailing comma in array and hash literals.'
|
129
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
436
130
|
Enabled: false
|
437
|
-
|
438
|
-
AllowPredicates: false
|
439
|
-
AllowDSLWriters: false
|
440
|
-
Whitelist:
|
441
|
-
- to_ary
|
442
|
-
- to_a
|
443
|
-
- to_c
|
444
|
-
- to_enum
|
445
|
-
- to_h
|
446
|
-
- to_hash
|
447
|
-
- to_i
|
448
|
-
- to_int
|
449
|
-
- to_io
|
450
|
-
- to_open
|
451
|
-
- to_path
|
452
|
-
- to_proc
|
453
|
-
- to_r
|
454
|
-
- to_regexp
|
455
|
-
- to_str
|
456
|
-
- to_s
|
457
|
-
- to_sym
|
458
|
-
Style/VariableName:
|
459
|
-
Description: Use the configured style when naming variables.
|
460
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
461
|
-
Enabled: true
|
462
|
-
EnforcedStyle: snake_case
|
131
|
+
EnforcedStyleForMultiline: no_comma
|
463
132
|
SupportedStyles:
|
464
|
-
-
|
465
|
-
-
|
466
|
-
|
467
|
-
Description: Favor modifier while/until usage when you have a single-line body.
|
468
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
|
469
|
-
Enabled: false
|
470
|
-
MaxLineLength: 80
|
471
|
-
Style/WordArray:
|
472
|
-
Description: Use %w or %W for arrays of words.
|
473
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
|
474
|
-
Enabled: false
|
475
|
-
MinSize: 0
|
476
|
-
WordRegex: !ruby/regexp /\A[\p{Word}]+\z/
|
133
|
+
- comma
|
134
|
+
- consistent_comma
|
135
|
+
- no_comma
|
477
136
|
Metrics/AbcSize:
|
478
137
|
Description: A calculated magnitude based on number of assignments, branches, and
|
479
138
|
conditions.
|
480
|
-
Enabled:
|
139
|
+
Enabled: false
|
481
140
|
Max: 15
|
482
|
-
Metrics/BlockNesting:
|
483
|
-
Description: Avoid excessive block nesting
|
484
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
|
485
|
-
Enabled: true
|
486
|
-
Max: 3
|
487
141
|
Metrics/ClassLength:
|
488
142
|
Description: Avoid classes longer than 100 lines of code.
|
489
143
|
Enabled: false
|
490
144
|
CountComments: false
|
491
145
|
Max: 100
|
492
|
-
Metrics/CyclomaticComplexity:
|
493
|
-
Description: A complexity metric that is strongly correlated to the number of test
|
494
|
-
cases needed to validate a method.
|
495
|
-
Enabled: true
|
496
|
-
Max: 6
|
497
146
|
Metrics/LineLength:
|
498
|
-
Description: Limit lines to
|
499
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
|
500
|
-
Enabled: true
|
147
|
+
Description: Limit lines to max 140 characters
|
501
148
|
Max: 140
|
149
|
+
AllowHeredoc: true
|
502
150
|
AllowURI: true
|
503
151
|
URISchemes:
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
152
|
+
- http
|
153
|
+
- https
|
154
|
+
Metrics/ModuleLength:
|
155
|
+
CountComments: false
|
156
|
+
Max: 100
|
157
|
+
Description: Avoid modules longer than 100 lines of code.
|
158
|
+
Enabled: false
|
159
|
+
Metrics/CyclomaticComplexity:
|
160
|
+
Description: A complexity metric that is strongly correlated to the number of test
|
161
|
+
cases needed to validate a method.
|
162
|
+
Enabled: false
|
163
|
+
Max: 6
|
508
164
|
Metrics/MethodLength:
|
509
165
|
Description: Avoid methods longer than 10 lines of code.
|
510
166
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
|
511
|
-
Enabled:
|
512
|
-
CountComments:
|
167
|
+
Enabled: false
|
168
|
+
CountComments: false
|
513
169
|
Max: 10
|
514
|
-
Exclude:
|
515
|
-
- "spec/**/*"
|
516
170
|
Metrics/ParameterLists:
|
517
|
-
Description: Avoid
|
171
|
+
Description: Avoid parameter lists longer than three or four parameters.
|
518
172
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
|
519
|
-
Enabled:
|
173
|
+
Enabled: false
|
520
174
|
Max: 5
|
521
175
|
CountKeywordArgs: true
|
522
176
|
Metrics/PerceivedComplexity:
|
523
177
|
Description: A complexity metric geared towards measuring complexity for a human
|
524
178
|
reader.
|
525
|
-
Enabled:
|
179
|
+
Enabled: false
|
526
180
|
Max: 7
|
527
181
|
Lint/AssignmentInCondition:
|
528
182
|
Description: Don't use assignment in conditions.
|
529
183
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
|
530
184
|
Enabled: false
|
531
185
|
AllowSafeAssignment: true
|
532
|
-
Lint/EndAlignment:
|
533
|
-
Description: Align ends correctly.
|
534
|
-
Enabled: true
|
535
|
-
AlignWith: keyword
|
536
|
-
SupportedStyles:
|
537
|
-
- keyword
|
538
|
-
- variable
|
539
|
-
Lint/DefEndAlignment:
|
540
|
-
Description: Align ends corresponding to defs correctly.
|
541
|
-
Enabled: true
|
542
|
-
AlignWith: start_of_line
|
543
|
-
SupportedStyles:
|
544
|
-
- start_of_line
|
545
|
-
- def
|
546
|
-
Rails/ActionFilter:
|
547
|
-
Description: Enforces consistent use of action filter methods.
|
548
|
-
Enabled: true
|
549
|
-
EnforcedStyle: action
|
550
|
-
SupportedStyles:
|
551
|
-
- action
|
552
|
-
- filter
|
553
|
-
Include:
|
554
|
-
- app/controllers/**/*.rb
|
555
|
-
Rails/DefaultScope:
|
556
|
-
Description: Checks if the argument passed to default_scope is a block.
|
557
|
-
Enabled: true
|
558
|
-
Include:
|
559
|
-
- app/models/**/*.rb
|
560
|
-
Rails/HasAndBelongsToMany:
|
561
|
-
Description: Prefer has_many :through to has_and_belongs_to_many.
|
562
|
-
Enabled: true
|
563
|
-
Include:
|
564
|
-
- app/models/**/*.rb
|
565
|
-
Rails/Output:
|
566
|
-
Description: Checks for calls to puts, print, etc.
|
567
|
-
Enabled: true
|
568
|
-
Include:
|
569
|
-
- app/**/*.rb
|
570
|
-
- config/**/*.rb
|
571
|
-
- db/**/*.rb
|
572
|
-
- lib/**/*.rb
|
573
|
-
Rails/ReadWriteAttribute:
|
574
|
-
Description: Checks for read_attribute(:attr) and write_attribute(:attr, val).
|
575
|
-
Enabled: true
|
576
|
-
Include:
|
577
|
-
- app/models/**/*.rb
|
578
|
-
Rails/ScopeArgs:
|
579
|
-
Description: Checks the arguments of ActiveRecord scopes.
|
580
|
-
Enabled: true
|
581
|
-
Include:
|
582
|
-
- app/models/**/*.rb
|
583
|
-
Rails/Validation:
|
584
|
-
Description: Use validates :attribute, hash of validations.
|
585
|
-
Enabled: true
|
586
|
-
Include:
|
587
|
-
- app/models/**/*.rb
|
588
186
|
Style/InlineComment:
|
589
187
|
Description: Avoid inline comments.
|
590
188
|
Enabled: false
|
591
|
-
Style/MethodCalledOnDoEndBlock:
|
592
|
-
Description: Avoid chaining a method call on a do...end block.
|
593
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
594
|
-
Enabled: false
|
595
|
-
Style/SymbolArray:
|
596
|
-
Description: Use %i or %I for arrays of symbols.
|
597
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
|
598
|
-
Enabled: false
|
599
|
-
Style/ExtraSpacing:
|
600
|
-
Description: Do not use unnecessary spacing.
|
601
|
-
Enabled: true
|
602
189
|
Style/AccessorMethodName:
|
603
190
|
Description: Check the naming of accessor methods for get_/set_.
|
604
191
|
Enabled: false
|
@@ -606,81 +193,6 @@ Style/Alias:
|
|
606
193
|
Description: Use alias_method instead of alias.
|
607
194
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
|
608
195
|
Enabled: false
|
609
|
-
Style/AlignArray:
|
610
|
-
Description: Align the elements of an array literal if they span more than one line.
|
611
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
|
612
|
-
Enabled: true
|
613
|
-
Style/ArrayJoin:
|
614
|
-
Description: Use Array#join instead of Array#*.
|
615
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
|
616
|
-
Enabled: false
|
617
|
-
Style/AsciiComments:
|
618
|
-
Description: Use only ascii symbols in comments.
|
619
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
|
620
|
-
Enabled: false
|
621
|
-
Style/AsciiIdentifiers:
|
622
|
-
Description: Use only ascii symbols in identifiers.
|
623
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
|
624
|
-
Enabled: false
|
625
|
-
Style/Attr:
|
626
|
-
Description: Checks for uses of Module#attr.
|
627
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
|
628
|
-
Enabled: false
|
629
|
-
Style/BeginBlock:
|
630
|
-
Description: Avoid the use of BEGIN blocks.
|
631
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks
|
632
|
-
Enabled: true
|
633
|
-
Style/BlockComments:
|
634
|
-
Description: Do not use block comments.
|
635
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
|
636
|
-
Enabled: true
|
637
|
-
Style/BlockEndNewline:
|
638
|
-
Description: Put end statement of multiline block on its own line.
|
639
|
-
Enabled: true
|
640
|
-
Style/Blocks:
|
641
|
-
Description: Avoid using {...} for multi-line blocks (multiline chaining is always
|
642
|
-
ugly). Prefer {...} over do...end for single-line blocks.
|
643
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
644
|
-
Enabled: true
|
645
|
-
Style/CaseEquality:
|
646
|
-
Description: Avoid explicit use of the case equality operator(===).
|
647
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
|
648
|
-
Enabled: false
|
649
|
-
Style/CharacterLiteral:
|
650
|
-
Description: Checks for uses of character literals.
|
651
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
|
652
|
-
Enabled: false
|
653
|
-
Style/ClassAndModuleCamelCase:
|
654
|
-
Description: Use CamelCase for classes and modules.
|
655
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
|
656
|
-
Enabled: true
|
657
|
-
Style/ClassMethods:
|
658
|
-
Description: Use self when defining module/class methods.
|
659
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-singletons
|
660
|
-
Enabled: true
|
661
|
-
Style/ClassVars:
|
662
|
-
Description: Avoid the use of class variables.
|
663
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
|
664
|
-
Enabled: false
|
665
|
-
Style/ColonMethodCall:
|
666
|
-
Description: 'Do not use :: for method call.'
|
667
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
|
668
|
-
Enabled: false
|
669
|
-
Style/CommentIndentation:
|
670
|
-
Description: Indentation of comments.
|
671
|
-
Enabled: true
|
672
|
-
Style/ConstantName:
|
673
|
-
Description: Constants should use SCREAMING_SNAKE_CASE.
|
674
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case
|
675
|
-
Enabled: true
|
676
|
-
Style/DefWithParentheses:
|
677
|
-
Description: Use def with parentheses when there are arguments.
|
678
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
|
679
|
-
Enabled: true
|
680
|
-
Style/DeprecatedHashMethods:
|
681
|
-
Description: Checks for use of deprecated Hash methods.
|
682
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
|
683
|
-
Enabled: false
|
684
196
|
Style/Documentation:
|
685
197
|
Description: Document classes and non-namespace modules.
|
686
198
|
Enabled: false
|
@@ -691,234 +203,31 @@ Style/DoubleNegation:
|
|
691
203
|
Style/EachWithObject:
|
692
204
|
Description: Prefer `each_with_object` over `inject` or `reduce`.
|
693
205
|
Enabled: false
|
694
|
-
Style/ElseAlignment:
|
695
|
-
Description: Align elses and elsifs correctly.
|
696
|
-
Enabled: true
|
697
|
-
Style/EmptyElse:
|
698
|
-
Description: Avoid empty else-clauses.
|
699
|
-
Enabled: true
|
700
|
-
Style/EmptyLines:
|
701
|
-
Description: Don't use several empty lines in a row.
|
702
|
-
Enabled: true
|
703
|
-
Style/EmptyLinesAroundAccessModifier:
|
704
|
-
Description: Keep blank lines around access modifiers.
|
705
|
-
Enabled: true
|
706
|
-
Style/EmptyLinesAroundMethodBody:
|
707
|
-
Description: Keeps track of empty lines around method bodies.
|
708
|
-
Enabled: true
|
709
206
|
Style/EmptyLiteral:
|
710
207
|
Description: Prefer literals to Array.new/Hash.new/String.new.
|
711
208
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
|
712
209
|
Enabled: false
|
713
|
-
Style/EndBlock:
|
714
|
-
Description: Avoid the use of END blocks.
|
715
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
|
716
|
-
Enabled: true
|
717
|
-
Style/EndOfLine:
|
718
|
-
Description: Use Unix-style line endings.
|
719
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
|
720
|
-
Enabled: true
|
721
|
-
Style/EvenOdd:
|
722
|
-
Description: Favor the use of Fixnum#even? && Fixnum#odd?
|
723
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
724
|
-
Enabled: false
|
725
|
-
Style/FlipFlop:
|
726
|
-
Description: Checks for flip flops
|
727
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
|
728
|
-
Enabled: false
|
729
|
-
Style/IfWithSemicolon:
|
730
|
-
Description: Do not use if x; .... Use the ternary operator instead.
|
731
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
|
732
|
-
Enabled: false
|
733
|
-
Style/IndentationConsistency:
|
734
|
-
Description: Keep indentation straight.
|
735
|
-
Enabled: true
|
736
|
-
Style/IndentArray:
|
737
|
-
Description: Checks the indentation of the first element in an array literal.
|
738
|
-
Enabled: true
|
739
|
-
Style/InfiniteLoop:
|
740
|
-
Description: Use Kernel#loop for infinite loops.
|
741
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#infinite-loop
|
742
|
-
Enabled: true
|
743
|
-
Style/Lambda:
|
744
|
-
Description: Use the new lambda literal syntax for single-line blocks.
|
745
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
|
746
|
-
Enabled: false
|
747
|
-
Style/LeadingCommentSpace:
|
748
|
-
Description: Comments should start with a space.
|
749
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
|
750
|
-
Enabled: true
|
751
|
-
Style/LineEndConcatenation:
|
752
|
-
Description: Use \ instead of + or << to concatenate two string literals at line
|
753
|
-
end.
|
754
|
-
Enabled: false
|
755
|
-
Style/MethodCallParentheses:
|
756
|
-
Description: Do not use parentheses for method calls with no arguments.
|
757
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-args-no-parens
|
758
|
-
Enabled: true
|
759
210
|
Style/ModuleFunction:
|
760
211
|
Description: Checks for usage of `extend self` in modules.
|
761
212
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
|
762
213
|
Enabled: false
|
763
|
-
Style/MultilineBlockChain:
|
764
|
-
Description: Avoid multi-line chains of blocks.
|
765
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
766
|
-
Enabled: true
|
767
|
-
Style/MultilineBlockLayout:
|
768
|
-
Description: Ensures newlines after multiline block do statements.
|
769
|
-
Enabled: true
|
770
|
-
Style/MultilineIfThen:
|
771
|
-
Description: Do not use then for multi-line if/unless.
|
772
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-then
|
773
|
-
Enabled: true
|
774
|
-
Style/MultilineTernaryOperator:
|
775
|
-
Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.'
|
776
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary
|
777
|
-
Enabled: true
|
778
|
-
Style/NegatedIf:
|
779
|
-
Description: Favor unless over if for negative conditions (or control flow or).
|
780
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
|
781
|
-
Enabled: false
|
782
|
-
Style/NegatedWhile:
|
783
|
-
Description: Favor until over while for negative conditions.
|
784
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
|
785
|
-
Enabled: false
|
786
|
-
Style/NestedTernaryOperator:
|
787
|
-
Description: Use one expression per branch in a ternary operator.
|
788
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-ternary
|
789
|
-
Enabled: true
|
790
|
-
Style/NilComparison:
|
791
|
-
Description: Prefer x.nil? to x == nil.
|
792
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
793
|
-
Enabled: false
|
794
|
-
Style/Not:
|
795
|
-
Description: Use ! instead of not.
|
796
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bang-not-not
|
797
|
-
Enabled: false
|
798
214
|
Style/OneLineConditional:
|
799
215
|
Description: Favor the ternary operator(?:) over if/then/else/end constructs.
|
800
216
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
|
801
217
|
Enabled: false
|
802
|
-
Style/OpMethod:
|
803
|
-
Description: When defining binary operators, name the argument other.
|
804
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
|
805
|
-
Enabled: false
|
806
218
|
Style/PerlBackrefs:
|
807
219
|
Description: Avoid Perl-style regex back references.
|
808
220
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
|
809
221
|
Enabled: false
|
810
|
-
Style/
|
811
|
-
Description:
|
812
|
-
|
813
|
-
|
814
|
-
Style/RedundantBegin:
|
815
|
-
Description: Don't use begin blocks when they are not needed.
|
816
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#begin-implicit
|
817
|
-
Enabled: true
|
818
|
-
Style/RedundantException:
|
819
|
-
Description: Checks for an obsolete RuntimeException argument in raise/fail.
|
820
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror
|
821
|
-
Enabled: true
|
822
|
-
Style/RedundantSelf:
|
823
|
-
Description: Don't use self where it's not needed.
|
824
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-self-unless-required
|
825
|
-
Enabled: true
|
826
|
-
Style/RescueModifier:
|
827
|
-
Description: Avoid using rescue in its modifier form.
|
828
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers
|
829
|
-
Enabled: true
|
830
|
-
Style/SelfAssignment:
|
831
|
-
Description: Checks for places where self-assignment shorthand should have been
|
832
|
-
used.
|
833
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
|
222
|
+
Style/Send:
|
223
|
+
Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send`
|
224
|
+
may overlap with existing methods.
|
225
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-public-send
|
834
226
|
Enabled: false
|
835
|
-
Style/SingleSpaceBeforeFirstArg:
|
836
|
-
Description: Checks that exactly one space is used between a method name and the
|
837
|
-
first argument for method calls without parentheses.
|
838
|
-
Enabled: true
|
839
|
-
Style/SpaceAfterColon:
|
840
|
-
Description: Use spaces after colons.
|
841
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
842
|
-
Enabled: true
|
843
|
-
Style/SpaceAfterComma:
|
844
|
-
Description: Use spaces after commas.
|
845
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
846
|
-
Enabled: true
|
847
|
-
Style/SpaceAfterControlKeyword:
|
848
|
-
Description: Use spaces after if/elsif/unless/while/until/case/when.
|
849
|
-
Enabled: true
|
850
|
-
Style/SpaceAfterMethodName:
|
851
|
-
Description: Do not put a space between a method name and the opening parenthesis
|
852
|
-
in a method definition.
|
853
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
854
|
-
Enabled: true
|
855
|
-
Style/SpaceAfterNot:
|
856
|
-
Description: Tracks redundant space after the ! operator.
|
857
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
|
858
|
-
Enabled: true
|
859
|
-
Style/SpaceAfterSemicolon:
|
860
|
-
Description: Use spaces after semicolons.
|
861
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
862
|
-
Enabled: true
|
863
|
-
Style/SpaceBeforeComma:
|
864
|
-
Description: No spaces before commas.
|
865
|
-
Enabled: true
|
866
|
-
Style/SpaceBeforeComment:
|
867
|
-
Description: Checks for missing space between code and a comment on the same line.
|
868
|
-
Enabled: true
|
869
|
-
Style/SpaceBeforeSemicolon:
|
870
|
-
Description: No spaces before semicolons.
|
871
|
-
Enabled: true
|
872
|
-
Style/SpaceAroundOperators:
|
873
|
-
Description: Use spaces around operators.
|
874
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
875
|
-
Enabled: true
|
876
|
-
Style/SpaceBeforeModifierKeyword:
|
877
|
-
Description: Put a space before the modifier keyword.
|
878
|
-
Enabled: true
|
879
|
-
Style/SpaceInsideBrackets:
|
880
|
-
Description: No spaces after [ or before ].
|
881
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
882
|
-
Enabled: true
|
883
|
-
Style/SpaceInsideParens:
|
884
|
-
Description: No spaces after ( or before ).
|
885
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
886
|
-
Enabled: true
|
887
|
-
Style/SpaceInsideRangeLiteral:
|
888
|
-
Description: No spaces inside range literals.
|
889
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
|
890
|
-
Enabled: true
|
891
227
|
Style/SpecialGlobalVars:
|
892
228
|
Description: Avoid Perl-style global variables.
|
893
229
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
|
894
230
|
Enabled: false
|
895
|
-
Style/StructInheritance:
|
896
|
-
Description: Checks for inheritance from Struct.new.
|
897
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
|
898
|
-
Enabled: true
|
899
|
-
Style/Tab:
|
900
|
-
Description: No hard tabs.
|
901
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
902
|
-
Enabled: true
|
903
|
-
Style/TrailingWhitespace:
|
904
|
-
Description: Avoid trailing whitespace.
|
905
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
|
906
|
-
Enabled: true
|
907
|
-
Style/UnlessElse:
|
908
|
-
Description: Do not use unless with else. Rewrite these with the positive case first.
|
909
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-else-with-unless
|
910
|
-
Enabled: true
|
911
|
-
Style/UnneededCapitalW:
|
912
|
-
Description: Checks for %W when interpolation is not needed.
|
913
|
-
Enabled: true
|
914
|
-
Style/UnneededPercentQ:
|
915
|
-
Description: Checks for %q/%Q when single quotes or double quotes would do.
|
916
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q
|
917
|
-
Enabled: true
|
918
|
-
Style/UnneededPercentX:
|
919
|
-
Description: Checks for %x when `` would do.
|
920
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-x
|
921
|
-
Enabled: true
|
922
231
|
Style/VariableInterpolation:
|
923
232
|
Description: Don't interpolate global, instance and class variables directly in
|
924
233
|
strings.
|
@@ -928,130 +237,16 @@ Style/WhenThen:
|
|
928
237
|
Description: Use when x then ... for one-line cases.
|
929
238
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
|
930
239
|
Enabled: false
|
931
|
-
|
932
|
-
Description:
|
933
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do
|
934
|
-
Enabled: true
|
935
|
-
Lint/AmbiguousOperator:
|
936
|
-
Description: Checks for ambiguous operators in the first argument of a method invocation
|
937
|
-
without parentheses.
|
938
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args
|
939
|
-
Enabled: false
|
940
|
-
Lint/AmbiguousRegexpLiteral:
|
941
|
-
Description: Checks for ambiguous regexp literals in the first argument of a method
|
942
|
-
invocation without parenthesis.
|
943
|
-
Enabled: false
|
944
|
-
Lint/BlockAlignment:
|
945
|
-
Description: Align block ends correctly.
|
946
|
-
Enabled: true
|
947
|
-
Lint/ConditionPosition:
|
948
|
-
Description: Checks for condition placed in a confusing position relative to the
|
949
|
-
keyword.
|
950
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
|
951
|
-
Enabled: false
|
952
|
-
Lint/Debugger:
|
953
|
-
Description: Check for debugger calls.
|
954
|
-
Enabled: true
|
955
|
-
Lint/DeprecatedClassMethods:
|
956
|
-
Description: Check for deprecated class method calls.
|
957
|
-
Enabled: false
|
958
|
-
Lint/DuplicateMethods:
|
959
|
-
Description: Check for duplicate methods calls.
|
960
|
-
Enabled: true
|
961
|
-
Lint/ElseLayout:
|
962
|
-
Description: Check for odd code arrangement in an else block.
|
963
|
-
Enabled: false
|
964
|
-
Lint/EmptyEnsure:
|
965
|
-
Description: Checks for empty ensure block.
|
966
|
-
Enabled: true
|
967
|
-
Lint/EmptyInterpolation:
|
968
|
-
Description: Checks for empty string interpolation.
|
969
|
-
Enabled: true
|
970
|
-
Lint/EndInMethod:
|
971
|
-
Description: END blocks should not be placed inside method definitions.
|
972
|
-
Enabled: true
|
973
|
-
Lint/EnsureReturn:
|
974
|
-
Description: Do not use return in an ensure block.
|
975
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
|
976
|
-
Enabled: true
|
977
|
-
Lint/Eval:
|
978
|
-
Description: The use of eval represents a serious security risk.
|
240
|
+
Lint/EachWithObjectArgument:
|
241
|
+
Description: Check for immutable argument given to each_with_object.
|
979
242
|
Enabled: true
|
980
243
|
Lint/HandleExceptions:
|
981
244
|
Description: Don't suppress exception.
|
982
245
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
|
983
246
|
Enabled: false
|
984
|
-
Lint/InvalidCharacterLiteral:
|
985
|
-
Description: Checks for invalid character literals with a non-escaped whitespace
|
986
|
-
character.
|
987
|
-
Enabled: false
|
988
247
|
Lint/LiteralInCondition:
|
989
248
|
Description: Checks of literals used in conditions.
|
990
249
|
Enabled: false
|
991
250
|
Lint/LiteralInInterpolation:
|
992
251
|
Description: Checks for literals used in interpolation.
|
993
252
|
Enabled: false
|
994
|
-
Lint/Loop:
|
995
|
-
Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
|
996
|
-
for post-loop tests.
|
997
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
|
998
|
-
Enabled: false
|
999
|
-
Lint/ParenthesesAsGroupedExpression:
|
1000
|
-
Description: Checks for method calls with a space before the opening parenthesis.
|
1001
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
1002
|
-
Enabled: false
|
1003
|
-
Lint/RequireParentheses:
|
1004
|
-
Description: Use parentheses in the method call to avoid confusion about precedence.
|
1005
|
-
Enabled: false
|
1006
|
-
Lint/RescueException:
|
1007
|
-
Description: Avoid rescuing the Exception class.
|
1008
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues
|
1009
|
-
Enabled: true
|
1010
|
-
Lint/ShadowingOuterLocalVariable:
|
1011
|
-
Description: Do not use the same name as outer local variable for block arguments
|
1012
|
-
or block local variables.
|
1013
|
-
Enabled: true
|
1014
|
-
Lint/SpaceBeforeFirstArg:
|
1015
|
-
Description: Put a space between a method name and the first argument in a method
|
1016
|
-
call without parentheses.
|
1017
|
-
Enabled: true
|
1018
|
-
Lint/StringConversionInInterpolation:
|
1019
|
-
Description: Checks for Object#to_s usage in string interpolation.
|
1020
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s
|
1021
|
-
Enabled: true
|
1022
|
-
Lint/UnderscorePrefixedVariableName:
|
1023
|
-
Description: Do not use prefix `_` for a variable that is used.
|
1024
|
-
Enabled: false
|
1025
|
-
Lint/UnusedBlockArgument:
|
1026
|
-
Description: Checks for unused block arguments.
|
1027
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
1028
|
-
Enabled: true
|
1029
|
-
Lint/UnusedMethodArgument:
|
1030
|
-
Description: Checks for unused method arguments.
|
1031
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
1032
|
-
Enabled: true
|
1033
|
-
Lint/UnreachableCode:
|
1034
|
-
Description: Unreachable code.
|
1035
|
-
Enabled: true
|
1036
|
-
Lint/UselessAccessModifier:
|
1037
|
-
Description: Checks for useless access modifiers.
|
1038
|
-
Enabled: true
|
1039
|
-
Lint/UselessAssignment:
|
1040
|
-
Description: Checks for useless assignment to a local variable.
|
1041
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
1042
|
-
Enabled: true
|
1043
|
-
Lint/UselessComparison:
|
1044
|
-
Description: Checks for comparison of something with itself.
|
1045
|
-
Enabled: true
|
1046
|
-
Lint/UselessElseWithoutRescue:
|
1047
|
-
Description: Checks for useless `else` in `begin..end` without `rescue`.
|
1048
|
-
Enabled: true
|
1049
|
-
Lint/UselessSetterCall:
|
1050
|
-
Description: Checks for useless setter call to a local variable.
|
1051
|
-
Enabled: true
|
1052
|
-
Lint/Void:
|
1053
|
-
Description: Possible use of operator/literal/variable in void context.
|
1054
|
-
Enabled: false
|
1055
|
-
Rails/Delegate:
|
1056
|
-
Description: Prefer delegate method for delegations.
|
1057
|
-
Enabled: false
|
data/Gemfile
CHANGED
@@ -88,10 +88,8 @@ module Europeana
|
|
88
88
|
def add_facet_qf_to_api(api_parameters)
|
89
89
|
return unless blacklight_params[:f]
|
90
90
|
|
91
|
-
|
92
|
-
|
93
|
-
salient_facets.each_pair do |facet_field, value_list|
|
94
|
-
Array(value_list).reject(&:blank?).each do |value|
|
91
|
+
salient_facets_for_api_facet_qf.each_pair do |facet_field, values|
|
92
|
+
[values].flatten.compact.each do |value|
|
95
93
|
api_parameters[:qf] ||= []
|
96
94
|
api_parameters[:qf] << "#{facet_field}:" + quote_facet_value(facet_field, value)
|
97
95
|
end
|
@@ -207,8 +205,17 @@ module Europeana
|
|
207
205
|
|
208
206
|
def api_request_facet_fields
|
209
207
|
@api_request_facet_fields ||= blacklight_config.facet_fields.select do |field_name, facet|
|
210
|
-
|
211
|
-
|
208
|
+
requestable_facet?(facet)
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
212
|
+
def requestable_facet?(facet)
|
213
|
+
if facet.query
|
214
|
+
false
|
215
|
+
elsif facet.include_in_request == false
|
216
|
+
false
|
217
|
+
else
|
218
|
+
blacklight_config.add_facet_fields_to_solr_request
|
212
219
|
end
|
213
220
|
end
|
214
221
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: europeana-blacklight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Doe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: blacklight
|
@@ -256,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
256
256
|
version: '0'
|
257
257
|
requirements: []
|
258
258
|
rubyforge_project:
|
259
|
-
rubygems_version: 2.5
|
259
|
+
rubygems_version: 2.6.5
|
260
260
|
signing_key:
|
261
261
|
specification_version: 4
|
262
262
|
summary: Europeana REST API adapter for Blacklight
|