google-cloud-error_reporting 0.41.0 → 0.42.0

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
  SHA256:
3
- metadata.gz: 7080f166c147060de68fa3f443bcc9c4e16963c1098001ecc624daac50f3f79d
4
- data.tar.gz: 71a23d0587d3bb4ce68bad190aafa82004307cabacfef6a235b440ec1466e906
3
+ metadata.gz: 9d0236b7db5323c5ab86adccc9a0fcad7db65080f4a7ff47142fd6645cc50008
4
+ data.tar.gz: bda4d6819f6a6063097a4874b80a939dbc13afe32531cac53488a3f5019a7045
5
5
  SHA512:
6
- metadata.gz: 7eca6a6c72f98c8b7ce1af403e732588f71753328a79a500480104298c112ae10d276a3aa36350a7d169ecdb9c97e221ac4a4b3cfda37a779782c5d220af327f
7
- data.tar.gz: 4b95d622ddfc1f36555374f7e24a0fe561cadaa6b32d4d5521b7f9b95f7a375e375f1565f99b468ce07ccfe2d540c65c61af85c643cb3e576ae2abfd8c25b097
6
+ metadata.gz: 70094df759c28f7ce883dc90d35bd1a820171ce41ddc03ea06f4b8f504f3f43891ecfb10e225d11d5de9224842e243c4f14e0b980f035a1e70edc2032ba98352
7
+ data.tar.gz: 4a2c39a5ee27364915bd340296f52dc5554c7e8f8a703c0bd3922b3b711e6ae87e9f44df0837bdb41bf7980c1377a0261624fac8723dc4f4c4ff24a475d3007d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 0.42.0 / 2021-03-10
4
+
5
+ #### Features
6
+
7
+ * Drop support for Ruby 2.4 and add support for Ruby 3.0
8
+
3
9
  ### 0.41.0 / 2020-09-16
4
10
 
5
11
  #### Features
data/CONTRIBUTING.md CHANGED
@@ -24,7 +24,7 @@ be able to accept your pull requests.
24
24
  In order to use the google-cloud-error_reporting console and run the project's
25
25
  tests, there is a small amount of setup:
26
26
 
27
- 1. Install Ruby. google-cloud-error_reporting requires Ruby 2.4+. You may choose
27
+ 1. Install Ruby. google-cloud-error_reporting requires Ruby 2.5+. You may choose
28
28
  to manage your Ruby and gem installations with [RVM](https://rvm.io/),
29
29
  [rbenv](https://github.com/rbenv/rbenv), or
30
30
  [chruby](https://github.com/postmodern/chruby).
@@ -45,7 +45,7 @@ tests, there is a small amount of setup:
45
45
 
46
46
  ```sh
47
47
  $ cd google-cloud-error_reporting/
48
- $ bundle exec rake bundleupdate
48
+ $ bundle install
49
49
  ```
50
50
 
51
51
  ## Console
data/LOGGING.md CHANGED
@@ -3,7 +3,7 @@
3
3
  To enable logging for this library, set the logger for the underlying
4
4
  [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. The logger
5
5
  that you set may be a Ruby stdlib
6
- [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as
6
+ [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as
7
7
  shown below, or a
8
8
  [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
9
9
  that will write logs to [Stackdriver
@@ -108,7 +108,7 @@ module Google
108
108
  #
109
109
  # @return [AsyncErrorReporter] returns self so calls can be chained.
110
110
  def stop
111
- @thread_pool.shutdown if @thread_pool
111
+ @thread_pool&.shutdown
112
112
 
113
113
  self
114
114
  end
@@ -145,7 +145,7 @@ module Google
145
145
  # @return [boolean] `true` when started, `false` otherwise.
146
146
  #
147
147
  def started?
148
- @thread_pool.running? if @thread_pool
148
+ @thread_pool&.running?
149
149
  end
150
150
 
151
151
  ##
@@ -50,7 +50,7 @@ module Google
50
50
  require "rack/request"
51
51
  @app = app
52
52
 
53
- load_config kwargs
53
+ load_config(**kwargs)
54
54
 
55
55
  @error_reporting =
56
56
  error_reporting ||
@@ -86,11 +86,11 @@ module Google
86
86
  end
87
87
 
88
88
  response
89
- rescue Exception => exception
90
- report_exception env, exception
89
+ rescue Exception => e
90
+ report_exception env, e
91
91
 
92
92
  # Always raise exception backup
93
- raise exception
93
+ raise e
94
94
  end
95
95
 
96
96
  ##
@@ -112,7 +112,7 @@ module Google
112
112
  # If this exception maps to a HTTP status code less than 500, do
113
113
  # not report it.
114
114
  status_code = error_event.http_status.to_i
115
- return if status_code > 0 && status_code < 500
115
+ return if status_code.positive? && status_code < 500
116
116
 
117
117
  error_reporting.report error_event
118
118
  end
@@ -151,13 +151,13 @@ module Google
151
151
  ErrorReporting::Credentials.new credentials
152
152
  end
153
153
  rescue StandardError => e
154
- STDOUT.puts "Note: Google::Cloud::ErrorReporting is disabled " \
154
+ $stdout.puts "Note: Google::Cloud::ErrorReporting is disabled " \
155
155
  "because it failed to authorize with the service. (#{e.message})"
156
156
  return false
157
157
  end
158
158
 
159
159
  if project_id.to_s.empty?
160
- STDOUT.puts "Note: Google::Cloud::ErrorReporting is disabled " \
160
+ $stdout.puts "Note: Google::Cloud::ErrorReporting is disabled " \
161
161
  "because the project ID could not be determined."
162
162
  return false
163
163
  end
@@ -25,7 +25,10 @@ module Google
25
25
  # @private Represents the gRPC Error Reporting service, including all the
26
26
  # API methods.
27
27
  class Service
28
- attr_accessor :project, :credentials, :timeout, :host
28
+ attr_accessor :project
29
+ attr_accessor :credentials
30
+ attr_accessor :timeout
31
+ attr_accessor :host
29
32
 
30
33
  ##
31
34
  # Creates a new Service instance.
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module ErrorReporting
19
- VERSION = "0.41.0".freeze
19
+ VERSION = "0.42.0".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-error_reporting
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.41.0
4
+ version: 0.42.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-16 00:00:00.000000000 Z
11
+ date: 2021-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 1.24.0
75
+ version: 1.25.1
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 1.24.0
82
+ version: 1.25.1
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: minitest
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -260,14 +260,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
260
260
  requirements:
261
261
  - - ">="
262
262
  - !ruby/object:Gem::Version
263
- version: '2.4'
263
+ version: '2.5'
264
264
  required_rubygems_version: !ruby/object:Gem::Requirement
265
265
  requirements:
266
266
  - - ">="
267
267
  - !ruby/object:Gem::Version
268
268
  version: '0'
269
269
  requirements: []
270
- rubygems_version: 3.1.4
270
+ rubygems_version: 3.2.13
271
271
  signing_key:
272
272
  specification_version: 4
273
273
  summary: API Client library for Stackdriver Error Reporting