From cdaf2bcec054f4d43a732fe1bef80252f5770b08 Mon Sep 17 00:00:00 2001 From: Brian Shand Date: Thu, 20 Nov 2025 13:31:46 +0000 Subject: [PATCH 1/3] GitHub Actions: Disable Slack notifications --- .github/workflows/test.yml | 50 +++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 40a9d3b..381c3a2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,28 +51,28 @@ jobs: if: ${{ needs.test.result != 'success' }} run: exit 1 - notify: - # Run only on master, but regardless of whether tests past: - if: ${{ always() && github.ref == 'refs/heads/master' }} - - needs: test_matrix - - runs-on: ubuntu-latest - - steps: - - uses: 8398a7/action-slack@v3 - with: - status: custom - fields: workflow,commit,author - custom_payload: | - { - channel: 'C7FQWGDHP', - username: 'CI – ' + '${{ github.repository }}'.split('/')[1], - icon_emoji: ':hammer_and_wrench:', - attachments: [{ - color: '${{ needs.test_matrix.result }}' === 'success' ? 'good' : '${{ needs.test_matrix.result }}' === 'failure' ? 'danger' : 'warning', - text: `${process.env.AS_WORKFLOW} against \`${{ github.ref }}\` (${process.env.AS_COMMIT}) for ${{ github.actor }} resulted in *${{ needs.test_matrix.result }}*.` - }] - } - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} +# notify: +# # Run only on master, but regardless of whether tests past: +# if: ${{ always() && github.ref == 'refs/heads/master' }} +# +# needs: test_matrix +# +# runs-on: ubuntu-latest +# +# steps: +# - uses: 8398a7/action-slack@v3 +# with: +# status: custom +# fields: workflow,commit,author +# custom_payload: | +# { +# channel: 'C7FQWGDHP', +# username: 'CI – ' + '${{ github.repository }}'.split('/')[1], +# icon_emoji: ':hammer_and_wrench:', +# attachments: [{ +# color: '${{ needs.test_matrix.result }}' === 'success' ? 'good' : '${{ needs.test_matrix.result }}' === 'failure' ? 'danger' : 'warning', +# text: `${process.env.AS_WORKFLOW} against \`${{ github.ref }}\` (${process.env.AS_COMMIT}) for ${{ github.actor }} resulted in *${{ needs.test_matrix.result }}*.` +# }] +# } +# env: +# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} From 18b2b164762ebb97602d8380ae97636934854335 Mon Sep 17 00:00:00 2001 From: Brian Shand Date: Thu, 20 Nov 2025 13:31:57 +0000 Subject: [PATCH 2/3] Remove unneeded ruby version lock inside testbed application --- test/dummy/.ruby-version | 1 - 1 file changed, 1 deletion(-) delete mode 100644 test/dummy/.ruby-version diff --git a/test/dummy/.ruby-version b/test/dummy/.ruby-version deleted file mode 100644 index ec1cf33..0000000 --- a/test/dummy/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -2.6.3 From e60a096e60938bd96fcdbe4ec89c6f743660fe67 Mon Sep 17 00:00:00 2001 From: Brian Shand Date: Thu, 20 Nov 2025 13:44:50 +0000 Subject: [PATCH 3/3] Support dogstatsd-ruby 5 --- CHANGELOG.md | 1 + ndr_stats.gemspec | 2 +- test/ndr_stats_test.rb | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 458a2b1..04b8935 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## [Unreleased] ### Fixed * Support Ruby 3.4. Drop support for Rails 7.0, Ruby 3.1 +* Support dogstatsd-ruby 5 ## 0.2.2 / 2024-11-19 ### Added diff --git a/ndr_stats.gemspec b/ndr_stats.gemspec index dfa5139..0f0bcef 100644 --- a/ndr_stats.gemspec +++ b/ndr_stats.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ['lib'] - spec.add_dependency 'dogstatsd-ruby', '~> 4.5' + spec.add_dependency 'dogstatsd-ruby', '>= 4.5', '< 6.0' # We list development dependencies for all Rails versions here. # Rails version-specific dependencies can go in the relevant Gemfile. diff --git a/test/ndr_stats_test.rb b/test/ndr_stats_test.rb index 86c19bc..4a8b369 100644 --- a/test/ndr_stats_test.rb +++ b/test/ndr_stats_test.rb @@ -19,8 +19,8 @@ def test_that_it_is_configurable adaptor = NdrStats.adaptor assert_kind_of Datadog::Statsd, adaptor - assert_equal 'test.host', adaptor.connection.host - assert_equal 9125, adaptor.connection.port + assert_equal 'test.host', adaptor.respond_to?(:host) ? adaptor.host : adaptor.connection.host + assert_equal 9125, adaptor.respond_to?(:port) ? adaptor.port : adaptor.connection.port assert_equal %w[system:app stack:live], adaptor.tags end end