From 0a44f51cbd29ac7700a1292019754b92d8d340f2 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Wed, 4 Sep 2024 22:57:17 +1200 Subject: [PATCH] Modernize gem. --- .github/workflows/rubocop.yaml | 20 ++++---------------- .github/workflows/test-coverage.yaml | 6 +++--- .rubocop.yml | 3 +++ bake.rb | 2 +- lib/protocol/http/body/rewindable.rb | 2 +- test/protocol/http/body/buffered.rb | 2 +- test/protocol/http/body/inflate.rb | 2 +- test/protocol/http/body/rewindable.rb | 2 +- 8 files changed, 15 insertions(+), 24 deletions(-) diff --git a/.github/workflows/rubocop.yaml b/.github/workflows/rubocop.yaml index edfd9bc..287c06d 100644 --- a/.github/workflows/rubocop.yaml +++ b/.github/workflows/rubocop.yaml @@ -1,4 +1,4 @@ -name: Test External +name: RuboCop on: [push, pull_request] @@ -9,26 +9,14 @@ env: CONSOLE_OUTPUT: XTerm jobs: - test: - name: ${{matrix.ruby}} on ${{matrix.os}} - runs-on: ${{matrix.os}}-latest - - strategy: - matrix: - os: - - ubuntu - - macos - - ruby: - - "3.1" - - "3.2" - - "3.3" + check: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: ${{matrix.ruby}} + ruby-version: ruby bundler-cache: true - name: Run RuboCop diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index d7e5b24..ffa0927 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -33,8 +33,8 @@ jobs: - name: Run tests timeout-minutes: 5 run: bundle exec bake test - - - uses: actions/upload-artifact@v3 + + - uses: actions/upload-artifact@v4 with: name: coverage-${{matrix.os}}-${{matrix.ruby}} path: .covered.db @@ -50,7 +50,7 @@ jobs: ruby-version: "3.3" bundler-cache: true - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 - name: Validate coverage timeout-minutes: 5 diff --git a/.rubocop.yml b/.rubocop.yml index 442c667..a2447c2 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -16,6 +16,9 @@ Layout/IndentationConsistency: Enabled: true EnforcedStyle: normal +Layout/BlockAlignment: + Enabled: true + Layout/EndAlignment: Enabled: true EnforcedStyleAlignWith: start_of_line diff --git a/bake.rb b/bake.rb index 52b35d0..6971885 100644 --- a/bake.rb +++ b/bake.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2024, by Samuel Williams. +# Copyright, 2020-2024, by Samuel Williams. # Update the project documentation with the new version number. # diff --git a/lib/protocol/http/body/rewindable.rb b/lib/protocol/http/body/rewindable.rb index eb1e508..438a0f9 100644 --- a/lib/protocol/http/body/rewindable.rb +++ b/lib/protocol/http/body/rewindable.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2019-2023, by Samuel Williams. +# Copyright, 2019-2024, by Samuel Williams. require_relative 'wrapper' require_relative 'buffered' diff --git a/test/protocol/http/body/buffered.rb b/test/protocol/http/body/buffered.rb index 679ba6e..d6167df 100644 --- a/test/protocol/http/body/buffered.rb +++ b/test/protocol/http/body/buffered.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2019-2023, by Samuel Williams. +# Copyright, 2019-2024, by Samuel Williams. # Copyright, 2020-2023, by Bruno Sutic. require 'protocol/http/body/buffered' diff --git a/test/protocol/http/body/inflate.rb b/test/protocol/http/body/inflate.rb index 45541e4..ded1b24 100644 --- a/test/protocol/http/body/inflate.rb +++ b/test/protocol/http/body/inflate.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2023, by Samuel Williams. +# Copyright, 2023-2024, by Samuel Williams. require 'protocol/http/body/buffered' require 'protocol/http/body/deflate' diff --git a/test/protocol/http/body/rewindable.rb b/test/protocol/http/body/rewindable.rb index b45ae30..b2fbb66 100644 --- a/test/protocol/http/body/rewindable.rb +++ b/test/protocol/http/body/rewindable.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2019-2023, by Samuel Williams. +# Copyright, 2019-2024, by Samuel Williams. require 'protocol/http/body/rewindable' require 'protocol/http/request'