Skip to content

Commit f766373

Browse files
authored
Merge pull request #1046 from orien/ruby3.2
CI: add Ruby 3.2 to the test matrix
2 parents ced04ac + 502517c commit f766373

File tree

5 files changed

+40
-49
lines changed

5 files changed

+40
-49
lines changed

.github/workflows/ci.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,29 @@ jobs:
2828
- gemfile: "6.1"
2929
ruby-version: 2.7
3030
- gemfile: "6.1"
31-
ruby-version: 3.0
31+
ruby-version: '3.0'
3232
- gemfile: "7.0"
3333
ruby-version: 3.1
34+
- gemfile: "7.0"
35+
ruby-version: 3.2
3436

3537
env:
36-
BUNDLE_GEMFILE: /home/runner/work/wicked_pdf/wicked_pdf/gemfiles/${{ matrix.gemfile }}.gemfile
38+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
3739
WKHTMLTOPDF_BIN: /usr/bin/wkhtmltopdf
3840

3941
steps:
40-
- uses: actions/checkout@v2
41-
42-
- name: Install Ruby ${{ matrix.ruby-version }}
43-
uses: ruby/setup-ruby@v1
44-
with:
45-
ruby-version: ${{ matrix.ruby-version }}
42+
- uses: actions/checkout@v3
4643

4744
- name: Install OS dependencies
4845
run: |
4946
sudo apt-get update -y -qq
5047
sudo apt-get install -y wkhtmltopdf
5148
52-
- name: Install gem dependencies
53-
run: bundle install
49+
- name: Install Ruby ${{ matrix.ruby-version }}
50+
uses: ruby/setup-ruby@v1
51+
with:
52+
ruby-version: ${{ matrix.ruby-version }}
53+
bundler-cache: true
5454

5555
- name: Run tests with Ruby ${{ matrix.ruby-version }} and Rails ${{ matrix.gemfile }}
5656
run: bundle exec rake

.rubocop.yml

+2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ inherit_from: .rubocop_todo.yml
22

33
AllCops:
44
NewCops: disable
5+
SuggestExtensions: false
56
TargetRubyVersion: 2.6
67
Exclude:
78
- 'gemfiles/bin/*'
89
- 'test/dummy/**/*'
10+
- 'vendor/**/*'
911

1012
Metrics/PerceivedComplexity:
1113
Enabled: false

.rubocop_todo.yml

+28-37
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,39 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2019-10-09 14:16:04 +0200 using RuboCop version 0.68.1.
3+
# on 2023-01-24 11:24:49 UTC using RuboCop version 1.44.0.
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: 11
10-
Metrics/AbcSize:
11-
Max: 45
12-
139
# Offense count: 2
14-
# Configuration parameters: CountComments.
10+
# Configuration parameters: CountComments, CountAsOne.
1511
Metrics/ClassLength:
16-
Max: 250
12+
Max: 203
1713

1814
# Offense count: 7
15+
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
1916
Metrics/CyclomaticComplexity:
2017
Max: 13
2118

2219
# Offense count: 17
23-
# Configuration parameters: CountComments, ExcludedMethods.
20+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
2421
Metrics/MethodLength:
25-
Max: 40
22+
Max: 34
2623

27-
# Offense count: 2
28-
# Configuration parameters: CountComments.
24+
# Offense count: 1
25+
# Configuration parameters: CountComments, CountAsOne.
2926
Metrics/ModuleLength:
30-
Max: 147
27+
Max: 104
3128

32-
# Offense count: 6
33-
Metrics/PerceivedComplexity:
34-
Max: 13
35-
36-
# Offense count: 2
29+
# Offense count: 1
3730
Naming/AccessorMethodName:
3831
Exclude:
3932
- 'lib/wicked_pdf/middleware.rb'
40-
- 'lib/wicked_pdf/pdf_helper.rb'
4133

4234
# Offense count: 1
35+
# This cop supports safe autocorrection (--autocorrect).
36+
# Configuration parameters: AllowOnConstant, AllowOnSelfClass.
4337
Style/CaseEquality:
4438
Exclude:
4539
- 'lib/wicked_pdf/wicked_pdf_helper.rb'
@@ -49,66 +43,63 @@ Style/ClassVars:
4943
Exclude:
5044
- 'lib/wicked_pdf.rb'
5145

