sentry-ruby-core 4.4.0 → 4.4.2

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: a6ec50e2aac42f99230cb5a3f78970b057535aae4d31b1dd94e18b0fdf8995be
4
- data.tar.gz: 162dc5844575766403454816354ec4b93ac0c05950c44251963fdcbea685f8e4
3
+ metadata.gz: 46eeab9b7fdc33dd16bbcdd3c7623dcffdc2e70d1c9af0016c4584a08bf743dd
4
+ data.tar.gz: 0ebfed842099817048aeb8754f27dfd7e637a66d8b9f64267bd1953cbd1f9645
5
5
  SHA512:
6
- metadata.gz: bed995802c6f5b4c628071283aacd5f9804ec1a963202fb2cf63170bc5c3bf75a16dcebc64520aa5b209bbef6042765456df9ff012512b66ba95261553732d1b
7
- data.tar.gz: da726d263583d1db7f5c163cfb5c4e947e3cd4145e512229f37ca8e2a416c62b2284a1a465d26af1155be12ccaf053e93ec74968aff415cca544ff71140e8038
6
+ metadata.gz: 76284658bda5c4856caf4017046d7f1d6481a11d9287ab0b9ac8363248d1606c7b7a274c9018b56db33062682ceac0f090d614b154048d9e17da4b0a11c98de1
7
+ data.tar.gz: 3462df382685823d4cd77ac0278644144b0570c04f15db4b2a58d591de8cb25fe3762f222adaf4bb990934c476bfc49b18dfc072021e96bb3f50943caa3dceca
data/.craft.yml CHANGED
@@ -26,4 +26,3 @@ targets:
26
26
  - name: github
27
27
  onlyIfPresent: /^sentry-ruby-core-\d.*\.gem$/
28
28
  tagPrefix: sentry-ruby-v
29
- changelog: sentry-ruby/CHANGELOG.md
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.4.2
4
+
5
+ - Fix NoMethodError when SDK's dsn is nil [#1433](https://github.com/getsentry/sentry-ruby/pull/1433)
6
+ - fix: Update protocol version to 7 [#1434](https://github.com/getsentry/sentry-ruby/pull/1434)
7
+ - Fixes [#867](https://github.com/getsentry/sentry-ruby/issues/867)
8
+
9
+ ## 4.4.1
10
+
11
+ - Apply patches when initializing the SDK [#1432](https://github.com/getsentry/sentry-ruby/pull/1432)
12
+
3
13
  ## 4.4.0
4
14
 
5
15
  ### Features
data/lib/sentry-ruby.rb CHANGED
@@ -7,7 +7,6 @@ require "sentry/exceptions"
7
7
  require "sentry/core_ext/object/deep_dup"
8
8
  require "sentry/utils/argument_checking_helper"
9
9
  require "sentry/utils/logging_helper"
10
- require "sentry/net/http"
11
10
  require "sentry/configuration"
12
11
  require "sentry/logger"
13
12
  require "sentry/event"
@@ -64,9 +63,26 @@ module Sentry
64
63
 
65
64
  attr_accessor :background_worker
66
65
 
66
+ @@registered_patches = []
67
+
68
+ def register_patch(&block)
69
+ registered_patches << block
70
+ end
71
+
72
+ def apply_patches(config)
73
+ registered_patches.each do |patch|
74
+ patch.call(config)
75
+ end
76
+ end
77
+
78
+ def registered_patches
79
+ @@registered_patches
80
+ end
81
+
67
82
  def init(&block)
68
83
  config = Configuration.new
69
84
  yield(config) if block_given?
85
+ apply_patches(config)
70
86
  client = Client.new(config)
71
87
  scope = Scope.new(max_breadcrumbs: config.max_breadcrumbs)
72
88
  hub = Hub.new(client, scope)
@@ -190,3 +206,6 @@ module Sentry
190
206
  end
191
207
  end
192
208
  end
209
+
210
+ # patches
211
+ require "sentry/net/http"
@@ -71,8 +71,8 @@ module Sentry
71
71
  end
72
72
 
73
73
  def from_sentry_sdk?
74
- dsn_host = Sentry.configuration.dsn.host
75
- dsn_host == self.address
74
+ dsn = Sentry.configuration.dsn
75
+ dsn && dsn.host == self.address
76
76
  end
77
77
 
78
78
  def extract_request_info(req)
@@ -84,4 +84,7 @@ module Sentry
84
84
  end
85
85
  end
86
86
 
87
- Net::HTTP.send(:prepend, Sentry::Net::HTTP)
87
+ Sentry.register_patch do
88
+ patch = Sentry::Net::HTTP
89
+ Net::HTTP.send(:prepend, patch) unless Net::HTTP.ancestors.include?(patch)
90
+ end
@@ -3,7 +3,7 @@ require "base64"
3
3
 
4
4
  module Sentry
5
5
  class Transport
6
- PROTOCOL_VERSION = '5'
6
+ PROTOCOL_VERSION = '7'
7
7
  USER_AGENT = "sentry-ruby/#{Sentry::VERSION}"
8
8
 
9
9
  include LoggingHelper
@@ -1,3 +1,3 @@
1
1
  module Sentry
2
- VERSION = "4.4.0"
2
+ VERSION = "4.4.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentry-ruby-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.0
4
+ version: 4.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sentry Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-03 00:00:00.000000000 Z
11
+ date: 2021-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday