blacklight 7.10.0 → 7.11.1

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.
Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +56 -7
  3. data/.rubocop_todo.yml +113 -98
  4. data/.travis.yml +0 -2
  5. data/Gemfile +0 -7
  6. data/README.md +1 -0
  7. data/VERSION +1 -1
  8. data/app/assets/javascripts/blacklight/blacklight.js +1 -2
  9. data/app/components/blacklight/document/bookmark_component.html.erb +16 -0
  10. data/app/components/blacklight/document/bookmark_component.rb +19 -0
  11. data/app/components/blacklight/document/citation_component.html.erb +9 -0
  12. data/app/components/blacklight/document/citation_component.rb +24 -0
  13. data/app/components/blacklight/document/more_like_this_component.html.erb +12 -0
  14. data/app/components/blacklight/document/more_like_this_component.rb +21 -0
  15. data/app/components/blacklight/document_component.html.erb +29 -0
  16. data/app/components/blacklight/document_component.rb +121 -0
  17. data/app/components/blacklight/document_metadata_component.html.erb +5 -0
  18. data/app/components/blacklight/document_metadata_component.rb +21 -0
  19. data/app/components/blacklight/facet_item_component.rb +6 -6
  20. data/app/components/blacklight/metadata_field_component.html.erb +8 -0
  21. data/app/components/blacklight/metadata_field_component.rb +31 -0
  22. data/app/components/blacklight/metadata_field_layout_component.html.erb +2 -0
  23. data/app/components/blacklight/metadata_field_layout_component.rb +16 -0
  24. data/app/components/blacklight/response/facet_group_component.html.erb +25 -0
  25. data/app/components/blacklight/response/facet_group_component.rb +19 -0
  26. data/app/components/blacklight/response/pagination_component.html.erb +3 -0
  27. data/app/components/blacklight/response/pagination_component.rb +17 -0
  28. data/app/components/blacklight/response/sort_component.html.erb +6 -0
  29. data/app/components/blacklight/response/sort_component.rb +16 -0
  30. data/app/components/blacklight/response/spellcheck_component.html.erb +7 -0
  31. data/app/components/blacklight/response/spellcheck_component.rb +20 -0
  32. data/app/components/blacklight/search_bar_component.html.erb +29 -0
  33. data/app/components/blacklight/search_bar_component.rb +45 -0
  34. data/app/components/blacklight/search_context_component.html.erb +10 -0
  35. data/app/components/blacklight/search_context_component.rb +30 -0
  36. data/app/components/blacklight/system/dropdown_component.html.erb +12 -0
  37. data/app/components/blacklight/system/dropdown_component.rb +42 -0
  38. data/app/components/blacklight/system/modal_component.html.erb +25 -0
  39. data/app/components/blacklight/system/modal_component.rb +9 -0
  40. data/app/controllers/concerns/blacklight/catalog.rb +5 -4
  41. data/app/controllers/concerns/blacklight/default_component_configuration.rb +2 -2
  42. data/app/controllers/concerns/blacklight/searchable.rb +11 -0
  43. data/app/helpers/blacklight/blacklight_helper_behavior.rb +14 -3
  44. data/app/helpers/blacklight/catalog_helper_behavior.rb +1 -0
  45. data/app/helpers/blacklight/component_helper_behavior.rb +2 -2
  46. data/app/helpers/blacklight/configuration_helper_behavior.rb +6 -0
  47. data/app/helpers/blacklight/facets_helper_behavior.rb +1 -1
  48. data/app/helpers/blacklight/icon_helper_behavior.rb +2 -2
  49. data/app/helpers/blacklight/search_history_constraints_helper_behavior.rb +7 -10
  50. data/app/helpers/blacklight/url_helper_behavior.rb +3 -3
  51. data/app/javascript/blacklight/search_context.js +0 -1
  52. data/app/models/blacklight/icon.rb +1 -0
  53. data/app/models/concerns/blacklight/document.rb +1 -0
  54. data/app/models/record_mailer.rb +1 -1
  55. data/app/presenters/blacklight/document_presenter.rb +7 -1
  56. data/app/presenters/blacklight/field_presenter.rb +1 -0
  57. data/app/presenters/blacklight/rendering/microdata.rb +1 -1
  58. data/app/services/blacklight/field_retriever.rb +1 -0
  59. data/app/services/blacklight/search_service.rb +1 -0
  60. data/app/views/catalog/_bookmark_control.html.erb +1 -36
  61. data/app/views/catalog/_citation.html.erb +4 -25
  62. data/app/views/catalog/_did_you_mean.html.erb +1 -5
  63. data/app/views/catalog/_document.atom.builder +3 -3
  64. data/app/views/catalog/_document.html.erb +5 -5
  65. data/app/views/catalog/_facet_group.html.erb +5 -19
  66. data/app/views/catalog/_index.html.erb +1 -10
  67. data/app/views/catalog/_paginate_compact.html.erb +6 -6
  68. data/app/views/catalog/_per_page_widget.html.erb +9 -12
  69. data/app/views/catalog/_previous_next_doc.html.erb +1 -12
  70. data/app/views/catalog/_results_pagination.html.erb +1 -3
  71. data/app/views/catalog/_search_form.html.erb +6 -27
  72. data/app/views/catalog/_show.html.erb +6 -8
  73. data/app/views/catalog/_show_main_content.html.erb +19 -13
  74. data/app/views/catalog/_show_sidebar.html.erb +1 -11
  75. data/app/views/catalog/_sort_widget.html.erb +5 -12
  76. data/app/views/catalog/email.html.erb +7 -7
  77. data/app/views/catalog/email_success.html.erb +5 -12
  78. data/app/views/catalog/facet.html.erb +14 -17
  79. data/app/views/catalog/index.atom.builder +0 -1
  80. data/app/views/catalog/sms.html.erb +7 -7
  81. data/app/views/catalog/sms_success.html.erb +5 -12
  82. data/blacklight.gemspec +3 -2
  83. data/config/i18n-tasks.yml +3 -0
  84. data/config/locales/blacklight.ar.yml +2 -0
  85. data/config/locales/blacklight.de.yml +2 -0
  86. data/config/locales/blacklight.en.yml +2 -0
  87. data/config/locales/blacklight.es.yml +4 -2
  88. data/config/locales/blacklight.fr.yml +2 -0
  89. data/config/locales/blacklight.hu.yml +2 -0
  90. data/config/locales/blacklight.it.yml +2 -0
  91. data/config/locales/blacklight.nl.yml +2 -0
  92. data/config/locales/blacklight.pt-BR.yml +2 -0
  93. data/config/locales/blacklight.sq.yml +2 -0
  94. data/config/locales/blacklight.zh.yml +2 -0
  95. data/lib/blacklight.rb +10 -0
  96. data/lib/blacklight/configuration.rb +8 -3
  97. data/lib/blacklight/configuration/fields.rb +5 -7
  98. data/lib/blacklight/engine.rb +1 -1
  99. data/lib/blacklight/nested_open_struct_with_hash_access.rb +1 -0
  100. data/lib/blacklight/search_state.rb +21 -7
  101. data/lib/blacklight/solr/response.rb +1 -0
  102. data/lib/blacklight/solr/response/facets.rb +9 -8
  103. data/lib/generators/blacklight/models_generator.rb +2 -0
  104. data/lib/generators/blacklight/templates/config/blacklight.yml +1 -0
  105. data/lib/railties/blacklight.rake +18 -13
  106. data/package.json +1 -1
  107. data/spec/components/blacklight/constraint_layout_component_spec.rb +1 -0
  108. data/spec/components/blacklight/document_component_spec.rb +129 -0
  109. data/spec/components/blacklight/document_metadata_component_spec.rb +0 -0
  110. data/spec/components/blacklight/metadata_field_component_spec.rb +41 -0
  111. data/spec/controllers/blacklight/search_fields_spec.rb +2 -2
  112. data/spec/controllers/catalog_controller_spec.rb +20 -0
  113. data/spec/features/search_context_spec.rb +12 -2
  114. data/spec/features/search_filters_spec.rb +4 -0
  115. data/spec/features/search_results_spec.rb +1 -0
  116. data/spec/features/sitelinks_search_box.rb +1 -0
  117. data/spec/helpers/blacklight/configuration_helper_behavior_spec.rb +3 -0
  118. data/spec/helpers/blacklight/render_partials_helper_behavior_spec.rb +1 -0
  119. data/spec/helpers/blacklight/search_history_constraints_helper_behavior_spec.rb +2 -0
  120. data/spec/helpers/blacklight/url_helper_behavior_spec.rb +1 -1
  121. data/spec/helpers/blacklight_helper_spec.rb +14 -1
  122. data/spec/helpers/catalog_helper_spec.rb +1 -4
  123. data/spec/lib/blacklight/search_state_spec.rb +32 -0
  124. data/spec/models/blacklight/configuration_spec.rb +5 -0
  125. data/spec/models/blacklight/document/cache_key_spec.rb +1 -0
  126. data/spec/models/blacklight/document/email_spec.rb +2 -0
  127. data/spec/models/blacklight/document/sms_spec.rb +2 -0
  128. data/spec/models/blacklight/facet_paginator_spec.rb +3 -0
  129. data/spec/models/blacklight/icon_spec.rb +6 -0
  130. data/spec/models/blacklight/solr/document_spec.rb +10 -0
  131. data/spec/models/blacklight/solr/response/facets_spec.rb +1 -1
  132. data/spec/models/blacklight/solr/response/group_response_spec.rb +2 -0
  133. data/spec/models/blacklight/solr/search_builder_spec.rb +10 -0
  134. data/spec/models/record_mailer_spec.rb +9 -0
  135. data/spec/models/search_spec.rb +1 -0
  136. data/spec/presenters/blacklight/show_presenter_spec.rb +8 -0
  137. data/spec/routing/catalog_routing_spec.rb +4 -0
  138. data/spec/services/blacklight/search_service_spec.rb +7 -0
  139. data/spec/spec_helper.rb +1 -1
  140. data/spec/views/catalog/_document.html.erb_spec.rb +13 -11
  141. data/spec/views/catalog/_facet_group.html.erb_spec.rb +1 -0
  142. data/spec/views/catalog/_facet_index_navigation.html.erb_spec.rb +1 -0
  143. data/spec/views/catalog/_previous_next_doc.html.erb_spec.rb +4 -0
  144. data/spec/views/catalog/index.atom.builder_spec.rb +40 -3
  145. data/spec/views/catalog/show.html.erb_spec.rb +14 -0
  146. data/tasks/blacklight.rake +7 -7
  147. metadata +56 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b7f2fb6980380cf12a51209225c105a4553f662015935c12335f7f0092086d6
