blacklight 6.21.0 → 7.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (420) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.npmignore +23 -0
  4. data/.rubocop.yml +40 -16
  5. data/.rubocop_todo.yml +479 -375
  6. data/.solr_wrapper.yml +9 -2
  7. data/.travis.yml +23 -27
  8. data/Gemfile +3 -4
  9. data/README.md +22 -5
  10. data/Rakefile +3 -2
  11. data/VERSION +1 -1
  12. data/Vagrantfile +2 -0
  13. data/app/assets/images/blacklight/list.svg +1 -0
  14. data/app/assets/images/blacklight/search.svg +1 -0
  15. data/app/assets/javascripts/blacklight/blacklight.js +497 -57
  16. data/app/assets/stylesheets/blacklight/_balanced_list.scss +7 -12
  17. data/app/assets/stylesheets/blacklight/_blacklight_base.scss +18 -15
  18. data/app/assets/stylesheets/blacklight/_bookmark.scss +1 -13
  19. data/app/assets/stylesheets/blacklight/_bootstrap_overrides.scss +27 -0
  20. data/app/assets/stylesheets/blacklight/_constraints.scss +17 -25
  21. data/app/assets/stylesheets/blacklight/_controls.scss +8 -16
  22. data/app/assets/stylesheets/blacklight/_facets.scss +64 -93
  23. data/app/assets/stylesheets/blacklight/_header.scss +35 -48
  24. data/app/assets/stylesheets/blacklight/_icons.scss +35 -0
  25. data/app/assets/stylesheets/blacklight/_layout.scss +0 -10
  26. data/app/assets/stylesheets/blacklight/_mixins.scss +15 -0
  27. data/app/assets/stylesheets/blacklight/_modal.scss +9 -17
  28. data/app/assets/stylesheets/blacklight/_pagination.scss +2 -17
  29. data/app/assets/stylesheets/blacklight/_search_form.scss +7 -0
  30. data/app/assets/stylesheets/blacklight/_search_history.scss +5 -13
  31. data/app/assets/stylesheets/blacklight/_search_results.scss +9 -8
  32. data/app/assets/stylesheets/blacklight/_twitter_typeahead.scss +1 -2
  33. data/app/assets/stylesheets/blacklight/blacklight.scss +1 -1
  34. data/app/builders/blacklight/action_builder.rb +57 -0
  35. data/app/controllers/bookmarks_controller.rb +2 -2
  36. data/app/controllers/catalog_controller.rb +2 -2
  37. data/app/controllers/concerns/blacklight/base.rb +0 -33
  38. data/app/controllers/concerns/blacklight/bookmarks.rb +19 -30
  39. data/app/controllers/concerns/blacklight/catalog.rb +263 -210
  40. data/app/controllers/concerns/blacklight/controller.rb +102 -124
  41. data/app/controllers/concerns/blacklight/default_component_configuration.rb +12 -43
  42. data/app/controllers/concerns/blacklight/facet.rb +3 -0
  43. data/app/controllers/concerns/blacklight/search_context.rb +11 -11
  44. data/app/controllers/concerns/blacklight/search_fields.rb +4 -14
  45. data/app/controllers/concerns/blacklight/search_history.rb +1 -6
  46. data/app/controllers/concerns/blacklight/token_based_user.rb +5 -7
  47. data/app/helpers/blacklight/blacklight_helper_behavior.rb +36 -118
  48. data/app/helpers/blacklight/catalog_helper_behavior.rb +94 -88
  49. data/app/helpers/blacklight/component_helper_behavior.rb +19 -19
  50. data/app/helpers/blacklight/configuration_helper_behavior.rb +30 -57
  51. data/app/helpers/blacklight/facets_helper_behavior.rb +55 -51
  52. data/app/helpers/blacklight/hash_as_hidden_fields_helper_behavior.rb +9 -11
  53. data/app/helpers/blacklight/icon_helper_behavior.rb +18 -0
  54. data/app/helpers/blacklight/layout_helper_behavior.rb +3 -10
  55. data/app/helpers/blacklight/render_constraints_helper_behavior.rb +8 -6
  56. data/app/helpers/blacklight/render_partials_helper_behavior.rb +195 -0
  57. data/app/helpers/blacklight/search_history_constraints_helper_behavior.rb +19 -11
  58. data/app/helpers/blacklight/suggest_helper_behavior.rb +1 -0
  59. data/app/helpers/blacklight/url_helper_behavior.rb +50 -41
  60. data/app/{assets/javascripts → javascript}/blacklight/autocomplete.js +3 -2
  61. data/app/javascript/blacklight/bookmark_toggle.js +25 -0
  62. data/app/{assets/javascripts → javascript}/blacklight/checkbox_submit.js +66 -71
  63. data/app/{assets/javascripts → javascript}/blacklight/collapsable.js +1 -1
  64. data/app/javascript/blacklight/core.js +41 -0
  65. data/app/{assets/javascripts → javascript}/blacklight/facet_load.js +6 -6
  66. data/app/{assets/javascripts/blacklight/ajax_modal.js → javascript/blacklight/modal.js} +62 -64
  67. data/app/{assets/javascripts → javascript}/blacklight/search_context.js +10 -3
  68. data/app/models/blacklight/facet_paginator.rb +3 -3
  69. data/app/models/blacklight/icon.rb +56 -0
  70. data/app/models/blacklight/solr/facet_paginator.rb +3 -3
  71. data/app/models/blacklight/suggest_search.rb +1 -1
  72. data/app/models/bookmark.rb +5 -10
  73. data/app/models/concerns/blacklight/configurable.rb +13 -13
  74. data/app/models/concerns/blacklight/document.rb +23 -39
  75. data/app/models/concerns/blacklight/document/active_model_shim.rb +8 -11
  76. data/app/models/concerns/blacklight/document/cache_key.rb +1 -1
  77. data/app/models/concerns/blacklight/document/dublin_core.rb +2 -2
  78. data/app/models/concerns/blacklight/document/email.rb +1 -1
  79. data/app/models/concerns/blacklight/document/extensions.rb +5 -5
  80. data/app/models/concerns/blacklight/document/semantic_fields.rb +9 -9
  81. data/app/models/concerns/blacklight/document/sms.rb +1 -1
  82. data/app/models/concerns/blacklight/solr/document.rb +8 -8
  83. data/app/models/concerns/blacklight/user.rb +7 -6
  84. data/app/models/record_mailer.rb +5 -6
  85. data/app/models/search.rb +5 -7
  86. data/app/presenters/blacklight/document_presenter.rb +25 -140
  87. data/app/presenters/blacklight/field_presenter.rb +7 -5
  88. data/app/presenters/blacklight/index_presenter.rb +41 -70
  89. data/app/presenters/blacklight/json_presenter.rb +10 -14
  90. data/app/presenters/blacklight/link_alternate_presenter.rb +3 -1
  91. data/app/presenters/blacklight/rendering/abstract_step.rb +7 -5
  92. data/app/presenters/blacklight/rendering/helper_method.rb +10 -8
  93. data/app/presenters/blacklight/rendering/join.rb +5 -3
  94. data/app/presenters/blacklight/rendering/link_to_facet.rb +23 -19
  95. data/app/presenters/blacklight/rendering/microdata.rb +6 -3
  96. data/app/presenters/blacklight/rendering/pipeline.rb +7 -5
  97. data/app/presenters/blacklight/rendering/terminator.rb +2 -0
  98. data/app/presenters/blacklight/search_bar_presenter.rb +39 -0
  99. data/app/presenters/blacklight/show_presenter.rb +26 -72
  100. data/app/presenters/blacklight/thumbnail_presenter.rb +74 -0
  101. data/app/services/blacklight/document_factory.rb +13 -0
  102. data/app/services/blacklight/field_retriever.rb +26 -24
  103. data/app/services/blacklight/search_service.rb +152 -0
  104. data/app/values/blacklight/types.rb +31 -0
  105. data/app/views/blacklight/nav/_bookmark.html.erb +2 -2
  106. data/app/views/blacklight/nav/_search_history.html.erb +1 -1
  107. data/app/views/bookmarks/_tools.html.erb +2 -2
  108. data/app/views/bookmarks/index.html.erb +12 -13
  109. data/app/views/catalog/_bookmark_control.html.erb +26 -10
  110. data/app/views/catalog/_citation.html.erb +18 -23
  111. data/app/views/catalog/_constraints.html.erb +6 -7
  112. data/app/views/catalog/_constraints_element.html.erb +6 -6
  113. data/app/views/catalog/_did_you_mean.html.erb +1 -1
  114. data/app/views/catalog/{_document_default.atom.builder → _document.atom.builder} +19 -18
  115. data/app/views/catalog/_document.html.erb +5 -3
  116. data/app/views/catalog/{_document_default.rss.builder → _document.rss.builder} +2 -0
  117. data/app/views/catalog/_document_action.html.erb +2 -1
  118. data/app/views/catalog/_email_form.html.erb +8 -4
  119. data/app/views/catalog/_facet_index_navigation.html.erb +5 -4
  120. data/app/views/catalog/_facet_layout.html.erb +6 -10
  121. data/app/views/catalog/_facet_limit.html.erb +3 -2
  122. data/app/views/catalog/_facet_pagination.html.erb +8 -8
  123. data/app/views/catalog/_facet_pivot.html.erb +2 -2
  124. data/app/views/catalog/_facets.html.erb +9 -12
  125. data/app/views/catalog/_field.json.jbuilder +10 -0
  126. data/app/views/catalog/{_group_default.html.erb → _group.html.erb} +1 -1
  127. data/app/views/catalog/_home_text.html.erb +32 -36
  128. data/app/views/catalog/_index.html.erb +10 -0
  129. data/app/views/catalog/{_index_header_default.html.erb → _index_header.html.erb} +3 -3
  130. data/app/views/catalog/_per_page_widget.html.erb +6 -7
  131. data/app/views/catalog/_previous_next_doc.html.erb +6 -14
  132. data/app/views/catalog/_results_pagination.html.erb +2 -2
  133. data/app/views/catalog/_search_form.html.erb +12 -8
  134. data/app/views/catalog/_search_header.html.erb +0 -3
  135. data/app/views/catalog/_search_results.html.erb +6 -2
  136. data/app/views/catalog/_show.html.erb +8 -0
  137. data/app/views/catalog/{_show_header_default.html.erb → _show_header.html.erb} +0 -0
  138. data/app/views/catalog/_show_main_content.html.erb +4 -4
  139. data/app/views/catalog/_show_more_like_this.html.erb +1 -1
  140. data/app/views/catalog/_show_sidebar.html.erb +3 -3
  141. data/app/views/catalog/_show_tools.html.erb +10 -12
  142. data/app/views/catalog/_sms_form.html.erb +8 -4
  143. data/app/views/catalog/_sort_and_per_page.html.erb +3 -3
  144. data/app/views/catalog/_sort_widget.html.erb +7 -7
  145. data/app/views/catalog/_thumbnail.html.erb +5 -0
  146. data/app/views/catalog/_view_type_group.html.erb +2 -2
  147. data/app/views/catalog/_zero_results.html.erb +1 -1
  148. data/app/views/catalog/citation.html.erb +1 -1
  149. data/app/views/catalog/citation.js.erb +9 -1
  150. data/app/views/catalog/email.html.erb +5 -3
  151. data/app/views/catalog/email_success.html.erb +12 -8
  152. data/app/views/catalog/facet.html.erb +10 -8
  153. data/app/views/catalog/facet.json.jbuilder +2 -0
  154. data/app/views/catalog/index.atom.builder +13 -16
  155. data/app/views/catalog/index.html.erb +9 -11
  156. data/app/views/catalog/index.json.jbuilder +84 -3
  157. data/app/views/catalog/index.rss.builder +7 -5
  158. data/app/views/catalog/opensearch.xml.builder +12 -10
  159. data/app/views/catalog/show.html.erb +11 -6
  160. data/app/views/catalog/show.json.jbuilder +21 -0
  161. data/app/views/catalog/sms.html.erb +3 -1
  162. data/app/views/catalog/sms_success.html.erb +12 -8
  163. data/app/views/kaminari/blacklight/_first_page.html.erb +2 -2
  164. data/app/views/kaminari/blacklight/_gap.html.erb +2 -2
  165. data/app/views/kaminari/blacklight/_last_page.html.erb +2 -2
  166. data/app/views/kaminari/blacklight/_next_page.html.erb +5 -5
  167. data/app/views/kaminari/blacklight/_page.html.erb +5 -3
  168. data/app/views/kaminari/blacklight/_prev_page.html.erb +4 -4
  169. data/app/views/kaminari/blacklight_compact/_paginator.html.erb +4 -4
  170. data/app/views/layouts/blacklight.html.erb +14 -41
  171. data/app/views/layouts/blacklight/base.html.erb +35 -0
  172. data/app/views/layouts/catalog_result.html.erb +11 -0
  173. data/app/views/search_history/index.html.erb +16 -21
  174. data/app/views/{_flash_msg.html.erb → shared/_flash_msg.html.erb} +0 -0
  175. data/app/views/shared/_header_navbar.html.erb +8 -13
  176. data/app/views/shared/_modal.html.erb +6 -0
  177. data/app/views/shared/_user_util_links.html.erb +22 -0
  178. data/blacklight.gemspec +8 -10
  179. data/config/i18n-tasks.yml +17 -0
  180. data/config/locales/blacklight.de.yml +71 -82
  181. data/config/locales/blacklight.en.yml +15 -27
  182. data/config/locales/blacklight.es.yml +14 -26
  183. data/config/locales/blacklight.fr.yml +16 -33
  184. data/config/locales/blacklight.hu.yml +212 -0
  185. data/config/locales/blacklight.it.yml +15 -26
  186. data/config/locales/blacklight.nl.yml +212 -0
  187. data/config/locales/blacklight.pt-BR.yml +24 -29
  188. data/config/locales/blacklight.sq.yml +4 -28
  189. data/config/locales/blacklight.zh.yml +3 -25
  190. data/config/routes.rb +2 -10
  191. data/db/migrate/20140202020202_create_bookmarks.rb +0 -1
  192. data/db/migrate/20140320000000_add_polymorphic_type_to_bookmarks.rb +1 -1
  193. data/lib/blacklight.rb +6 -4
  194. data/lib/blacklight/abstract_repository.rb +9 -9
  195. data/lib/blacklight/configuration.rb +99 -88
  196. data/lib/blacklight/configuration/context.rb +12 -1
  197. data/lib/blacklight/configuration/facet_field.rb +16 -9
  198. data/lib/blacklight/configuration/field.rb +32 -3
  199. data/lib/blacklight/configuration/fields.rb +15 -17
  200. data/lib/blacklight/configuration/null_field.rb +2 -0
  201. data/lib/blacklight/configuration/search_field.rb +2 -2
  202. data/lib/blacklight/configuration/sort_field.rb +2 -2
  203. data/lib/blacklight/configuration/view_config.rb +4 -0
  204. data/lib/blacklight/engine.rb +8 -9
  205. data/lib/blacklight/exceptions.rb +4 -7
  206. data/lib/blacklight/{utils.rb → nested_open_struct_with_hash_access.rb} +9 -81
  207. data/lib/blacklight/open_struct_with_hash_access.rb +49 -0
  208. data/lib/blacklight/parameters.rb +1 -1
  209. data/lib/blacklight/routes/exportable.rb +1 -3
  210. data/lib/blacklight/routes/searchable.rb +3 -3
  211. data/lib/blacklight/runtime_registry.rb +2 -0
  212. data/lib/blacklight/search_builder.rb +28 -35
  213. data/lib/blacklight/search_state.rb +10 -8
  214. data/lib/blacklight/solr/repository.rb +4 -3
  215. data/lib/blacklight/solr/request.rb +1 -1
  216. data/lib/blacklight/solr/response.rb +29 -30
  217. data/lib/blacklight/solr/response/facets.rb +29 -31
  218. data/lib/blacklight/solr/response/group.rb +3 -3
  219. data/lib/blacklight/solr/response/group_response.rb +1 -1
  220. data/lib/blacklight/solr/response/more_like_this.rb +2 -2
  221. data/lib/blacklight/solr/response/response.rb +2 -2
  222. data/lib/blacklight/solr/response/spelling.rb +4 -3
  223. data/lib/blacklight/solr/search_builder_behavior.rb +25 -29
  224. data/lib/blacklight/version.rb +1 -1
  225. data/lib/generators/blacklight/assets_generator.rb +13 -12
  226. data/lib/generators/blacklight/controller_generator.rb +4 -5
  227. data/lib/generators/blacklight/document_generator.rb +1 -1
  228. data/lib/generators/blacklight/install_generator.rb +17 -27
  229. data/lib/generators/blacklight/search_builder_generator.rb +1 -1
  230. data/lib/generators/blacklight/{solr5_generator.rb → solr_generator.rb} +12 -6
  231. data/lib/generators/blacklight/templates/.solr_wrapper.yml +5 -0
  232. data/lib/generators/blacklight/templates/alternate_controller.rb +4 -4
  233. data/lib/generators/blacklight/templates/blacklight.scss +0 -2
  234. data/lib/generators/blacklight/templates/catalog_controller.rb +57 -50
  235. data/lib/generators/blacklight/templates/config/blacklight.yml +1 -13
  236. data/{solr → lib/generators/blacklight/templates/solr}/conf/_rest_managed.json +0 -0
  237. data/{solr → lib/generators/blacklight/templates/solr}/conf/admin-extra.html +0 -0
  238. data/{solr → lib/generators/blacklight/templates/solr}/conf/elevate.xml +0 -0
  239. data/{solr → lib/generators/blacklight/templates/solr}/conf/mapping-ISOLatin1Accent.txt +0 -0
  240. data/{solr → lib/generators/blacklight/templates/solr}/conf/protwords.txt +0 -0
  241. data/lib/generators/blacklight/templates/solr/conf/schema.xml +388 -0
  242. data/{solr → lib/generators/blacklight/templates/solr}/conf/scripts.conf +0 -0
  243. data/lib/generators/blacklight/templates/solr/conf/solrconfig.xml +195 -0
  244. data/{solr → lib/generators/blacklight/templates/solr}/conf/spellings.txt +0 -0
  245. data/{solr → lib/generators/blacklight/templates/solr}/conf/stopwords.txt +0 -0
  246. data/{solr → lib/generators/blacklight/templates/solr}/conf/stopwords_en.txt +0 -0
  247. data/{solr → lib/generators/blacklight/templates/solr}/conf/synonyms.txt +0 -0
  248. data/{solr → lib/generators/blacklight/templates/solr}/conf/xslt/example.xsl +0 -0
  249. data/{solr → lib/generators/blacklight/templates/solr}/conf/xslt/example_atom.xsl +0 -0
  250. data/{solr → lib/generators/blacklight/templates/solr}/conf/xslt/example_rss.xsl +0 -0
  251. data/{solr → lib/generators/blacklight/templates/solr}/conf/xslt/luke.xsl +0 -0
  252. data/lib/generators/blacklight/test_support_generator.rb +10 -10
  253. data/lib/generators/blacklight/user_generator.rb +5 -6
  254. data/lib/railties/blacklight.rake +7 -6
  255. data/package-lock.json +2195 -0
  256. data/package.json +29 -0
  257. data/spec/controllers/alternate_controller_spec.rb +5 -4
  258. data/spec/controllers/application_controller_spec.rb +1 -5
  259. data/spec/controllers/blacklight/base_spec.rb +6 -3
  260. data/spec/controllers/blacklight/catalog/component_configuration_spec.rb +11 -7
  261. data/spec/controllers/blacklight/facet_spec.rb +1 -2
  262. data/spec/controllers/blacklight/search_fields_spec.rb +25 -34
  263. data/spec/controllers/bookmarks_controller_spec.rb +13 -13
  264. data/spec/controllers/catalog_controller_spec.rb +332 -164
  265. data/spec/controllers/search_history_controller_spec.rb +6 -6
  266. data/spec/features/alternate_controller_spec.rb +4 -4
  267. data/spec/features/autocomplete_spec.rb +4 -2
  268. data/spec/features/bookmarks_spec.rb +10 -10
  269. data/spec/features/did_you_mean_spec.rb +7 -12
  270. data/spec/features/facets_spec.rb +16 -16
  271. data/spec/features/record_view_spec.rb +12 -18
  272. data/spec/features/search_context_spec.rb +6 -7
  273. data/spec/features/search_crawler_spec.rb +3 -5
  274. data/spec/features/search_filters_spec.rb +80 -80
  275. data/spec/features/search_formats_spec.rb +1 -1
  276. data/spec/features/search_history_spec.rb +6 -29
  277. data/spec/features/search_pagination_spec.rb +4 -2
  278. data/spec/features/search_results_spec.rb +14 -12
  279. data/spec/features/search_sort_spec.rb +2 -2
  280. data/spec/features/search_spec.rb +7 -12
  281. data/spec/features/sitelinks_search_box.rb +4 -4
  282. data/{solr → spec/fixtures}/sample_solr_documents.yml +688 -688
  283. data/spec/helpers/{configuration_helper_spec.rb → blacklight/configuration_helper_behavior_spec.rb} +97 -92
  284. data/spec/helpers/{facets_helper_spec.rb → blacklight/facets_helper_behavior_spec.rb} +72 -67
  285. data/spec/helpers/{hash_as_hidden_fields_spec.rb → blacklight/hash_as_hidden_fields_behavior_spec.rb} +2 -2
  286. data/spec/helpers/blacklight/icon_helper_behavior_spec.rb +10 -0
  287. data/spec/helpers/{layout_helper_spec.rb → blacklight/layout_helper_behavior_spec.rb} +5 -15
  288. data/spec/helpers/{render_constraints_helper_spec.rb → blacklight/render_constraints_helper_behavior_spec.rb} +10 -6
  289. data/spec/helpers/blacklight/render_partials_helper_behavior_spec.rb +92 -0
  290. data/spec/helpers/{search_history_constraints_helper_spec.rb → blacklight/search_history_constraints_helper_behavior_spec.rb} +29 -30
  291. data/spec/helpers/{suggest_helper_spec.rb → blacklight/suggest_helper_behavior_spec.rb} +9 -2
  292. data/spec/helpers/{url_helper_spec.rb → blacklight/url_helper_behavior_spec.rb} +56 -54
  293. data/spec/helpers/blacklight_helper_spec.rb +62 -151
  294. data/spec/helpers/catalog_helper_spec.rb +80 -96
  295. data/spec/i18n_spec.rb +18 -0
  296. data/spec/integration/generators/blacklight/{solr5_generator_spec.rb → solr_generator_spec.rb} +21 -13
  297. data/spec/lib/blacklight/configuration/facet_field_spec.rb +13 -0
  298. data/spec/lib/blacklight/configuration/field_spec.rb +15 -0
  299. data/spec/lib/blacklight/nested_open_struct_with_hash_access_spec.rb +17 -0
  300. data/spec/lib/blacklight/open_struct_with_hash_access_spec.rb +148 -0
  301. data/spec/lib/blacklight/parameters_spec.rb +4 -2
  302. data/spec/lib/blacklight/search_state_spec.rb +53 -36
  303. data/spec/lib/blacklight_spec.rb +14 -15
  304. data/spec/lib/tasks/blacklight_task_spec.rb +4 -6
  305. data/spec/models/blacklight/configurable_spec.rb +24 -27
  306. data/spec/models/blacklight/configuration/context_spec.rb +9 -10
  307. data/spec/models/blacklight/configuration_spec.rb +188 -165
  308. data/spec/models/blacklight/document/active_model_shim_spec.rb +15 -6
  309. data/spec/models/blacklight/document/cache_key_spec.rb +9 -2
  310. data/spec/models/blacklight/document/dublin_core_spec.rb +17 -20
  311. data/spec/models/blacklight/document/email_spec.rb +10 -10
  312. data/spec/models/blacklight/document/sms_spec.rb +10 -10
  313. data/spec/models/blacklight/document_spec.rb +10 -22
  314. data/spec/models/blacklight/facet_paginator_spec.rb +40 -30
  315. data/spec/models/blacklight/icon_spec.rb +44 -0
  316. data/spec/models/blacklight/search_builder_spec.rb +41 -26
  317. data/spec/models/blacklight/solr/document_spec.rb +224 -216
  318. data/spec/models/blacklight/solr/facet_paginator_spec.rb +6 -4
  319. data/spec/models/blacklight/solr/repository_spec.rb +50 -42
  320. data/spec/models/blacklight/solr/request_spec.rb +17 -18
  321. data/spec/models/blacklight/solr/response/facets_spec.rb +58 -58
  322. data/spec/models/blacklight/solr/response/group_response_spec.rb +16 -22
  323. data/spec/models/blacklight/solr/response/group_spec.rb +18 -25
  324. data/spec/models/blacklight/solr/response_spec.rb +56 -55
  325. data/spec/models/blacklight/solr/search_builder_spec.rb +150 -164
  326. data/spec/models/blacklight/suggest/response_spec.rb +1 -0
  327. data/spec/models/blacklight/suggest_search_spec.rb +4 -4
  328. data/spec/models/blacklight/user_spec.rb +9 -11
  329. data/spec/models/bookmark_spec.rb +7 -6
  330. data/spec/models/record_mailer_spec.rb +23 -21
  331. data/spec/models/search_spec.rb +19 -18
  332. data/spec/models/solr_document_spec.rb +33 -5
  333. data/spec/presenters/blacklight/document_presenter_spec.rb +86 -0
  334. data/spec/presenters/{index_presenter_spec.rb → blacklight/index_presenter_spec.rb} +25 -62
  335. data/spec/presenters/blacklight/json_presenter_spec.rb +59 -0
  336. data/spec/presenters/blacklight/link_alternate_presenter_spec.rb +3 -0
  337. data/spec/presenters/blacklight/search_bar_presenter_spec.rb +79 -0
  338. data/spec/presenters/{show_presenter_spec.rb → blacklight/show_presenter_spec.rb} +47 -62
  339. data/spec/presenters/pipeline_spec.rb +18 -11
  340. data/spec/presenters/thumbnail_presenter_spec.rb +174 -0
  341. data/spec/routing/catalog_routing_spec.rb +13 -31
  342. data/spec/services/blacklight/search_service_spec.rb +488 -0
  343. data/spec/spec_helper.rb +22 -15
  344. data/spec/support/features.rb +1 -1
  345. data/spec/support/features/session_helpers.rb +4 -4
  346. data/spec/test_app_templates/Gemfile.extra +2 -5
  347. data/spec/test_app_templates/lib/generators/test_app_generator.rb +12 -13
  348. data/spec/views/catalog/_constraints.html.erb_spec.rb +3 -6
  349. data/spec/views/catalog/_constraints_element.html.erb_spec.rb +17 -13
  350. data/spec/views/catalog/_document.html.erb_spec.rb +11 -11
  351. data/spec/views/catalog/_document_list.html.erb_spec.rb +2 -1
  352. data/spec/views/catalog/_facet_index_navigation.html.erb_spec.rb +5 -5
  353. data/spec/views/catalog/_facet_layout.html.erb_spec.rb +6 -6
  354. data/spec/views/catalog/_facets.html.erb_spec.rb +10 -12
  355. data/spec/views/catalog/{_index_default.erb_spec.rb → _index.html.erb_spec.rb} +14 -15
  356. data/spec/views/catalog/{_index_header_default.html.erb_spec.rb → _index_header.html.erb_spec.rb} +6 -9
  357. data/spec/views/catalog/_paginate_compact.html.erb_spec.rb +7 -30
  358. data/spec/views/catalog/_search_header.erb_spec.rb +1 -3
  359. data/spec/views/catalog/{_show_default.erb_spec.rb → _show.html.erb_spec.rb} +13 -14
  360. data/spec/views/catalog/_show_sidebar.erb_spec.rb +6 -9
  361. data/spec/views/catalog/_show_tools.html.erb_spec.rb +5 -5
  362. data/spec/views/catalog/_sort_and_per_page.html.erb_spec.rb +1 -2
  363. data/spec/views/catalog/_sort_widget.html.erb_spec.rb +3 -1
  364. data/spec/views/catalog/{_thumbnail_default.erb_spec.rb → _thumbnail.html.erb_spec.rb} +7 -9
  365. data/spec/views/catalog/_view_type_group.html.erb_spec.rb +12 -10
  366. data/spec/views/catalog/email_success.html.erb_spec.rb +8 -0
  367. data/spec/views/catalog/facet.html.erb_spec.rb +4 -3
  368. data/spec/views/catalog/facet.json.jbuilder_spec.rb +3 -2
  369. data/spec/views/catalog/index.atom.builder_spec.rb +11 -6
  370. data/spec/views/catalog/index.html.erb_spec.rb +6 -8
  371. data/spec/views/catalog/index.json.jbuilder_spec.rb +119 -26
  372. data/spec/views/catalog/opensearch.xml.builder_spec.rb +1 -1
  373. data/spec/views/catalog/show.html.erb_spec.rb +8 -8
  374. data/spec/views/catalog/show.json.jbuilder_spec.rb +40 -0
  375. data/spec/views/catalog/sms_success.html.erb_spec.rb +8 -0
  376. data/spec/views/{_user_util_links.html.erb_spec.rb → shared/_user_util_links.html.erb_spec.rb} +4 -7
  377. data/tasks/blacklight.rake +8 -4
  378. data/template.demo.rb +3 -11
  379. metadata +175 -195
  380. data/app/assets/javascripts/blacklight/autofocus.js +0 -16
  381. data/app/assets/javascripts/blacklight/bookmark_toggle.js +0 -23
  382. data/app/assets/javascripts/blacklight/core.js +0 -30
  383. data/app/controllers/concerns/blacklight/request_builders.rb +0 -77
  384. data/app/controllers/concerns/blacklight/saved_searches.rb +0 -70
  385. data/app/controllers/concerns/blacklight/search_helper.rb +0 -161
  386. data/app/controllers/concerns/blacklight/suggest.rb +0 -25
  387. data/app/controllers/saved_searches_controller.rb +0 -4
  388. data/app/controllers/suggest_controller.rb +0 -4
  389. data/app/helpers/blacklight/deprecated_url_helper_behavior.rb +0 -57
  390. data/app/helpers/blacklight/render_partials_helper.rb +0 -205
  391. data/app/helpers/blacklight_configuration_helper.rb +0 -4
  392. data/app/helpers/blacklight_url_helper.rb +0 -4
  393. data/app/helpers/component_helper.rb +0 -4
  394. data/app/helpers/facets_helper.rb +0 -4
  395. data/app/helpers/hash_as_hidden_fields_helper.rb +0 -4
  396. data/app/helpers/layout_helper.rb +0 -4
  397. data/app/helpers/render_constraints_helper.rb +0 -4
  398. data/app/helpers/search_history_constraints_helper.rb +0 -4
  399. data/app/helpers/suggest_helper.rb +0 -4
  400. data/app/models/concerns/blacklight/solr/document/more_like_this.rb +0 -6
  401. data/app/views/_user_util_links.html.erb +0 -26
  402. data/app/views/blacklight/nav/_saved_searches.html.erb +0 -1
  403. data/app/views/catalog/_index_default.html.erb +0 -12
  404. data/app/views/catalog/_show_default.html.erb +0 -10
  405. data/app/views/catalog/_thumbnail_default.html.erb +0 -5
  406. data/app/views/saved_searches/index.html.erb +0 -32
  407. data/app/views/shared/_ajax_modal.html.erb +0 -6
  408. data/lib/generators/blacklight/solr4_generator.rb +0 -31
  409. data/lib/generators/blacklight/templates/config/jetty.yml +0 -13
  410. data/solr/conf/schema.xml +0 -627
  411. data/solr/conf/solrconfig.xml +0 -411
  412. data/spec/controllers/blacklight/search_helper_spec.rb +0 -489
  413. data/spec/controllers/saved_searches_controller_spec.rb +0 -32
  414. data/spec/controllers/suggest_controller_spec.rb +0 -17
  415. data/spec/features/saved_searches_spec.rb +0 -47
  416. data/spec/helpers/deprecated_url_helper_behavior_spec.rb +0 -101
  417. data/spec/lib/blacklight/utils_spec.rb +0 -167
  418. data/spec/models/blacklight/solr/document/more_like_this_spec.rb +0 -18
  419. data/spec/presenters/document_presenter_spec.rb +0 -438
  420. data/spec/support/backport_test.rb +0 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 481b96adfac07b1cb0009bc9969f299a3a5bab9f519b38c5f0b0f1ccd7a45ec6
