sentry-ruby 4.1.0 → 4.1.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
  SHA256:
3
- metadata.gz: 517c3e0bc0ab170dbd508034bf74b3a9ba62a1a32f13a992ba84d65f81249e01
4
- data.tar.gz: 8a86690e05e1695f15e2da33002ecd52b4596ef8dbd2e9c0a7461f94a8868906
3
+ metadata.gz: 4cf12a695558927106256af0d85575b36bf2675b1ba87cf13baec2e40354055f
4
+ data.tar.gz: 418475b2abe315f62b642d38ced99b6c16b78ffa1fef7ef645203bf46dff72e9
5
5
  SHA512:
6
- metadata.gz: 3cc45e503a6ed19a5cc507ab0791087e432b612581498e84403fd806e0d9538ff02f57c2fbb64294ba9895514218bca05610f637a8708a752e6eaf42fa61bfaa
7
- data.tar.gz: 9eb027f449b6bdee43316e3b78364d1680d56442b5f34ec82b49059a9f28418a51448e24e45318efb022e526b62e067e410a8e78eb3b67678f1e18ce46866004
6
+ metadata.gz: f4b5c90aad8d0249c29e901beb3569d4e0a89c53d35f8da459e97eb4134b989728c89ebc913b59f0db1b85c1903beedfcfb5968d5833d3fc2d5a6d209308212c
7
+ data.tar.gz: 86acbab302abb4d2cd66c9cc447486dcbebef127bbfbc03df69f2085057965166c3afc6a3f969d046b157255d1e88d54f85e7fac5581daa112e798eda04db2c7
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.1.1
4
+
5
+ - Fix NoMethodError when sending is not allowed [#1161](https://github.com/getsentry/sentry-ruby/pull/1161)
6
+ - Add notification for users who still use deprecated middlewares [#1160](https://github.com/getsentry/sentry-ruby/pull/1160)
7
+ - Improve top-level api safety [#1161](https://github.com/getsentry/sentry-ruby/pull/1161)
8
+
3
9
  ## 4.1.0
4
10
 
5
11
  - Separate rack integration [#1138](https://github.com/getsentry/sentry-ruby/pull/1138)
@@ -79,7 +79,7 @@ module Sentry
79
79
  end
80
80
 
81
81
  def get_current_client
82
- get_current_hub.current_client
82
+ get_current_hub&.current_client
83
83
  end
84
84
 
85
85
  def get_current_hub
@@ -96,15 +96,15 @@ module Sentry
96
96
  end
97
97
 
98
98
  def get_current_scope
99
- get_current_hub.current_scope
99
+ get_current_hub&.current_scope
100
100
  end
101
101
 
102
102
  def with_scope(&block)
103
- get_current_hub.with_scope(&block)
103
+ get_current_hub&.with_scope(&block)
104
104
  end
105
105
 
106
106
  def configure_scope(&block)
107
- get_current_hub.configure_scope(&block)
107
+ get_current_hub&.configure_scope(&block)
108
108
  end
109
109
 
110
110
  def send_event(event)
@@ -112,23 +112,23 @@ module Sentry
112
112
  end
113
113
 
114
114
  def capture_event(event)
115
- get_current_hub.capture_event(event)
115
+ get_current_hub&.capture_event(event)
116
116
  end
117
117
 
118
118
  def capture_exception(exception, **options, &block)
119
- get_current_hub.capture_exception(exception, **options, &block)
119
+ get_current_hub&.capture_exception(exception, **options, &block)
120
120
  end
121
121
 
122
122
  def capture_message(message, **options, &block)
123
- get_current_hub.capture_message(message, **options, &block)
123
+ get_current_hub&.capture_message(message, **options, &block)
124
124
  end
125
125
 
126
126
  def start_transaction(**options)
127
- get_current_hub.start_transaction(**options)
127
+ get_current_hub&.start_transaction(**options)
128
128
  end
129
129
 
130
130
  def last_event_id
131
- get_current_hub.last_event_id
131
+ get_current_hub&.last_event_id
132
132
  end
133
133
 
134
134
  def sys_command(command)
@@ -21,7 +21,7 @@ module Sentry
21
21
  end
22
22
 
23
23
  def capture_event(event, scope, hint = {})
24
- return false unless configuration.sending_allowed?
24
+ return unless configuration.sending_allowed?
25
25
 
26
26
  scope.apply_to_event(event, hint)
27
27
 
@@ -110,7 +110,7 @@ module Sentry
110
110
 
111
111
  event = current_client.capture_event(event, scope, hint)
112
112
 
113
- @last_event_id = event.event_id
113
+ @last_event_id = event&.event_id
114
114
  event
115
115
  end
116
116
 
@@ -2,3 +2,4 @@ require 'rack'
2
2
 
3
3
  require 'sentry/rack/capture_exceptions'
4
4
  require 'sentry/rack/interface'
5
+ require 'sentry/rack/deprecations'
@@ -0,0 +1,19 @@
1
+ module Sentry
2
+ module Rack
3
+ class DeprecatedMiddleware
4
+ def initialize(_)
5
+ raise Sentry::Error.new <<~MSG
6
+
7
+ You're seeing this message because #{self.class} has been replaced by Sentry::Rack::CaptureExceptions.
8
+ Removing this middleware from your app and upgrading sentry-rails to 4.1.0+ should solve the issue.
9
+ MSG
10
+ end
11
+ end
12
+
13
+ class Tracing < DeprecatedMiddleware
14
+ end
15
+
16
+ class CaptureException < DeprecatedMiddleware
17
+ end
18
+ end
19
+ end
@@ -1,3 +1,3 @@
1
1
  module Sentry
2
- VERSION = "4.1.0"
2
+ VERSION = "4.1.1"
3
3
  end
@@ -23,5 +23,5 @@ Gem::Specification.new do |spec|
23
23
  spec.require_paths = ["lib"]
24
24
 
25
25
  spec.add_dependency "faraday", ">= 1.0"
26
- spec.add_dependency "concurrent-ruby"
26
+ spec.add_dependency "concurrent-ruby", '~> 1.0', '>= 1.0.2'
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentry-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 4.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sentry Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-18 00:00:00.000000000 Z
11
+ date: 2020-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -28,16 +28,22 @@ dependencies:
28
28
  name: concurrent-ruby
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.0'
31
34
  - - ">="
32
35
  - !ruby/object:Gem::Version
33
- version: '0'
36
+ version: 1.0.2
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
41
+ - - "~>"
42
+ - !ruby/object:Gem::Version
43
+ version: '1.0'
38
44
  - - ">="
39
45
  - !ruby/object:Gem::Version
40
- version: '0'
46
+ version: 1.0.2
41
47
  description: A gem that provides a client interface for the Sentry error logger
42
48
  email: accounts@sentry.io
43
49
  executables: []
@@ -81,6 +87,7 @@ files:
81
87
  - lib/sentry/logger.rb
82
88
  - lib/sentry/rack.rb
83
89
  - lib/sentry/rack/capture_exceptions.rb
90
+ - lib/sentry/rack/deprecations.rb
84
91
  - lib/sentry/rack/interface.rb
85
92
  - lib/sentry/rake.rb
86
93
  - lib/sentry/scope.rb