Skip to content

Commit 0821102

Browse files
authored
Merge pull request #134 from FundingCircle/support-rails8
Support for rails 8
2 parents a13e5b5 + 19fe431 commit 0821102

50 files changed

Lines changed: 1106 additions & 358 deletions

Some content is hidden

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

.github/workflows/build-and-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Set up Ruby
3232
uses: ruby/setup-ruby@v1
3333
with:
34-
ruby-version: '3.3'
34+
ruby-version: '3.4'
3535
bundler-cache: true
3636

3737
- name: Run RuboCop
@@ -51,7 +51,7 @@ jobs:
5151
- 6379:6379
5252
strategy:
5353
matrix:
54-
ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3', 'head']
54+
ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3', '3.4', 'head']
5555
steps:
5656
- name: Check out repository code
5757
uses: actions/checkout@v4

.github/workflows/publish-gem.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Set up Ruby
1616
uses: ruby/setup-ruby@v1
1717
with:
18-
ruby-version: '3.3'
18+
ruby-version: '3.4'
1919
bundler-cache: true
2020

2121
- name: Build gem

.rubocop.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ AllCops:
1010
- 'vendor/bundle/**/*'
1111
- 'gemfiles/vendor/bundle/**/*'
1212

13-
require: rubocop-rspec
13+
plugins: rubocop-rspec
1414

15-
Documentation:
15+
Style/Documentation:
1616
Enabled: false
1717

1818
Layout/ExtraSpacing:
@@ -21,17 +21,17 @@ Layout/ExtraSpacing:
2121
Layout/SpaceAroundOperators:
2222
Enabled: false
2323

24+
Layout/LineLength:
25+
Enabled: true
26+
Max: 90
27+
2428
Metrics/AbcSize:
2529
Enabled: false
2630

2731
Metrics/BlockLength:
2832
Exclude:
2933
- spec/**/*_spec.rb
3034

31-
Metrics/LineLength:
32-
Enabled: true
33-
Max: 90
34-
3535
Metrics/MethodLength:
3636
Enabled: true
3737
Max: 15
@@ -42,11 +42,6 @@ RSpec/DescribeClass:
4242
RSpec/ExampleLength:
4343
Enabled: false
4444

45-
RSpec/FilePath:
46-
Exclude:
47-
- spec/integration/rails/action_mailer_spec.rb
48-
- spec/integration/rails/railtie_spec.rb
49-
5045
RSpec/MultipleExpectations:
5146
Enabled: false
5247

.rubocop_todo.yml

