awspec 1.11.0 → 1.11.1

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: 4796b48000c3ad199df777496b919e7a4552f213c667f9d2db1c3d68c8e3613a
4
- data.tar.gz: f7f643fbd5e24bc8fea279d2e15da65fb0546b646cdaa41a04b5ef6448c9e6d7
3
+ metadata.gz: 5fc6f65927df3c5bce28f2194e28e2295faaa76dcda4178e6a45c3ed0bb5d734
4
+ data.tar.gz: fd91c29eaa74f61f74be806370564496c462d4ce8850a8e2fa5072273edb7db7
5
5
  SHA512:
6
- metadata.gz: 3e7678a30b406bc0b948fd80015b5d5a0706ea44749039fde211d723dbe3a3e634d2ea019fafaf60a6e3bd06caf55b6974818d01b46463232b257df0b032b5fd
7
- data.tar.gz: 1324b06b2abc219beebcaa8b79caecabc014d704ecc8708415f2d2c9ce67695f0c16bc46b0deb785bc995ea64438226dcf8b295c96b8ca68a8fe964b8fa65256
6
+ metadata.gz: a55c537349f48a6d97106cbd3b7da029ee148bc39f7a1360ed40977a2b1fc71c3bf85d980babe943fbd9042d1450a7a86f5136ba76ea04072b52e31b5c39903a
7
+ data.tar.gz: 8e405e7f0a87cdbff849a78b6f3f7d020a28d241ab36c656d6e5297f098344a9bacfd9c32dc6a90afa0bca7f49678a2ebbb3136c52db2e3c7facaa927b220895
@@ -9,8 +9,25 @@ module Awspec::Helper
9
9
  end
10
10
  end
11
11
 
12
- def find_cloudwatch_logs_stream_by_log_group_name(id)
13
- cloudwatch_logs_client.describe_log_streams({ log_group_name: id }).log_streams.last
12
+ def find_cloudwatch_logs_stream_by_log_group_name(id, stream_name)
13
+ req = {
14
+ log_group_name: id,
15
+ log_stream_name_prefix: stream_name
16
+ }
17
+ ret = nil
18
+ loop do
19
+ res = cloudwatch_logs_client.describe_log_streams(req)
20
+ res.log_streams.find do |log_stream|
21
+ if log_stream[:log_stream_name] == stream_name
22
+ ret = log_stream[:log_stream_name]
23
+ break
24
+ end
25
+ end
26
+ break if ret.present?
27
+ break if res.next_token.nil?
28
+ req[:next_token] = res.next_token
29
+ end
30
+ ret
14
31
  end
15
32
 
16
33
  def find_cloudwatch_logs_metric_fileter_by_log_group_name(id, filter_name)
@@ -9,7 +9,7 @@ module Awspec::Type
9
9
  end
10
10
 
11
11
  def has_log_stream?(stream_name)
12
- ret = find_cloudwatch_logs_stream_by_log_group_name(@id).log_stream_name
12
+ ret = find_cloudwatch_logs_stream_by_log_group_name(@id, stream_name)
13
13
  return true if ret == stream_name
14
14
  end
15
15
 
@@ -1,3 +1,3 @@
1
1
  module Awspec
2
- VERSION = '1.11.0'
2
+ VERSION = '1.11.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.0
4
+ version: 1.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - k1LoW
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-28 00:00:00.000000000 Z
11
+ date: 2018-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk