statsd-instrument 2.3.2 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CODEOWNERS +1 -0
  3. data/.github/workflows/ci.yml +31 -0
  4. data/.gitignore +1 -0
  5. data/.rubocop-https---shopify-github-io-ruby-style-guide-rubocop-yml +1027 -0
  6. data/.rubocop.yml +21 -0
  7. data/CHANGELOG.md +41 -0
  8. data/CONTRIBUTING.md +26 -6
  9. data/Gemfile +2 -0
  10. data/Rakefile +3 -1
  11. data/lib/statsd/instrument/assertions.rb +24 -18
  12. data/lib/statsd/instrument/backend.rb +3 -2
  13. data/lib/statsd/instrument/backends/capture_backend.rb +2 -1
  14. data/lib/statsd/instrument/backends/logger_backend.rb +3 -3
  15. data/lib/statsd/instrument/backends/null_backend.rb +2 -0
  16. data/lib/statsd/instrument/backends/udp_backend.rb +20 -17
  17. data/lib/statsd/instrument/environment.rb +2 -0
  18. data/lib/statsd/instrument/helpers.rb +6 -2
  19. data/lib/statsd/instrument/matchers.rb +14 -11
  20. data/lib/statsd/instrument/metric.rb +34 -21
  21. data/lib/statsd/instrument/metric_expectation.rb +32 -18
  22. data/lib/statsd/instrument/railtie.rb +2 -1
  23. data/lib/statsd/instrument/version.rb +3 -1
  24. data/lib/statsd/instrument.rb +85 -36
  25. data/lib/statsd-instrument.rb +2 -0
  26. data/statsd-instrument.gemspec +13 -10
  27. data/test/assertions_test.rb +15 -4
  28. data/test/benchmark/default_tags.rb +47 -0
  29. data/test/benchmark/metrics.rb +9 -8
  30. data/test/benchmark/tags.rb +5 -3
  31. data/test/capture_backend_test.rb +4 -2
  32. data/test/environment_test.rb +2 -1
  33. data/test/helpers_test.rb +2 -1
  34. data/test/integration_test.rb +27 -7
  35. data/test/logger_backend_test.rb +10 -8
  36. data/test/matchers_test.rb +34 -20
  37. data/test/metric_test.rb +15 -4
  38. data/test/statsd_instrumentation_test.rb +7 -7
  39. data/test/statsd_test.rb +100 -10
  40. data/test/test_helper.rb +2 -0
  41. data/test/udp_backend_test.rb +5 -28
  42. metadata +23 -5
  43. data/.travis.yml +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 03ab2f74c3b653690d20eea1102515c64d901f739599816a0813cb9ab748d950
4
- data.tar.gz: 528dee5c361d7080a16a6a4da64057cc81596bbd9906eeb220fc731b30feb4f2
3
+ metadata.gz: c681ce1c0c9bd2755808d3b89ed7a56a924deaf384bf842e5e0a2b600a06c251
4
+ data.tar.gz: 8d4fbba3f23be9603861fff38a0dd604d00faa9d0105051a3e08d83e464fdf71
5
5
  SHA512:
6
- metadata.gz: 3c4ecdac1ee080fb1f92ca316f24669cccdc803fbb205ce577fbe45a58cb313cae98e9e7e04fc579ab230a99d1ae1353cfafe0d8d7c056ff7a98a3af35d1ea9e
7
- data.tar.gz: d9f9161e46aa12696eeaabf9d975cac6a64118e608d2b16978a3528b50459014dbf1f50623a54e8021fba7b504067c6c8a942e4e36907830fa939338588cb60f
6
+ metadata.gz: 15cbe3f85876c3e47658c8c15b65840e1bf97d4423199beedaef54e7843e469fd0958cf95a3960b11c5651e0fb8b3be3cf75543c22f98a5f0942e84ed6c4140f
7
+ data.tar.gz: '0590c1766ab84f54901568e98d273ddb3d6a7b59494223904cb5bfe9625473bfea40724f4f3b2d854cd4496a7f3b50d042fce082719bfab6596e5cbe467b4e51'
@@ -0,0 +1 @@
1
+ * @wvanbergen
@@ -0,0 +1,31 @@
1
+ name: CI
2
+
3
+ on: push
4
+
5
+ jobs:
6
+ test:
7
+ name: Ruby ${{ matrix.ruby }}
8
+ runs-on: ubuntu-18.04
9
+ strategy:
10
+ matrix:
11
+ ruby: ['2.3', '2.4', '2.5', '2.6']
12
+
13
+ steps:
14
+ - uses: actions/checkout@v1
15
+
16
+ - name: Setup Ruby
17
+ uses: actions/setup-ruby@v1
18
+ with:
19
+ version: ${{ matrix.ruby }}
20
+ architecture: 'x64'
21
+
22
+ - name: Install dependencies
23
+ run: |
24
+ gem install bundler
25
+ bundle install --jobs 4 --retry 3
26
+
27
+ - name: Run test suite
28
+ run: bundle exec rake
29
+
30
+ - name: Run Rubocop
31
+ run: bundle exec rubocop
data/.gitignore CHANGED
@@ -5,3 +5,4 @@ doc
5
5
  Gemfile.lock
6
6
  pkg/*
7
7
  vendor/
8
+ tmp/*