google-cloud-error_reporting 0.40.0 → 0.42.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: 452ba5aa7f919e40361ff114937df9378a02d14a420edf3966b9b2c9d283a7c2
4
- data.tar.gz: fca091beb1e8497cf3cdfdfda14bab9de60baf7df48ff9d6eb7b59fe6d521d40
3
+ metadata.gz: 9baa30ea8c65566f04434a7a0f289e45894997512a2e53f61273c7cc213d639f
4
+ data.tar.gz: 96746f9d6d989b951971111061a8a882bacde568bbe40e36b9de881b30731e67
5
5
  SHA512:
6
- metadata.gz: 64057bf9d228aa8632d6f69bf69293c5df32301a1b7efa959eb30f4aa6b7761fc5eeb3ae200141d3a48adea61b2a89282a47f2548b72d5303cb9b6cc8414edeb
7
- data.tar.gz: 52a6dbc6f51c0f93ed6e1928b461ee8440cc39f0b26705b32304397399a467b063fe9fc05df9c32b1b6b0b66ea26ab957ea64ef8110732e7cb8a19369781a611
6
+ metadata.gz: 0b33380396a904e3a46246b02740ef21e871ae47facb2502189417f52d0453455697ed37ef38bf1a7e19985a69fbc90b915050c19cb897b310dc86783eb83ccf
7
+ data.tar.gz: c1c87c88c61bac422ff558a5be6f9ab2878b95cd4fa6e523589b8c0decff89b8660ef2e90c474d6c2beec78ac886cab816a8838e6ce1083cd0dea584a3a65874
data/AUTHENTICATION.md CHANGED
@@ -96,7 +96,8 @@ client = Google::Cloud::ErrorReporting.new
96
96
 
97
97
  ### Configuration
98
98
 
99
- The **Project ID** and **Credentials JSON** can be configured instead of placing them in environment variables or providing them as arguments.
99
+ The **Project ID** and the path to the **Credentials JSON** file can be configured
100
+ instead of placing them in environment variables or providing them as arguments.
100
101
 
101
102
  ```ruby
102
103
  require "google/cloud/error_reporting"
data/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Release History
2
2
 
3
+ ### 0.42.2 / 2021-10-21
4
+
5
+ #### Documentation
6
+
7
+ * Add documentation for quota_project Configuration attribute
8
+
9
+ ### 0.42.1 / 2021-07-08
10
+
11
+ #### Documentation
12
+
13
+ * Update AUTHENTICATION.md in handwritten packages
14
+
15
+ ### 0.42.0 / 2021-03-10
16
+
17
+ #### Features
18
+
19
+ * Drop support for Ruby 2.4 and add support for Ruby 3.0
20
+
21
+ ### 0.41.0 / 2020-09-16
22
+
23
+ #### Features
24
+
25
+ * quota_project can be set via library configuration
26
+
3
27
  ### 0.40.0 / 2020-07-21
4
28
 
5
29
  This is a major update that removes the "low-level" client interface code, and
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
@@ -126,9 +126,7 @@ run the entire acceptance test suite. However, please ensure that you do
126
126
  successfully run acceptance tests for any code areas covered by your pull
127
127
  request.
128
128
 
129
- To run the acceptance tests, first create and configure a project in the Google
130
- Developers Console, as described in the {file:AUTHENTICATION.md Authentication
131
- guide}. Be sure to download the JSON KEY file. Make note of the PROJECT_ID and
129
+ To run the acceptance tests, first creat{file:AUTHENTICATION.md Authentication Guide}. Be sure to download the JSON KEY file. Make note of the PROJECT_ID and
132
130
  the KEYFILE location on your system.
133
131
 
134
132
  Before you can run the Error Reporting acceptance tests, you must first create
@@ -185,5 +183,4 @@ $ bundle exec rake rubocop
185
183
  ## Code of Conduct
186
184
 
187
185
  Please note that this project is released with a Contributor Code of Conduct. By
188
- participating in this project you agree to abide by its terms. See
189
- {file:CODE_OF_CONDUCT.md Code of Conduct} for more information.
186
+ participating in this project you agree to abide by its terms. See {file:CODE_OF_CONDUCT.md Code of Conduct} for more information.
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
data/OVERVIEW.md CHANGED
@@ -44,5 +44,4 @@ See the {file:INSTRUMENTATION.md Instrumentation Guide} for more examples.
44
44
 
45
45
  ## Additional information
46
46
 
47
- Stackdriver Error Reporting can be configured to use gRPC's logging. To learn more, see the
48
- {file:LOGGING.md Logging guide}.
47
+ Stackdriver Error Reporting can be configured to use gRPC's logging. To learn more, see the{file:LOGGING.md Logging guide}.
@@ -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
@@ -180,15 +180,10 @@ module Google
180
180
  ##
181
181
  # Fallback to default configuration values if not defined already
182
182
  def init_default_config
183
- configuration.project_id ||= begin
184
- (Cloud.configure.project_id ||
185
- ErrorReporting::Project.default_project_id)
186
- end
183
+ configuration.project_id ||= (Cloud.configure.project_id || ErrorReporting::Project.default_project_id)
187
184
  configuration.credentials ||= Cloud.configure.credentials
188
- configuration.service_name ||=
189
- ErrorReporting::Project.default_service_name
190
- configuration.service_version ||=
191
- ErrorReporting::Project.default_service_version
185
+ configuration.service_name ||= ErrorReporting::Project.default_service_name
186
+ configuration.service_version ||= ErrorReporting::Project.default_service_version
192
187
  configuration.ignore_classes = Array(configuration.ignore_classes)
193
188
  end
194
189
 
@@ -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.40.0".freeze
19
+ VERSION = "0.42.2".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -115,6 +115,8 @@ module Google
115
115
  # used.)
116
116
  # * `scope` - (String, Array<String>) The OAuth 2.0 scopes controlling
117
117
  # the set of resources and operations that the connection can access.
118
+ # * `quota_project` - (String) The project ID for a project that can be
119
+ # used by client libraries for quota and billing purposes.
118
120
  # * `timeout` - (Integer) Default timeout to use in requests.
119
121
  # * `endpoint` - (String) Override of the endpoint host name, or `nil`
120
122
  # to use the default endpoint.
@@ -150,6 +150,7 @@ Google::Cloud.configure.add_config! :error_reporting do |config|
150
150
  allow_nil: true
151
151
  config.add_alias! :keyfile, :credentials
152
152
  config.add_field! :scope, default_scopes, match: [String, Array]
153
+ config.add_field! :quota_project, nil, match: String
153
154
  config.add_field! :timeout, nil, match: Integer
154
155
  config.add_field! :endpoint, "clouderrorreporting.googleapis.com", match: String
155
156
  config.add_field! :service_name, default_service,
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.40.0
4
+ version: 0.42.2
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-07-21 00:00:00.000000000 Z
11
+ date: 2021-10-21 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.3
270
+ rubygems_version: 3.2.17
271
271
  signing_key:
272
272
  specification_version: 4
273
273
  summary: API Client library for Stackdriver Error Reporting