4
- data.tar.gz: fa8de265b2adfc5ca3e1bc6c8f94e6ed7cdbbd3d465b70516924c30aaf6d3a4b
3
+ metadata.gz: 74d6e5485343fa8fc02b71d94e374d2f2d0a49f05e9bbf2e2226fe02088213f4
4
+ data.tar.gz: d1894865278720fc03af712e6cb424eaa1f3c30aa0f71666be7a301052663562
5
5
  SHA512:
6
- metadata.gz: 3b2a6adc3e2affcfb8e0a193493b37e5b1fac9ccf98c5145a985b4bd8166b1cf2e525d7f603eb1fbca7170ea6f1c32823e9acd6b0f55fa103fe637cba5628ccb
7
- data.tar.gz: 126dff3afa6c1db27e4b707952b9ce82926ca66c5882164739e0a5ba63a95c1f8af9c069a151fd0f031705d8757dac57c9013b9c7c64dbd6d6a4ec05fbbff4ab
6
+ metadata.gz: 9d40718c50283de79a47a70e77c3cdd5e13a92edf1eb657d749c96f25fd473523a09f4d68e594adf3d2f5cb3a6e249d6ebd61bf7ec349a4bc97ffad8b213fc5e
7
+ data.tar.gz: d3732c39e9672c23943b01aef361d29fc7cfb3f1f9d6e243770b72cc6ac61677cee2f478ae8cf50120d51d3978eda85492d4f386a15820b04d6350bfac53219c
@@ -1,11 +1,14 @@
1
- require: rubocop-rspec
1
+ require:
2
+ - rubocop-rspec
3
+ - rubocop-rails
4
+
2
5
 
