Skip to content

Commit

Permalink
Revert "Upgrade to Ruby 3.3.0 (#142)" (#147)
Browse files Browse the repository at this point in the history
This reverts commit a6e0811.
  • Loading branch information
iHiD authored Mar 5, 2024
1 parent dae5272 commit f99ad0e
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-3.3.0
ruby-3.2.2
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.3.0-alpine3.18 AS build
FROM ruby:3.2.2-alpine3.18 AS build

RUN apk update && apk upgrade && \
apk add --no-cache git openssh build-base gcc wget git
Expand All @@ -9,7 +9,7 @@ RUN gem install bundler:2.4.18 && \
bundle config set without 'development test' && \
bundle install

FROM ruby:3.3.0-alpine3.18
FROM ruby:3.2.2-alpine3.18

RUN apk add --no-cache bash

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ git_source(:github) do |repo_name|
"https://github.com/#{repo_name}.git"
end

ruby '3.3.0'
ruby '3.2.2'

gem "mandate", "~> 1.0.0"
gem 'rake'
Expand Down
48 changes: 23 additions & 25 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,52 @@ GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
base64 (0.1.1)
coderay (1.1.3)
docile (1.4.0)
json (2.6.3)
docile (1.3.2)
json (2.6.1)
language_server-protocol (3.17.0.3)
mandate (1.0.0)
method_source (1.0.0)
minitest (5.11.3)
mocha (2.1.0)
ruby2_keywords (>= 0.0.5)
parallel (1.24.0)
parser (3.3.0.5)
mocha (1.11.2)
parallel (1.23.0)
parser (3.2.2.3)
ast (~> 2.4.1)
racc
pry (0.14.2)
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
racc (1.7.3)
racc (1.7.1)
rainbow (3.1.1)
rake (13.1.0)
regexp_parser (2.9.0)
rake (12.3.3)
regexp_parser (2.8.1)
rexml (3.2.6)
rubocop (1.61.0)
rubocop (1.56.0)
base64 (~> 0.1.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
parser (>= 3.2.2.3)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-ast (>= 1.28.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.1)
parser (>= 3.3.0.4)
rubocop-minitest (0.34.5)
rubocop (>= 1.39, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-performance (1.20.2)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
rubocop-minitest (0.10.1)
rubocop (>= 0.87)
rubocop-performance (1.8.0)
rubocop (>= 0.87.0)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
simplecov (0.17.1)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
unicode-display_width (2.5.0)
unicode-display_width (2.4.2)

PLATFORMS
ruby
Expand All @@ -69,7 +67,7 @@ DEPENDENCIES
simplecov (~> 0.17.0)

RUBY VERSION
ruby 3.3.0p0
ruby 3.2.2p53

BUNDLED WITH
2.5.3
2.4.18
4 changes: 2 additions & 2 deletions test/test_runner_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def test_fail

def test_deep_exception
message = "
NoMethodError: undefined method `non_existant_method' for nil
NoMethodError: undefined method `non_existant_method' for nil:NilClass
Traceback (most recent call first):
Line 8:in `work_out_name'
Expand Down Expand Up @@ -115,7 +115,7 @@ def test_name_error_exception
actual = JSON.parse(File.read(output_dir / "results.json"))
assert_equal "error", actual["status"]

expected = "Line 3: undefined local variable or method `raise_an_error_because_i_am_a_random_method' for main (NameError)"
expected = "Line 3: undefined local variable or method `raise_an_error_because_i_am_a_random_method' for main:Object (NameError)"
assert_equal expected, actual['message']

assert_test_run_exited_cleanly
Expand Down
2 changes: 1 addition & 1 deletion tests/deep_exception/expected_results.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":2,"status":"fail","message":null,"tests":[{"name":"No name given","test_code":"assert_equal \"One for you, one for me.\", TwoFer.two_fer","status":"error","message":"NoMethodError: undefined method `non_existant_method' for nil\n\nTraceback (most recent call first):\n Line 8:in `work_out_name'\n Line 3:in `two_fer'"}]}
{"version":2,"status":"fail","message":null,"tests":[{"name":"No name given","test_code":"assert_equal \"One for you, one for me.\", TwoFer.two_fer","status":"error","message":"NoMethodError: undefined method `non_existant_method' for nil:NilClass\n\nTraceback (most recent call first):\n Line 8:in `work_out_name'\n Line 3:in `two_fer'"}]}
2 changes: 1 addition & 1 deletion tests/exception/expected_results.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":2,"status":"error","message":"Line 3: undefined local variable or method `raise_an_error_because_i_am_a_random_method' for main (NameError)","tests":null}
{"version":2,"status":"error","message":"Line 3: undefined local variable or method `raise_an_error_because_i_am_a_random_method' for main:Object (NameError)","tests":null}
2 changes: 1 addition & 1 deletion tests/metadata/expected_results.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":2,"status":"fail","message":null,"tests":[{"name":"Assert equal works properly","test_code":"some_result = TwoFer.two_fer\nassert_equal \"One for you, one for me.\", some_result","status":"error","message":"NameError: uninitialized constant SomeTest::TwoFer\n\nTraceback (most recent call first):\n Line 3:in `test_assert_equal_works_properly'"},{"name":"Skip works properly","test_code":"something = \"Something\"\nassert something.present?","status":"error","message":"NoMethodError: undefined method `present?' for an instance of String\n\nTraceback (most recent call first):\n Line 5:in `test_skip_works_properly'"},{"name":"Zebra","test_code":"some_result = TwoFer.two_fer(\"zebra\")\nassert_equal \"One for you, one for zebra.\", some_result","status":"error","message":"NameError: uninitialized constant SomeTest::TwoFer\n\nTraceback (most recent call first):\n Line 3:in `test_zebra'"},{"name":"Anaconda","test_code":"some_result = TwoFer.two_fer(\"anaconda\")\nassert_equal \"One for you, one for anaconda.\", some_result","status":"error","message":"NameError: uninitialized constant SomeTest::TwoFer\n\nTraceback (most recent call first):\n Line 8:in `test_anaconda'"},{"name":"Gorilla","test_code":"some_result = TwoFer.two_fer(\"gorilla\")\nassert_equal \"One for you, one for gorilla.\", some_result","status":"error","message":"NameError: uninitialized constant SomeTest::TwoFer\n\nTraceback (most recent call first):\n Line 13:in `test_gorilla'"},{"name":"Boa","test_code":"some_result = TwoFer.two_fer(\"boa\")\nassert_equal \"One for you, one for boa.\", some_result","status":"error","message":"NameError: uninitialized constant SomeTest::TwoFer\n\nTraceback (most recent call first):\n Line 18:in `test_boa'"}]}
{"version":2,"status":"fail","message":null,"tests":[{"name":"Skip works properly","test_code":"something = \"Something\"\nassert something.present?","status":"error","message":"NoMethodError: undefined method `present?' for \"Something\":String\n\nTraceback (most recent call first):\n Line 5:in `test_skip_works_properly'"},{"name":"Assert equal works properly","test_code":"some_result = TwoFer.two_fer\nassert_equal \"One for you, one for me.\", some_result","status":"error","message":"NameError: uninitialized constant SomeTest::TwoFer\n\nTraceback (most recent call first):\n Line 3:in `test_assert_equal_works_properly'"},{"name":"Zebra","test_code":"some_result = TwoFer.two_fer(\"zebra\")\nassert_equal \"One for you, one for zebra.\", some_result","status":"error","message":"NameError: uninitialized constant SomeTest::TwoFer\n\nTraceback (most recent call first):\n Line 3:in `test_zebra'"},{"name":"Anaconda","test_code":"some_result = TwoFer.two_fer(\"anaconda\")\nassert_equal \"One for you, one for anaconda.\", some_result","status":"error","message":"NameError: uninitialized constant SomeTest::TwoFer\n\nTraceback (most recent call first):\n Line 8:in `test_anaconda'"},{"name":"Gorilla","test_code":"some_result = TwoFer.two_fer(\"gorilla\")\nassert_equal \"One for you, one for gorilla.\", some_result","status":"error","message":"NameError: uninitialized constant SomeTest::TwoFer\n\nTraceback (most recent call first):\n Line 13:in `test_gorilla'"},{"name":"Boa","test_code":"some_result = TwoFer.two_fer(\"boa\")\nassert_equal \"One for you, one for boa.\", some_result","status":"error","message":"NameError: uninitialized constant SomeTest::TwoFer\n\nTraceback (most recent call first):\n Line 18:in `test_boa'"}]}

0 comments on commit f99ad0e

Please sign in to comment.