From ef4b0cf2cbf00fc9a948ea7151254d38729d3ffb Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Wed, 6 Mar 2024 08:52:09 +1100 Subject: [PATCH 1/6] Update workflows Drops testing support for: Ruby 2.6 + Ruby 2.7: These have been EOL'd and should no longer be used. Rails 5.2: This version has been EOL'd as well. --- .github/workflows/ruby.yml | 28 ++-------------------------- gemfiles/Gemfile.rails-7.1.x | 13 +++++++++++++ 2 files changed, 15 insertions(+), 26 deletions(-) create mode 100644 gemfiles/Gemfile.rails-7.1.x diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 3e33190e..96f0b6d9 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -17,39 +17,15 @@ jobs: strategy: fail-fast: false matrix: - ruby_version: [3.2, 3.1, "3.0", 2.7, 2.6, jruby] + ruby_version: [3.3, 3.2, 3.1, jruby] gemfile: - Gemfile - - gemfiles/Gemfile.rails-5.2.x - gemfiles/Gemfile.rails-6.0.x - gemfiles/Gemfile.rails-6.1.x - gemfiles/Gemfile.rails-7.0.x + - gemfiles/Gemfile.rails-7.1.x - gemfiles/Gemfile.rails-main exclude: - # Ruby 3.2 is not supported by Rails 5.2.x - - ruby_version: 3.2 - gemfile: gemfiles/Gemfile.rails-5.2.x - - # Ruby 3.1 is not supported by Rails 5.2.x - - ruby_version: 3.1 - gemfile: gemfiles/Gemfile.rails-5.2.x - - # Ruby 3.x is not supported by Rails 5.2.x - - ruby_version: "3.0" - gemfile: gemfiles/Gemfile.rails-5.2.x - - # Ruby 2.6.x is not supported by Rails main - - ruby_version: 2.6 - gemfile: gemfiles/Gemfile.rails-main - - # Ruby 2.6.x is not supported by Rails 7.0.x - - ruby_version: 2.6 - gemfile: gemfiles/Gemfile.rails-7.0.x - - # JRuby 9.4.2.0 (3.1.0) is not supported by Rails 5.2.x - - ruby_version: jruby - gemfile: gemfiles/Gemfile.rails-5.2.x - # JRuby is not supported by Rails 7.0.x - ruby_version: jruby gemfile: gemfiles/Gemfile.rails-7.0.x diff --git a/gemfiles/Gemfile.rails-7.1.x b/gemfiles/Gemfile.rails-7.1.x new file mode 100644 index 00000000..68cf801a --- /dev/null +++ b/gemfiles/Gemfile.rails-7.1.x @@ -0,0 +1,13 @@ +source 'https://rubygems.org' + +gemspec :path => '..' + +gem 'activesupport', '~> 7.1' +gem 'mocha', '~> 1.7.0' +gem 'test_declarative', '0.0.6' +gem 'rake' +gem 'minitest', '~> 5.14' + +platforms :mri do + gem 'oj' +end From 2346d7c51e1ec96100a4d5a028fc6cedfd645945 Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Wed, 6 Mar 2024 08:58:16 +1100 Subject: [PATCH 2/6] Specify racc as a dependency This is because this dependency has been gemified as of Ruby 3.3 --- i18n.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/i18n.gemspec b/i18n.gemspec index 2bfad5be..4d94dbbc 100644 --- a/i18n.gemspec +++ b/i18n.gemspec @@ -27,5 +27,6 @@ Gem::Specification.new do |s| s.required_ruby_version = '>= 2.3.0' s.add_dependency 'concurrent-ruby', '~> 1.0' + s.add_dependency 'racc', '~> 1.7' end From d7a21247dbf167e4cd2a9011164bc91204795fd0 Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Wed, 6 Mar 2024 09:00:03 +1100 Subject: [PATCH 3/6] Bump Mocha deps to v2 to fix build issue --- gemfiles/Gemfile.rails-5.0.x | 13 ------------- gemfiles/Gemfile.rails-5.1.x | 13 ------------- gemfiles/Gemfile.rails-5.2.x | 13 ------------- gemfiles/Gemfile.rails-7.1.x | 2 +- 4 files changed, 1 insertion(+), 40 deletions(-) delete mode 100644 gemfiles/Gemfile.rails-5.0.x delete mode 100644 gemfiles/Gemfile.rails-5.1.x delete mode 100644 gemfiles/Gemfile.rails-5.2.x diff --git a/gemfiles/Gemfile.rails-5.0.x b/gemfiles/Gemfile.rails-5.0.x deleted file mode 100644 index 5428e594..00000000 --- a/gemfiles/Gemfile.rails-5.0.x +++ /dev/null @@ -1,13 +0,0 @@ -source 'https://rubygems.org' - -gemspec :path => '..' - -gem 'activesupport', '~> 5.0.0' -gem 'mocha', '~> 2.1.0' -gem 'test_declarative', '0.0.6' -gem 'rake', '~> 13' -gem 'minitest', '~> 5.14' - -platforms :mri do - gem 'oj' -end diff --git a/gemfiles/Gemfile.rails-5.1.x b/gemfiles/Gemfile.rails-5.1.x deleted file mode 100644 index a944b7a2..00000000 --- a/gemfiles/Gemfile.rails-5.1.x +++ /dev/null @@ -1,13 +0,0 @@ -source 'https://rubygems.org' - -gemspec :path => '..' - -gem 'activesupport', '~> 5.1.0' -gem 'mocha', '~> 2.1.0' -gem 'test_declarative', '0.0.6' -gem 'rake' -gem 'minitest', '~> 5.14' - -platforms :mri do - gem 'oj' -end diff --git a/gemfiles/Gemfile.rails-5.2.x b/gemfiles/Gemfile.rails-5.2.x deleted file mode 100644 index 854d4fe7..00000000 --- a/gemfiles/Gemfile.rails-5.2.x +++ /dev/null @@ -1,13 +0,0 @@ -source 'https://rubygems.org' - -gemspec :path => '..' - -gem 'activesupport', '~> 5.2.0' -gem 'mocha', '~> 2.1.0' -gem 'test_declarative', '0.0.6' -gem 'rake' -gem 'minitest', '~> 5.14' - -platforms :mri do - gem 'oj' -end diff --git a/gemfiles/Gemfile.rails-7.1.x b/gemfiles/Gemfile.rails-7.1.x index 68cf801a..f427a474 100644 --- a/gemfiles/Gemfile.rails-7.1.x +++ b/gemfiles/Gemfile.rails-7.1.x @@ -3,7 +3,7 @@ source 'https://rubygems.org' gemspec :path => '..' gem 'activesupport', '~> 7.1' -gem 'mocha', '~> 1.7.0' +gem 'mocha', '~> 2' gem 'test_declarative', '0.0.6' gem 'rake' gem 'minitest', '~> 5.14' From f4fe3b9bac012d001a06b838e16d165b923dded7 Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Wed, 6 Mar 2024 09:07:39 +1100 Subject: [PATCH 4/6] Use actions/checkout@v4, as Node 16 actions have been deprecated --- .github/workflows/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 96f0b6d9..21049d70 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: From a33633754af5f7f2ece6a3fa4e08f5007f88ada1 Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Wed, 6 Mar 2024 09:09:37 +1100 Subject: [PATCH 5/6] Add back Ruby 3.0 support --- .github/workflows/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 21049d70..d1486942 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - ruby_version: [3.3, 3.2, 3.1, jruby] + ruby_version: [3.3, 3.2, 3.1, 3.0, jruby] gemfile: - Gemfile - gemfiles/Gemfile.rails-6.0.x From 77491c371cd893a6e7a43c19ba014831e12019c4 Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Wed, 6 Mar 2024 09:11:52 +1100 Subject: [PATCH 6/6] Clearly specify which versions of Ruby + Rails we support --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 1d174ddc..7b7a6bca 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,14 @@ Currently maintained by @radar. You will most commonly use this library within a Rails app. +We support Rails versions from 6.0 and up. + [See the Rails Guide](https://guides.rubyonrails.org/i18n.html) for an example of its usage. ### Ruby (without Rails) +We support Ruby versions from 3.0 and up. + If you want to use this library without Rails, you can simply add `i18n` to your `Gemfile`: ```ruby