newrelic-sidekiq-metrics 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 918e652a40fcca747e0bfbf22ceee1e5f1c1bd84f1977f936ebdc547d56072c6
4
- data.tar.gz: 11c8b9b6cbe94ee53f5aab9f8a6ad3aa06d5963453e166ae4713cd4d78c1e037
3
+ metadata.gz: ff0aad65cd83cb47a11b9cdb7cdfbb23044fdf7c565d8dd85b0b90d30a273453
4
+ data.tar.gz: 78054abb2a57917468f409c3a19564ffe37a9a15cbff1a50a01f5ed9d95df6fb
5
5
  SHA512:
6
- metadata.gz: 2f037664b66be444cd1e93be897ca86181cd0227ef5e2779ce9e7f2578b02641666e534ddf2c4aebfcbcf36a4498cd5096241be49960182a4317ce3257c57a5b
7
- data.tar.gz: 338bfce14a6f9768381f8e0ca6c42b27981120892e399404822e8957fc769e500d79190d115205de0d86bf709b2ebd33a6ef26ba66ce92ab4122a94efbdbbde3
6
+ metadata.gz: 05ea0a727319ff8e3b98bb26999f5e1c103c81bbf4870bd1360f4ba68436eec4d50adfc7168ff1555ffbfa220ed6f11a58e54d815ae4ea1181b24b0b9feefc3f
7
+ data.tar.gz: 0c6486e4da0b24fffc90fc37d01dc7597837c9d9f2c50422bc6ec8f411ba5dc5fcf43187aa865412e9b1e24e57dc6efd51a88d523f5d90b16eeb0362b5d34128
data/.bundler-version ADDED
@@ -0,0 +1 @@
1
+ 2.2.14
@@ -3,9 +3,14 @@ version: 1
3
3
  update_configs:
4
4
  - package_manager: "ruby:bundler"
5
5
  directory: "/"
6
- update_schedule: "monthly"
6
+ update_schedule: "daily"
7
7
  commit_message:
8
8
  prefix: "[dependabot]"
9
9
  allowed_updates:
10
10
  - match:
11
- update_type: "all"
11
+ dependency_type: "all"
12
+ update_type: "security"
13
+ automerged_updates:
14
+ - match:
15
+ dependency_type: "all"
16
+ update_type: "security:patch"
@@ -1,7 +1,7 @@
1
- # automatically approve PRs submitted by Dependabot
1
+ # automatically approve PRs submitted by Dependabot or Renofidev
2
2
  # this will allow Dependabot to automatically merge dependency update PRs where CI passes
3
3
  # from: https://github.com/hmarr/auto-approve-action
4
- name: Auto approve Dependabot PRs
4
+ name: Auto approve dependency upgrades PRs
5
5
 
6
6
  on:
7
7
  pull_request
@@ -11,6 +11,6 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
13
  - uses: hmarr/auto-approve-action@v2.0.0
14
- if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
14
+ if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' || github.actor == 'renofidev'
15
15
  with:
16
16
  github-token: "${{ secrets.GITHUB_TOKEN }}"
@@ -0,0 +1,19 @@
1
+ name: automerge
2
+ on:
3
+ pull_request_review:
4
+ types:
5
+ - submitted
6
+ check_suite:
7
+ types:
8
+ - completed
9
+ status: {}
10
+ jobs:
11
+ automerge:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: automerge
15
+ uses: "pascalgn/automerge-action@v0.12.0"
16
+ env:
17
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
18
+ MERGE_METHOD: squash
19
+ MERGE_DELETE_BRANCH: true
data/.travis.yml CHANGED
@@ -5,6 +5,7 @@ cache: bundler
5
5
  rvm:
6
6
  - 2.6
7
7
  - 2.7
8
+ - 3.0
8
9
  before_install: gem install bundler
9
10
  script:
10
11
  - bundle exec rake rubocop
