datadog-notifications 0.5.2 → 0.5.3

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: 89b0d05d17eb685b11111b4e51f084cd06c38be7260cd59b4ea1658acb5b370c
4
- data.tar.gz: f909fcf6911e90ef1f8edc4b52623eab019dda46e71d89be08ef9dbdd7270054
3
+ metadata.gz: fad10b73b565812d444474c765e3f8e1054776e7f35205ca0b3e1d81e79413ad
4
+ data.tar.gz: db63472562524db432806070e6c6c64f32fbf848eed7fd775761fb7fe0189cbe
5
5
  SHA512:
6
- metadata.gz: 2c9992a90617646fa85892acbba126395d378c052ee8250b16a02f0133fdaee6894c9c4ecbbb5043984f32b973b1fa5ba27d6dcb5a7573663569855abc3d97df
7
- data.tar.gz: eba72a1ee4d04b105666402ca7573a542197d4b58b062f41527590f46732651d04b5f18fa7c591862de2c88cbe08424f33a1114ad7e1ca65101bd7ae608779bb
6
+ metadata.gz: 7f872dfd2ea075f5e2562f81ff149a7e5434d603cbda8013d1faf323fa33800543fb48c5ef5434fe40f51b4bf3ef6baa71437dd73947dcf0131a3acd96da0000
7
+ data.tar.gz: b650ab31ce04c9383e88b4eda57cfd7d3d907ebd5b62a0e44ae8258b820131fbf721bbc3fd10927299bb328786e0f6580e42c17ff80d9dbb8b0bb356e70bbac5
@@ -1,6 +1,7 @@
1
1
  Naming/FileName:
2
2
  Exclude:
3
3
  - "lib/datadog-notifications.rb"
4
+ - "datadog-notifications.gemspec"
4
5
 
5
6
  Metrics/AbcSize:
6
7
  Enabled: false
@@ -1,6 +1,7 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.4
5
- - 2.3
6
- - 2.2
4
+ - 2.5.x
5
+ - 2.4.x
6
+ - 2.3.x
7
+ - 2.2.x
@@ -1,25 +1,25 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- datadog-notifications (0.5.2)
4
+ datadog-notifications (0.5.3)
5
5
  activesupport