52-
# Offense count: 10
46+
# Offense count: 13
47+
# Configuration parameters: AllowedConstants.
5348
Style/Documentation:
5449
Exclude:
5550
- 'spec/**/*'
5651
- 'test/**/*'
5752
- 'generators/wicked_pdf/wicked_pdf_generator.rb'
5853
- 'lib/wicked_pdf.rb'
54+
- 'lib/wicked_pdf/binary.rb'
5955
- 'lib/wicked_pdf/middleware.rb'
56+
- 'lib/wicked_pdf/option_parser.rb'
6057
- 'lib/wicked_pdf/pdf_helper.rb'
6158
- 'lib/wicked_pdf/progress.rb'
6259
- 'lib/wicked_pdf/railtie.rb'
63-
- 'lib/wicked_pdf/binary.rb'
64-
- 'lib/wicked_pdf/option_parser.rb'
6560
- 'lib/wicked_pdf/tempfile.rb'
6661
- 'lib/wicked_pdf/wicked_pdf_helper.rb'
6762
- 'lib/wicked_pdf/wicked_pdf_helper/assets.rb'
6863

6964
# Offense count: 2
70-
# Cop supports --auto-correct.
65+
# This cop supports safe autocorrection (--autocorrect).
7166
Style/ExpandPathArguments:
7267
Exclude:
7368
- 'test/test_helper.rb'
7469
- 'wicked_pdf.gemspec'
7570

76-
# Offense count: 8
77-
# Cop supports --auto-correct.
78-
# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
71+
# Offense count: 4
72+
# This cop supports safe autocorrection (--autocorrect).
73+
# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
7974
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
75+
# SupportedShorthandSyntax: always, never, either, consistent
8076
Style/HashSyntax:
8177
Exclude:
82-
- 'gemfiles/4.0.gemfile'
83-
- 'gemfiles/4.1.gemfile'
84-
- 'gemfiles/4.2.gemfile'
8578
- 'gemfiles/5.0.gemfile'
8679
- 'gemfiles/5.1.gemfile'
8780
- 'gemfiles/5.2.gemfile'
8881
- 'gemfiles/6.0.gemfile'
89-
- 'gemfiles/rails_edge.gemfile'
9082

9183
# Offense count: 2
92-
# Cop supports --auto-correct.
84+
# This cop supports unsafe autocorrection (--autocorrect-all).
9385
# Configuration parameters: EnforcedStyle.
9486
# SupportedStyles: literals, strict
9587
Style/MutableConstant:
9688
Exclude:
9789
- 'lib/wicked_pdf/wicked_pdf_helper/assets.rb'
9890

99-
# Offense count: 6
100-
# Cop supports --auto-correct.
91+
# Offense count: 5
92+
# This cop supports safe autocorrection (--autocorrect).
10193
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
10294
# SupportedStyles: slashes, percent_r, mixed
10395
Style/RegexpLiteral:
10496
Exclude:
10597
- 'lib/wicked_pdf/middleware.rb'
10698
- 'lib/wicked_pdf/wicked_pdf_helper/assets.rb'
107-
- 'test/unit/wicked_pdf_test.rb'
10899

109-
# Offense count: 111
110-
# Cop supports --auto-correct.
111-
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
100+
# Offense count: 18
101+
# This cop supports safe autocorrection (--autocorrect).
102+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
112103
# URISchemes: http, https
113-
Metrics/LineLength:
104+
Layout/LineLength:
114105
Max: 563

gemfiles/6.1.gemfile

-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ gem 'webpacker'
77
gem 'rdoc'
88
gem 'sprockets', '~>3.0'
99
gem 'sqlite3', '~> 1.4'
10-
gem 'rubocop', '1.11.0'
1110

1211
gemspec :path => '../'

gemfiles/7.0.gemfile

-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ gem 'sprockets-rails'
77
gem 'rdoc'
88
gem 'sprockets', '~>3.0'
99
gem 'sqlite3', '~> 1.4'
10-
gem 'rubocop', '1.11.0'
1110

1211
gemspec :path => '../'

0 commit comments

Comments
 (0)