blacklight-gallery 4.3.0 → 4.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +4 -4
- data/app/components/blacklight/gallery/document_component.html.erb +1 -1
- data/app/components/blacklight/gallery/document_component.rb +1 -1
- data/app/components/blacklight/gallery/slideshow_preview_component.html.erb +2 -2
- data/app/components/blacklight/gallery/slideshow_preview_component.rb +1 -2
- data/blacklight-gallery.gemspec +0 -1
- data/lib/blacklight/gallery/version.rb +1 -1
- data/spec/components/blacklight/gallery/document_component_spec.rb +3 -3
- data/spec/components/blacklight/gallery/slideshow_component_spec.rb +1 -1
- data/spec/components/blacklight/gallery/slideshow_preview_component_spec.rb +3 -3
- data/spec/spec_helper.rb +0 -4
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2a0883ccc5d8a704089cb412b638f5c23e8a4c99c17f975ed9783e5bf2e0f73
|
4
|
+
data.tar.gz: a1535e02691bfcc2c282b5e4df8eb95d87f0f1a646b8c4d8aace0e5cba231b39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e897d9dd4f500ca90f25ce99375ffd01b23627e1c1c3782c760c8d5393dd34164c3a77febf0adcab25efcee3e7d215d73fe79a0e1dd79241a593d8c0ab0ec64
|
7
|
+
data.tar.gz: 2c2d9760850e5718537c471737d74719f3555f702df073c243438d93cfc09ddf6488abb4f2bc99fe8d5ed84b83cc57e9d1c79234e1aad97caabd5b0110f96eae
|
data/.github/workflows/ruby.yml
CHANGED
@@ -24,15 +24,15 @@ jobs:
|
|
24
24
|
rails_version: '7.0.4'
|
25
25
|
blacklight_version: '~> 7.0'
|
26
26
|
experimental: false
|
27
|
-
- ruby: '3.
|
27
|
+
- ruby: '3.2'
|
28
28
|
rails_version: '7.0.4'
|
29
|
-
blacklight_version: '8.0
|
29
|
+
blacklight_version: '~> 8.0'
|
30
30
|
experimental: false
|
31
|
-
- ruby: '3.
|
31
|
+
- ruby: '3.2'
|
32
32
|
rails_version: '7.0.4'
|
33
33
|
blacklight_version: 'github'
|
34
34
|
experimental: true
|
35
|
-
- ruby: '3.
|
35
|
+
- ruby: '3.2'
|
36
36
|
rails_version: '7.0.4'
|
37
37
|
blacklight_version: 'github'
|
38
38
|
experimental: true
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Blacklight::DocumentComponent.new(classes: 'col', component: :div, document: @document, presenter: @presenter, counter: @counter)
|
4
4
|
%>
|
5
5
|
<%= render(component) do |component| %>
|
6
|
-
<% component.
|
6
|
+
<% component.with_body do %>
|
7
7
|
<div class="thumbnail-container">
|
8
8
|
<%= thumbnail %>
|
9
9
|
|
@@ -4,7 +4,7 @@ module Blacklight
|
|
4
4
|
module Gallery
|
5
5
|
class DocumentComponent < Blacklight::DocumentComponent
|
6
6
|
def before_render
|
7
|
-
|
7
|
+
with_thumbnail(image_options: { class: 'img-thumbnail' }) unless thumbnail.present?
|
8
8
|
super
|
9
9
|
end
|
10
10
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Blacklight::DocumentComponent.new(classes: 'slideshow-preview-thumbnail', component: :div, document: @document, presenter: @presenter, counter: @counter)
|
4
4
|
%>
|
5
5
|
<%= render(component) do |component| %>
|
6
|
-
<% component.
|
7
|
-
<%= @view_context.link_to_document(@document, thumbnail, class: 'thumbnail', data: { 'context-href': nil, 'slide-to': @document_counter
|
6
|
+
<% component.with_body do %>
|
7
|
+
<%= @view_context.link_to_document(@document, thumbnail, class: 'thumbnail', data: { 'context-href': nil, 'slide-to': @document_counter, toggle: "modal", target: "#slideshow-modal" }) %>
|
8
8
|
<% end %>
|
9
9
|
<% end %>
|
data/blacklight-gallery.gemspec
CHANGED
@@ -29,6 +29,5 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_development_dependency "solr_wrapper"
|
30
30
|
spec.add_development_dependency "engine_cart", "~> 2.0"
|
31
31
|
spec.add_development_dependency "capybara"
|
32
|
-
spec.add_development_dependency 'webdrivers'
|
33
32
|
spec.add_development_dependency "selenium-webdriver", '>= 3.13.1'
|
34
33
|
end
|
@@ -12,7 +12,7 @@ RSpec.describe Blacklight::Gallery::DocumentComponent, type: :component do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
let(:attr) { {} }
|
15
|
-
let(:view_context) {
|
15
|
+
let(:view_context) { vc_test_controller.view_context }
|
16
16
|
let(:render) do
|
17
17
|
component.render_in(view_context)
|
18
18
|
end
|
@@ -43,13 +43,13 @@ RSpec.describe Blacklight::Gallery::DocumentComponent, type: :component do
|
|
43
43
|
end
|
44
44
|
|
45
45
|
before do
|
46
|
-
allow(
|
46
|
+
allow(vc_test_controller).to receive(:blacklight_config).and_return(blacklight_config)
|
47
47
|
allow(view_context).to receive(:current_search_session).and_return(nil)
|
48
48
|
allow(view_context).to receive(:search_session).and_return({})
|
49
49
|
allow(view_context).to receive(:blacklight_config).and_return(blacklight_config)
|
50
50
|
|
51
51
|
# dumb hack to get our stubbing into the thumbnail component
|
52
|
-
allow(
|
52
|
+
allow(vc_test_controller).to receive(:view_context).and_return(view_context)
|
53
53
|
end
|
54
54
|
|
55
55
|
it 'has a thumbnail and caption' do
|
@@ -12,7 +12,7 @@ RSpec.describe Blacklight::Gallery::SlideshowComponent, type: :component do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
let(:attr) { {} }
|
15
|
-
let(:view_context) {
|
15
|
+
let(:view_context) { vc_test_controller.view_context }
|
16
16
|
let(:render) do
|
17
17
|
component.render_in(view_context)
|
18
18
|
end
|
@@ -12,7 +12,7 @@ RSpec.describe Blacklight::Gallery::SlideshowPreviewComponent, type: :component
|
|
12
12
|
end
|
13
13
|
|
14
14
|
let(:attr) { {} }
|
15
|
-
let(:view_context) {
|
15
|
+
let(:view_context) { vc_test_controller.view_context }
|
16
16
|
let(:render) do
|
17
17
|
component.render_in(view_context)
|
18
18
|
end
|
@@ -29,8 +29,8 @@ RSpec.describe Blacklight::Gallery::SlideshowPreviewComponent, type: :component
|
|
29
29
|
allow(view_context).to receive(:current_search_session).and_return(nil)
|
30
30
|
allow(view_context).to receive(:search_session).and_return({})
|
31
31
|
|
32
|
-
#
|
33
|
-
allow(
|
32
|
+
# Every call to view_context returns a different object. This ensures it stays stable.
|
33
|
+
allow(vc_test_controller).to receive(:view_context).and_return(view_context)
|
34
34
|
end
|
35
35
|
|
36
36
|
let(:blacklight_config) do
|
data/spec/spec_helper.rb
CHANGED
@@ -9,8 +9,6 @@ require 'rspec/rails'
|
|
9
9
|
require 'rspec/active_model/mocks'
|
10
10
|
|
11
11
|
require 'selenium-webdriver'
|
12
|
-
require 'webdrivers'
|
13
|
-
|
14
12
|
|
15
13
|
Capybara.javascript_driver = :selenium_chrome_headless
|
16
14
|
Capybara.disable_animation = true
|
@@ -20,7 +18,5 @@ require 'blacklight/gallery'
|
|
20
18
|
|
21
19
|
RSpec.configure do |c|
|
22
20
|
c.infer_spec_type_from_file_location!
|
23
|
-
c.full_backtrace = true
|
24
21
|
c.include ViewComponent::TestHelpers, type: :component
|
25
|
-
#onfig.assets.precompile += %w(spotlight/default_thumbnail.jpg spotlight/default_browse_thumbnail.jpg)
|
26
22
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight-gallery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Beer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -176,20 +176,6 @@ dependencies:
|
|
176
176
|
- - ">="
|
177
177
|
- !ruby/object:Gem::Version
|
178
178
|
version: '0'
|
179
|
-
- !ruby/object:Gem::Dependency
|
180
|
-
name: webdrivers
|
181
|
-
requirement: !ruby/object:Gem::Requirement
|
182
|
-
requirements:
|
183
|
-
- - ">="
|
184
|
-
- !ruby/object:Gem::Version
|
185
|
-
version: '0'
|
186
|
-
type: :development
|
187
|
-
prerelease: false
|
188
|
-
version_requirements: !ruby/object:Gem::Requirement
|
189
|
-
requirements:
|
190
|
-
- - ">="
|
191
|
-
- !ruby/object:Gem::Version
|
192
|
-
version: '0'
|
193
179
|
- !ruby/object:Gem::Dependency
|
194
180
|
name: selenium-webdriver
|
195
181
|
requirement: !ruby/object:Gem::Requirement
|
@@ -332,7 +318,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
332
318
|
- !ruby/object:Gem::Version
|
333
319
|
version: '0'
|
334
320
|
requirements: []
|
335
|
-
rubygems_version: 3.
|
321
|
+
rubygems_version: 3.4.20
|
336
322
|
signing_key:
|
337
323
|
specification_version: 4
|
338
324
|
summary: Gallery display for Blacklight
|