4
- data.tar.gz: 0c237ece3ec9a48dfd7ddfa45086ca64c807bef013f5f2a0357f47bebe84b0be
3
+ metadata.gz: 85a532b997b308e09d4a8a2e9d32dad2875f6a5a9b47f3b02fcdff79bd237b2e
4
+ data.tar.gz: d103e0ede5a6c2bfb658ff7ec3dfe049d63aa261d3f8ba2e6f41273702c465cf
5
5
  SHA512:
6
- metadata.gz: b94d6eb3e43c0fa7d5144370f43e3990491e5014977258782a775939bc12610b5fd7aa1c5521e3bbfb51785f652ca1fb8afdefd9f88ed078f56fdf3130152f20
7
- data.tar.gz: 7dfc79605ae0f1763eed7322273dcdb1b66c9655c94522a5795dc9d122c412fb855aac1ecc43f43bc9b0eb7a0a037c494769f4265b4bfa2418ccef6305583c2a
6
+ metadata.gz: dfe1f7f5c84c9643861c8bf0e471190a0f364439c88ed19bc94ec66b52f18bc70092415016759d0118eb8372470fd85d56c775529732c46dbfbf52f0c7d83dbb
7
+ data.tar.gz: 212410aeded08255f08403d19fea41311426441d442d18dd9f54d451641eae9c93d03f016ca2dbda56aff5a70333ff08ae162bf4b5ca6980bf068666ffc8e636
data/.gitignore CHANGED
@@ -16,3 +16,4 @@ pkg/*
16
16
  .internal_test_app
17
17
  .vagrant
18
18
  /spec/examples.txt
19
+ node_modules/*
data/.npmignore ADDED
@@ -0,0 +1,23 @@
1
+ .*
2
+ Gemfile
3
+ Rakefile
4
+ Vagrantfile
5
+ app/assets/images
6
+ app/controllers
7
+ app/helpers
8
+ app/models
9
+ app/presenters
10
+ app/services
11
+ app/views
12
+ blacklight.gemspec
13
+ config/locales
14
+ config/routes.rb
15
+ coverage
16
+ db
17
+ lib
18
+ pkg
19
+ provision.sh
20
+ solr
21
+ spec
22
+ tasks
23
+ template.demo.rb
data/.rubocop.yml CHANGED
@@ -5,36 +5,60 @@ inherit_from:
5
5
 
6
6
  AllCops:
7
7
  DisplayCopNames: true
8
+ TargetRubyVersion: 2.3
8
9
  Exclude:
9
10
  - "lib/generators/blacklight/templates/**/*"
