google-cloud-gsuite_add_ons 1.0.1 → 1.1.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: e07cf79eed2c5eca8677762ad6f581e6e2ebbb11ec02cf2796e85f70881ee881
4
- data.tar.gz: 28dac035906e4aa3f567398efeb173ba40cab176251b75e064d9420e7d53c4b5
3
+ metadata.gz: 1c2f8705c356ffe1c9b4a3611635ee30933502b6aa8d350e0de623efbed37478
4
+ data.tar.gz: c25b032fe84f49ce77cdb9d367e3e7ae1ac37c42279ff46202dc9f5c420885c2
5
5
  SHA512:
6
- metadata.gz: 0e14c082f4d9a56424d75d692719cde077fc4c7731cc5030b141d8c1c2b653d8f4c0af85b636dfb2d164195f6001260b00a0075280f9b2cc688dd95b2af021f5
7
- data.tar.gz: 2036a996d3c7d629e3ad347850e9084e63beb474ad71416d5f6b9d56f5da45acccf5afe3cf47fbfdf7ab1380722d3f5fd5cc4c742a72289094fa75267e0c082a
6
+ metadata.gz: 3c0a618b8058e290ada616bedd91f9c593697c66b3bc86a525e6d4ea0823f58bf1fe63c019d9badd7e62a1a1ac31247939883c7e0ac85574cab0277467547c55
7
+ data.tar.gz: 920c40f52b1449c484cd7eea180aceab1a0ba1ce2d28a4ead5b4c14b153b68c98c9a3960525769a34e7c23d104278785a1019bb465a354aae731c7c063ba7411
data/README.md CHANGED
@@ -7,7 +7,7 @@ Add-ons are customized applications that integrate with Google Workspace product
7
7
  Actual client classes for the various versions of this API are defined in
8
8
  _versioned_ client gems, with names of the form `google-cloud-gsuite_add_ons-v*`.
9
9
  The gem `google-cloud-gsuite_add_ons` is the main client library that brings the
10
- verisoned gems in as dependencies, and provides high-level methods for
10
+ versioned gems in as dependencies, and provides high-level methods for
11
11
  constructing clients. More information on versioned clients can be found below
12
12
  in the section titled *Which client should I use?*.
13
13
 
@@ -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/gsuiteaddons.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-gsuite_add_ons-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-gsuite_add_ons-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
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module GSuiteAddOns
23
- VERSION = "1.0.1"
23
+ VERSION = "1.1.1"
24
24
  end
25
25
  end
26
26
  end
@@ -58,32 +58,37 @@ module Google
58
58
  # You can also specify a different transport by passing `:rest` or `:grpc` in
59
59
  # the `transport` parameter.
60
60
  #
61
+ # Raises an exception if the currently installed versioned client gem for the
62
+ # given API version does not support the given transport of the GSuiteAddOns service.
63
+ # You can determine whether the method will succeed by calling
64
+ # {Google::Cloud::GSuiteAddOns.gsuite_add_ons_available?}.
65
+ #
61
66
  # ## About GSuiteAddOns
62
67
  #
63
- # A service for managing Google Workspace Add-ons deployments.
68
+ # A service for managing Google Workspace add-ons deployments.
64
69
  #
65
- # A Google Workspace Add-on is a third-party embedded component that can be
70
+ # A Google Workspace add-on is a third-party embedded component that can be
66
71
  # installed in Google Workspace Applications like Gmail, Calendar, Drive, and
67
- # the Google Docs, Sheets, and Slides editors. Google Workspace Add-ons can
72
+ # the Google Docs, Sheets, and Slides editors. Google Workspace add-ons can
68
73
  # display UI cards, receive contextual information from the host application,
69
74
  # and perform actions in the host application (See:
70
75
  # https://developers.google.com/gsuite/add-ons/overview for more information).
71
76
  #
72
- # A Google Workspace Add-on deployment resource specifies metadata about the
77
+ # A Google Workspace add-on deployment resource specifies metadata about the
73
78
  # add-on, including a specification of the entry points in the host application
