Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
/test/tmp/
/test/version_tmp/
/tmp/
/vendor/

# Used by dotenv library to load environment variables.
# .env
Expand Down
81 changes: 81 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,84 @@
# 1.1.5 (2026-02-05)

* AP-536 Change some OkComputer healthchecks to HEAD requests
Alma and Wowza healthchecks now use HEAD requests, mainly because
we are only concerned with service status for these checks, and
because Alma, specifically, responds much faster for HEAD requests
than for GET requests.
* Adds the Berkeley_Library_Util gem to enable a new, extended version
of OkComputer's HTTPCheck that is called HeadCheck.
* OkComputer uses open-uri under the hood, which does not support HEAD
requests, so we used our own Requester wrapper for RestClient to
extend support.

# 1.1.4 (2026-01-15)

* ADA-669 stylesheets: Refactor header imprint styles
Before this change, the containing `a` element was using a `display`
of `contents`, which caused the elements to be inaccessible via the
keyboard. Changing the `a` to be a simple flex item caused various
other layout issues that were corrected:
* `vertical-align` was set to `middle` for both the image and text,
allowing them to look mostly the same as before.
* Added `text-align: center` to ensure the elements are centred on
mobile-sized viewports in column layout mode.
* On mobile, the image remains a `block` element so that it causes a
hard break in the flex grid (otherwise, on larger mobile/tablet
screen sizes, it is undersized and the "Audio/Video" appears next to
the logo element). On desktop, they are no longer required to be
`block` elements.
* Additionally, the fixed width size of the logo is now set as the
`max-width`, and a `width` of `100%` is used. This allows the logo
to shrink on very small viewports, such as an iPhone 11 in 2x zoom
mode. The iPhone 11 @ 2x has an effective viewport of 305px, which
is smaller than the 315px width and caused the logo to be cut off
with the current rules.
* ADA-670 Rework HTML markup for records
* Use `<ARTICLE/>` for the overall record container; each track remains
its own `<SECTION/>` which makes more semantic sense.
* Use `<ASIDE/>` instead of `<UL/>` for track information. This is the
intent for this tag (ancillary information about the section it appears
inside or next to), and fixes the accessibility issue of improperly
using a list for markup of something that is not a list.
* ADA-674 Use the `aria-pressed` attribute on fullscreen
* This adds the `aria-pressed` attribute for the fullscreen button. The
value toggles in the enterFullScreen/exitFullScreen methods.
* Notably, the value is always `false` in Safari / iOS WebKit. This is
because the WebKit's native fullscreen view disable access to the DOM
and all elements. There is no way to interact or manipulate them from
the fullscreen view. This should be fine, because that means any time
the user can interact with them, the pressed value should be false.
* ADA-667 Always set ARIA attributes on time scrubber
* This is a backport of https://github.com/mediaelement/mediaelement/pull/2986,
which is described in https://github.com/mediaelement/mediaelement/issues/2908.
* Co-authored-by: Raphael Krusenbaum <rkrusenb-git@noreply.materna.group>
* ADA-667 Add volume status element to volume slider
* This fixes https://github.com/mediaelement/mediaelement/issues/2950 and
https://github.com/mediaelement/mediaelement/issues/2976, and is a full
backport of https://github.com/mediaelement/mediaelement/pull/2988.
* Co-authored-by: Raphael Krusenbaum <rkrusenb-git@noreply.materna.group>

# 1.1.3 (2026-01-13)

* DP-2239 updating footer image to ucb svg
* Instead of changing the colour of links on hover to the highlight
colour (which results in very poor contrast), use the box shadow
effect that we already use in Framework and Lost-and-Found.
* For the login button on the header, change the cursor to a pointer
so it appears as a link, instead of leaving it as an arrow since it
actually is a button. This helps POLA / UX.

Closes: ADA-668

# 1.1.2 (2026-01-12)

* update library logo

# 1.1.1 (2025-12-17)

* fix mutiplatform builds
* ensures test artifacts are copied out