Lines changed: 67 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config --exclude-limit 10000000`
3-
# on 2024-02-09 15:03:07 UTC using RuboCop version 1.60.2.
3+
# on 2025-08-29 07:24:21 UTC using RuboCop version 1.80.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
77
# versions of RuboCop, may require this file to be generated again.
88

9-
# Offense count: 5
9+
# Offense count: 2
1010
# This cop supports safe autocorrection (--autocorrect).
11-
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
12-
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
11+
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation.
1312
Bundler/OrderedGems:
1413
Exclude:
1514
- 'Gemfile'
@@ -36,11 +35,24 @@ Layout/HashAlignment:
3635

3736
# Offense count: 1
3837
# This cop supports safe autocorrection (--autocorrect).
39-
# Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment.
38+
# Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment, AllowRBSInlineAnnotation, AllowSteepAnnotation.
4039
Layout/LeadingCommentSpace:
4140
Exclude:
4241
- 'lib/loga/railtie.rb'
4342

43+
# Offense count: 1
44+
# This cop supports safe autocorrection (--autocorrect).
45+
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
46+
# URISchemes: http, https
47+
Layout/LineLength:
48+
Exclude:
49+
- 'spec/loga/sidekiq_latest/job_logger_spec.rb'
50+
51+
# Offense count: 2
52+
Lint/CopDirectiveSyntax:
53+
Exclude:
54+
- 'spec/unit/loga/rack/logger_spec.rb'
55+
4456
# Offense count: 2
4557
# Configuration parameters: AllowComments, AllowEmptyLambdas.
4658
Lint/EmptyBlock:
@@ -66,6 +78,18 @@ Lint/SendWithMixinArgument:
6678
Exclude:
6779
- 'lib/loga/railtie.rb'
6880

81+
# Offense count: 2
82+
Lint/UselessConstantScoping:
83+
Exclude:
84+
- 'lib/loga/rack/request.rb'
85+
86+
# Offense count: 2
87+
# This cop supports safe autocorrection (--autocorrect).
88+
# Configuration parameters: CheckForMethodsWithNoSideEffects.
89+
Lint/Void:
90+
Exclude:
91+
- 'lib/loga/railtie.rb'
92+
6993
# Offense count: 1
7094
# Configuration parameters: AllowedMethods, AllowedPatterns.
7195
Metrics/CyclomaticComplexity:
@@ -98,12 +122,27 @@ RSpec/ContextWording:
98122
- 'spec/support/timecop_shared.rb'
99123
- 'spec/unit/loga/configuration_spec.rb'
100124

125+
# Offense count: 1
126+
RSpec/DescribeMethod:
127+
Exclude:
128+
- 'spec/loga/sidekiq_latest/job_logger_spec.rb'
129+
130+
# Offense count: 22
131+
# This cop supports safe autocorrection (--autocorrect).
132+
RSpec/IncludeExamples:
133+
Exclude:
134+
- 'spec/integration/rails/request_spec.rb'
135+
- 'spec/integration/sinatra_spec.rb'
136+
- 'spec/unit/loga/formatters/gelf_formatter_spec.rb'
137+
- 'spec/unit/loga/parameter_filter_spec.rb'
138+
- 'spec/unit/loga/rack/logger_spec.rb'
139+
101140
# Offense count: 41
102141
# Configuration parameters: AllowSubject.
103142
RSpec/MultipleMemoizedHelpers:
104143
Max: 12
105144

106-
# Offense count: 6
145+
# Offense count: 9
107146
# Configuration parameters: AllowedPatterns.
108147
# AllowedPatterns: ^expect_, ^assert_
109148
RSpec/NoExpectationExample:
@@ -112,10 +151,10 @@ RSpec/NoExpectationExample:
112151
- 'spec/integration/sidekiq61_spec.rb'
113152
- 'spec/integration/sidekiq65_spec.rb'
114153
- 'spec/integration/sidekiq7_spec.rb'
154+
- 'spec/integration/sidekiq8_spec.rb'
115155

116156
# Offense count: 2
117-
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
118-
# Include: **/*_spec.rb
157+
# Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata.
119158
RSpec/SpecFilePathFormat:
120159
Exclude:
121160
- '**/spec/routing/**/*'
@@ -142,12 +181,20 @@ Style/CommentAnnotation:
142181
Exclude:
143182
- 'lib/loga/configuration.rb'
144183

184+
# Offense count: 2
185+
# This cop supports unsafe autocorrection (--autocorrect-all).
186+
Style/FileNull:
187+
Exclude:
188+
- 'lib/loga/ext/rails/rack/logger.rb'
189+
- 'spec/unit/loga/rack/logger_spec.rb'
190+
145191
# Offense count: 25
146192
# This cop supports unsafe autocorrection (--autocorrect-all).
147193
# Configuration parameters: EnforcedStyle.
148194
# SupportedStyles: always, always_true, never
149195
Style/FrozenStringLiteralComment:
150196
Exclude:
197+
- '**/*.arb'
151198
- 'Appraisals'
152199
- 'Gemfile'
153200
- 'Guardfile'
@@ -180,6 +227,12 @@ Style/GlobalStdStream:
180227
Exclude:
181228
- 'lib/loga/configuration.rb'
182229

230+
# Offense count: 1
231+
# This cop supports unsafe autocorrection (--autocorrect-all).
232+
Style/HashSlice:
233+
Exclude:
234+
- 'lib/loga/sidekiq7/job_logger.rb'
235+
183236
# Offense count: 1
184237
# This cop supports unsafe autocorrection (--autocorrect-all).
185238
# Configuration parameters: EnforcedStyle.
@@ -204,3 +257,9 @@ Style/RedundantFileExtensionInRequire:
204257
Style/RedundantFreeze:
205258
Exclude:
206259
- 'lib/loga/sidekiq7/job_logger.rb'
260+
261+
# Offense count: 1
262+
# This cop supports safe autocorrection (--autocorrect).
263+
Style/RedundantRegexpEscape:
264+
Exclude:
265+
- 'lib/loga/rack/request_id.rb'

Appraisals

Lines changed: 73 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,137 @@
11
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3.0.0')
22
appraise 'rails52' do
3+
gem 'concurrent-ruby', '1.3.4'
34
gem 'rails', '~> 5.2.0'
45
end
56
end
67

78
appraise 'sinatra14' do
9+
gem 'concurrent-ruby', '1.3.4'
810
gem 'sinatra', '~> 1.4.0'
911
end
1012

1113
appraise 'sinatra2' do
14+
gem 'concurrent-ruby', '1.3.4'
1215
gem 'sinatra', '~> 2.2.4'
1316
end
1417

1518
appraise 'sinatra3' do
19+
gem 'concurrent-ruby', '1.3.4'
1620
gem 'sinatra', '~> 3.2.0'
1721
end
1822

1923
appraise 'sinatra4' do
24+
gem 'concurrent-ruby', '1.3.4'
2025
gem 'sinatra', '~> 4.0.0'
2126
end
2227

23-
appraise 'sidekiq51' do
24-
gem 'sidekiq', '~> 5.1.0'
25-
end
28+
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3.5.0')
29+
appraise 'sidekiq51' do
30+
gem 'concurrent-ruby', '1.3.4'
31+
gem 'sidekiq', '~> 5.1.0'
32+
end
2633

27-
appraise 'sidekiq60' do
28-
gem 'sidekiq', '~> 6.0.0'
29-
end
34+
appraise 'sidekiq60' do
35+
gem 'concurrent-ruby', '1.3.4'
36+
gem 'sidekiq', '~> 6.0.0'
37+
end
3038

31-
appraise 'sidekiq61' do
32-
gem 'sidekiq', '~> 6.1.0'
33-
end
39+
appraise 'sidekiq61' do
40+
gem 'concurrent-ruby', '1.3.4'
41+
gem 'sidekiq', '~> 6.1.0'
42+
end
3443

35-
appraise 'sidekiq62' do
36-
gem 'sidekiq', '~> 6.2.0'
37-
end
44+
appraise 'sidekiq62' do
45+
gem 'concurrent-ruby', '1.3.4'
46+
gem 'sidekiq', '~> 6.2.0'
47+
end
3848

39-
appraise 'sidekiq63' do
40-
gem 'sidekiq', '~> 6.3.0'
41-
end
49+
appraise 'sidekiq63' do
50+
gem 'concurrent-ruby', '1.3.4'
51+
gem 'sidekiq', '~> 6.3.0'
52+
end
4253

43-
appraise 'sidekiq64' do
44-
gem 'sidekiq', '~> 6.4.0'
45-
end
54+
appraise 'sidekiq64' do
55+
gem 'concurrent-ruby', '1.3.4'
56+
gem 'sidekiq', '~> 6.4.0'
57+
end
4658

47-
appraise 'sidekiq65' do
48-
gem 'sidekiq', '~> 6.5.0'
59+
appraise 'sidekiq65' do
60+
gem 'concurrent-ruby', '1.3.4'
61+
gem 'sidekiq', '~> 6.5.0'
62+
end
4963
end
5064

5165
appraise 'sidekiq70' do
66+
gem 'concurrent-ruby', '1.3.4'
5267
gem 'sidekiq', '~> 7.0.0'
5368
end
5469

5570
appraise 'sidekiq71' do
71+
gem 'concurrent-ruby', '1.3.4'
5672
gem 'sidekiq', '~> 7.1.0'
5773
end
5874

59-
appraise 'sidekiq7' do
60-
gem 'sidekiq', '~> 7.0'
61-
end
62-
6375
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3.2.0')
6476
appraise 'rails60' do
77+
gem 'concurrent-ruby', '1.3.4'
6578
gem 'rails', '~> 6.0.0'
6679
end
6780

6881
appraise 'rails61' do
82+
gem 'concurrent-ruby', '1.3.4'
6983
gem 'rails', '~> 6.1.4.4'
7084
end
7185
end
7286

7387
if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('3.0.0')
7488
appraise 'rails70' do
89+
gem 'concurrent-ruby', '1.3.4'
7590
gem 'rails', '~> 7.0.0'
7691
gem 'base64'
7792
gem 'mutex_m'
7893
end
7994

8095
appraise 'rails71' do
96+
gem 'concurrent-ruby', '~> 1.3'
8197
gem 'rails', '~> 7.1.0'
8298
gem 'base64'
8399
gem 'mutex_m'
84100
end
85101
end
86102

103+
if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('3.1.0')
104+
appraise 'rails72' do
105+
gem 'concurrent-ruby', '~> 1.3'
106+
gem 'rails', '~> 7.2.0'
107+
gem 'base64'
108+
gem 'mutex_m'
109+
end
110+
end
111+
112+
if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('3.2.0')
113+
appraise 'rails80' do
114+
gem 'concurrent-ruby', '~> 1.3'
115+
gem 'rails', '~> 8.0.0'
116+
gem 'base64'
117+
gem 'mutex_m'
118+
end
119+
120+
appraise 'sidekiq72' do
121+
gem 'concurrent-ruby', '1.3.4'
122+
gem 'sidekiq', '~> 7.2.0'
123+
end
124+
125+
appraise 'sidekiq73' do
126+
gem 'concurrent-ruby', '1.3.4'
127+
gem 'sidekiq', '~> 7.3.0'
128+
end
129+
130+
appraise 'sidekiq80' do
131+
gem 'concurrent-ruby', '1.3.4'
132+
gem 'sidekiq', '~> 8.0.0'
133+
end
134+
end
135+
87136
appraise 'unit' do
88137
end

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [2.9.0] - 2025-08-29
8+
### Added
9+
- Test against rails 7.2
10+
- Support for rails 8.0
11+
- Support for sidekiq 8
12+
### Fixed
13+
- Fix tests for ruby 3.4 and head
14+
715
## [2.8.1] - 2023-02-12
816
### Added
917
- Improve CI pipeline

0 commit comments

Comments
 (0)