blacklight 6.19.1 → 7.1.0

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