10
- - "spec/**/*"
11
11
  - "blacklight.gemspec"
12
12
 
13
- Rails:
14
- Enabled: true
13
+ # engine_cart block includes conditional, not duplication
14
+ Bundler/DuplicatedGem:
15
+ Exclude:
16
+ - 'Gemfile'
17
+
18
+ # engine_cart block is following default Rails order
19
+ Bundler/OrderedGems:
20
+ Exclude:
21
+ - 'Gemfile'
22
+
23
+ Layout/IndentationConsistency:
24
+ EnforcedStyle: normal
25
+
26
+ Metrics/BlockLength:
27
+ Exclude:
28
+ - "app/views/catalog/index.json.jbuilder"
29
+ - "lib/railties/blacklight.rake"
30
+ - "tasks/blacklight.rake"
31
+ - "spec/**/*"
32
+
33
+ Metrics/ClassLength:
34
+ Exclude:
35
+ - "lib/blacklight/configuration.rb"
15
36
 
16
37
  Metrics/LineLength:
17
38
  Max: 200
39
+ Exclude:
40
+ - 'spec/**/*'
18
41
 
19
- Style/StringLiterals:
42
+ Naming/HeredocDelimiterNaming:
20
43
  Enabled: false
21
44
 
22
- Style/IndentationConsistency:
23
- Enabled: false
45
+ Naming/PredicateName:
46
+ NamePrefixBlacklist:
47
+ - is_
48
+
49
+ Rails:
50
+ Enabled: true
24
51
 
