From d978bf3033f9438e3b3b5a4e49aa17c4f6f5c61c Mon Sep 17 00:00:00 2001 From: James Armes Date: Thu, 28 Mar 2024 16:57:37 -0400 Subject: [PATCH] Update github actions versions. --- .github/config/rubocop_linter_action.yml | 2 +- .github/workflows/branch.yml | 12 ++++---- .github/workflows/main.yml | 10 +++---- .rubocop.yml | 4 +++ Gemfile.lock | 36 +++++++++++++----------- spec/unit/destination/mongo_spec.rb | 3 +- 6 files changed, 35 insertions(+), 32 deletions(-) diff --git a/.github/config/rubocop_linter_action.yml b/.github/config/rubocop_linter_action.yml index 249432a..3f08492 100644 --- a/.github/config/rubocop_linter_action.yml +++ b/.github/config/rubocop_linter_action.yml @@ -21,7 +21,7 @@ versions: # Default: nil # Note: This does not need to be filled out for RuboCop to still find your config. # Resource: https://rubocop.readthedocs.io/en/stable/configuration/ -rubocop_config_path: '.rubocop.yml' +#rubocop_config_path: '.rubocop.yml' # The scope of code that RuboCop should lint. Use this if you only want to lint changed files. If this is not set # or not equal to 'modified', RuboCop is run against the entire codebase. Note that this will not work on the master branch. diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml index a13125a..03b0d0b 100644 --- a/.github/workflows/branch.yml +++ b/.github/workflows/branch.yml @@ -11,8 +11,6 @@ jobs: steps: - uses: actions/checkout@v4 - with: - fetch-depth: 1 - run: git fetch origin main --depth=1 - name: RuboCop Linter uses: andrewmcodes/rubocop-linter-action@v3.3.0 @@ -27,7 +25,7 @@ jobs: COVERAGE: 1 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -46,20 +44,20 @@ jobs: IMAGE_NAME: ${{ github.repository }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Log in to the Container registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Build and push Docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . push: true diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4e71212..23b56fd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,7 @@ jobs: COVERAGE: 1 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -44,20 +44,20 @@ jobs: IMAGE_NAME: ${{ github.repository }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Log in to the Container registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Build and push Docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . push: true diff --git a/.rubocop.yml b/.rubocop.yml index 8b4fb91..ce3d82e 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -25,3 +25,7 @@ RSpec/SubjectStub: RSpec/MultipleMemoizedHelpers: AllowSubject: true + +# Rack::MockResponse does not implement has_http_status?. +RSpec/Rails/HaveHttpStatus: + Enabled: false diff --git a/Gemfile.lock b/Gemfile.lock index 9a59457..c56e23b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -60,7 +60,8 @@ GEM i18n (1.14.1) concurrent-ruby (~> 1.0) iteraptor (0.10.0) - json (2.6.3) + json (2.7.1) + language_server-protocol (3.17.0.3) minitest (5.19.0) mongo (2.18.2) bson (>= 4.14.1, < 5.0.0) @@ -68,11 +69,11 @@ GEM ruby2_keywords (~> 0.0.1) mustermann-grape (1.0.2) mustermann (>= 1.0.0) - parallel (1.23.0) - parser (3.2.2.3) + parallel (1.24.0) + parser (3.3.0.5) ast (~> 2.4.1) racc - racc (1.7.0) + racc (1.7.3) rack (3.0.10) rack-accept (0.4.5) rack (>= 0.4) @@ -83,8 +84,8 @@ GEM webrick (~> 1.8) rainbow (3.1.1) rake (13.0.6) - regexp_parser (2.8.0) - rexml (3.2.5) + regexp_parser (2.9.0) + rexml (3.2.6) rspec (3.12.0) rspec-core (~> 3.12.0) rspec-expectations (~> 3.12.0) @@ -100,26 +101,27 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.0) - rubocop (1.52.0) + rubocop (1.62.1) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.0.0) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.29.0) - parser (>= 3.2.1.0) - rubocop-capybara (2.18.0) + rubocop-ast (1.31.2) + parser (>= 3.3.0.4) + rubocop-capybara (2.20.0) + rubocop (~> 1.41) + rubocop-factory_bot (2.25.1) rubocop (~> 1.41) - rubocop-factory_bot (2.23.1) - rubocop (~> 1.33) rubocop-rake (0.6.0) rubocop (~> 1.0) - rubocop-rspec (2.22.0) - rubocop (~> 1.33) + rubocop-rspec (2.27.1) + rubocop (~> 1.40) rubocop-capybara (~> 2.17) rubocop-factory_bot (~> 2.22) ruby-progressbar (1.13.0) @@ -134,7 +136,7 @@ GEM thor (1.2.2) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.4.2) + unicode-display_width (2.5.0) webrick (1.8.1) yajl-ruby (1.4.3) zeitwerk (2.6.13) diff --git a/spec/unit/destination/mongo_spec.rb b/spec/unit/destination/mongo_spec.rb index 2bd948e..c217463 100644 --- a/spec/unit/destination/mongo_spec.rb +++ b/spec/unit/destination/mongo_spec.rb @@ -19,8 +19,7 @@ end let(:client) do instance_double(Mongo::Client).tap do |client| - allow(client).to receive(:use).and_return(client) - allow(client).to receive(:[]).and_return(collection) + allow(client).to receive_messages(use: client, :[] => collection) end end let(:collection) do