ruby_aem_aws 2.2.0 → 2.2.2
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 +5 -5
- data/conf/gem.yaml +1 -1
- data/lib/ruby_aem_aws/client/cloudwatch.rb +16 -4
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8d58bb85cdaedba39301d6550a67b03f1d90132eb0b98313cee9450983e8d3ec
|
4
|
+
data.tar.gz: 55be333e31ed88e1c889b36bc9323e74065c3486babefe4133b55ee321762649
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 780ac5f503d1c4e1c13a93be2c6b2b6b4b0d293e02dec4800c5b1db1cef7e3a3917d49262d2a7f9bc2d22a0811ecd6a1c790d10ba2ed31d0d0d923ba6365d786
|
7
|
+
data.tar.gz: 1eec82b02677216049e97569ec93ebf635a7557b0f21226080c671db402c4c1d4ad9a6f1725fc1a1d63aaf047d939dec6f323b6174a599198ee1cfaab8f6b175
|
data/conf/gem.yaml
CHANGED
@@ -1 +1 @@
|
|
1
|
-
version: 2.2.
|
1
|
+
version: 2.2.2
|
@@ -36,13 +36,25 @@ module RubyAemAws
|
|
36
36
|
# @param log_message Log message to filter for
|
37
37
|
# @return Cloudwatch log client filter_log_events response
|
38
38
|
def get_log_event(loggroup_name, log_stream_name, log_message)
|
39
|
+
# Initialise response as an empty response having no events and no next token
|
40
|
+
# This is needed to handle the scenario when initial filter log events returns
|
41
|
+
# a response with nil next token, ensuring the clients of this method to
|
42
|
+
# be able to identify any empty response events.
|
43
|
+
response = { events: [], next_token: nil }
|
44
|
+
|
39
45
|
filter = filter_for_cloudwatch_log_event(loggroup_name, log_stream_name, log_message)
|
40
|
-
|
46
|
+
curr_response = cloud_watch_log_client.filter_log_events(filter)
|
41
47
|
|
42
|
-
|
43
|
-
|
48
|
+
# Since late 2021 (circa aws-sdk-cloudwatchlog 1.45.0), the last response
|
49
|
+
# is always empty (empty response events and nil next token).
|
50
|
+
# Previous to late 2021, the last response used to contain the filtered events
|
51
|
+
# with nil next token.
|
52
|
+
until curr_response.next_token.nil?
|
53
|
+
next_token = { next_token: curr_response.next_token }
|
44
54
|
filter.update(next_token)
|
45
|
-
|
55
|
+
# empty events should be ignored
|
56
|
+
response = curr_response unless curr_response.events.empty?
|
57
|
+
curr_response = cloud_watch_log_client.filter_log_events(filter)
|
46
58
|
end
|
47
59
|
|
48
60
|
response
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_aem_aws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shine Solutions
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -141,8 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
141
|
- !ruby/object:Gem::Version
|
142
142
|
version: '0'
|
143
143
|
requirements: []
|
144
|
-
|
145
|
-
rubygems_version: 2.6.14.4
|
144
|
+
rubygems_version: 3.1.2
|
146
145
|
signing_key:
|
147
146
|
specification_version: 4
|
148
147
|
summary: AEM on AWS API Ruby client
|