From 43a622df88e49f51bf17d0d656fad9a6d6a54c2e Mon Sep 17 00:00:00 2001 From: Leszek Zalewski Date: Thu, 5 Oct 2023 12:06:13 +0200 Subject: [PATCH] Upgrade ruby to v3.2 as 2.7 is not maintained anymore. --- .github/workflows/tests.yml | 2 +- .github/workflows/tests_5.7.yml | 2 +- Gemfile | 1 + Gemfile.lock | 20 +++++++++++--------- Makefile | 2 +- dev.yml | 2 +- test/test_helper.rb | 2 +- 7 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1cd54270..6d0fdce6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -63,7 +63,7 @@ jobs: - name: Setup Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7 + ruby-version: 3.2 bundler-cache: true - name: Starting up MySQL diff --git a/.github/workflows/tests_5.7.yml b/.github/workflows/tests_5.7.yml index 62aa65b3..19eb45c6 100644 --- a/.github/workflows/tests_5.7.yml +++ b/.github/workflows/tests_5.7.yml @@ -63,7 +63,7 @@ jobs: - name: Setup Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7 + ruby-version: 3.2 bundler-cache: true - name: Starting up MySQL diff --git a/Gemfile b/Gemfile index 3ef9386a..e404666d 100644 --- a/Gemfile +++ b/Gemfile @@ -3,6 +3,7 @@ source "https://rubygems.org" group :test do gem "minitest" gem "mysql2" + gem "webrick" gem "minitest-hooks" gem "minitest-reporters", "~> 1.4" diff --git a/Gemfile.lock b/Gemfile.lock index d4898b6d..42ce55a5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,25 +6,26 @@ GEM byebug (11.1.3) coderay (1.1.3) method_source (1.0.0) - minitest (5.14.4) + minitest (5.20.0) minitest-fail-fast (0.1.0) minitest (~> 5) - minitest-hooks (1.5.0) + minitest-hooks (1.5.1) minitest (> 5.3) - minitest-reporters (1.4.3) + minitest-reporters (1.6.1) ansi builder minitest (>= 5.0) ruby-progressbar - mysql2 (0.5.3) - pry (0.13.1) + mysql2 (0.5.5) + pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - pry-byebug (3.9.0) + pry-byebug (3.10.1) byebug (~> 11.0) - pry (~> 0.13.0) - ruby-progressbar (1.11.0) - tqdm (0.3.0) + pry (>= 0.13, < 0.15) + ruby-progressbar (1.13.0) + tqdm (0.4.1) + webrick (1.8.1) PLATFORMS ruby @@ -37,6 +38,7 @@ DEPENDENCIES mysql2 pry-byebug tqdm + webrick BUNDLED WITH 2.2.22 diff --git a/Makefile b/Makefile index 4dc22e85..29416f0d 100644 --- a/Makefile +++ b/Makefile @@ -67,7 +67,7 @@ test-go: test-ruby: bundle install - ruby test/main.rb + bundle exec ruby test/main.rb test: test-go test-ruby diff --git a/dev.yml b/dev.yml index 283830b5..d533c53e 100644 --- a/dev.yml +++ b/dev.yml @@ -9,7 +9,7 @@ up: or: [mysql@5.7] conflicts: [mysql-connector-c, mysql, mysql-client] - - ruby: "2.7.3" + - ruby: "3.2.2" - bundler - go: version: "1.16" diff --git a/test/test_helper.rb b/test/test_helper.rb index 59427bb2..626bbcad 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -55,7 +55,7 @@ def new_ghostferry(filepath, config: {}) end def new_ghostferry_with_interrupt_after_row_copy(filepath, config: {}, after_batches_written: 0) - g = new_ghostferry(filepath, config) + g = new_ghostferry(filepath, config: config) batches_written = 0 g.on_status(Ghostferry::Status::AFTER_ROW_COPY) do