Skip to content

Commit cd49d82

Browse files
committed
Add Rails 8 compatibility
Remove upper constraint as per svenfuchs/rails-i18n#1130 (comment)
1 parent 5b5476b commit cd49d82

File tree

9 files changed

+45
-9
lines changed

9 files changed

+45
-9
lines changed

.github/workflows/rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ jobs:
2929
ruby-version: ${{ matrix.ruby-version }}
3030
bundler-cache: true
3131
- name: Ruby linter
32-
run: bundle exec rubocop
32+
run: bundle exec rubocop --format github

.github/workflows/ruby.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3']
19-
gemfile: [rails_6.1, rails_7.0, rails_7.1, rails_7.2]
19+
gemfile: [rails_6.1, rails_7.0, rails_7.1, rails_7.2, rails_8.0]
2020
channel: ['stable']
2121

2222
include:
@@ -32,15 +32,24 @@ jobs:
3232
- ruby-version: 'head'
3333
gemfile: rails_7.2
3434
channel: 'experimental'
35+
- ruby-version: 'head'
36+
gemfile: rails_8.0
37+
channel: 'experimental'
3538
- ruby-version: 'head'
3639
gemfile: rails_edge
3740
channel: 'experimental'
3841

3942
exclude:
4043
- ruby-version: '2.7'
4144
gemfile: rails_7.2
45+
- ruby-version: '2.7'
46+
gemfile: rails_8.0
4247
- ruby-version: '3.0'
4348
gemfile: rails_7.2
49+
- ruby-version: '3.0'
50+
gemfile: rails_8.0
51+
- ruby-version: '3.1'
52+
gemfile: rails_8.0
4453
- ruby-version: '3.2'
4554
gemfile: rails_6.1
4655
- ruby-version: '3.3'

Appraisals

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ appraise 'rails-7.1' do
1313
end
1414

1515
appraise 'rails-7.2' do
16-
gem 'rails', '~> 7.2.0.beta2'
16+
gem 'rails', '~> 7.2.0'
17+
end
18+
19+
appraise 'rails-8.0' do
20+
gem 'rails', '~> 8.0.0'
1721
end
1822

1923
appraise 'rails-edge' do

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 14.2.0 / 2024-11-08
4+
5+
* [FEATURE] Rails 8.0 compatibility
6+
37
## 14.1.2 / 2024-05-27
48

59
* [ENHANCEMENT] Test against Ruby 3.3

gemfiles/rails_7.2.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ source "https://rubygems.org"
55
gem "appraisal"
66
gem "byebug"
77
gem "minitest"
8-
gem "rails", "~> 7.2.0.beta2"
8+
gem "rails", "~> 7.2.0"
99
gem "rake"
1010
gem "rubocop"
1111
gem "rubocop-minitest"

gemfiles/rails_8.0.gemfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "appraisal"
6+
gem "byebug"
7+
gem "minitest"
8+
gem "rails", "~> 8.0.0"
9+
gem "rake"
10+
gem "rubocop"
11+
gem "rubocop-minitest"
12+
gem "rubocop-packaging"
13+
gem "rubocop-performance"
14+
gem "rubocop-rails"
15+
gem "rubocop-rake"
16+
gem "simplecov"
17+
gem "simplecov-lcov"
18+
19+
gemspec path: "../"

lib/route_translator/translator/path/segment.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ def translate_resource(str, locale, scope)
2424
handler = proc { |exception| exception }
2525
opts = { locale: locale, scope: scope }
2626

27-
if I18n.t(str, **opts.merge(exception_handler: handler)).is_a?(I18n::MissingTranslation)
28-
I18n.t! str, **opts.merge(fallback_options(str, locale))
27+
if I18n.t(str, **opts, exception_handler: handler).is_a?(I18n::MissingTranslation)
28+
I18n.t! str, **opts, **fallback_options(str, locale)
2929
else
3030
I18n.t str, **opts
3131
end

lib/route_translator/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module RouteTranslator
4-
VERSION = '14.1.2'
4+
VERSION = '14.2.0'
55
end

route_translator.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ Gem::Specification.new do |spec|
2626

2727
spec.required_ruby_version = '>= 2.7'
2828

29-
spec.add_dependency 'actionpack', '>= 6.1', '< 8.0'
30-
spec.add_dependency 'activesupport', '>= 6.1', '< 8.0'
29+
spec.add_dependency 'actionpack', '>= 6.1'
30+
spec.add_dependency 'activesupport', '>= 6.1'
3131
end

0 commit comments

Comments
 (0)