blacklight-gallery 4.2.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/README.md +8 -0
- data/app/assets/config/blacklight_gallery/manifest.js +2 -0
- data/app/assets/stylesheets/blacklight_gallery/_masonry.scss +1 -1
- 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/config/importmap.rb +4 -0
- data/lib/blacklight/gallery/engine.rb +3 -0
- data/lib/blacklight/gallery/version.rb +1 -1
- data/lib/generators/blacklight_gallery/install_generator.rb +1 -0
- data/package.json +2 -2
- 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 +5 -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
|
data/README.md
CHANGED
@@ -49,3 +49,11 @@ If you would like to add or remove any particular view either add or remove the
|
|
49
49
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
50
50
|
4. Push to the branch (`git push origin my-new-feature`)
|
51
51
|
5. Create new Pull Request
|
52
|
+
|
53
|
+
## Releasing
|
54
|
+
|
55
|
+
1. Edit `lib/version.rb` and `package.json` to set the new version
|
56
|
+
1. Commit the changes e.g. `git commit -am "Bump version to X.X.X"`
|
57
|
+
1. Push release to rubygems `bundle exec rake release`
|
58
|
+
1. Push release to NPM `npm publish`
|
59
|
+
1. Create a release on github with the tag that was just created: https://github.com/projectblacklight/blacklight-gallery/releases/new
|
@@ -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
|
data/config/importmap.rb
ADDED
@@ -3,6 +3,9 @@ require 'blacklight'
|
|
3
3
|
module Blacklight
|
4
4
|
module Gallery
|
5
5
|
class Engine < Rails::Engine
|
6
|
+
initializer 'blacklight_gallery.importmap', before: 'importmap' do |app|
|
7
|
+
app.config.importmap.paths << Engine.root.join('config/importmap.rb') if app.config.respond_to?(:importmap)
|
8
|
+
end
|
6
9
|
end
|
7
10
|
end
|
8
11
|
end
|
@@ -29,6 +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
33
|
copy_file "blacklight_gallery.js", "app/assets/javascripts/blacklight_gallery.js"
|
33
34
|
|
34
35
|
insert_into_file "app/assets/javascripts/application.js", after: '//= require blacklight/blacklight' do
|
data/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "blacklight-gallery",
|
3
|
-
"version": "4.
|
3
|
+
"version": "4.3.0",
|
4
4
|
"description": "Gallery views for Blacklight search results",
|
5
5
|
"main": "app/assets/javascripts/blacklight_gallery/default.js",
|
6
6
|
"files": [
|
@@ -20,7 +20,7 @@
|
|
20
20
|
"homepage": "https://github.com/projectblacklight/blacklight-gallery#readme",
|
21
21
|
"devDependencies": { },
|
22
22
|
"dependencies": {
|
23
|
-
"blacklight-frontend": ">=7.1.0
|
23
|
+
"blacklight-frontend": ">=7.1.0 <9",
|
24
24
|
"jquery": ">=3.0"
|
25
25
|
}
|
26
26
|
}
|
@@ -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
|
@@ -218,6 +204,7 @@ files:
|
|
218
204
|
- LICENSE.txt
|
219
205
|
- README.md
|
220
206
|
- Rakefile
|
207
|
+
- app/assets/config/blacklight_gallery/manifest.js
|
221
208
|
- app/assets/images/blacklight/add_circle.svg
|
222
209
|
- app/assets/images/blacklight/chevron_left.svg
|
223
210
|
- app/assets/images/blacklight/chevron_right.svg
|
@@ -264,6 +251,7 @@ files:
|
|
264
251
|
- app/views/catalog/_openseadragon_default.html.erb
|
265
252
|
- app/views/catalog/_slideshow_modal.html.erb
|
266
253
|
- blacklight-gallery.gemspec
|
254
|
+
- config/importmap.rb
|
267
255
|
- config/locales/blacklight-gallery.ar.yml
|
268
256
|
- config/locales/blacklight-gallery.de.yml
|
269
257
|
- config/locales/blacklight-gallery.en.yml
|
@@ -330,7 +318,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
330
318
|
- !ruby/object:Gem::Version
|
331
319
|
version: '0'
|
332
320
|
requirements: []
|
333
|
-
rubygems_version: 3.
|
321
|
+
rubygems_version: 3.4.20
|
334
322
|
signing_key:
|
335
323
|
specification_version: 4
|
336
324
|
summary: Gallery display for Blacklight
|