Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade dependencies and add support for Rails 7.2 and 8.0 #37

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.2
bundler-cache: true
- name: Run Linter
run: bundle exec rubocop --parallel
16 changes: 4 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,15 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ['2.6', '2.7', '3.0', '3.1']
ruby: ['3.2', '3.3', '3.4']
gemfile:
- gemfiles/rails_5_2.gemfile
- gemfiles/rails_6_0.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_5_2.gemfile
- ruby: '3.0'
gemfile: gemfiles/rails_5_2.gemfile
- ruby: '2.6'
- ruby: '3.4'
gemfile: gemfiles/rails_7_0.gemfile
- ruby: '2.6'
gemfile: gemfiles/rails_7_1.gemfile

steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
.bundle/
.idea/
Gemfile.lock
log/*.log
pkg/
spec/examples.txt
spec/dummy/log/*.log
spec/dummy/tmp/
/gemfiles/*.gemfile.lock
4 changes: 2 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ inherit_gem:
- config/default.yml

AllCops:
TargetRubyVersion: 2.6
TargetRubyVersion: 3.2
NewCops: enable
Exclude:
- 'spec/dummy/db/**/*'
- 'vendor/**/*'
- 'gemfiles/vendor/**/*'
- 'gemfiles/*.gemfile'
76 changes: 70 additions & 6 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 99999`
# on 2023-05-19 18:17:27 UTC using RuboCop version 1.51.0.
# on 2025-01-21 19:47:26 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
Expand All @@ -14,16 +14,57 @@ Gemspec/DevelopmentDependencies:
Exclude:
- 'journaled.gemspec'

# Offense count: 2
RSpec/ExpectInHook:
# Offense count: 13
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: with_first_argument, with_fixed_indentation
Layout/ArgumentAlignment:
Exclude:
- 'spec/models/concerns/journaled/changes_spec.rb'
- 'app/models/journaled/audit_log/event.rb'
- 'app/models/journaled/change.rb'

# Offense count: 5
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, IndentOneStep, IndentationWidth.
# SupportedStyles: case, end
Layout/CaseIndentation:
Exclude:
- 'app/models/journaled/audit_log/event.rb'
- 'lib/journaled/relation_change_protection.rb'

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

# Offense count: 7
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: with_first_parameter, with_fixed_indentation
Layout/ParameterAlignment:
Exclude:
- 'app/models/journaled/change.rb'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Lint/RedundantCopDisableDirective:
Exclude:
- 'lib/journaled/audit_log.rb'
- 'lib/journaled/relation_change_protection.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
RSpec/Rails/TravelAround:
Lint/RedundantDirGlobSort:
Exclude:
- 'spec/lib/journaled/audit_log_spec.rb'
- 'spec/rails_helper.rb'

# Offense count: 2
RSpec/ExpectInHook:
Exclude:
- 'spec/models/concerns/journaled/changes_spec.rb'

# Offense count: 2
RSpec/SubjectStub:
Expand All @@ -38,6 +79,12 @@ RSpec/VerifiedDoubles:
- 'spec/models/journaled/actor_uri_provider_spec.rb'
- 'spec/models/journaled/change_writer_spec.rb'

# Offense count: 2
# This cop supports unsafe autocorrection (--autocorrect-all).
RSpecRails/TravelAround:
Exclude:
- 'spec/lib/journaled/audit_log_spec.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Rails/IndexWith:
Expand All @@ -46,10 +93,27 @@ Rails/IndexWith:

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AllowedReceivers.
Style/CollectionCompact:
Exclude:
- 'app/jobs/journaled/delivery_job.rb'

# Offense count: 20
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
# SupportedShorthandSyntax: always, never, either, consistent
Style/HashSyntax:
Exclude:
- 'app/jobs/journaled/delivery_job.rb'
- 'app/models/concerns/journaled/changes.rb'
- 'app/models/journaled/change_writer.rb'
- 'app/models/journaled/writer.rb'
- 'lib/journaled/audit_log.rb'
- 'spec/models/journaled/change_writer_spec.rb'
- 'spec/models/journaled/json_schema_model/validator_spec.rb'
- 'spec/models/journaled/writer_spec.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantConstantBase:
Expand Down
25 changes: 13 additions & 12 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
# frozen_string_literal: true

appraise 'rails-5-2' do
gem 'railties', '~> 5.2.0'
end

appraise 'rails-6-0' do
gem 'railties', '~> 6.0.0'
end

appraise 'rails-6-1' do
gem 'railties', '~> 6.1.0'
end

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

appraise 'rails-7-1' do
gem 'railties', '~> 7.1.0'
gem 'sqlite3', '>= 1.4'
end

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

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

gemspec

gem 'sqlite3', '>= 2.1'
Loading
Loading