Skip to content

Commit

Permalink
chore(ruby): upgrade to ruby 3.3
Browse files Browse the repository at this point in the history
- fix error due to tar files being frozen strings
  • Loading branch information
adi-herwana-nus committed Oct 1, 2024
1 parent 237c430 commit d1e6068
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ executors:
default: false

docker:
- image: cimg/ruby:3.1.4-browsers
- image: cimg/ruby:3.3.5-browsers
environment:
PG_HOST: localhost
PG_USER: ubuntu
Expand Down
7 changes: 6 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# frozen_string_literal: true
source 'https://rubygems.org'

ruby '3.1.4'
ruby '3.3.5'

# These gems are included in Ruby defaults for now,
# but they will have to be included separately in future versions.
gem 'ostruct'
gem 'csv'

# For Windows devs
gem 'tzinfo-data', platforms: [:mswin, :mswin64]
Expand Down
6 changes: 5 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ GEM
coursemology-polyglot (0.3.8)
activesupport (>= 4.2)
crass (1.0.6)
csv (3.2.8)
date (3.3.4)
devise (4.9.4)
bcrypt (~> 3.0)
Expand Down Expand Up @@ -372,6 +373,7 @@ GEM
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
orm_adapter (0.5.0)
ostruct (0.6.0)
parallel (1.26.3)
parallel_tests (4.7.1)
parallel
Expand Down Expand Up @@ -630,6 +632,7 @@ DEPENDENCIES
codecov
consistency_fail
coursemology-polyglot
csv
devise (= 4.9.4)
devise-multi_email
docker-api
Expand Down Expand Up @@ -660,6 +663,7 @@ DEPENDENCIES
mimemagic (= 0.4.3)
mini_magick
nokogiri (>= 1.8.1)
ostruct
parallel_tests
pg
puma
Expand Down Expand Up @@ -703,7 +707,7 @@ DEPENDENCIES
yard

RUBY VERSION
ruby 3.1.4p223
ruby 3.3.5p100

BUNDLED WITH
2.5.9
3 changes: 2 additions & 1 deletion lib/autoload/coursemology_docker_container.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ def extract_test_report(report_path)
tar_file = Gem::Package::TarReader.new(stream)
tar_file.each do |file|
test_report = file.read
return test_report.force_encoding(Encoding::UTF_8) if test_report
# this string must be mutable for force_encoding to work
return (+test_report).force_encoding(Encoding::UTF_8) if test_report
end
rescue Docker::Error::NotFoundError
nil
Expand Down

0 comments on commit d1e6068

Please sign in to comment.