25
52
  Rails/OutputSafety:
26
53
  Enabled: false
27
54
 
28
- Style/MethodMissing:
29
- Exclude:
30
- - 'lib/blacklight/utils.rb'
55
+ # https://github.com/rubocop-hq/rubocop/issues/6439
56
+ Style/AccessModifierDeclarations:
57
+ Enabled: false
31
58
 
32
- # engine_cart block includes conditional, not duplication
33
- Bundler/DuplicatedGem:
59
+ Style/MissingRespondToMissing:
34
60
  Exclude:
35
- - 'Gemfile'
61
+ - 'lib/blacklight/nested_open_struct_with_hash_access.rb'
36
62
 
37
- # engine_cart block is following default Rails order
38
- Bundler/OrderedGems:
39
- Exclude:
40
- - 'Gemfile'
63
+ Style/StringLiterals:
64
+ Enabled: false
data/.rubocop_todo.yml CHANGED
@@ -1,157 +1,454 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2017-03-03 12:59:32 -0800 using RuboCop version 0.47.1.
3
+ # on 2018-10-31 21:34:01 -0500 using RuboCop version 0.60.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: 19
9
+ # Offense count: 4
10
+ Capybara/CurrentPathExpectation:
11
+ Exclude:
12
+ - 'spec/features/alternate_controller_spec.rb'
13
+
14
+ # Offense count: 2
15
+ # Cop supports --auto-correct.
16
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
17
+ # SupportedStyles: with_first_parameter, with_fixed_indentation
18
+ Layout/AlignParameters:
19
+ Exclude:
20
+ - 'app/views/catalog/_document.atom.builder'
21
+
22
+ # Offense count: 8
10
23
  # Cop supports --auto-correct.
11
- # Configuration parameters: EnforcedStyleAlignWith, SupportedStylesAlignWith, AutoCorrect.
12
- # SupportedStylesAlignWith: keyword, variable, start_of_line
13
- Lint/EndAlignment:
24
+ # Configuration parameters: EnforcedStyle, IndentOneStep, IndentationWidth.
25
+ # SupportedStyles: case, end
26
+ Layout/CaseIndentation:
14
27
  Exclude:
15
- - 'app/controllers/concerns/blacklight/token_based_user.rb'
16
28
  - 'app/helpers/blacklight/catalog_helper_behavior.rb'
17
- - 'app/helpers/blacklight/deprecated_url_helper_behavior.rb'
18
- - 'app/helpers/blacklight/facets_helper_behavior.rb'
19
- - 'app/helpers/blacklight/render_partials_helper.rb'
20
- - 'app/helpers/blacklight/url_helper_behavior.rb'
21
- - 'app/models/concerns/blacklight/configurable.rb'
22
29
  - 'app/presenters/blacklight/index_presenter.rb'
23
30
  - 'lib/blacklight/configuration/fields.rb'
24
- - 'lib/blacklight/search_builder.rb'
25
- - 'lib/blacklight/solr/response/facets.rb'
26
- - 'lib/blacklight/solr/search_builder_behavior.rb'
27
31
 
28
- # Offense count: 26
32
+ # Offense count: 2
29
33
  # Cop supports --auto-correct.
30
- # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
31
- Lint/UnusedBlockArgument:
34
+ Layout/ClosingParenthesisIndentation:
32
35
  Exclude:
33
- - 'app/controllers/concerns/blacklight/search_context.rb'
34
- - 'app/helpers/blacklight/configuration_helper_behavior.rb'
35
- - 'app/models/concerns/blacklight/document/dublin_core.rb'
36
- - 'lib/blacklight/configuration/fields.rb'
37
- - 'lib/blacklight/engine.rb'
38
- - 'lib/blacklight/parameters.rb'
39
- - 'lib/blacklight/solr/response/facets.rb'
40
- - 'lib/blacklight/solr/search_builder_behavior.rb'
41
- - 'lib/railties/blacklight.rake'
42
- - 'tasks/blacklight.rake'
36
+ - 'app/views/catalog/index.atom.builder'
43
37
 
44
- # Offense count: 19
38
+ # Offense count: 108
39
+ # Cop supports --auto-correct.
40
+ Layout/EmptyLineAfterMagicComment:
41
+ Enabled: false
42
+
43
+ # Offense count: 8
45
44
  # Cop supports --auto-correct.
46
- # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
47
- Lint/UnusedMethodArgument:
45
+ # Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
46
+ Layout/ExtraSpacing:
48
47
  Exclude:
49
- - 'app/helpers/blacklight/blacklight_helper_behavior.rb'
50
48
  - 'app/helpers/blacklight/catalog_helper_behavior.rb'
51
- - 'app/helpers/blacklight/component_helper_behavior.rb'
52
- - 'app/helpers/blacklight/configuration_helper_behavior.rb'
53
- - 'app/helpers/blacklight/deprecated_url_helper_behavior.rb'
49
+ - 'app/models/concerns/blacklight/document/dublin_core.rb'
50
+ - 'app/models/record_mailer.rb'
51
+ - 'app/views/catalog/index.atom.builder'
52
+ - 'config/routes.rb'
53
+
54
+ # Offense count: 2
55
+ # Cop supports --auto-correct.
56
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
57
+ # SupportedStyles: special_inside_parentheses, consistent, align_braces
58
+ Layout/IndentHash:
59
+ Exclude:
60
+ - 'lib/blacklight/configuration.rb'
61
+
62
+ # Offense count: 6
63
+ # Cop supports --auto-correct.
64
+ Layout/LeadingCommentSpace:
65
+ Exclude:
66
+ - 'app/models/blacklight/facet_paginator.rb'
67
+ - 'app/models/concerns/blacklight/configurable.rb'
68
+ - 'app/models/concerns/blacklight/document/export.rb'
69
+ - 'app/views/catalog/_document.atom.builder'
70
+
71
+ # Offense count: 2
72
+ # Cop supports --auto-correct.
73
+ Layout/MultilineBlockLayout:
74
+ Exclude:
75
+ - 'lib/generators/blacklight/install_generator.rb'
76
+ - 'lib/generators/blacklight/test_support_generator.rb'
77
+
78
+ # Offense count: 2
79
+ # Cop supports --auto-correct.
80
+ # Configuration parameters: EnforcedStyle.
81
+ # SupportedStyles: symmetrical, new_line, same_line
82
+ Layout/MultilineMethodCallBraceLayout:
83
+ Exclude:
84
+ - 'app/views/catalog/index.atom.builder'
85
+
86
+ # Offense count: 9
87
+ # Cop supports --auto-correct.
88
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
89
+ # SupportedStyles: aligned, indented, indented_relative_to_receiver
90
+ Layout/MultilineMethodCallIndentation:
91
+ Exclude:
92
+ - 'lib/blacklight/search_builder.rb'
93
+
94
+ # Offense count: 11
95
+ # Cop supports --auto-correct.
96
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
97
+ # SupportedStyles: aligned, indented
98
+ Layout/MultilineOperationIndentation:
99
+ Exclude:
54
100
  - 'app/helpers/blacklight/facets_helper_behavior.rb'
