blacklight-hierarchy 4.2.0 → 4.2.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: c27766d9e3478e114c0c47f20a6d9e117aabd392bdfbe95ced2a1280b80759ee
4
- data.tar.gz: 4661be605018474298c69155324327607665e0e0ddd6561ea960a40ffd91cb51
3
+ metadata.gz: 79579c36f70d48f54d5968f3123e636b59dd5bcc267603967a4c161f991d1da8
4
+ data.tar.gz: c7046b2a00788761b9901cb625f4b845db1d91877cce3c09a07a76751bb84ea3
5
5
  SHA512:
6
- metadata.gz: 4e6ff1475cfdb98679c258e5174ddea50be40324b384b8cf29c6affbc04f66ad2c2fd4ef89368c0979731e878a0af3e31fe889125b9f7786d823e3aeef9d29a6
7
- data.tar.gz: 79b0d2b32e5b861f8931d47b73dfb4bf37662954cb6274c34dbb2d9ff6086ac54c88069e5b9c3155e93da8e36572155d7f2fe53c00c7ab91bd69cec59784a702
6
+ metadata.gz: 0e26f0a52342f53fe9e06c1c253dd46a44dbc2cce4590edeafe978e410b71f0471e2ec70b65844a5cd0bf3b1e30ae8e0be25c0733be739dd6f7508f0d16afc0b
7
+ data.tar.gz: 11d377fc4e98d6a7352b4db13c85d8ac3431531604ce55ed1185b2c2c7291f7e4df771954f3e3ddbfce73ed551212843416b4c0fecdd61d289eb8455e9ad387a
@@ -122,17 +122,15 @@ module Blacklight::HierarchyHelper
122
122
  "blacklight.hierarchy.#{field_name}_toggle_aria_label",
123
123
  default: :'blacklight.hierarchy.toggle_aria_label'
124
124
  )
125
- <<-HTML
126
- <button
127
- aria-expanded="false"
128
- aria-label="#{aria_label}"
129
- aria-describedby="#{described_by}"
130
- class="toggle-handle"
131
- >
132
- <span aria-hidden="true" class="closed">#{Blacklight::Hierarchy::Engine.config.closed_icon}</span>
133
- <span aria-hidden="true" class="opened">#{Blacklight::Hierarchy::Engine.config.opened_icon}</span>
134
- </button>
135
- HTML
125
+
126
+ # For Rails 5.2 support all options must be symbols. See https://github.com/rails/rails/issues/39813
127
+ tag.button(:'aria-expanded' => 'false',
128
+ :'aria-label' => aria_label,
129
+ :'aria-describedby' => described_by,
130
+ class: 'toggle-handle') do
131
+ tag.span(Blacklight::Hierarchy::Engine.config.closed_icon, :'aria-hidden' => 'true', class: 'closed') +
132
+ tag.span(Blacklight::Hierarchy::Engine.config.opened_icon, :'aria-hidden' => 'true', class: 'opened')
133
+ end
136
134
  end
137
135
 
138
136
  # --------------------------------------------------------------------------------------------------------------------------------
@@ -1,5 +1,5 @@
1
1
  module Blacklight
2
2
  module Hierarchy
3
- VERSION = '4.2.0'.freeze
3
+ VERSION = '4.2.1'.freeze
4
4
  end
5
5
  end
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Blacklight::HierarchyHelper do
3
+ RSpec.describe Blacklight::HierarchyHelper do
4
4
  describe '#render_hierarchy' do
5
5
  it 'should remove the _suffix from the field name' do
6
6
  expect(Deprecation).to receive(:warn)
@@ -9,4 +9,12 @@ describe Blacklight::HierarchyHelper do
9
9
  helper.render_hierarchy(field)
10
10
  end
11
11
  end
12
+
13
+ describe '#facet_toggle_button' do
14
+ subject { helper.facet_toggle_button(field_name, described_by) }
15
+ let(:field_name) { 'exploded_tag_ssim' }
16
+ let(:described_by) { 'unique-string' }
17
+
18
+ it { is_expected.to be_html_safe }
19
+ end
12
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight-hierarchy
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0
4
+ version: 4.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael B. Klein
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-08 00:00:00.000000000 Z
11
+ date: 2020-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: blacklight