Update to Ruby 3.2.0

Required minor changes since File.exists? is now File.exist?
This commit is contained in:
Olivier Lacan 2023-02-07 12:40:42 -05:00
parent a4d63781eb
commit abf0658960
3 changed files with 4 additions and 4 deletions

View File

@ -1 +1 @@
3.1.2
3.2.0

View File

@ -197,9 +197,9 @@ helpers do
language_name = language.last[:name]
language_path = "source/#{language.first}"
if File.exists?("#{language_path}/#{$last_version}")
if File.exist?("#{language_path}/#{$last_version}")
"#{$last_version} #{language_name}"
elsif File.exists?("#{language_path}/#{$previous_version}")
elsif File.exist?("#{language_path}/#{$previous_version}")
"#{$previous_version} #{language_name}"
else
nil

View File

@ -4,7 +4,7 @@
- language_code = current_page.metadata[:page][:language]
- versions = Dir.entries("source/#{language_code}") - %w[. ..]
- current_version = current_page.metadata[:page][:version]
- newer_version_available = File.exists?("source/#{language_code}/#{$last_version}")
- newer_version_available = File.exist?("source/#{language_code}/#{$last_version}")
!!! 5
%html