Skip to content

Commit 2263526

Browse files
authored
Merge pull request #183 from tagliala/chore/update-rubocop
Test against Ruby 3.4 and fix CI
2 parents 28264c5 + 04ac000 commit 2263526

File tree

6 files changed

+17
-25
lines changed

6 files changed

+17
-25
lines changed

.github/workflows/rubocop.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
ruby-version: ['3.3']
18+
ruby-version: ['3.4']
1919

2020
continue-on-error: ${{ matrix.channel != 'stable' }}
2121

@@ -24,8 +24,8 @@ jobs:
2424
- name: Set up Ruby
2525
uses: ruby/setup-ruby@v1
2626
with:
27-
ruby-version: '3.3'
27+
ruby-version: ${{ matrix.ruby-version }}
2828
bundler-cache: true
2929
- name: Test with Rake
3030
run: |
31-
bundle exec rubocop
31+
bundle exec rubocop --format github

.github/workflows/ruby.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
ruby-version: ['3.1', '3.2', '3.3']
18+
ruby-version: ['3.1', '3.2', '3.3', '3.4']
1919
channel: ['stable']
2020

2121
include:
@@ -29,7 +29,7 @@ jobs:
2929
- name: Set up Ruby
3030
uses: ruby/setup-ruby@v1
3131
with:
32-
ruby-version: '3.3'
32+
ruby-version: ${{ matrix.ruby-version }}
3333
bundler-cache: true
3434
- name: Test with Rake
3535
run: |

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
inherit_from: .rubocop_todo.yml
22

3-
require:
3+
plugins:
44
- rubocop-packaging
55
- rubocop-performance
66
- rubocop-rake

Gemfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ gem "pry"
1010
gem "rake"
1111
gem "rspec"
1212

13-
gem "rubocop", "1.69.2", require: false
14-
gem "rubocop-packaging", "0.5.2", require: false
15-
gem "rubocop-performance", "1.23.0", require: false
16-
gem "rubocop-rake", "0.6.0", require: false
17-
gem "rubocop-rspec", "3.3.0", require: false
13+
gem "rubocop", "1.75.3", require: false
14+
gem "rubocop-packaging", "0.6.0", require: false
15+
gem "rubocop-performance", "1.25.0", require: false
16+
gem "rubocop-rake", "0.7.1", require: false
17+
gem "rubocop-rspec", "3.6.0", require: false
1818

1919
gem "simplecov", require: false

spec/finds_asset_paths_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@
8686
shakapacker = double('ShakapackerDouble')
8787

8888
expect(shakapacker).to receive(:find_asset).with('some-file')
89-
.and_return(double(filename: Pathname('https://my-fancy-domain.test/full/path/to/some-file')))
89+
.and_return(double(filename: Pathname('https://test.example.org/full/path/to/some-file')))
9090

9191
InlineSvg.configure do |config|
9292
config.asset_finder = shakapacker
9393
end
9494

95-
expect(InlineSvg::FindsAssetPaths.by_filename('some-file')).to eq Pathname('https://my-fancy-domain.test/full/path/to/some-file')
95+
expect(InlineSvg::FindsAssetPaths.by_filename('some-file')).to eq Pathname('https://test.example.org/full/path/to/some-file')
9696
end
9797
end
9898
end

spec/helpers/inline_svg_spec.rb

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ def transform(doc)
1515
let(:helper) { (Class.new { include InlineSvg::ActionView::Helpers }).new }
1616

1717
shared_examples "inline_svg helper" do |helper_method:|
18-
context "when passed the name of an SVG that does not exist" do
19-
after do
20-
InlineSvg.reset_configuration!
21-
end
18+
after do
19+
InlineSvg.reset_configuration!
20+
end
2221

22+
context "when passed the name of an SVG that does not exist" do
2323
context "and configured to raise" do
2424
before do
2525
InlineSvg.configure do |config|
@@ -166,10 +166,6 @@ def transform(doc)
166166
end
167167
end
168168

169-
after do
170-
InlineSvg.reset_configuration!
171-
end
172-
173169
it "applies custm transformations to the output" do
174170
input_svg = '<svg></svg>'
175171
expected_output = '<svg custom="some value"></svg>'
@@ -185,10 +181,6 @@ def transform(doc)
185181
end
186182
end
187183

188-
after do
189-
InlineSvg.reset_configuration!
190-
end
191-
192184
context "without passing the attribute value" do
193185
it "applies custom transformations to the output using the default value" do
194186
input_svg = '<svg></svg>'

0 commit comments

Comments
 (0)