55
- - 'app/helpers/blacklight/render_partials_helper.rb'
56
101
  - 'app/helpers/blacklight/search_history_constraints_helper_behavior.rb'
57
- - 'app/models/concerns/blacklight/document.rb'
58
- - 'lib/blacklight/abstract_repository.rb'
59
- - 'lib/blacklight/configuration/field.rb'
60
- - 'lib/blacklight/search_builder.rb'
102
+ - 'lib/blacklight/configuration/context.rb'
61
103
  - 'lib/blacklight/search_state.rb'
104
+ - 'lib/blacklight/solr/search_builder_behavior.rb'
62
105
 
63
- # Offense count: 9
64
- Lint/UselessAssignment:
106
+ # Offense count: 2
107
+ # Cop supports --auto-correct.
108
+ Layout/SpaceAfterComma:
65
109
  Exclude:
66
- - 'app/controllers/concerns/blacklight/search_context.rb'
67
- - 'app/helpers/blacklight/deprecated_url_helper_behavior.rb'
68
- - 'app/helpers/blacklight/facets_helper_behavior.rb'
69
- - 'app/models/bookmark.rb'
70
- - 'lib/blacklight/routes/exportable.rb'
71
- - 'lib/blacklight/routes/searchable.rb'
72
- - 'lib/blacklight/solr/response/spelling.rb'
73
- - 'lib/railties/blacklight.rake'
110
+ - 'app/views/catalog/index.atom.builder'
111
+ - 'app/views/catalog/opensearch.xml.builder'
74
112
 
75
- # Offense count: 62
113
+ # Offense count: 1
114
+ # Cop supports --auto-correct.
115
+ # Configuration parameters: AllowForAlignment.
116
+ Layout/SpaceBeforeFirstArg:
117
+ Exclude:
118
+ - 'app/views/catalog/index.atom.builder'
119
+
120
+ # Offense count: 7
121
+ # Cop supports --auto-correct.
122
+ # Configuration parameters: EnforcedStyle.
123
+ # SupportedStyles: space, no_space
124
+ Layout/SpaceInsideParens:
125
+ Exclude:
126
+ - 'app/views/catalog/_document.rss.builder'
127
+ - 'app/views/catalog/index.atom.builder'
128
+
129
+ # Offense count: 27
130
+ # Cop supports --auto-correct.
131
+ # Configuration parameters: AllowInHeredoc.
132
+ Layout/TrailingWhitespace:
133
+ Exclude:
134
+ - 'app/views/catalog/_document.atom.builder'
135
+ - 'app/views/catalog/_document.rss.builder'
136
+ - 'app/views/catalog/index.atom.builder'
137
+
138
+ # Offense count: 1
139
+ Lint/AmbiguousBlockAssociation:
140
+ Exclude:
141
+ - 'lib/blacklight/solr/search_builder_behavior.rb'
142
+
143
+ # Offense count: 8
144
+ Lint/AmbiguousOperator:
145
+ Exclude:
146
+ - 'spec/helpers/blacklight/facets_helper_behavior_spec.rb'
147
+ - 'spec/helpers/blacklight/render_constraints_helper_behavior_spec.rb'
148
+ - 'spec/helpers/blacklight/url_helper_behavior_spec.rb'
149
+ - 'spec/helpers/blacklight_helper_spec.rb'
150
+ - 'spec/models/blacklight/facet_paginator_spec.rb'
151
+ - 'spec/models/blacklight/solr/search_builder_spec.rb'
152
+ - 'spec/services/blacklight/search_service_spec.rb'
153
+
154
+ # Offense count: 58
155
+ Lint/AmbiguousRegexpLiteral:
156
+ Exclude:
157
+ - 'spec/controllers/catalog_controller_spec.rb'
158
+ - 'spec/features/alternate_controller_spec.rb'
159
+ - 'spec/helpers/blacklight/url_helper_behavior_spec.rb'
160
+ - 'spec/helpers/catalog_helper_spec.rb'
161
+ - 'spec/models/record_mailer_spec.rb'
162
+ - 'spec/views/catalog/_document.html.erb_spec.rb'
163
+ - 'spec/views/catalog/_search_header.erb_spec.rb'
164
+ - 'spec/views/catalog/_sort_and_per_page.html.erb_spec.rb'
165
+ - 'spec/views/catalog/_thumbnail.html.erb_spec.rb'
166
+ - 'spec/views/catalog/index.html.erb_spec.rb'
167
+ - 'spec/views/catalog/show.html.erb_spec.rb'
168
+
169
+ # Offense count: 30
170
+ Lint/ParenthesesAsGroupedExpression:
171
+ Exclude:
172
+ - 'spec/controllers/catalog_controller_spec.rb'
173
+ - 'spec/features/did_you_mean_spec.rb'
174
+ - 'spec/features/search_filters_spec.rb'
175
+ - 'spec/features/search_pagination_spec.rb'
176
+ - 'spec/features/search_spec.rb'
177
+ - 'spec/lib/blacklight/search_state_spec.rb'
178
+ - 'spec/models/blacklight/solr/repository_spec.rb'
179
+
180
+ # Offense count: 2
181
+ Lint/ShadowingOuterLocalVariable:
182
+ Exclude:
183
+ - 'spec/models/blacklight/configuration_spec.rb'
184
+
185
+ # Offense count: 1
186
+ Lint/UselessComparison:
187
+ Exclude:
188
+ - 'spec/models/blacklight/document/active_model_shim_spec.rb'
189
+
190
+ # Offense count: 57
76
191
  Metrics/AbcSize:
77
- Max: 53
192
+ Max: 49
78
193
 
79
- # Offense count: 4
194
+ # Offense count: 2
80
195
  # Configuration parameters: CountComments, ExcludedMethods.
196
+ # ExcludedMethods: refine
81
197
  Metrics/BlockLength:
82
- Max: 94
198
+ Max: 30
83
199
 
84
200
  # Offense count: 1
85
201
  # Configuration parameters: CountBlocks.
86
202
  Metrics/BlockNesting:
87
203
  Max: 4
88
204
 
205
+ # Offense count: 2
89
206
  # Configuration parameters: CountComments.
90
207
  Metrics/ClassLength:
91
- Max: 100
92
- Exclude:
93
- - 'lib/blacklight/configuration.rb'
94
- - 'lib/blacklight/search_builder.rb'
95
- - 'lib/blacklight/search_state.rb'
208
+ Max: 169
96
209
 
97
- # Offense count: 20
210
+ # Offense count: 19
98
211
  Metrics/CyclomaticComplexity:
99
212
  Max: 12
100
213
 
101
- # Offense count: 53
102
- # Configuration parameters: CountComments.
214
+ # Offense count: 46
215
+ # Configuration parameters: CountComments, ExcludedMethods.
103
216
  Metrics/MethodLength:
104
- Max: 52
105
- Exclude:
106
- - 'lib/blacklight/configuration.rb'
217
+ Max: 35
107
218
 
108
- # Offense count: 9
219
+ # Offense count: 8
109
220
  # Configuration parameters: CountComments.
110
221
  Metrics/ModuleLength:
111
- Max: 211
112
- Exclude:
113
- - 'lib/blacklight/solr/search_builder_behavior.rb'
222
+ Max: 215
114
223
 
115
224
  # Offense count: 1
116
225
  # Configuration parameters: CountKeywordArgs.
117
226
  Metrics/ParameterLists:
118
227
  Max: 6
119
228
 
120
- # Offense count: 18
229
+ # Offense count: 16
121
230
  Metrics/PerceivedComplexity:
122
231
  Max: 14
123
232
 
124
- # Offense count: 2
125
- Rails/FilePath:
233
+ # Offense count: 4
234
+ # Configuration parameters: EnforcedStyleForLeadingUnderscores.
235
+ # SupportedStylesForLeadingUnderscores: disallowed, required, optional
236
+ Naming/MemoizedInstanceVariableName:
126
237
  Exclude:
127
- - 'app/controllers/concerns/blacklight/catalog.rb'
238
+ - 'app/helpers/blacklight/blacklight_helper_behavior.rb'
239
+ - 'app/helpers/blacklight/render_partials_helper_behavior.rb'
240
+ - 'app/models/concerns/blacklight/document/semantic_fields.rb'
241
+ - 'lib/blacklight/solr/response.rb'
242
+
243
+ # Offense count: 14
244
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
245
+ # AllowedNames: io, id, to, by, on, in, at, ip, db
246
+ Naming/UncommunicativeMethodParamName:
247
+ Exclude:
248
+ - 'app/models/blacklight/facet_paginator.rb'
249
+ - 'app/models/concerns/blacklight/document.rb'
250
+ - 'app/models/concerns/blacklight/solr/document.rb'
251
+ - 'app/presenters/blacklight/rendering/link_to_facet.rb'
252
+ - 'lib/blacklight/nested_open_struct_with_hash_access.rb'
253
+ - 'lib/blacklight/search_state.rb'
254
+ - 'lib/blacklight/solr/search_builder_behavior.rb'
255
+ - 'spec/features/search_context_spec.rb'
256
+ - 'spec/features/search_results_spec.rb'
257
+
258
+ # Offense count: 15
259
+ # Configuration parameters: EnforcedStyle.
260
+ # SupportedStyles: snake_case, normalcase, non_integer
261
+ Naming/VariableNumber:
262
+ Exclude:
263
+ - 'spec/views/catalog/_facets.html.erb_spec.rb'
264
+ - 'spec/views/catalog/_index.html.erb_spec.rb'
265
+ - 'spec/views/catalog/_show.html.erb_spec.rb'
128
266
 
129
267
  # Offense count: 1
130
- # Configuration parameters: Blacklist.
131
- # Blacklist: decrement!, decrement_counter, increment!, increment_counter, toggle!, touch, update_all, update_attribute, update_column, update_columns, update_counters
132
- Rails/SkipsModelValidations:
268
+ # Cop supports --auto-correct.
269
+ # Configuration parameters: AutoCorrect.
270
+ Performance/TimesMap:
133
271
  Exclude:
134
- - 'app/controllers/concerns/blacklight/saved_searches.rb'
272
+ - 'spec/views/catalog/index.atom.builder_spec.rb'
135
273
 
