Skip to content

Commit

Permalink
Image render failure hot fix (#278)
Browse files Browse the repository at this point in the history
* remove webdrivers gem, selenium-webdriver now handles chrome updates

* only attempting to render feature image if it exists
  • Loading branch information
JackBlackLight authored Jan 23, 2024
1 parent 2088852 commit 4e9284c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ group :development, :test do
gem 'selenium-webdriver', '~> 4.11'
gem 'simplecov', '>= 0.22.0', require: false
gem 'solr_wrapper', '~> 4.0'
gem 'webdrivers', '~> 5.3.0', require: false
gem 'webmock'
end

Expand Down
5 changes: 0 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -616,10 +616,6 @@ GEM
rack (>= 1.4, < 3.0)
warden (1.2.9)
rack (>= 2.0.9)
webdrivers (5.3.1)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (~> 4.0, < 4.11)
webmock (3.14.0)
addressable (>= 2.8.0)
crack (>= 0.3.2)
Expand Down Expand Up @@ -709,7 +705,6 @@ DEPENDENCIES
uglifier
unicode
voight_kampff
webdrivers (~> 5.3.0)
webmock
webpacker (~> 5.4.0)
whenever
Expand Down
8 changes: 6 additions & 2 deletions app/views/shared/_featured_searches.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@
<%- features.each do |feature| %>
<div class="col-md-4 featured-search">
<div class="logo">
<%= link_to feature.url, target: "_blank", rel: "noopener noreferrer" do -%>
<%= image_tag(image_url(feature.image_url), alt: "link to #{feature.label} site") %>
<% begin %>
<%= link_to feature.url, target: "_blank", rel: "noopener noreferrer" do -%>
<%= image_tag(image_url(feature.image_url), alt: "link to #{feature.label} site") %>
<% rescue => e%>
<%# temporary suppression of failing featured search category images - ACHYDRA-936 %>
<% end %>
<%- end %>
</div>
<div class="title"><%= feature.label %></div>
Expand Down

0 comments on commit 4e9284c

Please sign in to comment.