Skip to content

Commit

Permalink
Add Rails 7.2 and 8.0 support (#22)
Browse files Browse the repository at this point in the history
* Upgraded all dependencies
* Fixed default Rake task to run appraisals
* Allow Rails 7.2 and 8.0
* Added appraisals for 7.2 and 8.0
* Added Ruby 3.3 to CI
  • Loading branch information
rzane authored Jan 22, 2025
1 parent ca94ba2 commit c37ed08
Show file tree
Hide file tree
Showing 19 changed files with 877 additions and 324 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,20 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ['3.0', '3.2']
ruby: ['3.0', '3.2', '3.3']
gemfile:
- gemfiles/rails_6_1.gemfile
- gemfiles/rails_7_0.gemfile
- gemfiles/rails_7_1.gemfile
- gemfiles/rails_7_2.gemfile
- gemfiles/rails_8_0.gemfile
exclude:
- ruby: '3.1'
gemfile: gemfiles/rails_8_0.gemfile
- ruby: '3.0'
gemfile: gemfiles/rails_8_0.gemfile
- ruby: '3.0'
gemfile: gemfiles/rails_7_2.gemfile
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
Expand Down
6 changes: 6 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,11 @@ inherit_gem:
betterlint:
- config/default.yml

inherit_mode:
merge:
- Exclude

AllCops:
TargetRubyVersion: 3.0
Exclude:
- gemfiles/*.gemfile
50 changes: 23 additions & 27 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# This configuration was generated by
# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 99999`
# on 2023-05-09 13:01:46 UTC using RuboCop version 1.50.2.
# on 2025-01-21 18:35:39 UTC using RuboCop version 1.62.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 4
# Offense count: 6
# Configuration parameters: EnforcedStyle, AllowedGems, Include.
# SupportedStyles: Gemfile, gems.rb, gemspec
# Include: **/*.gemspec, **/Gemfile, **/gems.rb
Expand All @@ -15,11 +15,25 @@ Gemspec/DevelopmentDependencies:
- 'authorized_persona.gemspec'

# Offense count: 1
# Configuration parameters: Severity, Include.
# Include: **/*.gemspec
Gemspec/RequiredRubyVersion:
# This cop supports safe autocorrection (--autocorrect).
Layout/ElseAlignment:
Exclude:
- 'authorized_persona.gemspec'
- 'lib/authorized_persona/authorization.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyleAlignWith, Severity.
# SupportedStylesAlignWith: keyword, variable, start_of_line
Layout/EndAlignment:
Exclude:
- 'lib/authorized_persona/authorization.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Width, AllowedPatterns.
Layout/IndentationWidth:
Exclude:
- 'lib/authorized_persona/authorization.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Expand All @@ -30,29 +44,25 @@ Layout/LineLength:
- 'lib/authorized_persona/authorization.rb'

# Offense count: 2
# Configuration parameters: AllowedParentClasses.
Lint/MissingSuper:
Exclude:
- 'spec/authorized_persona/authorization_spec.rb'
- 'spec/authorized_persona/persona_spec.rb'

# Offense count: 2
# Offense count: 4
# This cop supports safe autocorrection (--autocorrect).
Lint/RedundantCopDisableDirective:
Exclude:
- 'lib/authorized_persona/authorization.rb'
- 'lib/authorized_persona/persona.rb'

# Offense count: 1
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
Metrics/PerceivedComplexity:
Exclude:
- 'lib/authorized_persona/persona.rb'

# Offense count: 2
# This cop supports unsafe autocorrection (--autocorrect-all).
RSpec/BeEq:
Exclude:
- 'spec/authorized_persona/authorization_spec.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Rails/ActiveSupportOnLoad:
Expand All @@ -64,20 +74,6 @@ Rails/I18nLocaleTexts:
Exclude:
- 'lib/authorized_persona/authorization.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: Include.
# Include: **/Rakefile, **/*.rake
Rails/RakeEnvironment:
Exclude:
- 'Rakefile'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Rake/Desc:
Exclude:
- 'Rakefile'

# Offense count: 2
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AllowedReceivers.
Expand Down
13 changes: 10 additions & 3 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@

appraise 'rails-6-1' do
gem 'railties', '~> 6.1.0'
gem 'activemodel', '~>6.1.0'
gem 'concurrent-ruby', '1.3.4'
end

appraise 'rails-7-0' do
gem 'railties', '~> 7.0.0'
gem 'activemodel', '~>7.0.0'
gem 'concurrent-ruby', '1.3.4'
end

appraise 'rails-7-1' do
gem 'railties', '~> 7.1.0'
gem 'activemodel', '~>7.1.0'
end

appraise 'rails-7-2' do
gem 'railties', '~> 7.2.0'
end

appraise 'rails-8-0' do
gem 'railties', '~> 8.0.0'
end
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ source "https://rubygems.org"

# Specify your gem's dependencies in authorized_persona.gemspec
gemspec

gem 'zeitwerk', '~> 2.6.18' # Newer versions require Ruby 3.2
gem 'nokogiri', '~> 1.17.2' # Newer versions require Ruby 3.2
gem 'securerandom', '~> 0.3.2' # Newer versions require Ruby 3.1
Loading

0 comments on commit c37ed08

Please sign in to comment.