136
- # Offense count: 2
274
+ # Offense count: 3
275
+ Performance/UnfreezeString:
276
+ Exclude:
277
+ - 'lib/generators/blacklight/install_generator.rb'
278
+ - 'spec/helpers/blacklight/url_helper_behavior_spec.rb'
279
+ - 'spec/helpers/blacklight_helper_spec.rb'
280
+
281
+ # Offense count: 9
282
+ RSpec/BeforeAfterAll:
283
+ Exclude:
284
+ - 'spec/spec_helper.rb'
285
+ - 'spec/rails_helper.rb'
286
+ - 'spec/support/**/*.rb'
287
+ - 'spec/controllers/blacklight/search_fields_spec.rb'
288
+ - 'spec/controllers/search_history_controller_spec.rb'
289
+ - 'spec/helpers/blacklight/search_history_constraints_helper_behavior_spec.rb'
290
+ - 'spec/models/blacklight/configurable_spec.rb'
291
+ - 'spec/models/blacklight/document/dublin_core_spec.rb'
292
+ - 'spec/models/blacklight/document/email_spec.rb'
293
+ - 'spec/models/blacklight/document/sms_spec.rb'
294
+ - 'spec/models/blacklight/solr/document_spec.rb'
295
+
296
+ # Offense count: 70
297
+ # Configuration parameters: Prefixes.
298
+ # Prefixes: when, with, without
299
+ RSpec/ContextWording:
300
+ Enabled: false
301
+
302
+ # Offense count: 54
303
+ RSpec/DescribeClass:
304
+ Enabled: false
305
+
306
+ # Offense count: 1
307
+ # Configuration parameters: CustomIncludeMethods.
308
+ RSpec/EmptyExampleGroup:
309
+ Exclude:
310
+ - 'spec/models/blacklight/solr/search_builder_spec.rb'
311
+
312
+ # Offense count: 126
313
+ # Configuration parameters: Max.
314
+ RSpec/ExampleLength:
315
+ Enabled: false
316
+
317
+ # Offense count: 15
318
+ RSpec/ExpectInHook:
319
+ Exclude:
320
+ - 'spec/controllers/catalog_controller_spec.rb'
321
+ - 'spec/helpers/blacklight/configuration_helper_behavior_spec.rb'
322
+ - 'spec/helpers/blacklight/render_constraints_helper_behavior_spec.rb'
323
+ - 'spec/helpers/blacklight/suggest_helper_behavior_spec.rb'
324
+ - 'spec/helpers/catalog_helper_spec.rb'
325
+
326
+ # Offense count: 5
327
+ # Configuration parameters: CustomTransform, IgnoreMethods.
328
+ RSpec/FilePath:
329
+ Exclude:
330
+ - 'spec/controllers/blacklight/catalog/component_configuration_spec.rb'
331
+ - 'spec/helpers/blacklight/hash_as_hidden_fields_behavior_spec.rb'
332
+ - 'spec/models/blacklight/solr/search_builder_spec.rb'
333
+ - 'spec/presenters/pipeline_spec.rb'
334
+ - 'spec/presenters/thumbnail_presenter_spec.rb'
335
+
336
+ # Offense count: 194
337
+ # Configuration parameters: AssignmentOnly.
338
+ RSpec/InstanceVariable:
339
+ Enabled: false
340
+
341
+ # Offense count: 4
342
+ RSpec/IteratedExpectation:
343
+ Exclude:
344
+ - 'spec/models/blacklight/solr/response/group_response_spec.rb'
345
+ - 'spec/models/blacklight/solr/response/group_spec.rb'
346
+ - 'spec/models/blacklight/solr/response_spec.rb'
347
+
348
+ # Offense count: 8
349
+ RSpec/MessageChain:
350
+ Exclude:
351
+ - 'spec/controllers/bookmarks_controller_spec.rb'
352
+ - 'spec/presenters/blacklight/show_presenter_spec.rb'
353
+ - 'spec/views/shared/_user_util_links.html.erb_spec.rb'
354
+
355
+ # Offense count: 62
356
+ # Configuration parameters: .
357
+ # SupportedStyles: have_received, receive
358
+ RSpec/MessageSpies:
359
+ Enabled: false
360
+
361
+ # Offense count: 339
362
+ # Configuration parameters: AggregateFailuresByDefault.
363
+ RSpec/MultipleExpectations:
364
+ Max: 16
365
+
366
+ # Offense count: 326
367
+ RSpec/NamedSubject:
368
+ Enabled: false
369
+
370
+ # Offense count: 40
371
+ RSpec/NestedGroups:
372
+ Max: 5
373
+
374
+ # Offense count: 8
375
+ RSpec/RepeatedDescription:
376
+ Exclude:
377
+ - 'spec/features/search_results_spec.rb'
378
+ - 'spec/helpers/blacklight/facets_helper_behavior_spec.rb'
379
+ - 'spec/helpers/catalog_helper_spec.rb'
380
+ - 'spec/models/blacklight/solr/search_builder_spec.rb'
381
+
382
+ # Offense count: 4
383
+ RSpec/RepeatedExample:
384
+ Exclude:
385
+ - 'spec/features/search_filters_spec.rb'
386
+ - 'spec/models/blacklight/solr/document_spec.rb'
387
+
388
+ # Offense count: 4
389
+ RSpec/ScatteredLet:
390
+ Exclude:
391
+ - 'spec/helpers/catalog_helper_spec.rb'
392
+ - 'spec/models/blacklight/solr/search_builder_spec.rb'
393
+ - 'spec/views/catalog/index.atom.builder_spec.rb'
394
+
395
+ # Offense count: 4
396
+ RSpec/SubjectStub:
397
+ Exclude:
398
+ - 'spec/lib/blacklight/search_state_spec.rb'
399
+ - 'spec/services/blacklight/search_service_spec.rb'
400
+
401
+ # Offense count: 117
402
+ # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
403
+ RSpec/VerifiedDoubles:
404
+ Enabled: false
405
+
406
+ # Offense count: 1
407
+ RSpec/VoidExpect:
408
+ Exclude:
409
+ - 'spec/lib/blacklight/configuration/facet_field_spec.rb'
410
+
411
+ # Offense count: 1
137
412
  # Cop supports --auto-correct.
138
- Security/YAMLLoad:
413
+ # Configuration parameters: NilOrEmpty, NotPresent, UnlessPresent.
414
+ Rails/Blank:
139
415
  Exclude:
140
- - 'lib/blacklight.rb'
141
- - 'lib/railties/blacklight.rake'
416
+ - 'lib/blacklight/solr/search_builder_behavior.rb'
142
417
 
143
- # Offense count: 2
418
+ # Offense count: 4
419
+ # Configuration parameters: EnforcedStyle.
420
+ # SupportedStyles: strict, flexible
421
+ Rails/Date:
422
+ Exclude:
423
+ - 'spec/models/search_spec.rb'
424
+
425
+ # Offense count: 13
144
426
  # Cop supports --auto-correct.
145
- # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
146
- # SupportedStyles: outdent, indent
147
- Style/AccessModifierIndentation:
427
+ # Configuration parameters: NotNilAndNotEmpty, NotBlank, UnlessBlank.
428
+ Rails/Present:
148
429
  Exclude:
149
430
  - 'app/controllers/concerns/blacklight/catalog.rb'
150
- - 'app/controllers/concerns/blacklight/controller.rb'
431
+ - 'app/helpers/blacklight/component_helper_behavior.rb'
432
+ - 'app/helpers/blacklight/facets_helper_behavior.rb'
433
+ - 'app/models/concerns/blacklight/document/email.rb'
434
+ - 'app/models/concerns/blacklight/document/sms.rb'
435
+ - 'lib/blacklight/solr/search_builder_behavior.rb'
436
+
437
+ # Offense count: 1
438
+ # Configuration parameters: EnforcedStyle.
439
+ # SupportedStyles: strict, flexible
440
+ Rails/TimeZone:
441
+ Exclude:
442
+ - 'spec/models/blacklight/solr/search_builder_spec.rb'
443
+
444
+ # Offense count: 13
445
+ Security/Eval:
446
+ Exclude:
447
+ - 'spec/models/blacklight/solr/response_spec.rb'
151
448
 
152
449
  # Offense count: 9
153
450
  # Cop supports --auto-correct.
154
- # Configuration parameters: EnforcedStyle, SupportedStyles.
451
+ # Configuration parameters: EnforcedStyle.
155
452
  # SupportedStyles: prefer_alias, prefer_alias_method
156
453
  Style/Alias:
157
454
  Exclude:
@@ -162,27 +459,21 @@ Style/Alias:
162
459
  - 'lib/blacklight/solr/response.rb'
163
460
  - 'lib/blacklight/solr/response/group_response.rb'
164
461
 
165
- # Offense count: 6
462
+ # Offense count: 3
166
463
  # Cop supports --auto-correct.
167
- # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
168
- # SupportedStyles: with_first_parameter, with_fixed_indentation
169
- Style/AlignParameters:
464
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods.
465
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining
466
+ # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
467
+ # FunctionalMethods: let, let!, subject, watch
468
+ # IgnoredMethods: lambda, proc, it
469
+ Style/BlockDelimiters:
170
470
  Exclude:
171
- - 'app/helpers/blacklight/render_constraints_helper_behavior.rb'
172
- - 'app/helpers/blacklight/search_history_constraints_helper_behavior.rb'
173
- - 'lib/blacklight/configuration.rb'
174
- - 'lib/generators/blacklight/solr4_generator.rb'
175
-
176
- # Offense count: 64
177
- # Cop supports --auto-correct.
178
- # Configuration parameters: EnforcedStyle, SupportedStyles.
179
- # SupportedStyles: always, conditionals
180
- Style/AndOr:
181
- Enabled: false
471
+ - 'app/views/catalog/index.rss.builder'
472
+ - 'app/views/catalog/opensearch.xml.builder'
182
473
 
183
474
  # Offense count: 3
184
475
  # Cop supports --auto-correct.
185
- # Configuration parameters: EnforcedStyle, SupportedStyles.
476
+ # Configuration parameters: EnforcedStyle.
186
477
  # SupportedStyles: braces, no_braces, context_dependent
187
478
  Style/BracesAroundHashParameters:
188
479
  Exclude:
@@ -190,199 +481,105 @@ Style/BracesAroundHashParameters:
190
481
  - 'lib/blacklight/solr/response/facets.rb'
191
482
  - 'lib/generators/blacklight/test_support_generator.rb'
192
483
 
193
- # Offense count: 13
484
+ # Offense count: 50
194
485
  # Cop supports --auto-correct.