74
79
  # that trigger add-on executions (see:
75
80
  # https://developers.google.com/gsuite/add-ons/concepts/gsuite-manifests).
76
- # Add-on deployments defined via the Google Workspace Add-ons API define their
81
+ # Add-on deployments defined via the Google Workspace add-ons API define their
77
82
  # entrypoints using HTTPS URLs (See:
78
83
  # https://developers.google.com/gsuite/add-ons/guides/alternate-runtimes),
79
84
  #
80
- # A Google Workspace Add-on deployment can be installed in developer mode,
85
+ # A Google Workspace add-on deployment can be installed in developer mode,
81
86
  # which allows an add-on developer to test the experience an end-user would see
82
87
  # when installing and running the add-on in their G Suite applications. When
83
88
  # running in developer mode, more detailed error messages are exposed in the
84
89
  # add-on UI to aid in debugging.
85
90
  #
86
- # A Google Workspace Add-on deployment can be published to Google Workspace
91
+ # A Google Workspace add-on deployment can be published to Google Workspace
87
92
  # Marketplace, which allows other Google Workspace users to discover and
88
93
  # install the add-on. See:
89
94
  # https://developers.google.com/gsuite/add-ons/how-tos/publish-add-on-overview
@@ -106,6 +111,37 @@ module Google
106
111
  service_module.const_get(:Client).new(&block)
107
112
  end
108
113
 
114
+ ##
115
+ # Determines whether the GSuiteAddOns service is supported by the current client.
116
+ # If true, you can retrieve a client object by calling {Google::Cloud::GSuiteAddOns.gsuite_add_ons}.
117
+ # If false, that method will raise an exception. This could happen if the given
118
+ # API version does not exist or does not support the GSuiteAddOns service,
119
+ # or if the versioned client gem needs an update to support the GSuiteAddOns service.
120
+ #
121
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
122
+ # Defaults to `:v1`.
123
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
124
+ # @return [boolean] Whether the service is available.
125
+ #
126
+ def self.gsuite_add_ons_available? version: :v1, transport: :grpc
127
+ require "google/cloud/gsuite_add_ons/#{version.to_s.downcase}"
128
+ package_name = Google::Cloud::GSuiteAddOns
129
+ .constants
130
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
131
+ .first
132
+ return false unless package_name
133
+ service_module = Google::Cloud::GSuiteAddOns.const_get package_name
134
+ return false unless service_module.const_defined? :GSuiteAddOns
135
+ service_module = service_module.const_get :GSuiteAddOns
136
+ if transport == :rest
137
+ return false unless service_module.const_defined? :Rest
138
+ service_module = service_module.const_get :Rest
139
+ end
140
+ service_module.const_defined? :Client
141
+ rescue ::LoadError
142
+ false
143
+ end
144
+
109
145
  ##
110
146
  # Configure the google-cloud-gsuite_add_ons library.
111
147
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-gsuite_add_ons
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-08-09 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-core
@@ -62,7 +61,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
62
61
  licenses:
63
62
  - Apache-2.0
64
63
  metadata: {}
65
- post_install_message:
66
64
  rdoc_options: []
67
65
  require_paths:
68
66
  - lib
@@ -70,15 +68,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
70
68
  requirements:
71
69
  - - ">="
72
70
  - !ruby/object:Gem::Version
73
- version: '2.7'
71
+ version: '3.0'
74
72
  required_rubygems_version: !ruby/object:Gem::Requirement
75
73
  requirements:
76
74
  - - ">="
77
75
  - !ruby/object:Gem::Version
78
76
  version: '0'
79
77
  requirements: []
80
- rubygems_version: 3.5.6
81
- signing_key:
78
+ rubygems_version: 3.6.8
82
79
  specification_version: 4
83
80
  summary: API Client library for the Google Workspace Add-ons API
84
81
  test_files: []