From 2c41944a8f7f041a54b3cfe1ae3f0ab88e210c07 Mon Sep 17 00:00:00 2001 From: joey Date: Sun, 1 Sep 2024 14:26:34 +0100 Subject: [PATCH 1/3] fix: wrong mocked parameter --- test/middleware_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/middleware_test.rb b/test/middleware_test.rb index 69826cc..734a608 100644 --- a/test/middleware_test.rb +++ b/test/middleware_test.rb @@ -168,7 +168,7 @@ def test_patch_called_with_prepend_instrument Object.stub_const(:Dalli, Module) do ::Dalli.stub_const(:Client) do mock = Minitest::Mock.new - mock.expect :call, nil, [Dalli::Client, Array, :memcache, { instrument: :prepend }] + mock.expect :call, nil, [Dalli::Client, Array, :memcache], instrument: :prepend ::PrometheusExporter::Instrumentation::MethodProfiler.stub(:patch, mock) do configure_middleware(instrument: :prepend) end @@ -219,7 +219,7 @@ def test_patch_called_with_alias_method_instrument Object.stub_const(:Dalli, Module) do ::Dalli.stub_const(:Client) do mock = Minitest::Mock.new - mock.expect :call, nil, [Dalli::Client, Array, :memcache, { instrument: :alias_method }] + mock.expect :call, nil, [Dalli::Client, Array, :memcache], instrument: :alias_method ::PrometheusExporter::Instrumentation::MethodProfiler.stub(:patch, mock) do configure_middleware(instrument: :alias_method) end From 129eacf2b5bb65d2f612022e0f6dc879b0aed0a7 Mon Sep 17 00:00:00 2001 From: joey Date: Sun, 1 Sep 2024 14:29:29 +0100 Subject: [PATCH 2/3] support image built for dynamic owner --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b449fc..6ec162b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ permissions: packages: write env: - DOCKER_REPO: ghcr.io/discourse/prometheus_exporter + DOCKER_REPO: ghcr.io/${{ github.repository_owner }}/prometheus_exporter jobs: build: From e501e9f9859be0b1c13b099569e9a043c6b075ea Mon Sep 17 00:00:00 2001 From: joey Date: Sun, 1 Sep 2024 15:05:07 +0100 Subject: [PATCH 3/3] uprade to support Ruby 3 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ec162b..c8babf6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,7 +58,7 @@ jobs: - name: Release gem id: release - uses: discourse/publish-rubygems-action@v2 + uses: discourse/publish-rubygems-action@v3 env: RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} GIT_EMAIL: team@discourse.org