3
6
  inherit_from:
4
7
  - .rubocop_todo.yml
5
8
 
6
9
  AllCops:
7
10
  DisplayCopNames: true
8
- TargetRubyVersion: 2.3
11
+ TargetRubyVersion: 2.5
9
12
  Exclude:
10
13
  - "lib/generators/blacklight/templates/**/*"
11
14
  - "blacklight.gemspec"
@@ -34,7 +37,7 @@ Metrics/ClassLength:
34
37
  Exclude:
35
38
  - "lib/blacklight/configuration.rb"
36
39
 
37
- Metrics/LineLength:
40
+ Layout/LineLength:
38
41
  Max: 200
39
42
  Exclude:
40
43
  - 'spec/**/*'
@@ -42,16 +45,18 @@ Metrics/LineLength:
42
45
  Naming/HeredocDelimiterNaming:
43
46
  Enabled: false
44
47
 
48
+ Naming/MethodParameterName:
49
+ AllowedNames:
50
+ - id
51
+ - q
52
+
45
53
  Naming/PredicateName:
46
- NamePrefixBlacklist:
54
+ ForbiddenPrefixes:
47
55
  - is_
48
56
 
49
57
  Rails:
50
58
  Enabled: true
51
59
 
52
- Rails/OutputSafety:
53
- Enabled: false
54
-
55
60
  # https://github.com/rubocop-hq/rubocop/issues/6439
56
61
  Style/AccessModifierDeclarations:
57
62
  Enabled: false
@@ -62,3 +67,47 @@ Style/MissingRespondToMissing:
62
67
 
