aws-logs 0.2.0 → 0.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: 64ddf1d20fab423535f9f50bb65c10ae9be2130c57fbf15575a12ea5c3d63e96
4
- data.tar.gz: f48a61b93834a37c64e22e088465f4d2212a863fc69c42214f250237713a4886
3
+ metadata.gz: '0759793548df8b9310656546548321c91d45d2cb7b26baf99a90f4344a6de4aa'
4
+ data.tar.gz: 5eb4f2cfa33a74102f29c0e88b4174d5686b99c496a4f8eb1ed60506d530bcf5
5
5
  SHA512:
6
- metadata.gz: 1d362480e5d9aa1279ff5350bf685b3cdb350523f960e29a884106857c8a0f3033c9dc6974d778dc17971ca07c65d523b74da7b6e3e4f9e232331328bff801bc
7
- data.tar.gz: 456686311206099c88a2f931e6369eb030145a97d3e45d54381b6e5a237b816bf5234bc029edd2fb0d6062e156d6092e6c4dec5ec7fe1753121c669227d1f6a9
6
+ metadata.gz: 398fc1c1bd9617fd6a55be36807e8e65d80d55e66d7c7bad0a04b2eb33de592a49591a16b58c9a67bcc7c173346a30b6ef070a6fa4cacda5bb60947aeadecdff
7
+ data.tar.gz: 4bec6913762543ddef4f910f1e35ebe7bdc5cfd4986b0bb5978b7334871e3d5329ac47f4f5fa5f7b06024bbc65bcc10eccd965907035f042bed5de85b5870fc4
data/CHANGELOG.md CHANGED
@@ -3,6 +3,9 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [0.3.0]
7
+ - display final logs upon stop_follow!
8
+
6
9
  ## [0.2.0]
7
10
  - add stop_follow! method
8
11
  - friendly error message when log not found
data/lib/aws_logs/tail.rb CHANGED
@@ -36,13 +36,16 @@ module AwsLogs
36
36
  end
37
37
 
38
38
  since, now = initial_since, current_now
39
- while true && !end_loop?
39
+ until end_loop?
40
40
  refresh_events(since, now)
41
41
  display
42
42
  since, now = now, current_now
43
43
  loop_count!
44
44
  sleep 5 if @follow && !@@end_loop_signal && !ENV["AWS_LOGS_TEST"]
45
45
  end
46
+ # Refresh and display a final time in case the end_loop gets interrupted by stop_follow!
47
+ refresh_events(since, now)
48
+ display
46
49
  rescue Aws::CloudWatchLogs::Errors::ResourceNotFoundException => e
47
50
  puts "ERROR: #{e.class}: #{e.message}".color(:red)
48
51
  puts "Log group #{@log_group_name} not found."
@@ -1,3 +1,3 @@
1
1
  module AwsLogs
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-logs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen