airbrake-ruby 4.5.0 → 4.5.1

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
  SHA1:
3
- metadata.gz: b9aea7ecb085e30e5e237e2a2299265d1df6b950
4
- data.tar.gz: 7d2a2130e69749306f0792eb786237122b0bd514
3
+ metadata.gz: ffbab1be170a9aef318ba4f64637e80a8d272c4a
4
+ data.tar.gz: c79758680cc22faea98b5d93877a7c46a26949e4
5
5
  SHA512:
6
- metadata.gz: c78add83dd9ec84df8f1031ba1233a85eac988ce3c57cbd08b419ec67f7f609fe54ceaf16669dd3a0d80d24621a8254693604e264e8213ce9bd826ad1f16588d
7
- data.tar.gz: 61587145c472a7be1a62ace1cb426f7aa766318676c4999b3fabb6570aaf813d181f5e553ae17edf7e1c08e8f9b99bda5693f682595c7489b22c55653175bd4b
6
+ metadata.gz: 057622e0593896c5acbe522e1e248f37fcbafdf64f7d9cfed980a19bbfa0da07e07e46091d1feaa5a4a42890078f5e4acc99b85cfaea00d7919b3469046f171a
7
+ data.tar.gz: 859ab7e7f71ce69259481901f289746ac1cb2148a2690c8134db1cab087935d2e2944d2f821c875b7aeed41cfb0226fcb73399ffe247da373d23a7e5ec3993bd
@@ -82,7 +82,7 @@ module Airbrake
82
82
  signature = "#{self.class.name}##{__method__}"
83
83
  raise "#{signature}: payload (#{payload}) cannot be empty. Race?" if payload.none?
84
84
 
85
- logger.debug("#{LOG_LABEL} #{signature}: #{payload}")
85
+ logger.debug { "#{LOG_LABEL} #{signature}: #{payload}" }
86
86
 
87
87
  with_grouped_payload(payload) do |resource_hash, destination|
88
88
  url = URI.join(
@@ -1,5 +1,6 @@
1
1
  require 'base64'
2
2
 
3
+ # rubocop:disable Metrics/BlockLength
3
4
  module Airbrake
4
5
  # Stat is a data structure that allows accumulating performance data (route
5
6
  # performance, SQL query performance and such). It's powered by TDigests.
@@ -58,5 +59,15 @@ module Airbrake
58
59
 
59
60
  tdigest.push(ms)
60
61
  end
62
+
63
+ # We define custom inspect so that we weed out uninformative TDigest, which
64
+ # is also very slow to dump when we log Airbrake::Stat.
65
+ #
66
+ # @return [String]
67
+ def inspect
68
+ "#<struct Airbrake::Stat count=#{count}, sum=#{sum}, sumsq=#{sumsq}>"
69
+ end
70
+ alias_method :pretty_print, :inspect
61
71
  end
62
72
  end
73
+ # rubocop:enable Metrics/BlockLength
@@ -2,5 +2,5 @@
2
2
  # More information: http://semver.org/
3
3
  module Airbrake
4
4
  # @return [String] the library version
5
- AIRBRAKE_RUBY_VERSION = '4.5.0'.freeze
5
+ AIRBRAKE_RUBY_VERSION = '4.5.1'.freeze
6
6
  end
@@ -30,4 +30,18 @@ RSpec.describe Airbrake::Stat do
30
30
  expect(subject.tdigest.size).to eq(1)
31
31
  end
32
32
  end
33
+
34
+ describe "#inspect" do
35
+ it "provides custom inspect output" do
36
+ expect(subject.inspect).to eq(
37
+ '#<struct Airbrake::Stat count=0, sum=0.0, sumsq=0.0>'
38
+ )
39
+ end
40
+ end
41
+
42
+ describe "#pretty_print" do
43
+ it "is an alias of #inspect" do
44
+ expect(subject.method(:pretty_print)).to eql(subject.method(:inspect))
45
+ end
46
+ end
33
47
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: airbrake-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.5.0
4
+ version: 4.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Airbrake Technologies, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-25 00:00:00.000000000 Z
11
+ date: 2019-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbtree3
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  version: '0'
156
156
  requirements: []
157
157
  rubyforge_project:
158
- rubygems_version: 2.6.13
158
+ rubygems_version: 2.6.14.4
159
159
  signing_key:
160
160
  specification_version: 4
161
161
  summary: Ruby notifier for https://airbrake.io