63
68
  Style/StringLiterals:
64
69
  Enabled: false
70
+
71
+ Style/MethodDefParentheses:
72
+ Enabled: false
73
+
74
+ Layout/EmptyLinesAroundAttributeAccessor:
75
+ Enabled: true
76
+
77
+ Layout/SpaceAroundMethodCallOperator:
78
+ Enabled: true
79
+
80
+ Lint/DeprecatedOpenSSLConstant:
81
+ Enabled: true
82
+
83
+ Lint/MixedRegexpCaptureTypes:
84
+ Enabled: true
85
+
86
+ Lint/RaiseException:
87
+ Enabled: true
88
+
89
+ Lint/StructNewOverride:
90
+ Enabled: true
91
+
92
+ Style/ExponentialNotation:
93
+ Enabled: true
94
+
95
+ Style/HashEachMethods:
96
+ Enabled: true
97
+ Exclude:
98
+ - 'spec/services/blacklight/search_service_spec.rb'
99
+
100
+ Style/HashTransformKeys:
101
+ Enabled: true
102
+
103
+ Style/HashTransformValues:
104
+ Enabled: true
105
+
106
+ Style/RedundantRegexpCharacterClass:
107
+ Enabled: true
108
+
109
+ Style/RedundantRegexpEscape:
110
+ Enabled: true
111
+
112
+ Style/SlicingWithRange:
113
+ Enabled: true
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2020-03-30 10:03:33 -0700 using RuboCop version 0.63.1.
3
+ # on 2020-09-24 02:12:21 UTC using RuboCop version 0.91.1.
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
@@ -12,13 +12,13 @@ Capybara/CurrentPathExpectation:
12
12
  Exclude:
13
13
  - 'spec/features/alternate_controller_spec.rb'
14
14
 
15
- # Offense count: 2
16
- # Cop supports --auto-correct.
17
- # Configuration parameters: EnforcedStyle, IndentationWidth.
18
- # SupportedStyles: with_first_parameter, with_fixed_indentation
19
- Layout/AlignParameters:
15
+ # Offense count: 20
16
+ Capybara/VisibilityMatcher:
20
17
  Exclude:
21
- - 'app/views/catalog/_document.atom.builder'
18
+ - 'spec/features/facets_spec.rb'
19
+ - 'spec/features/search_filters_spec.rb'
20
+ - 'spec/helpers/blacklight/hash_as_hidden_fields_behavior_spec.rb'
21
+ - 'spec/helpers/blacklight_helper_spec.rb'
22
22
 
23
23
  # Offense count: 8
24
24
  # Cop supports --auto-correct.
@@ -36,14 +36,22 @@ Layout/ClosingParenthesisIndentation:
36
36
  Exclude:
37
37
  - 'app/views/catalog/index.atom.builder'
38
38
 
39
- # Offense count: 109
39
+ # Offense count: 111
40
40
  # Cop supports --auto-correct.
41
41
  Layout/EmptyLineAfterMagicComment:
42
42
  Enabled: false
43
43
 
44
+ # Offense count: 1
45
+ # Cop supports --auto-correct.
46
+ # Configuration parameters: AllowAliasSyntax, AllowedMethods.
47
+ # AllowedMethods: alias_method, public, protected, private
48
+ Layout/EmptyLinesAroundAttributeAccessor:
49
+ Exclude:
50
+ - 'app/presenters/blacklight/field_presenter.rb'
51
+
44
52
  # Offense count: 7
45
53
  # Cop supports --auto-correct.
46
- # Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
54
+ # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
47
55
  Layout/ExtraSpacing:
48
56
  Exclude:
49
57
  - 'app/models/concerns/blacklight/document/dublin_core.rb'
@@ -55,12 +63,13 @@ Layout/ExtraSpacing:
55
63
  # Cop supports --auto-correct.
56
64
  # Configuration parameters: EnforcedStyle, IndentationWidth.
57
65
  # SupportedStyles: special_inside_parentheses, consistent, align_braces
58
- Layout/IndentHash:
66
+ Layout/FirstHashElementIndentation:
59
67
  Exclude:
60
68
  - 'lib/blacklight/configuration.rb'
61
69
 
62
70
  # Offense count: 6
63
71
  # Cop supports --auto-correct.
72
+ # Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment.
64
73
  Layout/LeadingCommentSpace:
65
74
  Exclude:
66
75
  - 'app/models/blacklight/facet_paginator.rb'
@@ -90,13 +99,12 @@ Layout/MultilineMethodCallIndentation:
90
99
  Exclude:
91
100
  - 'lib/blacklight/search_builder.rb'
92
101
 
