aws-ec2 1.4.6 → 1.4.7

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: caf18db0edfbee2f8032e88d5a6607f7a0a1aa1ec2899432a4c8cb15360aa5d8
4
- data.tar.gz: 0aff7e73005748908c5891501be67ad6824d3709c3f0fe47b5d4311aff860a00
3
+ metadata.gz: ee0ea02658d486e66858c54d3b41e91a70566e51da76bf3d785875e7014df39d
4
+ data.tar.gz: ea1c08516e20b2a670b62be2cab5763adcc7f82061cb7da53a25015526741848
5
5
  SHA512:
6
- metadata.gz: a7218e5b6b3b90d1e5d89b1ed9f29e86c4c27ac3d8a9ff87798e61931bcf3421545cb80c18adcdb03fac5a51bb933b251f5b439ae9bbe82459c2c55a3d1dbb63
7
- data.tar.gz: 7b7fc9cff1a27a919ed23dd2f1e3497d14532670549601dee71414bb8d06da2301082019e604497ae4310531c07709a9efcb534a6a7ea20c3110afd83a5fd740
6
+ metadata.gz: 4bf875d2b4fdcebaddd99ece713e57fa6ffed3b3491b394056895e92ede295ae5c5f2ddd3eb8b4f69b886ee989e001f192d30f3c715a3d6bd675ec28d78642ef
7
+ data.tar.gz: 6489f81330974a1c23f7d6f7f5c6cb2a3227f27ba97431d5e5c07d080e391528593de3bea338677c433eb4626450f81b7952f69ffe80d487622c1d81660cbd27
@@ -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
+ ## [1.4.7]
7
+ - add AWS_EC2_CW to show cw tail command
8
+
6
9
  ## [1.4.6]
7
10
  - enable awslogs on reboot
8
11
  - improve message when auto-terminate gets called from a previous ami
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aws-ec2 (1.4.2)
4
+ aws-ec2 (1.4.7)
5
5
  activesupport
6
6
  aws-sdk-ec2
7
7
  aws-sdk-s3
@@ -20,7 +20,7 @@ GEM
20
20
  i18n (~> 0.7)
21
21
  minitest (~> 5.1)
22
22
  tzinfo (~> 1.1)
23
- aws-partitions (1.72.0)
23
+ aws-partitions (1.73.0)
24
24
  aws-sdk-core (3.17.1)
25
25
  aws-partitions (~> 1.0)
26
26
  aws-sigv4 (~> 1.0)
@@ -91,11 +91,16 @@ module AwsEc2
91
91
  return unless @options[:cloudwatch]
92
92
 
93
93
  region = get_region
94
- url = "https://#{region}.console.aws.amazon.com/cloudwatch/home?region=#{region}#logEventViewer:group=ec2;stream=#{instance_id}/var/log/cloud-init-output.log"
94
+ stream = "#{instance_id}/var/log/cloud-init-output.log"
95
+ url = "https://#{region}.console.aws.amazon.com/cloudwatch/home?region=#{region}#logEventViewer:group=ec2;stream=#{stream}"
96
+ cw_command = "cw tail -f ec2 #{stream}"
95
97
  puts "To view instance's cloudwatch logs visit:"
96
98
  puts " #{url}"
99
+ puts " #{cw_command}" if ENV['AWS_EC2_CW']
97
100
  puts "Note: It takes a little time for the instance to launch and report logs."
98
- add_to_clipboard(url)
101
+
102
+ paste_command = ENV['AWS_EC2_CW'] ? cw_command : url
103
+ add_to_clipboard(paste_command)
99
104
  end
100
105
 
101
106
  def add_to_clipboard(text)
@@ -8,3 +8,4 @@ systemctl daemon-reload
8
8
  systemctl restart awslogsd
9
9
  systemctl enable awslogsd
10
10
  # systemctl status awslogsd
11
+ # systemctl is-enabled awslogsd
@@ -5,3 +5,4 @@ systemctl daemon-reload
5
5
  systemctl restart awslogs
6
6
  systemctl enable awslogs
7
7
  # systemctl status awslogs
8
+ # systemctl is-enabled awslogs
@@ -1,3 +1,3 @@
1
1
  module AwsEc2
2
- VERSION = "1.4.6"
2
+ VERSION = "1.4.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-ec2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.6
4
+ version: 1.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-27 00:00:00.000000000 Z
11
+ date: 2018-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport