blacklight 7.14.0 → 7.14.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 125e5713e43315d9fdbae35677048bb1a1bb9830970f8ff43101ecaed9979385
4
- data.tar.gz: 34d83a1474edd010642bc2ddf9f72a5409dd66f80bd28f3e6576fafdaa119475
3
+ metadata.gz: f0fa09c963759adb956f189243824f10d2c16ee518849c33ed0e6343240dec93
4
+ data.tar.gz: 61d5a9c3f582555de951e49a1912ad7a4feceb16f2635f1650eafa7a2200be39
5
5
  SHA512:
6
- metadata.gz: ab411c9cd2690a01b3d61fa1c8f602b910686b920e26ac638eddfb08e4b43af86d6beca036509056f510a2d56041059dadcfa0ee92cccedcbe238bfe5d7abc4b
7
- data.tar.gz: ed2cea2667023dbe7720c4939f4dc4b3cd98d26be0e7a1bc89dba416d0b077bf3792b810fe9e479ef5890f2cad3b3003154822778722b5528051df106f570e51
6
+ metadata.gz: 9ed401d79a83ca244fd44f3d5ecc08e45a57ec69d76e84265dec12b450594e228906a3db51eb7d2c38560e5ed6a3d643c0ecf16eea9941eb0830cbc64f88294c
7
+ data.tar.gz: 90388ff2eab28a18cf4810769995b18143badd8c325b00ad075dbef243d5b3b074de5bb7442c65f6905f009485feca10452ff7b9c4d749b453e7b28da2a3a21d
data/README.md CHANGED
@@ -1,7 +1,5 @@
1
1
  # Blacklight
2
2
 
3
- [![Build Status](https://travis-ci.com/projectblacklight/blacklight.png?branch=master)](https://travis-ci.com/projectblacklight/blacklight) [![Gem Version](https://badge.fury.io/rb/blacklight.png)](http://badge.fury.io/rb/blacklight) [![Test Coverage](https://api.codeclimate.com/v1/badges/83fd270492c136594e59/test_coverage)](https://codeclimate.com/github/projectblacklight/blacklight/test_coverage)
4
-
5
3
  Blacklight is an open source Solr user interface discovery platform.
6
4
  You can use Blacklight to enable searching and browsing of your collections.
7
5
  Blacklight uses the [Apache Solr](http://lucene.apache.org/solr) search engine
data/VERSION CHANGED
@@ -1 +1 @@
1
- 7.14.0
1
+ 7.14.1
@@ -14,11 +14,6 @@
14
14
  background: transparent $logo-image no-repeat top left;
15
15
  }
16
16
 
17
- @if $logo_image {
18
- // deprecated
19
- background: transparent image_url($logo_image) no-repeat top left;
20
- }
21
-
22
17
  display: inline-block;
23
18
  flex: 0 0 150px;
24
19
  height: 50px;
@@ -1,7 +1,6 @@
1
1
  /* Warning! If you want to change these, just copy them into your own theme css. But you want to remove the !default, which only will set them if not already set. */
2
2
 
3
3
  $logo-image: image_url('blacklight/logo.png') !default;
4
- $logo_image: false !default; // deprecated
5
4
 
6
5
  /* label (field names) */
7
6
  $field_name_color: $text-muted !default;
@@ -15,7 +15,7 @@ module Blacklight
15
15
  end
16
16
 
17
17
  def field_component(field)
18
- field.try(:component) || Blacklight::MetadataFieldComponent
18
+ field&.component || Blacklight::MetadataFieldComponent
19
19
  end
20
20
  end
21
21
  end
@@ -25,7 +25,7 @@ module Blacklight::Bookmarks
25
25
  def action_documents
26
26
  bookmarks = token_or_current_or_guest_user.bookmarks
27
27
  bookmark_ids = bookmarks.collect { |b| b.document_id.to_s }
28
- search_service.fetch(bookmark_ids)
28
+ search_service.fetch(bookmark_ids, rows: bookmark_ids.count)
29
29
  end
30
30
 
31
31
  def action_success_redirect_path
@@ -189,7 +189,7 @@ module Blacklight::ConfigurationHelperBehavior
189
189
 
190
190
  field = fields.first if document.nil?
191
191
  field ||= fields.find { |f| document.has? f }
192
- field &&= field.try(:to_sym)
192
+ field &&= field&.to_sym
193
193
 
194
194
  field
195
195
  end
@@ -198,7 +198,7 @@ module Blacklight::ConfigurationHelperBehavior
198
198
  ##
199
199
  # Default sort field
200
200
  def default_sort_field
201
- (active_sort_fields.find { |_k, config| config.respond_to?(:default) && config.default } || active_sort_fields.first).try(:last)
201
+ (active_sort_fields.find { |_k, config| config.respond_to?(:default) && config.default } || active_sort_fields.first)&.last
202
202
  end
203
203
 
204
204
  ##
@@ -180,7 +180,7 @@ module Blacklight::FacetsHelperBehavior
180
180
  # @return [String]
181
181
  def facet_partial_name(display_facet = nil)
182
182
  config = facet_configuration_for_field(display_facet.name)
183
- name = config.try(:partial)
183
+ name = config.partial
184
184
  name ||= "facet_pivot" if config.pivot
185
185
  name || "facet_limit"
186
186
  end
@@ -22,7 +22,7 @@ module Blacklight
22
22
  # present
23
23
  # @return [Array]
24
24
  def suggestions
25
- (response.try(:[], suggest_path).try(:[], suggester_name).try(:[], request_params[:q]).try(:[], 'suggestions') || []).uniq
25
+ (response.dig(suggest_path, suggester_name, request_params[:q], 'suggestions') || []).uniq
26
26
  end
27
27
  end
28
28
  end
@@ -30,7 +30,7 @@ module Blacklight
30
30
  end
31
31
 
32
32
  attr_reader :view_context, :document, :field_config, :except_operations, :options
33
- delegate :key, to: :field_config
33
+ delegate :key, :component, to: :field_config
34
34
 
35
35
  # @return [String]
36
36
  def render
@@ -4,7 +4,7 @@
4
4
  <ul>
5
5
  <li><%= t 'blacklight.search.zero_results.use_fewer_keywords' %></li>
6
6
 
7
- <%- if params[:q] and params[:search_field] and params[:search_field] != blacklight_config.default_search_field.try(:key) -%>
7
+ <%- if params[:q] and params[:search_field] and params[:search_field] != blacklight_config.default_search_field&.key -%>
8
8
  <li><%= t 'blacklight.search.zero_results.search_fields', :search_fields => search_field_label(params) %> -
9
9
  <%= link_to t('blacklight.search.zero_results.search_everything', field: blacklight_config.default_search_field.label), url_for(search_state.params_for_search(search_field: blacklight_config.default_search_field.key)) %>
10
10
  </li>
@@ -44,7 +44,7 @@ module Blacklight
44
44
 
45
45
  def default_label
46
46
  if self.key.respond_to?(:titleize)
47
- self.key.try(:titleize)
47
+ self.key.titleize
48
48
  else
49
49
  self.key.to_s.titleize
50
50
  end
@@ -6,7 +6,7 @@ module Blacklight
6
6
 
7
7
  def normalize! blacklight_config = nil
8
8
  super
9
- self.field ||= label.try(:parameterize)
9
+ self.field ||= label&.parameterize
10
10
  self.field ||= sort
11
11
 
12
12
  self.sort ||= self.field
@@ -57,7 +57,7 @@ RSpec.describe "Bookmarks" do
57
57
  expect(page).to have_content 'Strong Medicine speaks'
58
58
  end
59
59
 
60
- it "cites items in current bookmarks page" do
60
+ it "cites all items in current bookmarks" do
61
61
  visit solr_document_path('2009373513') # Ci an zhou bian
62
62
  click_button 'Bookmark'
63
63
 
@@ -70,14 +70,6 @@ RSpec.describe "Bookmarks" do
70
70
 
71
71
  click_link 'Cite'
72
72
  expect(page).to have_content 'Strong Medicine speaks'
73
- expect(page).not_to have_content 'Ci an zhou bian'
74
-
75
- visit "/bookmarks?per_page=1"
76
- click_link "2"
77
- expect(page).to have_content 'Ci an zhou bian'
78
-
79
- click_link 'Cite'
80
- expect(page).not_to have_content 'Strong Medicine speaks'
81
73
  expect(page).to have_content 'Ci an zhou bian'
82
74
  end
83
75
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.14.0
4
+ version: 7.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Rochkind
@@ -14,10 +14,10 @@ authors:
14
14
  - Dan Funk
15
15
  - Naomi Dushay
16
16
  - Justin Coyne
17
- autorequire:
17
+ autorequire:
18
18
  bindir: exe
19
19
  cert_chain: []
20
- date: 2021-01-10 00:00:00.000000000 Z
20
+ date: 2021-01-14 00:00:00.000000000 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: rails
@@ -864,7 +864,7 @@ homepage: http://projectblacklight.org/
864
864
  licenses:
865
865
  - Apache 2.0
866
866
  metadata: {}
867
- post_install_message:
867
+ post_install_message:
868
868
  rdoc_options: []
869
869
  require_paths:
870
870
  - lib
@@ -879,8 +879,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
879
879
  - !ruby/object:Gem::Version
880
880
  version: '0'
881
881
  requirements: []
882
- rubygems_version: 3.2.3
883
- signing_key:
882
+ rubygems_version: 3.1.2
883
+ signing_key:
884
884
  specification_version: 4
885
885
  summary: Blacklight provides a discovery interface for any Solr (http://lucene.apache.org/solr)
886
886
  index.