airbrake-ruby 4.5.0-java → 4.5.1-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d4e58a8ab700b97a73bb42e4dbbecdb34b383607
4
- data.tar.gz: 7d2a2130e69749306f0792eb786237122b0bd514
3
+ metadata.gz: ae44df864962487a4dbe1a4df872256599657094
4
+ data.tar.gz: c79758680cc22faea98b5d93877a7c46a26949e4
5
5
  SHA512:
6
- metadata.gz: 795644660b305c160cdc8e94efd72c803112680ad65a5229516ac2a0faab59cd346ede0a1c264932adc7a0f1c412fbaeb5347f9d9181fe5fc3f8dcd3ee485192
7
- data.tar.gz: 61587145c472a7be1a62ace1cb426f7aa766318676c4999b3fabb6570aaf813d181f5e553ae17edf7e1c08e8f9b99bda5693f682595c7489b22c55653175bd4b
6
+ metadata.gz: db8be8324e647e5bfc46741fced926b455407abbc5ddbe9da353e6adb95d4226ebe0c0c29b12c3f4c214d8ea2de260b014e647435a9f1fff6db0cf12f444efe8
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
data/spec/stat_spec.rb CHANGED
@@ -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: java
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: rbtree-jruby
@@ -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