google-cloud-logging 2.2.1 → 2.3.1

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: 452b43b8ed4bf36f7df5058920f99eefd06978661388e083c5c44438895074d8
4
- data.tar.gz: 51144e1b89a09fa84f8b5f414e2753cff9dd2e0063f3e1440873af1176757d85
3
+ metadata.gz: fa5e9177bed7ff2feb86c315d5909c2a4b5a62d737d97013255fce17280fac59
4
+ data.tar.gz: 5ffed5d6b74634499303c00fdcd1173a323343b858e43eaa656d09a2b416dff9
5
5
  SHA512:
6
- metadata.gz: 4a0e137ad75408c8c439982470b86384c3d74fc2e2c15a21a0ded9901b1f06b95294ab13af432dc6ae97638a5a5fa37cfffcbc476f5a499a4711b08af5ae4b0a
7
- data.tar.gz: a51c965c7c1c975fde5e4052b0a34cf6093fff0f5d4c942ec4a067af7e850a223705e72be3cafc3b047bbc35acdb7838f390745268999b130a8801e5d38fc926
6
+ metadata.gz: b10024972a427273f729a219b734af80ad62ec6d5b94bf9e1064a8c30c4f145316df900399ecc07387d10b517ac7cb00b7422868a9493494ae2820f20ea824db
7
+ data.tar.gz: '073670209591e5b9dab798cb87f1f505b835f4775221f4923234f2700a0606987a1851dc5b958fc49ccde47915cbb196e53ca46461e28e2f6a560a82d24ec019'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Release History
2
2
 
