Skip to content

Commit cc3408e

Browse files
authored
Upgrade dependencies and add support for Rails 7.2 and 8.0 (#37)
* Changes `required_ruby_version` to `>= 3.2` * Changes Rails version support to `>= 7.0, < 8.1` * Removes unnecessary files and configuration from `spec/dummy` * Removes unnecessary `>= 5.2` checks * Commits lockfiles, since that's what we do nowadays * Runs CI against Ruby 3.2, 3.3, and 3.4
1 parent 19e4983 commit cc3408e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1509
-741
lines changed

.github/workflows/linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- uses: actions/checkout@v2
1111
- uses: ruby/setup-ruby@v1
1212
with:
13-
ruby-version: 2.7
13+
ruby-version: 3.2
1414
bundler-cache: true
1515
- name: Run Linter
1616
run: bundle exec rubocop --parallel

.github/workflows/tests.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,15 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
ruby: ['2.6', '2.7', '3.0', '3.1']
12+
ruby: ['3.2', '3.3', '3.4']
1313
gemfile:
14-
- gemfiles/rails_5_2.gemfile
15-
- gemfiles/rails_6_0.gemfile
16-
- gemfiles/rails_6_1.gemfile
1714
- gemfiles/rails_7_0.gemfile
1815
- gemfiles/rails_7_1.gemfile
16+
- gemfiles/rails_7_2.gemfile
17+
- gemfiles/rails_8_0.gemfile
1918
exclude:
20-
- ruby: '3.1'
21-
gemfile: gemfiles/rails_5_2.gemfile
22-
- ruby: '3.0'
23-
gemfile: gemfiles/rails_5_2.gemfile
24-
- ruby: '2.6'
19+
- ruby: '3.4'
2520
gemfile: gemfiles/rails_7_0.gemfile
26-
- ruby: '2.6'
27-
gemfile: gemfiles/rails_7_1.gemfile
28-
2921
steps:
3022
- uses: actions/checkout@v2
3123
- uses: ruby/setup-ruby@v1

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
.bundle/
22
.idea/
3-
Gemfile.lock
43
log/*.log
54
pkg/
65
spec/examples.txt
76
spec/dummy/log/*.log
87
spec/dummy/tmp/
9-
/gemfiles/*.gemfile.lock

.rubocop.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ inherit_gem:
55
- config/default.yml
66

77
AllCops:
8-
TargetRubyVersion: 2.6
8+
TargetRubyVersion: 3.2
99
NewCops: enable
1010
Exclude:
1111
- 'spec/dummy/db/**/*'
1212
- 'vendor/**/*'
13-
- 'gemfiles/vendor/**/*'
13+
- 'gemfiles/*.gemfile'

.rubocop_todo.yml

Lines changed: 70 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 99999`
3-
# on 2023-05-19 18:17:27 UTC using RuboCop version 1.51.0.
3+
# on 2025-01-21 19:47:26 UTC using RuboCop version 1.62.1.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -14,16 +14,57 @@ Gemspec/DevelopmentDependencies:
1414
Exclude:
1515
- 'journaled.gemspec'
1616

17-
# Offense count: 2
18-
RSpec/ExpectInHook:
17+
# Offense count: 13
18+
# This cop supports safe autocorrection (--autocorrect).
19+
# Configuration parameters: EnforcedStyle, IndentationWidth.
20+
# SupportedStyles: with_first_argument, with_fixed_indentation
21+
Layout/ArgumentAlignment:
1922
Exclude:
20-
- 'spec/models/concerns/journaled/changes_spec.rb'
23+
- 'app/models/journaled/audit_log/event.rb'
24+
- 'app/models/journaled/change.rb'
25+
26+
# Offense count: 5
27+
# This cop supports safe autocorrection (--autocorrect).
28+
# Configuration parameters: EnforcedStyle, IndentOneStep, IndentationWidth.
29+
# SupportedStyles: case, end
30+
Layout/CaseIndentation:
31+
Exclude:
32+
- 'app/models/journaled/audit_log/event.rb'
33+
- 'lib/journaled/relation_change_protection.rb'
34+
35+
# Offense count: 1
36+
# This cop supports safe autocorrection (--autocorrect).
37+
# Configuration parameters: EnforcedStyleAlignWith, Severity.
38+
# SupportedStylesAlignWith: keyword, variable, start_of_line
39+
Layout/EndAlignment:
40+
Exclude:
41+
- 'lib/journaled/relation_change_protection.rb'
42+
43+
# Offense count: 7
44+
# This cop supports safe autocorrection (--autocorrect).
45+
# Configuration parameters: EnforcedStyle, IndentationWidth.
46+
# SupportedStyles: with_first_parameter, with_fixed_indentation
47+
Layout/ParameterAlignment:
48+
Exclude:
49+
- 'app/models/journaled/change.rb'
2150

2251
# Offense count: 2
52+
# This cop supports safe autocorrection (--autocorrect).
53+
Lint/RedundantCopDisableDirective:
54+
Exclude:
55+
- 'lib/journaled/audit_log.rb'
56+
- 'lib/journaled/relation_change_protection.rb'
57+
58+
# Offense count: 1
2359
# This cop supports unsafe autocorrection (--autocorrect-all).
24-
RSpec/Rails/TravelAround:
60+
Lint/RedundantDirGlobSort:
2561
Exclude:
26-
- 'spec/lib/journaled/audit_log_spec.rb'
62+
- 'spec/rails_helper.rb'
63+
64+
# Offense count: 2
65+
RSpec/ExpectInHook:
66+
Exclude:
67+
- 'spec/models/concerns/journaled/changes_spec.rb'
2768

2869
# Offense count: 2
2970
RSpec/SubjectStub:
@@ -38,6 +79,12 @@ RSpec/VerifiedDoubles:
3879
- 'spec/models/journaled/actor_uri_provider_spec.rb'
3980
- 'spec/models/journaled/change_writer_spec.rb'
4081

82+
# Offense count: 2
83+
# This cop supports unsafe autocorrection (--autocorrect-all).
84+
RSpecRails/TravelAround:
85+
Exclude:
86+
- 'spec/lib/journaled/audit_log_spec.rb'
87+
4188
# Offense count: 1
4289
# This cop supports safe autocorrection (--autocorrect).
4390
Rails/IndexWith:
@@ -46,10 +93,27 @@ Rails/IndexWith:
4693

4794
# Offense count: 1
4895
# This cop supports unsafe autocorrection (--autocorrect-all).
96+
# Configuration parameters: AllowedReceivers.
4997
Style/CollectionCompact:
5098
Exclude:
5199
- 'app/jobs/journaled/delivery_job.rb'
52100

101+
# Offense count: 20
102+
# This cop supports safe autocorrection (--autocorrect).
103+
# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
104+
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
105+
# SupportedShorthandSyntax: always, never, either, consistent
106+
Style/HashSyntax:
107+
Exclude:
108+
- 'app/jobs/journaled/delivery_job.rb'
109+
- 'app/models/concerns/journaled/changes.rb'
110+
- 'app/models/journaled/change_writer.rb'
111+
- 'app/models/journaled/writer.rb'
112+
- 'lib/journaled/audit_log.rb'
113+
- 'spec/models/journaled/change_writer_spec.rb'
114+
- 'spec/models/journaled/json_schema_model/validator_spec.rb'
115+
- 'spec/models/journaled/writer_spec.rb'
116+
53117
# Offense count: 1
54118
# This cop supports safe autocorrection (--autocorrect).
55119
Style/RedundantConstantBase:

Appraisals

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
# frozen_string_literal: true
22

3-
appraise 'rails-5-2' do
4-
gem 'railties', '~> 5.2.0'
5-
end
6-
7-
appraise 'rails-6-0' do
8-
gem 'railties', '~> 6.0.0'
9-
end
10-
11-
appraise 'rails-6-1' do
12-
gem 'railties', '~> 6.1.0'
13-
end
14-
153
appraise 'rails-7-0' do
164
gem 'railties', '~> 7.0.0'
5+
gem 'concurrent-ruby', '1.3.4'
6+
gem 'sqlite3', '~> 1.4'
177
end
188

199
appraise 'rails-7-1' do
2010
gem 'railties', '~> 7.1.0'
11+
gem 'sqlite3', '>= 1.4'
12+
end
13+
14+
appraise 'rails-7-2' do
15+
gem 'railties', '~> 7.2.0'
16+
gem 'sqlite3', '>= 1.4'
17+
end
18+
19+
appraise 'rails-8-0' do
20+
gem 'railties', '~> 8.0.0'
21+
gem 'sqlite3', '>= 2.1'
2122
end

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
source 'https://rubygems.org'
44

55
gemspec
6+
7+
gem 'sqlite3', '>= 2.1'

0 commit comments

Comments
 (0)