195
- # Configuration parameters: EnforcedStyle, SupportedStyles, IndentOneStep, IndentationWidth.
196
- # SupportedStyles: case, end
197
- Style/CaseIndentation:
198
- Exclude:
199
- - 'app/helpers/blacklight/catalog_helper_behavior.rb'
200
- - 'app/helpers/blacklight/deprecated_url_helper_behavior.rb'
201
- - 'app/presenters/blacklight/index_presenter.rb'
202
- - 'lib/blacklight/configuration/fields.rb'
203
- - 'lib/blacklight/search_builder.rb'
204
-
205
- # Offense count: 51
206
- # Configuration parameters: EnforcedStyle, SupportedStyles.
486
+ # Configuration parameters: AutoCorrect, EnforcedStyle.
207
487
  # SupportedStyles: nested, compact
208
488
  Style/ClassAndModuleChildren:
209
489
  Enabled: false
210
490
 
211
- # Offense count: 2
491
+ # Offense count: 6
492
+ Style/CommentedKeyword:
493
+ Exclude:
494
+ - 'spec/controllers/catalog_controller_spec.rb'
495
+ - 'spec/services/blacklight/search_service_spec.rb'
496
+
497
+ # Offense count: 1
212
498
  # Cop supports --auto-correct.
213
- # Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly, IncludeTernaryExpressions.
499
+ # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
214
500
  # SupportedStyles: assign_to_condition, assign_inside_condition
215
501
  Style/ConditionalAssignment:
216
502
  Exclude:
217
503
  - 'lib/blacklight/solr/response/spelling.rb'
218
504
 
219
- # Offense count: 104
505
+ # Offense count: 1
506
+ # Configuration parameters: AllowCoercion.
507
+ Style/DateTime:
508
+ Exclude:
509
+ - 'spec/models/blacklight/solr/search_builder_spec.rb'
510
+
511
+ # Offense count: 93
220
512
  Style/Documentation:
221
513
  Enabled: false
222
514
 
223
- # Offense count: 7
224
- # Cop supports --auto-correct.
225
- # Configuration parameters: EnforcedStyle, SupportedStyles.
226
- # SupportedStyles: leading, trailing
227
- Style/DotPosition:
228
- Exclude:
229
- - 'app/controllers/concerns/blacklight/search_helper.rb'
230
- - 'lib/blacklight/search_builder.rb'
231
-
232
515
  # Offense count: 1
233
516
  Style/DoubleNegation:
234
517
  Exclude:
235
518
  - 'lib/blacklight/search_builder.rb'
236
519
 
237
- # Offense count: 16
238
- # Cop supports --auto-correct.
239
- Style/ElseAlignment:
240
- Exclude:
241
- - 'app/helpers/blacklight/catalog_helper_behavior.rb'
242
- - 'app/helpers/blacklight/facets_helper_behavior.rb'
243
- - 'app/helpers/blacklight/url_helper_behavior.rb'
244
- - 'app/models/concerns/blacklight/configurable.rb'
245
- - 'lib/blacklight/search_builder.rb'
246
- - 'lib/blacklight/solr/response/facets.rb'
247
- - 'lib/blacklight/solr/search_builder_behavior.rb'
248
-
249
- # Offense count: 20
520
+ # Offense count: 9
250
521
  # Cop supports --auto-correct.
251
- # Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
252
- Style/ExtraSpacing:
522
+ Style/ExpandPathArguments:
253
523
  Exclude:
254
- - 'app/helpers/blacklight/catalog_helper_behavior.rb'
255
- - 'app/helpers/blacklight/configuration_helper_behavior.rb'
256
- - 'app/models/concerns/blacklight/document/dublin_core.rb'
257
- - 'app/models/record_mailer.rb'
258
- - 'config/routes.rb'
524
+ - 'Gemfile'
525
+ - 'lib/generators/blacklight/assets_generator.rb'
259
526
  - 'lib/generators/blacklight/controller_generator.rb'
260
527
  - 'lib/generators/blacklight/document_generator.rb'
261
528
  - 'lib/generators/blacklight/install_generator.rb'
529
+ - 'lib/generators/blacklight/models_generator.rb'
262
530
  - 'lib/generators/blacklight/search_builder_generator.rb'
263
- - 'lib/railties/blacklight.rake'
264
- - 'tasks/blacklight.rake'
531
+ - 'lib/generators/blacklight/test_support_generator.rb'
532
+ - 'lib/generators/blacklight/user_generator.rb'
265
533
 
266
- # Offense count: 2
267
- # Configuration parameters: EnforcedStyle, SupportedStyles.
268
- # SupportedStyles: format, sprintf, percent
269
- Style/FormatString:
534
+ # Offense count: 16
535
+ # Configuration parameters: EnforcedStyle.
536
+ # SupportedStyles: annotated, template, unannotated
537
+ Style/FormatStringToken:
270
538
  Exclude:
271
- - 'app/helpers/blacklight/render_partials_helper.rb'
539
+ - 'app/helpers/blacklight/render_partials_helper_behavior.rb'
272
540
 
273
- # Offense count: 10
541
+ # Offense count: 8
274
542
  # Configuration parameters: MinBodyLength.
275
543
  Style/GuardClause:
276
544
  Exclude:
277
- - 'app/controllers/concerns/blacklight/base.rb'
278
545
  - 'app/controllers/concerns/blacklight/bookmarks.rb'
279
546
  - 'app/controllers/concerns/blacklight/catalog.rb'
280
547
  - 'app/controllers/concerns/blacklight/search_context.rb'
281
548
  - 'app/helpers/blacklight/catalog_helper_behavior.rb'
282
549
  - 'lib/blacklight/solr/search_builder_behavior.rb'
283
550
 
284
- # Offense count: 111
551
+ # Offense count: 1
285
552
  # Cop supports --auto-correct.
286
- # Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
553
+ # Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
287
554
  # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
288
555
  Style/HashSyntax:
289
- Enabled: false
290
-
291
- # Offense count: 15
292
- # Cop supports --auto-correct.
293
- # Configuration parameters: MaxLineLength.
294
- Style/IfUnlessModifier:
295
556
  Exclude:
296
- - 'app/controllers/concerns/blacklight/controller.rb'
297
- - 'app/controllers/concerns/blacklight/request_builders.rb'
298
- - 'app/controllers/concerns/blacklight/token_based_user.rb'
299
- - 'app/helpers/blacklight/catalog_helper_behavior.rb'
300
557
  - 'app/helpers/blacklight/url_helper_behavior.rb'
301
- - 'app/models/blacklight/facet_paginator.rb'
302
- - 'lib/blacklight/configuration/fields.rb'
303
- - 'lib/blacklight/search_state.rb'
304
- - 'lib/generators/blacklight/install_generator.rb'
305
- - 'lib/railties/blacklight.rake'
306
558
 
307
- # Offense count: 2
559
+ # Offense count: 39
308
560
  # Cop supports --auto-correct.
309
- # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
310
- # SupportedStyles: special_inside_parentheses, consistent, align_braces
311
- Style/IndentHash:
312
- Exclude:
313
- - 'lib/blacklight/configuration.rb'
314
-
315
- # Offense count: 23
316
- # Cop supports --auto-correct.
317
- # Configuration parameters: Width.
318
- Style/IndentationWidth:
319
- Exclude:
320
- - 'app/controllers/concerns/blacklight/bookmarks.rb'
321
- - 'app/controllers/concerns/blacklight/search_fields.rb'
322
- - 'app/controllers/concerns/blacklight/token_based_user.rb'
323
- - 'app/helpers/blacklight/catalog_helper_behavior.rb'
324
- - 'app/helpers/blacklight/facets_helper_behavior.rb'
325
- - 'app/helpers/blacklight/render_constraints_helper_behavior.rb'
326
- - 'app/helpers/blacklight/render_partials_helper.rb'
327
- - 'app/helpers/blacklight/url_helper_behavior.rb'
328
- - 'app/models/concerns/blacklight/configurable.rb'
329
- - 'lib/blacklight/search_builder.rb'
330
- - 'lib/blacklight/solr/response/facets.rb'
331
- - 'lib/blacklight/solr/search_builder_behavior.rb'
332
- - 'lib/generators/blacklight/assets_generator.rb'
333
-
334
- # Offense count: 9
335
- # Cop supports --auto-correct.
336
- Style/LeadingCommentSpace:
337
- Exclude:
338
- - 'app/models/blacklight/facet_paginator.rb'
339
- - 'app/models/concerns/blacklight/configurable.rb'
340
- - 'app/models/concerns/blacklight/document/export.rb'
341
- - 'lib/blacklight/configuration.rb'
342
- - 'lib/blacklight/solr/response/spelling.rb'
561
+ Style/IfUnlessModifier:
562
+ Enabled: false
343
563
 
344
- # Offense count: 125
564
+ # Offense count: 124
345
565
  # Cop supports --auto-correct.
346
- # Configuration parameters: EnforcedStyle, SupportedStyles.
566
+ # Configuration parameters: EnforcedStyle.
347
567
  # SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline
348
568
  Style/MethodDefParentheses:
349
569
  Enabled: false
350
570
 
351
- # Offense count: 2
352
- # Cop supports --auto-correct.
353
- Style/MultilineBlockLayout:
354
- Exclude:
355
- - 'lib/generators/blacklight/install_generator.rb'
356
- - 'lib/generators/blacklight/test_support_generator.rb'
357
-
358
- # Offense count: 3
571
+ # Offense count: 5
359
572
  # Cop supports --auto-correct.
360
573
  Style/MultilineIfModifier:
361
574
  Exclude:
575
+ - 'app/views/catalog/index.atom.builder'
362
576
  - 'lib/blacklight/solr/response/facets.rb'
363
577
  - 'lib/blacklight/solr/search_builder_behavior.rb'
364
578
 
365
- # Offense count: 13
366
- # Cop supports --auto-correct.
367
- # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
368
- # SupportedStyles: aligned, indented, indented_relative_to_receiver
369
- Style/MultilineMethodCallIndentation:
370
- Exclude:
371
- - 'app/controllers/concerns/blacklight/search_helper.rb'
372
- - 'lib/blacklight/search_builder.rb'
373
-
374
- # Offense count: 12
375
- # Cop supports --auto-correct.
376
- # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
377
- # SupportedStyles: aligned, indented
378
- Style/MultilineOperationIndentation:
579
+ # Offense count: 1
580
+ Style/MultipleComparison:
379
581
  Exclude:
380
- - 'app/controllers/concerns/blacklight/default_component_configuration.rb'
381
- - 'app/helpers/blacklight/facets_helper_behavior.rb'
382
- - 'app/helpers/blacklight/search_history_constraints_helper_behavior.rb'
383
582
  - 'lib/blacklight/configuration/context.rb'
384
- - 'lib/blacklight/search_state.rb'
385
- - 'lib/blacklight/solr/search_builder_behavior.rb'
386
583
 
387
584
  # Offense count: 2
388
585
  # Cop supports --auto-correct.
@@ -390,167 +587,74 @@ Style/MutableConstant:
390
587
  Exclude:
391
588
  - 'lib/blacklight/solr/request.rb'
392
589
 