# 1.1.0 (2025-12-09)

* AP-533: pass in image build arguments (#22)
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ruby ruby_version_exact
gem 'berkeley_library-av-core', '~> 0.5.0'
gem 'berkeley_library-docker', '~> 0.2.0'
gem 'berkeley_library-logging', '~> 0.2'
gem 'berkeley_library-util', '~> 0.3'
gem 'browser', '~> 4.2'
gem 'jbuilder', '~> 2.13'
gem 'mutex_m'
Expand Down
4 changes: 3 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ GEM
marc (~> 1.0)
parslet (~> 2.0)
ruby-marc-spec (~> 0.1)
berkeley_library-util (0.2.0)
berkeley_library-util (0.3.0)
berkeley_library-logging (~> 0.3)
rest-client (~> 2.1)
typesafe_enum (~> 0.3)
Expand Down Expand Up @@ -421,13 +421,15 @@ PLATFORMS
arm64-darwin-21
arm64-darwin-22
arm64-darwin-23
arm64-darwin-25
x86_64-darwin-19
x86_64-linux

DEPENDENCIES
berkeley_library-av-core (~> 0.5.0)
berkeley_library-docker (~> 0.2.0)
berkeley_library-logging (~> 0.2)
berkeley_library-util (~> 0.3)
brakeman
browser (~> 4.2)
bundle-audit
Expand Down
6 changes: 4 additions & 2 deletions config/initializers/okcomputer.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require 'berkeley_library/util/uris/head_check'

# Health check configuration

OkComputer.logger = Rails.logger
Expand Down Expand Up @@ -27,12 +29,12 @@ def check
end

# Ensure Alma API is working.
OkComputer::Registry.register 'alma-metadata', OkComputer::HttpCheck.new(ALMA_TEST_URL)
OkComputer::Registry.register 'alma-metadata', BerkeleyLibrary::Util::HeadCheck.new(ALMA_TEST_URL)

# Ensure TIND API is working. This cannot use `OkComputer::HttpCheck`
# out of the box as we can't yet inject headers into the request without
# subclassing the whole thing.
OkComputer::Registry.register 'tind-metadata', TindCheck.new

# Ensure Wowza is working
OkComputer::Registry.register 'wowza-streaming', OkComputer::HttpCheck.new(WOWZA_TEST_URL)
OkComputer::Registry.register 'wowza-streaming', BerkeleyLibrary::Util::HeadCheck.new(WOWZA_TEST_URL)
6 changes: 3 additions & 3 deletions spec/request/okcomputer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

RSpec.describe 'OKComputer', type: :request do
before do
stub_sru_request('b23305522')
stub_sru_head_request('b23305522')

hls_manifest = File.read('spec/data/playlist.m3u8')
manifest_url = 'https://wowza.lib.berkeley.edu/Pacifica/mp3:PRA_NHPRC1_AZ1084_00_000_00.mp3/playlist.m3u8'
stub_request(:get, manifest_url).to_return(status: 200, body: hls_manifest)
stub_request(:head, manifest_url).to_return(status: 200)

record_id = '(pacradio)01469'
tind_url = BerkeleyLibrary::AV::Metadata::Source::TIND.marc_uri_for(record_id)
Expand All @@ -20,6 +19,7 @@

it 'returns all checks to /health' do
get '/health'

expect(response).to have_http_status :ok
expect(response.parsed_body.keys).to match_array %w[
alma-metadata
Expand Down
5 changes: 5 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ def stub_sru_request(record_id, body: nil)
stub_request(:get, sru_url).to_return(status: 200, body: body || File.new(alma_sru_data_path_for(record_id)))
end

def stub_sru_head_request(record_id)
sru_url = alma_sru_url_for(record_id)
stub_request(:head, sru_url).to_return(status: 200)
end

def alma_marc_record_for(record_id)
marc_xml_path = alma_sru_data_path_for(record_id)
MARC::XMLReader.new(marc_xml_path).first
Expand Down