3
+ ### 2.3.1 (2022-07-24)
4
+
5
+ #### Bug Fixes
6
+
7
+ * update resource descriptor to handle paged enum ([#18856](https://github.com/googleapis/google-cloud-ruby/issues/18856))
8
+
9
+ ### 2.3.0 (2022-06-30)
10
+
11
+ #### Features
12
+
13
+ * Update minimum Ruby version to 2.6 ([#18444](https://github.com/googleapis/google-cloud-ruby/issues/18444))
14
+
15
+ ### 2.2.2 / 2021-10-21
16
+
17
+ #### Documentation
18
+
19
+ * Add documentation for quota_project Configuration attribute
20
+
3
21
  ### 2.2.1 / 2021-07-08
4
22
 
5
23
  #### Documentation
@@ -24,7 +24,7 @@ module Google
24
24
  def self.hash_to_struct hash
25
25
  # TODO: ArgumentError if hash is not a Hash
26
26
  Google::Protobuf::Struct.new \
27
- fields: Hash[hash.map { |k, v| [String(k), object_to_value(v)] }]
27
+ fields: hash.to_h { |k, v| [String(k), object_to_value(v)] }
28
28
  end
29
29
 
30
30
  ##
@@ -65,8 +65,7 @@ module Google
65
65
  if map.respond_to? :to_h
66
66
  map.to_h
67
67
  else
68
- # Enumerable doesn't have to_h on ruby 2.0...
69
- Hash[map.to_a]
68
+ map.to_a.to_h
70
69
  end
71
70
  end
72
71
  end
@@ -487,10 +487,10 @@ module Google
487
487
  def labels_grpc
488
488
  return {} if labels.nil?
489
489
  # Coerce symbols to strings
490
- Hash[labels.map do |k, v|
490
+ labels.to_h do |k, v|
491
491
  v = String(v) if v.is_a? Symbol
492
492
  [String(k), v]
493
- end]
493
+ end
494
494
  end
495
495
 
496
496
  ##
@@ -205,15 +205,15 @@ module Google
205
205
  end
206
206
  rescue Exception => e # rubocop:disable Lint/RescueException
207
207
  $stdout.puts "Note: Google::Cloud::Logging is disabled because " \
208
- "it failed to authorize with the service. (#{e.message}) " \
209
- "Falling back to the default Rails logger."
208
+ "it failed to authorize with the service. (#{e.message}) " \
209
+ "Falling back to the default Rails logger."
210
210
  return false
211
211
  end
212
212
 
213
213
  if project_id.to_s.empty?
214
214
  $stdout.puts "Note: Google::Cloud::Logging is disabled because " \
215
- "the project ID could not be determined. " \
216
- "Falling back to the default Rails logger."
215
+ "the project ID could not be determined. " \
216
+ "Falling back to the default Rails logger."
217
217
  return false
218
218
  end
219
219
 
@@ -66,7 +66,7 @@ module Google
66
66
  return nil if empty?
67
67
  Google::Api::MonitoredResource.new(
68
68
  type: type,
69
- labels: Hash[labels.map { |k, v| [String(k), String(v)] }]
69
+ labels: labels.to_h { |k, v| [String(k), String(v)] }
70
70
  )
71
71
  end
72
72
 
@@ -102,7 +102,7 @@ module Google
102
102
  entry.log_name = log_path entry.log_name
103
103
  end
104
104
  resource = resource.to_grpc if resource
105
- labels = Hash[labels.map { |k, v| [String(k), String(v)] }] if labels
105
+ labels = labels.to_h { |k, v| [String(k), String(v)] } if labels
106
106
  logging.write_log_entries entries: entries,
107
107
  log_name: log_path(log_name),
108
108
  resource: resource,
@@ -123,7 +123,8 @@ module Google
123
123
  end
124
124
 
125
125
  def list_resource_descriptors token: nil, max: nil
126
- logging.list_monitored_resource_descriptors page_size: max, page_token: token
126
+ paged_enum = logging.list_monitored_resource_descriptors page_size: max, page_token: token
127
+ paged_enum.response
127
128
  end
128
129
 
129
130
  def list_sinks token: nil, max: nil
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Logging
19
- VERSION = "2.2.1".freeze
19
+ VERSION = "2.3.1".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -124,6 +124,8 @@ module Google
124
124
  # parameter `keyfile` is considered deprecated, but may also be used.)
125
125
  # * `scope` - (String, Array<String>) The OAuth 2.0 scopes controlling
126
126
  # the set of resources and operations that the connection can access.
127
+ # * `quota_project` - (String) The project ID for a project that can be
128
+ # used by client libraries for quota and billing purposes.
127
129
  # * `timeout` - (Integer) Default timeout to use in requests.
128
130
  # * `endpoint` - (String) Override of the endpoint host name, or `nil`
129
131
  # to use the default endpoint.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-logging
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-07-08 00:00:00.000000000 Z
12
+ date: 2022-07-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-core
@@ -73,28 +73,28 @@ dependencies:
73
73
  requirements:
74
74
  - - "~>"
75
75
  - !ruby/object:Gem::Version
76
- version: 1.25.1
76
+ version: 1.26.1
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - "~>"
82
82
  - !ruby/object:Gem::Version
83
- version: 1.25.1
83
+ version: 1.26.1
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: minitest
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: '5.14'
90
+ version: '5.16'
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - "~>"
96
96
  - !ruby/object:Gem::Version
97
- version: '5.14'
97
+ version: '5.16'
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: minitest-autotest
100
100
  requirement: !ruby/object:Gem::Requirement
@@ -290,14 +290,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
290
290
  requirements:
291
291
  - - ">="
292
292
  - !ruby/object:Gem::Version
293
- version: '2.5'
293
+ version: '2.6'
294
294
  required_rubygems_version: !ruby/object:Gem::Requirement
295
295
  requirements:
296
296
  - - ">="
297
297
  - !ruby/object:Gem::Version
298
298
  version: '0'
299
299
  requirements: []
300
- rubygems_version: 3.2.17
300
+ rubygems_version: 3.3.14
301
301
  signing_key:
302
302
  specification_version: 4
303
303
  summary: API Client library for Stackdriver Logging