93
- # Offense count: 11
102
+ # Offense count: 9
94
103
  # Cop supports --auto-correct.
95
104
  # Configuration parameters: EnforcedStyle, IndentationWidth.
96
105
  # SupportedStyles: aligned, indented
97
106
  Layout/MultilineOperationIndentation:
98
107
  Exclude:
99
- - 'app/helpers/blacklight/facets_helper_behavior.rb'
100
108
  - 'app/helpers/blacklight/search_history_constraints_helper_behavior.rb'
101
109
  - 'lib/blacklight/configuration/context.rb'
102
110
  - 'lib/blacklight/search_state.rb'
@@ -125,12 +133,20 @@ Layout/SpaceInsideParens:
125
133
  - 'app/views/catalog/_document.rss.builder'
126
134
  - 'app/views/catalog/index.atom.builder'
127
135
 
136
+ # Offense count: 1
137
+ # Cop supports --auto-correct.
138
+ # Configuration parameters: AllowInHeredoc.
139
+ Layout/TrailingWhitespace:
140
+ Exclude:
141
+ - 'lib/blacklight/configuration.rb'
142
+
128
143
  # Offense count: 1
129
144
  Lint/AmbiguousBlockAssociation:
130
145
  Exclude:
131
146
  - 'lib/blacklight/solr/search_builder_behavior.rb'
132
147
 
133
148
  # Offense count: 8
149
+ # Cop supports --auto-correct.
134
150
  Lint/AmbiguousOperator:
135
151
  Exclude:
136
152
  - 'spec/helpers/blacklight/facets_helper_behavior_spec.rb'
@@ -142,6 +158,7 @@ Lint/AmbiguousOperator:
142
158
  - 'spec/services/blacklight/search_service_spec.rb'
143
159
 
144
160
  # Offense count: 55
161
+ # Cop supports --auto-correct.
145
162
  Lint/AmbiguousRegexpLiteral:
146
163
  Exclude:
147
164
  - 'spec/controllers/catalog_controller_spec.rb'
@@ -156,10 +173,10 @@ Lint/AmbiguousRegexpLiteral:
156
173
  - 'spec/views/catalog/index.html.erb_spec.rb'
157
174
  - 'spec/views/catalog/show.html.erb_spec.rb'
158
175
 
159
- # Offense count: 30
176
+ # Offense count: 29
177
+ # Cop supports --auto-correct.
160
178
  Lint/ParenthesesAsGroupedExpression:
161
179
  Exclude:
162
- - 'spec/controllers/catalog_controller_spec.rb'
163
180
  - 'spec/features/did_you_mean_spec.rb'
164
181
  - 'spec/features/search_filters_spec.rb'
165
182
  - 'spec/features/search_pagination_spec.rb'
@@ -172,17 +189,13 @@ Lint/ShadowingOuterLocalVariable:
172
189
  Exclude:
173
190
  - 'spec/models/blacklight/configuration_spec.rb'
174
191
 
175
- # Offense count: 1
176
- Lint/UselessComparison:
177
- Exclude:
178
- - 'spec/models/blacklight/document/active_model_shim_spec.rb'
179
-
180
- # Offense count: 60
192
+ # Offense count: 57
193
+ # Configuration parameters: IgnoredMethods.
181
194
  Metrics/AbcSize:
182
- Max: 49
195
+ Max: 59
183
196
 
184
197
  # Offense count: 2
185
- # Configuration parameters: CountComments, ExcludedMethods.
198
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
186
199
  # ExcludedMethods: refine
187
200
  Metrics/BlockLength:
188
201
  Max: 30
@@ -193,32 +206,34 @@ Metrics/BlockNesting:
193
206
  Max: 4
194
207
 
195
208
  # Offense count: 2
196
- # Configuration parameters: CountComments.
209
+ # Configuration parameters: CountComments, CountAsOne.
197
210
  Metrics/ClassLength:
198
211
  Max: 169
199
212
 
200
- # Offense count: 19
213
+ # Offense count: 26
214
+ # Configuration parameters: IgnoredMethods.
201
215
  Metrics/CyclomaticComplexity:
202
- Max: 11
216
+ Max: 14
203
217
 
204
- # Offense count: 56
205
- # Configuration parameters: CountComments, ExcludedMethods.
218
+ # Offense count: 61
219
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
206
220
  Metrics/MethodLength:
207
221
  Max: 30
208
222
 
209
223
  # Offense count: 8
210
- # Configuration parameters: CountComments.
224
+ # Configuration parameters: CountComments, CountAsOne.
211
225
  Metrics/ModuleLength:
212
- Max: 212
226
+ Max: 213
213
227
 
214
- # Offense count: 5
228
+ # Offense count: 3
215
229
  # Configuration parameters: CountKeywordArgs.