6
6
  dogstatsd-ruby (~> 3.1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activemodel (5.1.6)
12
- activesupport (= 5.1.6)
13
- activerecord (5.1.6)
14
- activemodel (= 5.1.6)
15
- activesupport (= 5.1.6)
16
- arel (~> 8.0)
17
- activesupport (5.1.6)
11
+ activemodel (5.2.1)
12
+ activesupport (= 5.2.1)
13
+ activerecord (5.2.1)
14
+ activemodel (= 5.2.1)
15
+ activesupport (= 5.2.1)
16
+ arel (>= 9.0)
17
+ activesupport (5.2.1)
18
18
  concurrent-ruby (~> 1.0, >= 1.0.2)
19
19
  i18n (>= 0.7, < 2)
20
20
  minitest (~> 5.1)
21
21
  tzinfo (~> 1.1)
22
- arel (8.0.0)
22
+ arel (9.0.0)
23
23
  ast (2.4.0)
24
24
  axiom-types (0.1.1)
25
25
  descendants_tracker (~> 0.0.4)
@@ -34,57 +34,59 @@ GEM
34
34
  diff-lcs (1.3)
35
35
  dogstatsd-ruby (3.3.0)
36
36
  equalizer (0.0.11)
37
- grape (1.0.2)
37
+ grape (1.1.0)
38
38
  activesupport
39
39
  builder
40
40
  mustermann-grape (~> 1.0.0)
41
41
  rack (>= 1.3.0)
42
42
  rack-accept
43
43
  virtus (>= 1.0.0)
44
- i18n (1.0.0)
44
+ i18n (1.1.0)
45
45
  concurrent-ruby (~> 1.0)
46
46
  ice_nine (0.11.2)
47
+ jaro_winkler (1.5.1)
47
48
  minitest (5.11.3)
48
- mustermann (1.0.2)
49
+ mustermann (1.0.3)
49
50
  mustermann-grape (1.0.0)
50
51
  mustermann (~> 1.0.0)
51
52
  parallel (1.12.1)
52
- parser (2.5.0.5)
53
+ parser (2.5.1.2)
53
54
  ast (~> 2.4.0)
54
- powerpack (0.1.1)
55
- rack (2.0.4)
55
+ powerpack (0.1.2)
56
+ rack (2.0.5)
56
57
  rack-accept (0.4.5)
57
58
  rack (>= 0.4)
58
- rack-test (1.0.0)
59
+ rack-test (1.1.0)
59
60
  rack (>= 1.0, < 3)
60
61
  rainbow (3.0.0)
61
62
  rake (12.3.1)
62
- rspec (3.7.0)
63
- rspec-core (~> 3.7.0)
64
- rspec-expectations (~> 3.7.0)
65
- rspec-mocks (~> 3.7.0)
66
- rspec-core (3.7.1)
67
- rspec-support (~> 3.7.0)
68
- rspec-expectations (3.7.0)
63
+ rspec (3.8.0)
64
+ rspec-core (~> 3.8.0)
65
+ rspec-expectations (~> 3.8.0)
66
+ rspec-mocks (~> 3.8.0)
67
+ rspec-core (3.8.0)
68
+ rspec-support (~> 3.8.0)
69
+ rspec-expectations (3.8.1)
69
70
  diff-lcs (>= 1.2.0, < 2.0)
70
- rspec-support (~> 3.7.0)
71
- rspec-mocks (3.7.0)
71
+ rspec-support (~> 3.8.0)
72
+ rspec-mocks (3.8.0)
72
73
  diff-lcs (>= 1.2.0, < 2.0)
73
- rspec-support (~> 3.7.0)
74
- rspec-support (3.7.1)
75
- rubocop (0.54.0)
74
+ rspec-support (~> 3.8.0)
75
+ rspec-support (3.8.0)
76
+ rubocop (0.59.0)
77
+ jaro_winkler (~> 1.5.1)
76
78
  parallel (~> 1.10)
77
- parser (>= 2.5)
79
+ parser (>= 2.5, != 2.5.1.1)
78
80
  powerpack (~> 0.1)
79
81
  rainbow (>= 2.2.2, < 4.0)
80
82
  ruby-progressbar (~> 1.7)
81
83
  unicode-display_width (~> 1.0, >= 1.0.1)
82
- ruby-progressbar (1.9.0)
84
+ ruby-progressbar (1.10.0)
83
85
  sqlite3 (1.3.13)
84
86
  thread_safe (0.3.6)
85
87
  tzinfo (1.2.5)
86
88
  thread_safe (~> 0.1)
87
- unicode-display_width (1.3.0)
89
+ unicode-display_width (1.4.0)
88
90
  virtus (1.0.5)
89
91
  axiom-types (~> 0.1)
90
92
  coercible (~> 1.0)
@@ -106,4 +108,4 @@ DEPENDENCIES
106
108
  sqlite3
107
109
 
108
110
  BUNDLED WITH
109
- 1.16.3
111
+ 1.16.4
@@ -1,4 +1,3 @@
1
-
2
1
  lib = File.expand_path('lib', __dir__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'datadog/notifications/version'
@@ -68,10 +68,10 @@ module Datadog
68
68
  end
69
69
  end
70
70
 
71
+ private
72
+
71
73
  def reporter
72
74
  @reporter ||= config.send(:connect!)
73
75
  end
74
- private :reporter
75
-
76
76
  end
77
77
  end
@@ -18,6 +18,8 @@ module Datadog
18
18
  @plugins.push klass.new(opts)
19
19
  end
20
20
 
21
+ protected
22
+
21
23
  def connect!
22
24
  env = ENV['RAILS_ENV'] || ENV['RACK_ENV']
23
25
  tags.push("env:#{env}") if env && tags.none? {|t| t =~ /^env\:/ }
@@ -27,7 +29,6 @@ module Datadog
27
29
 
28
30
  reporter.new statsd_host, statsd_port, namespace: namespace, tags: tags, socket_path: socket_path
29
31
  end
30
- protected :connect!
31
32
 
32
33
  end
33
34
  end
@@ -47,10 +47,10 @@ module Datadog::Notifications::Plugins
47
47
 
48
48
  def extract_path(endpoint)
49
49
  route = begin
50
- endpoint.route
51
- rescue NoMethodError
52
- nil
53
- end
50
+ endpoint.route
51
+ rescue NoMethodError
52
+ nil
53
+ end
54
54
  return endpoint.request.path unless route
55
55
 
56
56
  path = endpoint.route.path.dup
@@ -29,8 +29,8 @@ module Datadog::Notifications::Plugins
29
29
  tags = self.tags + %W[action:#{action} status:#{status}]
30
30
 
31
31
  reporter.batch do
32
- reporter.increment metric_name, tags: tags
33
- reporter.timing "#{metric_name}.time", event.duration, tags: tags
32
+ reporter.increment @metric_name, tags: tags
33
+ reporter.timing "#{@metric_name}.time", event.duration, tags: tags
34
34
  end
35
35
  end
36
36
 
@@ -1,5 +1,5 @@
1
1
  module Datadog
2
2
  class Notifications
3
- VERSION = '0.5.2'.freeze
3
+ VERSION = '0.5.3'.freeze
4
4
  end
5
5
  end
@@ -4,23 +4,18 @@ describe Datadog::Notifications::Plugins::ActiveRecord do
4
4
 
5
5
  it 'should send an increment and timing event for each query' do
6
6
  Post.all.to_a
7
- expect(buffered).to eq([
7
+ expect(buffered).to eq [
8
8
  "activerecord.sql:1|c|#custom:tag,env:test,host:test.host,query:post.load",
9
9
  "activerecord.sql.time:333|ms|#custom:tag,env:test,host:test.host,query:post.load",
10
- ],)
11
- end
12
-
13
- it 'should skip unnamed by default' do
14
- Post.create!(title: "Hello!")
15
- expect(buffered).to eq([])
10
+ ]
16
11
  end
17
12
 
18
13
  it 'should support custom queries' do
19
14
  Post.find_by_sql("SELECT * FROM posts LIMIT 1").to_a
20
- expect(buffered).to eq([
15
+ expect(buffered).to eq [
21
16
  "activerecord.sql:1|c|#custom:tag,env:test,host:test.host,query:post.load",
22
17
  "activerecord.sql.time:333|ms|#custom:tag,env:test,host:test.host,query:post.load",
23
- ],)
18
+ ]
24
19
  end
25
20
 
26
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datadog-notifications
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dimitrij Denissenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-07 00:00:00.000000000 Z
11
+ date: 2018-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -203,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
203
  version: '0'
204
204
  requirements: []
205
205
  rubyforge_project:
206
- rubygems_version: 2.7.7
206
+ rubygems_version: 2.7.6
207
207
  signing_key:
208
208
  specification_version: 4
209
209
  summary: Generic ActiveSupport::Notifications Datadog handler