Skip to content

Commit

Permalink
Merge pull request #3673 from tulibraries/update-google-api-v4-0.38.0
Browse files Browse the repository at this point in the history
Update google api v4 0.38.0
  • Loading branch information
cdoyle-temple authored Nov 15, 2024
2 parents 45a1b2e + b06dc4e commit 8b8efb1
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 19 deletions.
18 changes: 9 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,12 @@ GEM
railties (>= 5.0.0)
faker (3.5.1)
i18n (>= 1.8.11, < 2)
faraday (2.12.0)
faraday-net_http (>= 2.0, < 3.4)
faraday (2.12.1)
faraday-net_http (>= 2.0, < 3.5)
json
logger
faraday-net_http (3.3.0)
net-http
faraday-net_http (3.4.0)
net-http (>= 0.5.0)
fast_jsonapi (1.5)
activesupport (>= 4.2)
feedjira (3.2.3)
Expand Down Expand Up @@ -244,11 +244,11 @@ GEM
mutex_m
representable (~> 3.0)
retriable (>= 2.0, < 4.a)
google-apis-sheets_v4 (0.37.0)
google-apis-sheets_v4 (0.38.0)
google-apis-core (>= 0.15.0, < 2.a)
google-cloud-env (2.2.1)
faraday (>= 1.0, < 3.a)
googleauth (1.11.1)
googleauth (1.11.2)
faraday (>= 1.0, < 3.a)
google-cloud-env (~> 2.1)
jwt (>= 1.4, < 3.0)
Expand Down Expand Up @@ -298,7 +298,7 @@ GEM
thor (>= 0.14, < 2.0)
jsbundling-rails (1.3.1)
railties (>= 6.0.0)
json (2.8.1)
json (2.8.2)
json-canonicalization (1.0.0)
json-ld (3.3.2)
htmlentities (~> 4.3)
Expand Down Expand Up @@ -372,7 +372,7 @@ GEM
rspec-core (>= 3.8.0, < 4.0.0)
mutex_m (0.2.0)
nenv (0.3.0)
net-http (0.4.1)
net-http (0.5.0)
uri
net-imap (0.4.17)
date
Expand Down Expand Up @@ -658,7 +658,7 @@ GEM
unparser (0.6.15)
diff-lcs (~> 1.3)
parser (>= 3.3.0)
uri (0.13.1)
uri (1.0.2)
useragent (0.16.10)
vcr (6.3.1)
base64
Expand Down
3 changes: 2 additions & 1 deletion app/models/external_link.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ def label
def link_cleanup!
if self.link.present?
# if it is not a full url
unless self.link =~ URI::DEFAULT_PARSER.regexp[:ABS_URI]
link_value = URI.parse(self.link)
unless link_value.kind_of? URI::HTTP
# and it doesn't already start with /
unless self.link.starts_with?("/")
# prepend /
Expand Down
3 changes: 2 additions & 1 deletion app/models/redirect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def ensure_starting_slash_in_legacy_path!
def manifold_path_cleanup!
if self.manifold_path.present?
# make sure it is not a full url
unless self.manifold_path =~ URI::DEFAULT_PARSER.regexp[:ABS_URI]
manifold_path = URI.parse(self.manifold_path)
unless manifold_path.kind_of? URI::HTTP
unless self.manifold_path.starts_with?("/")
self.manifold_path = self.manifold_path.prepend("/")
end
Expand Down
8 changes: 4 additions & 4 deletions spec/serializers/event_serializer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@

describe "image attribute" do
it "returns an valid url" do
image_url = data[:attributes][:image]
expect(image_url =~ URI::DEFAULT_PARSER.regexp[:ABS_URI]).to be_truthy
image_url = URI.parse(data[:attributes][:image])
expect(image_url.kind_of? URI::HTTP).to be_truthy
end
end

describe "thumbnail_image attribute" do
it "returns an valid url" do
image_url = data[:attributes][:thumbnail_image]
expect(image_url =~ URI::DEFAULT_PARSER.regexp[:ABS_URI]).to be_truthy
image_url = URI.parse(data[:attributes][:thumbnail_image])
expect(image_url.kind_of? URI::HTTP).to be_truthy
end
end

Expand Down
8 changes: 4 additions & 4 deletions spec/serializers/person_serializer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@

describe "image attribute" do
it "returns an valid url" do
image_url = data[:attributes][:image]
expect(image_url =~ URI::DEFAULT_PARSER.regexp[:ABS_URI]).to be_truthy
image_url = URI.parse(data[:attributes][:image])
expect(image_url.kind_of? URI::HTTP).to be_truthy
end
end

describe "thumbnail_image attribute" do
it "returns an valid url" do
image_url = data[:attributes][:thumbnail_image]
expect(image_url =~ URI::DEFAULT_PARSER.regexp[:ABS_URI]).to be_truthy
image_url = URI.parse(data[:attributes][:thumbnail_image])
expect(image_url.kind_of? URI::HTTP).to be_truthy
end
end

Expand Down

0 comments on commit 8b8efb1

Please sign in to comment.