data/Gemfile.lock CHANGED
@@ -1,68 +1,70 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- newrelic-sidekiq-metrics (1.1.1)
5
- newrelic_rpm (~> 6.8)
4
+ newrelic-sidekiq-metrics (1.2.0)
5
+ newrelic_rpm (~> 6.14)
6
6
  sidekiq (~> 6.1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- ast (2.4.1)
11
+ ast (2.4.2)
12
12
  coderay (1.1.3)
13
13
  connection_pool (2.2.3)
14
14
  diff-lcs (1.4.4)
15
15
  method_source (1.0.0)
16
- newrelic_rpm (6.12.0.367)
17
- parallel (1.19.2)
18
- parser (2.7.1.4)
16
+ newrelic_rpm (6.15.0)
17
+ parallel (1.20.1)
18
+ parser (3.0.0.0)
19
19
  ast (~> 2.4.1)
20
- pry (0.13.1)
20
+ pry (0.14.0)
21
21
  coderay (~> 1.1)
22
22
  method_source (~> 1.0)
23
23
  rack (2.2.3)
24
24
  rainbow (3.0.0)
25
- rake (13.0.1)
26
- redis (4.2.1)
27
- regexp_parser (1.7.1)
25
+ rake (13.0.3)
26
+ redis (4.2.5)
27
+ regexp_parser (2.1.1)
28
28
  rexml (3.2.4)
29
- rspec (3.9.0)
30
- rspec-core (~> 3.9.0)
31
- rspec-expectations (~> 3.9.0)
32
- rspec-mocks (~> 3.9.0)
33
- rspec-core (3.9.2)
34
- rspec-support (~> 3.9.3)
35
- rspec-expectations (3.9.2)
29
+ rspec (3.10.0)
30
+ rspec-core (~> 3.10.0)
31
+ rspec-expectations (~> 3.10.0)
32
+ rspec-mocks (~> 3.10.0)
33
+ rspec-core (3.10.1)
34
+ rspec-support (~> 3.10.0)
35
+ rspec-expectations (3.10.1)
36
36
  diff-lcs (>= 1.2.0, < 2.0)
37
- rspec-support (~> 3.9.0)
38
- rspec-mocks (3.9.1)
37
+ rspec-support (~> 3.10.0)
38
+ rspec-mocks (3.10.2)
39
39
  diff-lcs (>= 1.2.0, < 2.0)
40
- rspec-support (~> 3.9.0)
41
- rspec-support (3.9.3)
42
- rubocop (0.90.0)
40
+ rspec-support (~> 3.10.0)
41
+ rspec-support (3.10.2)
42
+ rubocop (1.11.0)
43
43
  parallel (~> 1.10)
44
- parser (>= 2.7.1.1)
44
+ parser (>= 3.0.0.0)
45
45
  rainbow (>= 2.2.2, < 4.0)
46
- regexp_parser (>= 1.7)
46
+ regexp_parser (>= 1.8, < 3.0)
47
47
  rexml
48
- rubocop-ast (>= 0.3.0, < 1.0)
48
+ rubocop-ast (>= 1.2.0, < 2.0)
49
49
  ruby-progressbar (~> 1.7)
50
- unicode-display_width (>= 1.4.0, < 2.0)
51
- rubocop-ast (0.3.0)
52
- parser (>= 2.7.1.4)
53
- rubocop-performance (1.7.1)
54
- rubocop (>= 0.82.0)
55
- rubocop-rspec (1.43.2)
56
- rubocop (~> 0.87)
57
- ruby-progressbar (1.10.1)
58
- sidekiq (6.1.1)
50
+ unicode-display_width (>= 1.4.0, < 3.0)
51
+ rubocop-ast (1.4.1)
52
+ parser (>= 2.7.1.5)
53
+ rubocop-rake (0.5.1)
54
+ rubocop
55
+ rubocop-rspec (2.2.0)
56
+ rubocop (~> 1.0)
57
+ rubocop-ast (>= 1.1.0)
58
+ ruby-progressbar (1.11.0)
59
+ sidekiq (6.2.0)
59
60
  connection_pool (>= 2.2.2)
60
61
  rack (~> 2.0)
61
62
  redis (>= 4.2.0)
62
- unicode-display_width (1.7.0)
63
+ unicode-display_width (2.0.0)
63
64
 
64
65
  PLATFORMS
65
66
  ruby
67
+ x86_64-linux
66
68
 
67
69
  DEPENDENCIES
68
70
  bundler
@@ -71,8 +73,8 @@ DEPENDENCIES
71
73
  rake
72
74
  rspec
73
75
  rubocop
74
- rubocop-performance
76
+ rubocop-rake
75
77
  rubocop-rspec
76
78
 
77
79
  BUNDLED WITH
78
- 2.1.4
80
+ 2.2.15
@@ -50,6 +50,10 @@ module NewrelicSidekiqMetrics
50
50
  end
51
51
  end
52
52
  end
53
+
54
+ def self.inline_sidekiq?
55
+ defined?(Sidekiq::Testing) && Sidekiq::Testing.inline?
56
+ end
53
57
  end
54
58
 
55
59
  NewrelicSidekiqMetrics.add_client_middleware
@@ -10,14 +10,19 @@ module NewrelicSidekiqMetrics
10
10
  metrics.each { |m| record_metric(m) }
11
11
  end
12
12
 
13
+ private
14
+
13
15
  def stats
14
16
  @stats ||= Sidekiq::Stats.new
15
17
  end
16
18
 
17
- private
19
+ def get_stat(name)
20
+ return 0 if NewrelicSidekiqMetrics.inline_sidekiq?
21
+ stats.public_send(name)
22
+ end
18
23
 
19
24
  def record_metric(name)
20
- NewRelic::Agent.record_metric(metric_full_name(name), stats.public_send(name))
25
+ NewRelic::Agent.record_metric(metric_full_name(name), get_stat(name))
21
26
  end
22
27
 
23
28
  def metric_full_name(name)
@@ -1,3 +1,3 @@
1
1
  module NewrelicSidekiqMetrics
2
- VERSION = "1.1.1".freeze
2
+ VERSION = "1.2.0".freeze
3
3
  end
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  spec.required_ruby_version = '>= 2.6'
26
26
 
27
- spec.add_dependency 'newrelic_rpm', '~> 6.8'
27
+ spec.add_dependency 'newrelic_rpm', '~> 6.14'
28
28
  spec.add_dependency 'sidekiq', '~> 6.1'
29
29
 
30
30
  spec.add_development_dependency 'bundler'
@@ -32,6 +32,6 @@ Gem::Specification.new do |spec|
32
32
  spec.add_development_dependency 'rake'
33
33
  spec.add_development_dependency 'rspec'
34
34
  spec.add_development_dependency 'rubocop'
35
- spec.add_development_dependency 'rubocop-performance'
35
+ spec.add_development_dependency 'rubocop-rake'
36
36
  spec.add_development_dependency 'rubocop-rspec'
37
37
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic-sidekiq-metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krzysztof Knapik
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-09-02 00:00:00.000000000 Z
12
+ date: 2021-03-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: newrelic_rpm
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '6.8'
20
+ version: '6.14'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '6.8'
27
+ version: '6.14'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: sidekiq
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -110,7 +110,7 @@ dependencies:
110
110
  - !ruby/object:Gem::Version
111
111
  version: '0'
112
112
  - !ruby/object:Gem::Dependency
113
- name: rubocop-performance
113
+ name: rubocop-rake
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - ">="
@@ -145,12 +145,14 @@ executables: []
145
145
  extensions: []
146
146
  extra_rdoc_files: []
147
147
  files:
148
+ - ".bundler-version"
148
149
  - ".dependabot/config.yml"
149
150
  - ".github/ISSUE_TEMPLATE/bug_report.md"
150
151
  - ".github/ISSUE_TEMPLATE/config.yml"
151
152
  - ".github/ISSUE_TEMPLATE/story.md"
152
153
  - ".github/PULL_REQUEST_TEMPLATE.md"
153
154
  - ".github/workflows/auto-approve.yml"
155
+ - ".github/workflows/auto-merge.yml"
154
156
  - ".gitignore"
155
157
  - ".rspec"
156
158
  - ".travis.yml"
@@ -186,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
188
  - !ruby/object:Gem::Version
187
189
  version: '0'
188
190
  requirements: []
189
- rubygems_version: 3.1.2
191
+ rubygems_version: 3.2.15
190
192
  signing_key:
191
193
  specification_version: 4
192
194
  summary: Implements recording Sidekiq stats to New Relic metrics.