Skip to content

Commit

Permalink
Upgrade openseadragon-rails and blacklight-gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Jan 7, 2025
1 parent 36cf45b commit fac9000
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 27 deletions.
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,3 @@ gem 'cssbundling-rails', '~> 1.1'
gem 'stimulus-rails', '~> 1.2'

gem 'recaptcha', '~> 5.16'

gem 'openseadragon', '0.9.0' # Pin temporarily until we move off sprockets or resolve the osd gem asset issue
39 changes: 20 additions & 19 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ GEM
bcrypt_pbkdf (1.1.1-arm64-darwin)
bcrypt_pbkdf (1.1.1-x86_64-darwin)
benchmark (0.4.0)
bigdecimal (3.1.8)
bigdecimal (3.1.9)
bindex (0.8.1)
blacklight (8.7.0)
globalid
Expand All @@ -108,7 +108,7 @@ GEM
rails (>= 6.1, < 9)
view_component (>= 2.74, < 4)
zeitwerk
blacklight-gallery (4.6.3)
blacklight-gallery (4.7.0)
blacklight (>= 7.17, < 9)
rails (>= 6.1, < 9)
blacklight-hierarchy (6.4.0)
Expand Down Expand Up @@ -286,7 +286,7 @@ GEM
dry-schema (>= 1.12, < 2)
zeitwerk (~> 2.6)
ed25519 (1.3.0)
erubi (1.13.0)
erubi (1.13.1)
execjs (2.10.0)
factory_bot (6.5.0)
activesupport (>= 5.0.0)
Expand Down Expand Up @@ -417,7 +417,7 @@ GEM
activesupport (>= 6.0.0)
railties (>= 6.0.0)
io-console (0.8.0)
irb (1.14.2)
irb (1.14.3)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
jbuilder (2.13.0)
Expand Down Expand Up @@ -445,13 +445,13 @@ GEM
llhttp-ffi (0.5.0)
ffi-compiler (~> 1.0)
rake (~> 13.0)
logger (1.6.3)
logger (1.6.4)
lograge (0.14.0)
actionpack (>= 4)
activesupport (>= 4)
railties (>= 4)
request_store (~> 1.0)
loofah (2.23.1)
loofah (2.24.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
Expand All @@ -473,7 +473,7 @@ GEM
mutex_m (0.3.0)
net-http (0.6.0)
uri
net-imap (0.5.1)
net-imap (0.5.5)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -488,11 +488,11 @@ GEM
net-protocol
net-ssh (7.3.0)
nio4r (2.7.4)
nokogiri (1.17.2-arm64-darwin)
nokogiri (1.18.1-arm64-darwin)
racc (~> 1.4)
nokogiri (1.17.2-x86_64-darwin)
nokogiri (1.18.1-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.17.2-x86_64-linux)
nokogiri (1.18.1-x86_64-linux-gnu)
racc (~> 1.4)
oauth2 (2.0.9)
faraday (>= 0.17.3, < 3.0)
Expand All @@ -502,7 +502,7 @@ GEM
snaky_hash (~> 2.0)
version_gem (~> 1.1)
okcomputer (1.18.5)
openseadragon (0.9.0)
openseadragon (1.0.11)
rails (> 6.1.0)
orm_adapter (0.5.0)
os (1.1.4)
Expand All @@ -515,7 +515,7 @@ GEM
ast (~> 2.4.1)
racc
pg (1.5.9)
psych (5.2.1)
psych (5.2.2)
date
stringio
public_suffix (6.0.1)
Expand All @@ -529,9 +529,10 @@ GEM
rack (>= 1.2.0)
rack-proxy (0.7.7)
rack
rack-session (2.0.0)
rack-session (2.1.0)
base64 (>= 0.1.0)
rack (>= 3.0.0)
rack-test (2.1.0)
rack-test (2.2.0)
rack (>= 1.3)
rack-timeout (0.7.0)
rackup (2.2.1)
Expand Down Expand Up @@ -578,7 +579,7 @@ GEM
zeitwerk (~> 2.6)
rainbow (3.1.1)
rake (13.2.1)
rdoc (6.9.0)
rdoc (6.10.0)
psych (>= 4.0.0)
recaptcha (5.18.0)
redcarpet (3.6.0)
Expand All @@ -587,7 +588,7 @@ GEM
redis-client (0.23.0)
connection_pool
regexp_parser (2.9.3)
reline (0.5.12)
reline (0.6.0)
io-console (~> 0.5)
representable (3.2.0)
declarative (< 0.1.0)
Expand Down Expand Up @@ -757,7 +758,7 @@ GEM
unicode-display_width (2.6.0)
uri (1.0.2)
version_gem (1.1.4)
view_component (3.20.0)
view_component (3.21.0)
activesupport (>= 5.2.0, < 8.1)
concurrent-ruby (~> 1.0)
method_source (~> 1.0)
Expand All @@ -769,7 +770,8 @@ GEM
bindex (>= 0.4.0)
railties (>= 6.0.0)
websocket (1.2.11)
websocket-driver (0.7.6)
websocket-driver (0.7.7)
base64
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
Expand Down Expand Up @@ -816,7 +818,6 @@ DEPENDENCIES
jbuilder (~> 2.7)
lograge
okcomputer
openseadragon (= 0.9.0)
pg
puma (~> 6.0)
rack-attack
Expand Down
9 changes: 5 additions & 4 deletions app/assets/config/manifest.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
//= link_tree ../images
//= link_directory ../javascripts .js
//= link application.css
//= link openseadragon-assets
//= link openseadragon/jquery.js
//= link openseadragon/rails.js
//= link openseadragon/openseadragon.js
//= link blacklight/manifest.js
//= link spotlight/manifest.js
//= link blacklight_gallery/manifest.js
//= link openseadragon-rails/index.js
//= link openseadragon-rails/dom.js
//= link openseadragon-rails/rails.js
//= link openseadragon-rails/jquery.js
//= link_tree ../../javascript .js
//= link_tree ../../../vendor/javascript .js
//= link_tree ../builds
//= link_tree ../../../node_modules/openseadragon/build/openseadragon/images
2 changes: 0 additions & 2 deletions app/assets/javascripts/openseadragon.js

This file was deleted.

1 change: 1 addition & 0 deletions app/javascript/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ import { I18n } from 'i18n-js'
export const i18n = new I18n()

import 'transform_result'
import 'openseadragon-rails'
3 changes: 3 additions & 0 deletions config/importmap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@
pin "lodash/zipObject", to: "https://ga.jspm.io/npm:[email protected]/zipObject.js"
pin "make-plural", to: "https://ga.jspm.io/npm:[email protected]/plurals.mjs"
pin 'transform_result'
pin "openseadragon-rails" # @1.0.11
pin "openseadragon-rails/dom", to: "openseadragon-rails--dom.js" # @1.0.11
pin "openseadragon-rails/rails", to: "openseadragon-rails--rails.js" # @1.0.11
1 change: 1 addition & 0 deletions config/initializers/assets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

# Add Yarn node_modules folder to the asset load path.
Rails.application.config.assets.paths << Rails.root.join('node_modules')
Rails.application.config.assets.paths << Rails.root.join('node_modules/openseadragon/build/openseadragon/images')

# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in the app/assets
Expand Down
4 changes: 4 additions & 0 deletions vendor/javascript/openseadragon-rails--dom.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions vendor/javascript/openseadragon-rails--rails.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// openseadragon-rails/[email protected] downloaded from https://ga.jspm.io/npm:[email protected]/app/javascript/openseadragon-rails/rails.js

(function(){function initOpenSeadragon(){document.querySelectorAll("picture[data-openseadragon]:not(:has(.openseadragon-container))").openseadragon()}if(typeof Turbo!=="undefined"){addEventListener("turbo:load",(()=>initOpenSeadragon()));addEventListener("turbo:frame-load",(()=>initOpenSeadragon()))}else addEventListener("load",(()=>initOpenSeadragon()))})();var e={};export{e as default};

4 changes: 4 additions & 0 deletions vendor/javascript/openseadragon-rails.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// [email protected] downloaded from https://ga.jspm.io/npm:[email protected]/app/javascript/openseadragon-rails/index.js

import"openseadragon-rails/dom";import"openseadragon-rails/rails";

0 comments on commit fac9000

Please sign in to comment.