From 3fbf8807826729d8d6b28352bb45ca5f1cce8a0f Mon Sep 17 00:00:00 2001 From: Nicholas La Roux Date: Sun, 8 Jun 2025 16:02:47 +0900 Subject: [PATCH 1/3] Bump minitest (5.17.0 to 5.27.0) and mocha (2.0.2 to 3.0.2) --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0dfd3b1a..d0304b09 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -47,7 +47,7 @@ GEM json (2.7.1) language_server-protocol (3.17.0.3) method_source (1.1.0) - minitest (5.17.0) + minitest (5.27.0) minitest-focus (1.3.1) minitest (>= 4, < 6) minitest-reporters (1.5.0) @@ -55,7 +55,7 @@ GEM builder minitest (>= 5.0) ruby-progressbar - mocha (2.0.2) + mocha (3.0.2) ruby2_keywords (>= 0.0.5) mutex_m (0.1.2) nokogiri (1.18.9-arm64-darwin) From fc0cda8dfc30894f906b76902e6f4bdcba74e027 Mon Sep 17 00:00:00 2001 From: Nicholas La Roux Date: Sun, 8 Jun 2025 16:22:35 +0900 Subject: [PATCH 2/3] Add support for and start testing against Ruby 4 - Add no-longer-stanadard-library gems to Gemfile and Gemspec - Upgrade gems to versions that support Ruby 4 - Add Ruby 4 to CI matrix - Bump dev Ruby from 3.4.8 to 4.0.1 --- .github/workflows/ci.yml | 2 +- .ruby-version | 2 +- CHANGELOG.md | 2 ++ Gemfile | 2 ++ Gemfile.lock | 41 ++++++++++++++++++++++++++++++---------- worldwide.gemspec | 2 ++ 6 files changed, 39 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f74fb47..860f7da4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: matrix: gemfile: - Gemfile - ruby: ["3.2", "3.3", "3.4"] + ruby: ["3.2", "3.3", "3.4", "4.0"] env: BUNDLE_GEMFILE: ${{ matrix.gemfile }} steps: diff --git a/.ruby-version b/.ruby-version index 7921bd0c..1454f6ed 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.4.8 +4.0.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cdb4ae2..b347a11b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +- Add support for Ruby 4.0 [#434](https://github.com/Shopify/worldwide/pull/434) + --- ## [1.22.0] - 2026-03-09 - Add CLDR unit formatting support for 12 new measurement categories: area, duration, electric, energy, frequency, light, power, pressure, speed, temperature, digital, and graphics (~50 new unit keys with locale-aware formatting) [#436](https://github.com/Shopify/worldwide/pull/436) diff --git a/Gemfile b/Gemfile index 4d9556db..f4ccdd43 100644 --- a/Gemfile +++ b/Gemfile @@ -21,6 +21,8 @@ group :development do gem "rubocop", require: false gem "ruby-lsp", require: false gem "pry-byebug", require: false + gem "irb", require: false + gem "benchmark", require: false end group :test do diff --git a/Gemfile.lock b/Gemfile.lock index d0304b09..da07536b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -16,6 +16,8 @@ PATH worldwide (1.22.0) activesupport (>= 7.0) i18n + logger + ostruct phonelib (~> 0.8) GEM @@ -34,18 +36,26 @@ GEM ansi (1.5.0) ast (2.4.2) base64 (0.1.1) + benchmark (0.5.0) bigdecimal (3.1.4) builder (3.2.4) - byebug (11.1.3) + byebug (13.0.0) + reline (>= 0.6.0) coderay (1.1.3) - concurrent-ruby (1.2.2) + concurrent-ruby (1.3.6) connection_pool (2.4.1) drb (2.1.1) ruby2_keywords - i18n (1.14.1) + i18n (1.14.8) concurrent-ruby (~> 1.0) + io-console (0.8.0) + irb (1.15.2) + pp (>= 0.6.0) + rdoc (>= 4.0.0) + reline (>= 0.4.2) json (2.7.1) language_server-protocol (3.17.0.3) + logger (1.7.0) method_source (1.1.0) minitest (5.27.0) minitest-focus (1.3.1) @@ -58,22 +68,27 @@ GEM mocha (3.0.2) ruby2_keywords (>= 0.0.5) mutex_m (0.1.2) - nokogiri (1.18.9-arm64-darwin) + nokogiri (1.19.1-arm64-darwin) racc (~> 1.4) - nokogiri (1.18.9-x86_64-linux-gnu) + nokogiri (1.19.1-x86_64-linux-gnu) racc (~> 1.4) + ostruct (0.6.3) parallel (1.24.0) parser (3.3.0.5) ast (~> 2.4.1) racc phonelib (0.8.7) + pp (0.6.2) + prettyprint prettier_print (1.2.0) - pry (0.14.2) + prettyprint (0.2.0) + pry (0.16.0) coderay (~> 1.1) method_source (~> 1.0) - pry-byebug (3.10.1) - byebug (~> 11.0) - pry (>= 0.13, < 0.15) + reline (>= 0.6.0) + pry-byebug (3.12.0) + byebug (~> 13.0) + pry (>= 0.13, < 0.17) psych (5.1.0) stringio racc (1.8.1) @@ -81,7 +96,11 @@ GEM rake (13.0.6) rake-compiler (1.2.1) rake + rdoc (6.13.1) + psych (>= 4.0.0) regexp_parser (2.9.0) + reline (0.6.1) + io-console (~> 0.5) rexml (3.2.8) strscan (>= 3.0.9) rubocop (1.62.1) @@ -114,7 +133,7 @@ GEM ruby2_keywords (0.0.5) rubyzip (2.3.2) sorbet-runtime (0.5.10648) - stringio (3.1.0) + stringio (3.2.0) strscan (3.1.0) syntax_tree (5.3.0) prettier_print (>= 1.2.0) @@ -130,6 +149,8 @@ PLATFORMS x86_64-linux DEPENDENCIES + benchmark + irb minitest (~> 5.0) minitest-focus minitest-reporters diff --git a/worldwide.gemspec b/worldwide.gemspec index 2e337985..fa6c9d55 100644 --- a/worldwide.gemspec +++ b/worldwide.gemspec @@ -28,5 +28,7 @@ Gem::Specification.new do |spec| spec.add_dependency("activesupport", ">= 7.0") spec.add_dependency("i18n") + spec.add_dependency("logger") + spec.add_dependency("ostruct") spec.add_dependency("phonelib", "~> 0.8") end From 61af2a3ed577518798c3e1c0c5c1873009cf670f Mon Sep 17 00:00:00 2001 From: Nicholas La Roux Date: Sun, 8 Jun 2025 16:35:29 +0900 Subject: [PATCH 3/3] Migrate from byebug to debug for debugging --- Gemfile | 3 +-- Gemfile.lock | 33 +++++++++++++++------------------ test/test_helper.rb | 2 +- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/Gemfile b/Gemfile index f4ccdd43..6ec563bf 100644 --- a/Gemfile +++ b/Gemfile @@ -20,8 +20,7 @@ group :development do gem "rubocop-shopify", require: false gem "rubocop", require: false gem "ruby-lsp", require: false - gem "pry-byebug", require: false - gem "irb", require: false + gem "debug", require: false gem "benchmark", require: false end diff --git a/Gemfile.lock b/Gemfile.lock index da07536b..257214d3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -39,24 +39,25 @@ GEM benchmark (0.5.0) bigdecimal (3.1.4) builder (3.2.4) - byebug (13.0.0) - reline (>= 0.6.0) - coderay (1.1.3) concurrent-ruby (1.3.6) connection_pool (2.4.1) + debug (1.11.1) + irb (~> 1.10) + reline (>= 0.3.8) drb (2.1.1) ruby2_keywords + erb (6.0.1) i18n (1.14.8) concurrent-ruby (~> 1.0) - io-console (0.8.0) - irb (1.15.2) + io-console (0.8.2) + irb (1.17.0) pp (>= 0.6.0) + prism (>= 1.3.0) rdoc (>= 4.0.0) reline (>= 0.4.2) json (2.7.1) language_server-protocol (3.17.0.3) logger (1.7.0) - method_source (1.1.0) minitest (5.27.0) minitest-focus (1.3.1) minitest (>= 4, < 6) @@ -78,17 +79,11 @@ GEM ast (~> 2.4.1) racc phonelib (0.8.7) - pp (0.6.2) + pp (0.6.3) prettyprint prettier_print (1.2.0) prettyprint (0.2.0) - pry (0.16.0) - coderay (~> 1.1) - method_source (~> 1.0) - reline (>= 0.6.0) - pry-byebug (3.12.0) - byebug (~> 13.0) - pry (>= 0.13, < 0.17) + prism (1.9.0) psych (5.1.0) stringio racc (1.8.1) @@ -96,10 +91,12 @@ GEM rake (13.0.6) rake-compiler (1.2.1) rake - rdoc (6.13.1) + rdoc (7.2.0) + erb psych (>= 4.0.0) + tsort regexp_parser (2.9.0) - reline (0.6.1) + reline (0.6.3) io-console (~> 0.5) rexml (3.2.8) strscan (>= 3.0.9) @@ -138,6 +135,7 @@ GEM syntax_tree (5.3.0) prettier_print (>= 1.2.0) thor (1.2.1) + tsort (0.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.5.0) @@ -150,12 +148,11 @@ PLATFORMS DEPENDENCIES benchmark - irb + debug minitest (~> 5.0) minitest-focus minitest-reporters mocha - pry-byebug rake (~> 13.0) rake-compiler rubocop diff --git a/test/test_helper.rb b/test/test_helper.rb index 0b85f23e..a5471918 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -8,7 +8,7 @@ require "minitest/reporters" require "minitest/focus" unless ENV["CI"] require "mocha/minitest" -require "pry-byebug" +require "debug" # All the locales used in the tests I18n.available_locales = Worldwide::Locales.known