google-apps-events-subscriptions 1.0.0 → 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: f5b826be7b1e1519711f73434b0a4f2bdb75517f0b3a38d93baa7441fe4cff9d
4
- data.tar.gz: 2d135192c72085aed64a50f8c88bd0ca8d6ac0b43c7e3502b860ebdb163deaf5
3
+ metadata.gz: 2e3495bba2ea4fd6521d45377a64853c39d5597a112eda6ac3775d1626f8ea03
4
+ data.tar.gz: 0ea0e6f8a25105ad7b92f298ffaa108f374f62c2b36cb95eafe1233dd57ab87b
5
5
  SHA512:
6
- metadata.gz: e62148893f7691f1047c47da24957cded69b966f3e3ad3edf13b7dae5eaec615deb24fc7a634b5f927b9fa6f0e780c8b4f64c009e837b2cc2cd844c7db6c5bb7
7
- data.tar.gz: 838df75b20c36704056707a07477f8188b6dc996bade54569ca339ef186fc48f6ba45302cc8c385fa1b7b453275686e5d048f35ece5c054dc0fe5d12fe45e871
6
+ metadata.gz: 3fafdf21aec791ff167adf112f51f41802fd3686f20887afed1d1594d90318e191cfe9affe3d8f93f9ff87bbcc46ad3f377e2f3a19bc90f1d78e8d21d65f73ae
7
+ data.tar.gz: 499141fa3147fa76903305c74b9eafce3a89ba982eb99bf57ab5db25088bd566bda8704480238294753a4dc6d09a050b56ff29ad912c4f6b3a8a31e8e5012b62
data/README.md CHANGED
@@ -7,7 +7,7 @@ The Google Workspace Events API lets you subscribe to events and manage change n
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-apps-events-subscriptions-v*`.
9
9
  The gem `google-apps-events-subscriptions` 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/workspaceevents.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-apps-events-subscriptions-v1](https://cloud.google.com/ruby/docs/reference/google-apps-events-subscriptions-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 Apps
22
22
  module Events
23
23
  module Subscriptions
24
- VERSION = "1.0.0"
24
+ VERSION = "1.1.1"
25
25
  end
26
26
  end
27
27
  end
@@ -41,6 +41,11 @@ module Google
41
41
  # You can also specify a different transport by passing `:rest` or `:grpc` in
42
42
  # the `transport` parameter.
43
43
  #
44
+ # Raises an exception if the currently installed versioned client gem for the
45
+ # given API version does not support the given transport of the SubscriptionsService service.
46
+ # You can determine whether the method will succeed by calling
47
+ # {Google::Apps::Events::Subscriptions.subscriptions_service_available?}.
48
+ #
44
49
  # ## About SubscriptionsService
45
50
  #
46
51
  # A service that manages subscriptions to Google Workspace events.
@@ -61,6 +66,37 @@ module Google
61
66
  service_module = service_module.const_get(:Rest) if transport == :rest
62
67
  service_module.const_get(:Client).new(&block)
63
68
  end
69
+
70
+ ##
71
+ # Determines whether the SubscriptionsService service is supported by the current client.
72
+ # If true, you can retrieve a client object by calling {Google::Apps::Events::Subscriptions.subscriptions_service}.
73
+ # If false, that method will raise an exception. This could happen if the given
74
+ # API version does not exist or does not support the SubscriptionsService service,
75
+ # or if the versioned client gem needs an update to support the SubscriptionsService service.
76
+ #
77
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
78
+ # Defaults to `:v1`.
79
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
80
+ # @return [boolean] Whether the service is available.
81
+ #
82
+ def self.subscriptions_service_available? version: :v1, transport: :grpc
83
+ require "google/apps/events/subscriptions/#{version.to_s.downcase}"
84
+ package_name = Google::Apps::Events::Subscriptions
85
+ .constants
86
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
87
+ .first
88
+ return false unless package_name
89
+ service_module = Google::Apps::Events::Subscriptions.const_get package_name
90
+ return false unless service_module.const_defined? :SubscriptionsService
91
+ service_module = service_module.const_get :SubscriptionsService
92
+ if transport == :rest
93
+ return false unless service_module.const_defined? :Rest
94
+ service_module = service_module.const_get :Rest
95
+ end
96
+ service_module.const_defined? :Client
97
+ rescue ::LoadError
98
+ false
99
+ end
64
100
  end
65
101
  end
66
102
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apps-events-subscriptions
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
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-06-27 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-apps-events-subscriptions-v1
@@ -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: The Google Workspace Events API lets you subscribe to events and manage change
84
81
  notifications across Google Workspace applications.