216
230
  Metrics/ParameterLists:
217
- Max: 7
231
+ Max: 6
218
232
 
219
- # Offense count: 16
233
+ # Offense count: 22
234
+ # Configuration parameters: IgnoredMethods.
220
235
  Metrics/PerceivedComplexity:
221
- Max: 13
236
+ Max: 16
222
237
 
223
238
  # Offense count: 4
224
239
  # Configuration parameters: EnforcedStyleForLeadingUnderscores.
@@ -230,12 +245,11 @@ Naming/MemoizedInstanceVariableName:
230
245
  - 'app/models/concerns/blacklight/document/semantic_fields.rb'
231
246
  - 'lib/blacklight/solr/response.rb'
232
247
 
233
- # Offense count: 14
248
+ # Offense count: 13
234
249
  # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
235
- # AllowedNames: io, id, to, by, on, in, at, ip, db
236
- Naming/UncommunicativeMethodParamName:
250
+ # AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
251
+ Naming/MethodParameterName:
237
252
  Exclude:
238
- - 'app/models/blacklight/facet_paginator.rb'
239
253
  - 'app/models/concerns/blacklight/document.rb'
240
254
  - 'app/presenters/blacklight/rendering/link_to_facet.rb'
241
255
  - 'lib/blacklight/nested_open_struct_with_hash_access.rb'
@@ -253,19 +267,6 @@ Naming/VariableNumber:
253
267
  - 'spec/views/catalog/_index.html.erb_spec.rb'
254
268
  - 'spec/views/catalog/_show.html.erb_spec.rb'
255
269
 
256
- # Offense count: 1
257
- # Cop supports --auto-correct.
258
- # Configuration parameters: AutoCorrect.
259
- Performance/TimesMap:
260
- Exclude:
261
- - 'spec/views/catalog/index.atom.builder_spec.rb'
262
-
263
- # Offense count: 2
264
- Performance/UnfreezeString:
265
- Exclude:
266
- - 'lib/generators/blacklight/install_generator.rb'
267
- - 'spec/helpers/blacklight_helper_spec.rb'
268
-
269
270
  # Offense count: 9
270
271
  RSpec/BeforeAfterAll:
271
272
  Exclude:
@@ -281,23 +282,24 @@ RSpec/BeforeAfterAll:
281
282
  - 'spec/models/blacklight/document/sms_spec.rb'
282
283
  - 'spec/models/blacklight/solr/document_spec.rb'
283
284
 
284
- # Offense count: 77
285
+ # Offense count: 81
285
286
  # Configuration parameters: Prefixes.
286
287
  # Prefixes: when, with, without
287
288
  RSpec/ContextWording:
288
289
  Enabled: false
289
290
 
290
- # Offense count: 56
291
+ # Offense count: 42
291
292
  RSpec/DescribeClass:
292
293
  Enabled: false
293
294
 
294
- # Offense count: 1
295
+ # Offense count: 2
295
296
  # Configuration parameters: CustomIncludeMethods.
296
297
  RSpec/EmptyExampleGroup:
297
298
  Exclude:
299
+ - 'spec/helpers/blacklight_helper_spec.rb'
298
300
  - 'spec/models/blacklight/solr/search_builder_spec.rb'
299
301
 
300
- # Offense count: 130
302
+ # Offense count: 134
301
303
  # Configuration parameters: Max.
302
304
  RSpec/ExampleLength:
303
305
  Enabled: false
@@ -312,7 +314,7 @@ RSpec/ExpectInHook:
312
314
  - 'spec/helpers/catalog_helper_spec.rb'
313
315
 
314
316
  # Offense count: 5
315
- # Configuration parameters: CustomTransform, IgnoreMethods.
317
+ # Configuration parameters: CustomTransform, IgnoreMethods, SpecSuffixOnly.
316
318
  RSpec/FilePath:
317
319
  Exclude:
318
320
  - 'spec/controllers/blacklight/catalog/component_configuration_spec.rb'
@@ -371,12 +373,16 @@ RSpec/MessageSpies:
371
373
  - 'spec/presenters/blacklight/field_presenter_spec.rb'
372
374
  - 'spec/presenters/thumbnail_presenter_spec.rb'
373
375
 
374
- # Offense count: 343
375
- # Configuration parameters: AggregateFailuresByDefault.
376
+ # Offense count: 363
376
377
  RSpec/MultipleExpectations:
377
378
  Max: 16
378
379
 
379
- # Offense count: 341
380
+ # Offense count: 160
381
+ # Configuration parameters: AllowSubject.
382
+ RSpec/MultipleMemoizedHelpers:
383
+ Max: 14
384
+
385
+ # Offense count: 337
380
386
  # Configuration parameters: IgnoreSharedExamples.
