blacklight 7.8.0 → 7.8.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 797fccb08c32206cbf11ab04efa5b980456a8a1ff2f949940ce68b9b29843720
|
4
|
+
data.tar.gz: 26608839399a44a7f33f4313337a35c5a064578daa0819cc845a601c9d058d3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2066cfd8c17650d43b39707f8d73c39745307eff3795875833f0a1e0c794ba92a8aae1aa061db59e5a39154332e0e5addcb3a4d4463894ccc641eee57ed40b7e
|
7
|
+
data.tar.gz: 3403d40968957aadb62eba71caed870704c23bbebf93f98910bba9931ca136b80d79ba411cb1852a2a48bf227e3456fd1d91fc8ecd01b7b8aad852dbb3f4ab8e
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
7.8.
|
1
|
+
7.8.1
|
@@ -10,12 +10,14 @@
|
|
10
10
|
<% if @remove_path.present? %>
|
11
11
|
<%= link_to(@remove_path, class: 'btn btn-outline-secondary remove') do %>
|
12
12
|
<span class="remove-icon">✖</span>
|
13
|
-
|
13
|
+
<span class="sr-only">
|
14
|
+
<%= if @label.blank?
|
14
15
|
t('blacklight.search.filters.remove.value', value: @value)
|
15
16
|
else
|
16
17
|
t('blacklight.search.filters.remove.label_value', label: @label, value: @value)
|
17
18
|
end
|
18
|
-
|
19
|
+
%>
|
20
|
+
</span>
|
19
21
|
<% end %>
|
20
22
|
<% end %>
|
21
23
|
</span>
|
@@ -37,6 +37,26 @@ module Blacklight
|
|
37
37
|
end
|
38
38
|
alias to_h to_hash
|
39
39
|
|
40
|
+
def to_unsafe_h
|
41
|
+
Deprecation.warn(self, 'Use SearchState#to_h instead of SearchState#to_unsafe_h')
|
42
|
+
to_hash
|
43
|
+
end
|
44
|
+
|
45
|
+
def method_missing(method_name, *arguments, &block)
|
46
|
+
if @params.respond_to?(method_name)
|
47
|
+
Deprecation.warn(self, "Calling `#{method_name}` on Blacklight::SearchState " \
|
48
|
+
'is deprecated and will be removed in Blacklight 8. Call #to_h first if you ' \
|
49
|
+
' need to use hash methods (or, preferably, use your own SearchState implementation)')
|
50
|
+
@params.public_send(method_name, *arguments, &block)
|
51
|
+
else
|
52
|
+
super
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def respond_to_missing?(method_name, include_private = false)
|
57
|
+
@params.respond_to?(method_name, include_private) || super
|
58
|
+
end
|
59
|
+
|
40
60
|
# Tiny shim to make it easier to migrate raw params access to using this class
|
41
61
|
delegate :[], to: :params
|
42
62
|
deprecation_deprecate :[]
|
@@ -38,7 +38,7 @@ RSpec.describe Blacklight::ConstraintLayoutComponent, type: :component do
|
|
38
38
|
end
|
39
39
|
it "has an accessible remove label" do
|
40
40
|
expect(rendered).to have_selector(".remove") do |s|
|
41
|
-
expect(s).to
|
41
|
+
expect(s).to have_selector('.sr-only', text: 'Remove constraint my label: my value')
|
42
42
|
end
|
43
43
|
end
|
44
44
|
end
|
@@ -48,6 +48,18 @@ RSpec.describe Blacklight::SearchState do
|
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
|
+
describe 'interface compatibility with params' do
|
52
|
+
let(:params) { parameter_class.new f: { ff: ['xyz'] } }
|
53
|
+
|
54
|
+
it 'implements param methods' do
|
55
|
+
Deprecation.silence(described_class) do
|
56
|
+
expect(search_state.to_unsafe_h).to eq('f' => { 'ff' => ['xyz'] })
|
57
|
+
expect(search_state.fetch(:f)).to eq('ff' => ['xyz'])
|
58
|
+
expect(search_state.select { |k, _v,| k == 'f' }).to eq('f' => { 'ff' => ['xyz'] })
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
51
63
|
describe '#query_param' do
|
52
64
|
let(:params) { parameter_class.new q: 'xyz' }
|
53
65
|
|
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.8.
|
4
|
+
version: 7.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Rochkind
|
@@ -17,7 +17,7 @@ authors:
|
|
17
17
|
autorequire:
|
18
18
|
bindir: exe
|
19
19
|
cert_chain: []
|
20
|
-
date: 2020-
|
20
|
+
date: 2020-06-01 00:00:00.000000000 Z
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
name: rails
|