google-cloud-eventarc-publishing 1.2.0 → 1.3.0

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: cdbe98af747fcdde212e45c9104c7f92bfc8d84de8175fba08de711ca222c74c
4
- data.tar.gz: 753d594423d4a2aaadc5ef454d2ced930e5784ee0d949d234b36f1159a6567aa
3
+ metadata.gz: 200567f9e80175ad214f63bbd09e3f4fe0929fe4b72a4a06cce817b9e30349f9
4
+ data.tar.gz: 5b93bbeb38f8fa3ba84f174f2b454ff0d67c905b90cd343863d41409ebb5baf1
5
5
  SHA512:
6
- metadata.gz: 826c0fe253eda44324139caec76ba84693c0b4d0feb165115693f1c08e0facf83e34880e74fd6f73c3e29e4e112eadf50c74f63a30021c5b8655e340b36c6d58
7
- data.tar.gz: 3d9d157759a43809903142d468912bef94f3712106f8e0093a4e60c69b6f56a89756cc819cb601258146788a36786ddba3aead7686f514ceef7c2d812e1ae132
6
+ metadata.gz: c727b01761d9cedc27d1354da904d0ca04ec3323f2f3a756430bf67a23977b6e3793838e1d83692ff98bcc4318291d83b394a3150bf8cabd734c8b78cfb1f3fd
7
+ data.tar.gz: 2b149076a3387ccc6a9e918813cc01f51071ad511f48585e84936f0646d9914f501ad9a06a8c52d0964d3019ffa0c493c6e39062095001ddd83c2a5117dfb169
data/README.md CHANGED
@@ -34,9 +34,39 @@ In order to use this library, you first need to go through the following steps:
34
34
  1. [Enable the API.](https://console.cloud.google.com/apis/library/eventarcpublishing.googleapis.com)
35
35
  1. {file:AUTHENTICATION.md Set up authentication.}
36
36
 
37
+ ## Debug Logging
38
+
39
+ This library comes with opt-in Debug Logging that can help you troubleshoot
40
+ your application's integration with the API. When logging is activated, key
41
+ events such as requests and responses, along with data payloads and metadata
42
+ such as headers and client configuration, are logged to the standard error
43
+ stream.
44
+
45
+ **WARNING:** Client Library Debug Logging includes your data payloads in
46
+ plaintext, which could include sensitive data such as PII for yourself or your
47
+ customers, private keys, or other security data that could be compromising if
48
+ leaked. Always practice good data hygiene with your application logs, and follow
49
+ the principle of least access. Google also recommends that Client Library Debug
50
+ Logging be enabled only temporarily during active debugging, and not used
51
+ permanently in production.
52
+
53
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
54
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
55
+ list of client library gem names. This will select the default logging behavior,
56
+ which writes logs to the standard error stream. On a local workstation, this may
57
+ result in logs appearing on the console. When running on a Google Cloud hosting
58
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
59
+ results in logs appearing alongside your application logs in the
60
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
61
+
62
+ Debug logging also requires that the versioned clients for this service be
63
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
64
+ working, try updating the versioned clients in your bundle or installed gems:
65
+ [google-cloud-eventarc-publishing-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-publishing-v1/latest).
66
+
37
67
  ## Supported Ruby Versions
38
68
 
39
- This library is supported on Ruby 2.7+.
69
+ This library is supported on Ruby 3.0+.
40
70
 
41
71
  Google provides official support for Ruby versions that are actively supported
42
72
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Eventarc
23
23
  module Publishing
24
- VERSION = "1.2.0"
24
+ VERSION = "1.3.0"
25
25
  end
26
26
  end
27
27
  end
@@ -59,6 +59,11 @@ module Google
59
59
  # You can also specify a different transport by passing `:rest` or `:grpc` in
60
60
  # the `transport` parameter.
61
61
  #
62
+ # Raises an exception if the currently installed versioned client gem for the
63
+ # given API version does not support the given transport of the Publisher service.
64
+ # You can determine whether the method will succeed by calling
65
+ # {Google::Cloud::Eventarc::Publishing.publisher_available?}.
66
+ #
62
67
  # ## About Publisher
63
68
  #
64
69
  # Eventarc processes events generated by an event provider and delivers them to
@@ -103,6 +108,37 @@ module Google
103
108
  service_module.const_get(:Client).new(&block)
104
109
  end
105
110
 
111
+ ##
112
+ # Determines whether the Publisher service is supported by the current client.
113
+ # If true, you can retrieve a client object by calling {Google::Cloud::Eventarc::Publishing.publisher}.
114
+ # If false, that method will raise an exception. This could happen if the given
115
+ # API version does not exist or does not support the Publisher service,
116
+ # or if the versioned client gem needs an update to support the Publisher service.
117
+ #
118
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
119
+ # Defaults to `:v1`.
120
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
121
+ # @return [boolean] Whether the service is available.
122
+ #
123
+ def self.publisher_available? version: :v1, transport: :grpc
124
+ require "google/cloud/eventarc/publishing/#{version.to_s.downcase}"
125
+ package_name = Google::Cloud::Eventarc::Publishing
126
+ .constants
127
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
128
+ .first
129
+ return false unless package_name
130
+ service_module = Google::Cloud::Eventarc::Publishing.const_get package_name
131
+ return false unless service_module.const_defined? :Publisher
132
+ service_module = service_module.const_get :Publisher
133
+ if transport == :rest
134
+ return false unless service_module.const_defined? :Rest
135
+ service_module = service_module.const_get :Rest
136
+ end
137
+ service_module.const_defined? :Client
138
+ rescue ::LoadError
139
+ false
140
+ end
141
+
106
142
  ##
107
143
  # Configure the google-cloud-eventarc-publishing library.
108
144
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-eventarc-publishing
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-02-26 00:00:00.000000000 Z
10
+ date: 2025-01-29 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-core
@@ -64,7 +63,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
64
63
  licenses:
65
64
  - Apache-2.0
66
65
  metadata: {}
67
- post_install_message:
68
66
  rdoc_options: []
69
67
  require_paths:
70
68
  - lib
@@ -72,15 +70,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
72
70
  requirements:
73
71
  - - ">="
74
72
  - !ruby/object:Gem::Version
75
- version: '2.7'
73
+ version: '3.0'
76
74
  required_rubygems_version: !ruby/object:Gem::Requirement
77
75
  requirements:
78
76
  - - ">="
79
77
  - !ruby/object:Gem::Version
80
78
  version: '0'
81
79
  requirements: []
82
- rubygems_version: 3.5.6
83
- signing_key:
80
+ rubygems_version: 3.6.2
84
81
  specification_version: 4
85
82
  summary: API Client library for the Eventarc Publishing API
86
83
  test_files: []