blacklight-gallery 4.3.0 → 4.4.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: 4aa064cc9d3955af52339ff6ffcaeb6edec7fb71dfe8b5b8b11b435f43dd10b1
4
- data.tar.gz: 3f49377d2861106d630d16c5d8aca656ce0d7d1e5fe6422befee3b342cceb388
3
+ metadata.gz: 961f640e56b764735aef81bd840df36caacfbf81c493c0b673c1a541d9aca1a8
4
+ data.tar.gz: a37481f4b036cc67a0d00d925634c61e0702f673f9fc741df8234bdbc137244a
5
5
  SHA512:
6
- metadata.gz: 0ae3864ebf3d8bf2c20c16cc5b4ebbc5a167e0182b985a071eb1e7835640357cbc56cbb62279835bcf0783c89d4192b3a2fb2d9b2500db14226910ba10a91d48
7
- data.tar.gz: ac663b760e931c884454fea3eec9e7d9b896ab08f0aa065ca2ac4fee2633005d95a149d95b1c0c21cab123b737057e1beac0b1445a3330dd2ef0cf6cf1c2f177
6
+ metadata.gz: fb24ef250ddcc2aa65ecca6dae9698bcc8f5326a01912272a3e29423c8de17c062dffe5866fd4cd0936e3c97d177974497def182c16805333c573ce57dc49e34
7
+ data.tar.gz: 9a6964b2c111118a74d02a1e31e9db4d252f8704f70a3304b2628a831fbf89cc4ffa2ba7a889a5c7ac092e4b4692b3a6571b6cb78a04afdb9091ed3f01755901
@@ -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.1'
27
+ - ruby: '3.2'
28
28
  rails_version: '7.0.4'
29
- blacklight_version: '8.0.0.beta6'
29
+ blacklight_version: '~> 8.0'
30
30
  experimental: false
31
- - ruby: '3.1'
31
+ - ruby: '3.2'
32
32
  rails_version: '7.0.4'
33
33
  blacklight_version: 'github'
34
34
  experimental: true
35
- - ruby: '3.1'
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.body do %>
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
- thumbnail(image_options: { class: 'img-thumbnail' }) unless thumbnail.present?
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.body do %>
7
- <%= @view_context.link_to_document(@document, thumbnail, class: 'thumbnail', data: { 'context-href': nil, 'slide-to': @document_counter - 1, toggle: "modal", target: "#slideshow-modal" }) %>
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 %>
@@ -25,8 +25,7 @@ module Blacklight
25
25
  class: 'thumbnail thumbnail-placeholder'
26
26
  )
27
27
  end
28
-
29
- thumbnail(thumbnail_content)
28
+ with_thumbnail(thumbnail_content)
30
29
  end
31
30
 
32
31
  def presenter
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Blacklight
2
2
  module Gallery
3
- VERSION = "4.3.0"
3
+ VERSION = "4.4.1"
4
4
  end
5
5
  end
@@ -29,7 +29,7 @@ module BlacklightGallery
29
29
 
30
30
  def assets
31
31
  copy_file "blacklight_gallery.css.scss", "app/assets/stylesheets/blacklight_gallery.css.scss"
32
- append_to_file 'app/assets/config/manifest.js', "\n//= link blacklight_gallery/manifest.js"
32
+ append_to_file 'app/assets/config/manifest.js', "\n//= link blacklight_gallery/manifest.js\n"
33
33
  copy_file "blacklight_gallery.js", "app/assets/javascripts/blacklight_gallery.js"
34
34
 
35
35
  insert_into_file "app/assets/javascripts/application.js", after: '//= require blacklight/blacklight' do
@@ -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) { controller.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(controller).to receive(:blacklight_config).and_return(blacklight_config)
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(controller).to receive(:view_context).and_return(view_context)
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) { controller.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) { controller.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
- # dumb hack to get our stubbing into the thumbnail component
33
- allow(controller).to receive(:view_context).and_return(view_context)
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.3.0
4
+ version: 4.4.1
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-03-08 00:00:00.000000000 Z
11
+ date: 2024-06-28 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.3.26
321
+ rubygems_version: 3.5.14
336
322
  signing_key:
337
323
  specification_version: 4
338
324
  summary: Gallery display for Blacklight