381
387
  RSpec/NamedSubject:
382
388
  Enabled: false
@@ -385,7 +391,7 @@ RSpec/NamedSubject:
385
391
  RSpec/NestedGroups:
386
392
  Max: 5
387
393
 
388
- # Offense count: 8
394
+ # Offense count: 11
389
395
  RSpec/RepeatedDescription:
390
396
  Exclude:
391
397
  - 'spec/features/search_results_spec.rb'
@@ -399,20 +405,29 @@ RSpec/RepeatedExample:
399
405
  - 'spec/models/blacklight/solr/document_spec.rb'
400
406
 
401
407
  # Offense count: 4
408
+ RSpec/RepeatedExampleGroupDescription:
409
+ Exclude:
410
+ - 'spec/helpers/blacklight/facets_helper_behavior_spec.rb'
411
+ - 'spec/services/blacklight/search_service_spec.rb'
412
+
413
+ # Offense count: 4
414
+ # Cop supports --auto-correct.
402
415
  RSpec/ScatteredLet:
403
416
  Exclude:
404
417
  - 'spec/helpers/catalog_helper_spec.rb'
405
418
  - 'spec/models/blacklight/solr/search_builder_spec.rb'
406
419
  - 'spec/views/catalog/index.atom.builder_spec.rb'
407
420
 
408
- # Offense count: 10
421
+ # Offense count: 13
409
422
  RSpec/SubjectStub:
410
423
  Exclude:
424
+ - 'spec/controllers/catalog_controller_spec.rb'
411
425
  - 'spec/lib/blacklight/search_state_spec.rb'
426
+ - 'spec/models/blacklight/document/cache_key_spec.rb'
412
427
  - 'spec/models/blacklight/search_builder_spec.rb'
413
428
  - 'spec/services/blacklight/search_service_spec.rb'
414
429
 
415
- # Offense count: 118
430
+ # Offense count: 121
416
431
  # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
417
432
  RSpec/VerifiedDoubles:
418
433
  Enabled: false
@@ -422,6 +437,13 @@ RSpec/VoidExpect:
422
437
  Exclude:
423
438
  - 'spec/lib/blacklight/configuration/facet_field_spec.rb'
424
439
 
440
+ # Offense count: 8
441
+ # Cop supports --auto-correct.
442
+ Rails/ContentTag:
443
+ Exclude:
444
+ - 'app/components/blacklight/document_component.rb'
445
+ - 'app/components/blacklight/facet_item_pivot_component.rb'
446
+
425
447
  # Offense count: 4
426
448
  # Configuration parameters: EnforcedStyle.
427
449
  # SupportedStyles: strict, flexible
@@ -429,12 +451,25 @@ Rails/Date:
429
451
  Exclude:
430
452
  - 'spec/models/search_spec.rb'
431
453
 
432
- # Offense count: 1
433
- # Configuration parameters: EnforcedStyle.
434
- # SupportedStyles: strict, flexible
435
- Rails/TimeZone:
454
+ # Offense count: 31
455
+ # Configuration parameters: Include.
456
+ # Include: app/helpers/**/*.rb
457
+ Rails/HelperInstanceVariable:
436
458
  Exclude:
437
- - 'spec/models/blacklight/solr/search_builder_spec.rb'
459
+ - 'app/helpers/blacklight/blacklight_helper_behavior.rb'
460
+ - 'app/helpers/blacklight/catalog_helper_behavior.rb'
461
+ - 'app/helpers/blacklight/component_helper_behavior.rb'
462
+ - 'app/helpers/blacklight/facets_helper_behavior.rb'
463
+ - 'app/helpers/blacklight/render_partials_helper_behavior.rb'
464
+
465
+ # Offense count: 11
466
+ Rails/OutputSafety:
467
+ Exclude:
468
+ - 'app/helpers/blacklight/catalog_helper_behavior.rb'
469
+ - 'app/helpers/blacklight/configuration_helper_behavior.rb'
470
+ - 'app/helpers/blacklight/icon_helper_behavior.rb'
471
+ - 'app/helpers/blacklight/url_helper_behavior.rb'
472
+ - 'app/presenters/blacklight/rendering/join.rb'
438
473
 
439
474
  # Offense count: 13
440
475
  Security/Eval:
@@ -456,8 +491,8 @@ Style/Alias:
456
491
 
457
492
  # Offense count: 3
458
493
  # Cop supports --auto-correct.
459
- # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods.
460
- # SupportedStyles: line_count_based, semantic, braces_for_chaining
494
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
495
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
461
496
  # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
462
497
  # FunctionalMethods: let, let!, subject, watch
