diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 65d20da..7f98f8e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: os: [ubuntu] - ruby-version: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3"] + ruby-version: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4"] steps: - uses: actions/checkout@v2 - name: Setup Ruby ${{ matrix.ruby-version }} @@ -19,6 +19,6 @@ jobs: bundler-cache: true - name: Build and run tests run: | - gem install bundler -v 2.4.6 + gem install bundler -v 2.4.22 bundle install --jobs 4 --retry 3 bundle exec rake diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index f0b68db..e101f19 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2025-10-09 00:04:06 UTC using RuboCop version 1.81.1. +# on 2025-10-17 11:20:00 UTC using RuboCop version 1.81.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 @@ -40,7 +40,7 @@ Metrics/AbcSize: # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. # AllowedMethods: refine Metrics/BlockLength: - Max: 79 + Max: 82 # Offense count: 2 # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. diff --git a/CHANGELOG.md b/CHANGELOG.md index 5af544c..4cbe885 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [FEATURE: Add Skunk HTML Report](https://github.com/fastruby/skunk/pull/123) * [FEATURE: Add Skunk::Config class](https://github.com/fastruby/skunk/pull/123) +* [FEATURE: Add Ruby 3.4 compatibility](https://github.com/fastruby/skunk/pull/124) ## v0.5.4 / 2025-05-05 [(commits)](https://github.com/fastruby/skunk/compare/v0.5.3...v0.5.4) diff --git a/Gemfile b/Gemfile index 6412983..52aa166 100644 --- a/Gemfile +++ b/Gemfile @@ -9,4 +9,3 @@ gemspec gem "reek", "~> 6.1" gem "rubocop", "~> 1.48" -gem "vcr", "~> 6.1.0" diff --git a/skunk.gemspec b/skunk.gemspec index 732e68b..f68c820 100644 --- a/skunk.gemspec +++ b/skunk.gemspec @@ -52,5 +52,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency "rubocop" spec.add_development_dependency "simplecov", "~> 0.18" spec.add_development_dependency "simplecov-console", "0.5.0" - spec.add_development_dependency "webmock", "~> 3.10.0" + spec.add_development_dependency "webmock", "~> 3.20.0" end diff --git a/test/lib/skunk/application_test.rb b/test/lib/skunk/application_test.rb index 41e369f..4f24063 100644 --- a/test/lib/skunk/application_test.rb +++ b/test/lib/skunk/application_test.rb @@ -75,9 +75,12 @@ end around do |example| - VCR.use_cassette "skunk-fyi" do - example.call - end + stub_request(:post, "https://skunk.fastruby.io/reports").to_return( + status: 200, + body: '{"id":"j"}', + headers: { "Content-Type" => "application/json" } + ) + example.call end it "share report to default server" do diff --git a/test/samples/vcr/skunk-fyi.yml b/test/samples/vcr/skunk-fyi.yml deleted file mode 100644 index e022369..0000000 --- a/test/samples/vcr/skunk-fyi.yml +++ /dev/null @@ -1,59 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: https://skunk.fastruby.io/reports - body: - encoding: UTF-8 - string: '{"entries":[{"file":"samples/rubycritic/analysed_module.rb","skunk_score":0.59,"churn_times_cost":0.59,"churn":1,"cost":0.59,"coverage":100.0}],"summary":{"total_skunk_score":0.59,"analysed_modules_count":1,"skunk_score_average":0.59,"skunk_version":"0.4.2","worst_skunk_score":{"file":"samples/rubycritic/analysed_module.rb","skunk_score":0.59}},"options":{"compare":"false"}}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Host: - - skunk.fastruby.io - response: - status: - code: 200 - message: OK - headers: - Server: - - Cowboy - Date: - - Wed, 18 Nov 2020 20:48:58 GMT - Connection: - - keep-alive - X-Frame-Options: - - SAMEORIGIN - X-Xss-Protection: - - 1; mode=block - X-Content-Type-Options: - - nosniff - X-Download-Options: - - noopen - X-Permitted-Cross-Domain-Policies: - - none - Referrer-Policy: - - strict-origin-when-cross-origin - Content-Type: - - application/json; charset=utf-8 - Etag: - - W/"510d9374d13d569167428b81cfd4cf0e" - Cache-Control: - - max-age=0, private, must-revalidate - X-Request-Id: - - b66077d1-4f4c-47a6-8e12-1a6c65898933 - X-Runtime: - - '0.141992' - Transfer-Encoding: - - chunked - Via: - - 1.1 vegur - body: - encoding: UTF-8 - string: '{"id":"j"}' - recorded_at: Wed, 18 Nov 2020 20:48:58 GMT -recorded_with: VCR 6.0.0 diff --git a/test/test_helper.rb b/test/test_helper.rb index 838c098..1b63517 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -26,7 +26,6 @@ require "minitest/around/spec" require "minitest/stub_any_instance" require "webmock/minitest" -require "vcr" require "skunk/rubycritic/analysed_module" @@ -52,9 +51,3 @@ def capture_output_streams $stdout = STDOUT $stderr = STDERR end - -VCR.configure do |config| - config.hook_into :webmock - config.allow_http_connections_when_no_cassette = false - config.cassette_library_dir = "test/samples/vcr" -end