Skip to content

Commit

Permalink
[TASK] Drop support for Ruby 3.0 (#184)
Browse files Browse the repository at this point in the history
Ruby 3.0 has been EOL'ed:
https://www.ruby-lang.org/en/news/2024/04/23/ruby-3-0-7-released/

Also make use of some Ruby 3.1 features.

Fixes #181
  • Loading branch information
oliverklee authored Apr 26, 2024
1 parent cf294dd commit db50881
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,12 @@ jobs:
fail-fast: false
matrix:
include:
- { 'rails': '6.1', 'ruby': '3.0.7' }
- { 'rails': '6.1', 'ruby': '3.1.5' }
- { 'rails': '6.1', 'ruby': '3.2.4' }
- { 'rails': '6.1', 'ruby': '3.3.1' }
- { 'rails': '7.0', 'ruby': '3.0.7' }
- { 'rails': '7.0', 'ruby': '3.1.5' }
- { 'rails': '7.0', 'ruby': '3.2.4' }
- { 'rails': '7.0', 'ruby': '3.3.1' }
- { 'rails': '7.1', 'ruby': '3.0.7' }
- { 'rails': '7.1', 'ruby': '3.1.5' }
- { 'rails': '7.1', 'ruby': '3.2.4' }
- { 'rails': '7.1', 'ruby': '3.3.1' }
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require:
- rubocop-rails

AllCops:
TargetRubyVersion: 3.0
TargetRubyVersion: 3.1
TargetRailsVersion: 6.1
NewCops: enable

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ about why a change log is important.
### Deprecated

### Removed
- Drop support for Ruby 3.0 (#184)

### Fixed

Expand Down
6 changes: 3 additions & 3 deletions lib/page_title_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def title(env)
end

# Add new, custom, interpolation.
def self.interpolates(key, &block)
Interpolations.send(:define_method, key, &block)
def self.interpolates(key, &)
Interpolations.send(:define_method, key, &)
end

# Default options, which are globally referenced and can
Expand Down Expand Up @@ -75,7 +75,7 @@ def page_title(options = nil)
format = PageTitleHelper.formats[format] if PageTitleHelper.formats.include?(format)

# construct basic env to pass around
env = { title: real_title, app: options[:app], options: options, view: self }
env = { title: real_title, app: options[:app], options:, view: self }

# interpolate format
Interpolations.interpolate(format, env)
Expand Down
2 changes: 1 addition & 1 deletion page_title_helper.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Gem::Specification.new do |s|
s.summary = 'Simple, internationalized and DRY page titles and headings for Rails.'
s.description = 'Simple, internationalized and DRY page titles and headings for Rails.'

s.required_ruby_version = '>= 3.0.0'
s.required_ruby_version = '>= 3.1.0'

s.authors = ['Lukas Westermann']
s.email = ['[email protected]']
Expand Down

0 comments on commit db50881

Please sign in to comment.