463
498
  # IgnoredMethods: lambda, proc, it
@@ -466,19 +501,9 @@ Style/BlockDelimiters:
466
501
  - 'app/views/catalog/index.rss.builder'
467
502
  - 'app/views/catalog/opensearch.xml.builder'
468
503
 
469
- # Offense count: 3
470
- # Cop supports --auto-correct.
471
- # Configuration parameters: EnforcedStyle.
472
- # SupportedStyles: braces, no_braces, context_dependent
473
- Style/BracesAroundHashParameters:
474
- Exclude:
475
- - 'lib/blacklight/solr/repository.rb'
476
- - 'lib/blacklight/solr/response/facets.rb'
477
- - 'lib/generators/blacklight/test_support_generator.rb'
478
-
479
504
  # Offense count: 51
480
505
  # Cop supports --auto-correct.
481
- # Configuration parameters: AutoCorrect, EnforcedStyle.
506
+ # Configuration parameters: EnforcedStyle.
482
507
  # SupportedStyles: nested, compact
483
508
  Style/ClassAndModuleChildren:
484
509
  Enabled: false
@@ -497,16 +522,11 @@ Style/ConditionalAssignment:
497
522
  Exclude:
498
523
  - 'lib/blacklight/solr/response/spelling.rb'
499
524
 
500
- # Offense count: 99
525
+ # Offense count: 105
501
526
  Style/Documentation:
502
527
  Enabled: false
503
528
 
504
- # Offense count: 1
505
- Style/DoubleNegation:
506
- Exclude:
507
- - 'lib/blacklight/search_builder.rb'
508
-
509
- # Offense count: 9
529
+ # Offense count: 10
510
530
  # Cop supports --auto-correct.
511
531
  Style/ExpandPathArguments:
512
532
  Exclude:
@@ -517,6 +537,7 @@ Style/ExpandPathArguments:
517
537
  - 'lib/generators/blacklight/install_generator.rb'
518
538
  - 'lib/generators/blacklight/models_generator.rb'
519
539
  - 'lib/generators/blacklight/search_builder_generator.rb'
540
+ - 'lib/generators/blacklight/solr_generator.rb'
520
541
  - 'lib/generators/blacklight/test_support_generator.rb'
521
542
  - 'lib/generators/blacklight/user_generator.rb'
522
543
 
@@ -542,13 +563,6 @@ Style/GuardClause:
542
563
  Style/IfUnlessModifier:
543
564
  Enabled: false
544
565
 
545
- # Offense count: 122
546
- # Cop supports --auto-correct.
547
- # Configuration parameters: EnforcedStyle.
548
- # SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline
549
- Style/MethodDefParentheses:
550
- Enabled: false
551
-
552
566
  # Offense count: 5
553
567
  # Cop supports --auto-correct.
554
568
  Style/MultilineIfModifier:
@@ -564,13 +578,15 @@ Style/MultipleComparison:
564
578
 
565
579
  # Offense count: 2
566
580
  # Cop supports --auto-correct.
581
+ # Configuration parameters: EnforcedStyle.
582
+ # SupportedStyles: literals, strict
567
583
  Style/MutableConstant:
568
584
  Exclude:
569
585
  - 'lib/blacklight/solr/request.rb'
570
586
 
571
587
  # Offense count: 9
572
588
  # Cop supports --auto-correct.
573
- # Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
589
+ # Configuration parameters: EnforcedStyle, IgnoredMethods.
574
590
  # SupportedStyles: predicate, comparison
575
591
  Style/NumericPredicate:
576
592
  Exclude:
@@ -590,12 +606,11 @@ Style/ParenthesesAroundCondition:
590
606
  Exclude:
591
607
  - 'app/views/catalog/_document.atom.builder'
592
608
 
593
- # Offense count: 5
609
+ # Offense count: 3
594
610
  # Cop supports --auto-correct.
595
611
  # Configuration parameters: PreferredDelimiters.
596
612
  Style/PercentLiteralDelimiters:
597
613
  Exclude:
598
- - 'lib/blacklight/configuration.rb'
599
614
  - 'lib/blacklight/engine.rb'
600
615
  - 'lib/blacklight/solr/request.rb'
601
616
 
@@ -612,8 +627,8 @@ Style/RescueStandardError:
612
627
 
613
628
  # Offense count: 12
614
629
  # Cop supports --auto-correct.
615
- # Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.
616
- # Whitelist: present?, blank?, presence, try, try!
630
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
631
+ # AllowedMethods: present?, blank?, presence, try, try!
617
632
  Style/SafeNavigation:
618
633
  Exclude:
619
634
  - 'app/controllers/concerns/blacklight/bookmarks.rb'