393
- # Offense count: 8
394
- # Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
395
- # NamePrefix: is_, has_, have_
396
- # NamePrefixBlacklist: is_, has_, have_
397
- # NameWhitelist: is_a?
398
- Style/PredicateName:
590
+ # Offense count: 9
591
+ # Cop supports --auto-correct.
592
+ # Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
593
+ # SupportedStyles: predicate, comparison
594
+ Style/NumericPredicate:
399
595
  Exclude:
400
596
  - 'spec/**/*'
401
- - 'app/controllers/concerns/blacklight/catalog.rb'
402
- - 'app/controllers/concerns/blacklight/controller.rb'
403
597
  - 'app/helpers/blacklight/catalog_helper_behavior.rb'
404
- - 'app/helpers/blacklight/configuration_helper_behavior.rb'
405
- - 'app/helpers/blacklight/facets_helper_behavior.rb'
406
- - 'app/models/concerns/blacklight/document.rb'
407
- - 'app/models/concerns/blacklight/solr/document.rb'
408
- - 'lib/generators/blacklight/assets_generator.rb'
409
-
410
- # Offense count: 43
411
- # Cop supports --auto-correct.
412
- Style/RedundantSelf:
413
- Enabled: false
414
-
415
- # Offense count: 17
416
- # Cop supports --auto-correct.
417
- Style/SpaceAfterComma:
418
- Exclude:
419
- - 'app/controllers/concerns/blacklight/search_context.rb'
420
- - 'app/helpers/blacklight/configuration_helper_behavior.rb'
421
- - 'app/helpers/blacklight/facets_helper_behavior.rb'
422
- - 'app/helpers/blacklight/render_constraints_helper_behavior.rb'
423
- - 'app/models/concerns/blacklight/document/dublin_core.rb'
424
- - 'lib/blacklight/configuration/fields.rb'
425
- - 'lib/blacklight/parameters.rb'
598
+ - 'app/models/blacklight/solr/facet_paginator.rb'
599
+ - 'app/services/blacklight/search_service.rb'
600
+ - 'lib/blacklight/search_builder.rb'
426
601
  - 'lib/blacklight/solr/response/facets.rb'
427
602
  - 'lib/blacklight/solr/search_builder_behavior.rb'
428
- - 'lib/blacklight/utils.rb'
429
-
430
- # Offense count: 3
431
- # Cop supports --auto-correct.
432
- # Configuration parameters: EnforcedStyleInsidePipes, SupportedStylesInsidePipes.
433
- # SupportedStylesInsidePipes: space, no_space
434
- Style/SpaceAroundBlockParameters:
435
- Exclude:
436
- - 'app/controllers/concerns/blacklight/catalog.rb'
437
- - 'app/models/concerns/blacklight/document/extensions.rb'
438
-
439
- # Offense count: 26
440
- # Cop supports --auto-correct.
441
- # Configuration parameters: EnforcedStyle, SupportedStyles.
442
- # SupportedStyles: space, no_space
443
- Style/SpaceAroundEqualsInParameterDefault:
444
- Exclude:
445
- - 'app/controllers/concerns/blacklight/search_helper.rb'
446
- - 'app/helpers/blacklight/blacklight_helper_behavior.rb'
447
- - 'app/helpers/blacklight/component_helper_behavior.rb'
448
- - 'app/helpers/blacklight/configuration_helper_behavior.rb'
449
- - 'app/helpers/blacklight/facets_helper_behavior.rb'
450
- - 'app/helpers/blacklight/url_helper_behavior.rb'
451
- - 'app/models/concerns/blacklight/document.rb'
452
- - 'app/presenters/blacklight/document_presenter.rb'
453
- - 'app/presenters/blacklight/index_presenter.rb'
454
- - 'app/presenters/blacklight/show_presenter.rb'
455
- - 'lib/blacklight/search_state.rb'
456
-
457
- # Offense count: 11
458
- # Cop supports --auto-correct.
459
- # Configuration parameters: AllowForAlignment.
460
- Style/SpaceAroundOperators:
461
- Exclude:
462
- - 'app/controllers/concerns/blacklight/request_builders.rb'
463
- - 'app/helpers/blacklight/blacklight_helper_behavior.rb'
464
- - 'app/helpers/blacklight/facets_helper_behavior.rb'
465
- - 'app/helpers/blacklight/search_history_constraints_helper_behavior.rb'
466
- - 'app/helpers/blacklight/url_helper_behavior.rb'
467
- - 'lib/blacklight/solr/repository.rb'
468
- - 'lib/blacklight/solr/response/spelling.rb'
469
- - 'tasks/blacklight.rake'
470
-
471
- # Offense count: 1
472
- # Cop supports --auto-correct.
473
- # Configuration parameters: EnforcedStyle, SupportedStyles.
474
- # SupportedStyles: space, no_space
475
- Style/SpaceBeforeBlockBraces:
476
- Exclude:
477
- - 'lib/blacklight/solr/response.rb'
478
-
479
- # Offense count: 15
480
- # Cop supports --auto-correct.
481
- Style/SpaceBeforeComma:
482
- Exclude:
483
- - 'app/helpers/blacklight/search_history_constraints_helper_behavior.rb'
484
- - 'lib/generators/blacklight/controller_generator.rb'
485
- - 'lib/generators/blacklight/document_generator.rb'
486
- - 'lib/generators/blacklight/install_generator.rb'
487
- - 'lib/generators/blacklight/search_builder_generator.rb'
488
- - 'lib/generators/blacklight/user_generator.rb'
603
+ - 'lib/railties/blacklight.rake'
489
604
 
490
605
  # Offense count: 3
491
606
  # Cop supports --auto-correct.
492
- # Configuration parameters: AllowForAlignment.
493
- Style/SpaceBeforeFirstArg:
607
+ # Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions.
608
+ Style/ParenthesesAroundCondition:
494
609
  Exclude:
495
- - 'lib/generators/blacklight/controller_generator.rb'
496
- - 'lib/generators/blacklight/document_generator.rb'
497
- - 'lib/generators/blacklight/search_builder_generator.rb'
610
+ - 'app/views/catalog/_document.atom.builder'
498
611
 
499
- # Offense count: 15
612
+ # Offense count: 5
500
613
  # Cop supports --auto-correct.
501
- # Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces, SpaceBeforeBlockParameters.
502
- # SupportedStyles: space, no_space
503
- # SupportedStylesForEmptyBraces: space, no_space
504
- Style/SpaceInsideBlockBraces:
614
+ # Configuration parameters: PreferredDelimiters.
615
+ Style/PercentLiteralDelimiters:
505
616
  Exclude:
506
- - 'app/controllers/concerns/blacklight/bookmarks.rb'
507
- - 'app/controllers/concerns/blacklight/controller.rb'
508
- - 'app/controllers/concerns/blacklight/search_helper.rb'
509
- - 'app/helpers/blacklight/catalog_helper_behavior.rb'
510
- - 'app/helpers/blacklight/facets_helper_behavior.rb'
511
- - 'lib/blacklight/search_builder.rb'
617
+ - 'lib/blacklight/configuration.rb'
618
+ - 'lib/blacklight/engine.rb'
512
619
  - 'lib/blacklight/solr/request.rb'
513
- - 'lib/blacklight/solr/response.rb'
514
- - 'lib/blacklight/solr/response/group.rb'
515
620
 
516
- # Offense count: 8
621
+ # Offense count: 7
517
622
  # Cop supports --auto-correct.
518
- Style/SpaceInsideBrackets:
623
+ # Configuration parameters: EnforcedStyle.
624
+ # SupportedStyles: implicit, explicit
625
+ Style/RescueStandardError:
519
626
  Exclude:
627
+ - 'app/models/record_mailer.rb'
628
+ - 'lib/blacklight.rb'
520
629
  - 'lib/blacklight/configuration/fields.rb'
630
+ - 'lib/railties/blacklight.rake'
521
631
 
522
- # Offense count: 18
632
+ # Offense count: 12
523
633
  # Cop supports --auto-correct.
524
- # Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces.
525
- # SupportedStyles: space, no_space, compact
526
- # SupportedStylesForEmptyBraces: space, no_space
527
- Style/SpaceInsideHashLiteralBraces:
634
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.
635
+ # Whitelist: present?, blank?, presence, try, try!
636
+ Style/SafeNavigation:
528
637
  Exclude:
529
638
  - 'app/controllers/concerns/blacklight/bookmarks.rb'
530
- - 'app/controllers/concerns/blacklight/catalog.rb'
531
- - 'app/controllers/concerns/blacklight/search_context.rb'
532
- - 'app/helpers/blacklight/render_constraints_helper_behavior.rb'
533
- - 'app/helpers/blacklight/url_helper_behavior.rb'
534
- - 'app/models/concerns/blacklight/document/extensions.rb'
535
- - 'lib/blacklight/configuration.rb'
536
- - 'lib/blacklight/solr/repository.rb'
639
+ - 'app/controllers/concerns/blacklight/controller.rb'
640
+ - 'app/services/blacklight/field_retriever.rb'
641
+ - 'lib/blacklight.rb'
642
+ - 'lib/blacklight/configuration/facet_field.rb'
643
+ - 'lib/blacklight/configuration/search_field.rb'
644
+ - 'lib/blacklight/search_state.rb'
645
+ - 'lib/blacklight/solr/search_builder_behavior.rb'
537
646
 
538
- # Offense count: 18
647
+ # Offense count: 3
539
648
  # Cop supports --auto-correct.
540
- Style/SpaceInsideParens:
649
+ # Configuration parameters: AllowAsExpressionSeparator.
650
+ Style/Semicolon:
541
651
  Exclude:
542
- - 'app/controllers/concerns/blacklight/search_context.rb'
543
- - 'app/helpers/blacklight/catalog_helper_behavior.rb'
544
- - 'app/helpers/blacklight/facets_helper_behavior.rb'
545
- - 'app/helpers/blacklight/search_history_constraints_helper_behavior.rb'
546
- - 'app/helpers/blacklight/url_helper_behavior.rb'
547
- - 'app/models/concerns/blacklight/document/dublin_core.rb'
548
- - 'app/models/concerns/blacklight/document/extensions.rb'
549
- - 'app/models/record_mailer.rb'
550
- - 'lib/blacklight/search_state.rb'
551
- - 'lib/blacklight/solr/search_builder_behavior.rb'
652
+ - 'spec/models/blacklight/solr/repository_spec.rb'
653
+ - 'spec/views/catalog/_paginate_compact.html.erb_spec.rb'
552
654
 
553
- # Offense count: 199
655
+ # Offense count: 32
554
656
  # Cop supports --auto-correct.
555
- Style/TrailingWhitespace:
556
- Enabled: false
657
+ # Configuration parameters: MinSize.
658
+ # SupportedStyles: percent, brackets
659
+ Style/SymbolArray:
660
+ EnforcedStyle: brackets