aws-ec2 1.4.3 → 1.4.4

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: 133b3adbf26d2f3f9e02e7aa2f97dfc3e899cff09e3c7195dd2fb3670c35f1d2
4
- data.tar.gz: d16e6f935714439ae350822441e84f7192ba14837d2c88df42517d77e49e2e77
3
+ metadata.gz: caac59da7ff1ea2c83844e88b669b3caf2593b59b12caf6c18d1816849a9d6a5
4
+ data.tar.gz: 9f1490cc65e80777efd29cb97da53bedd5109d3c504c9a08bf2f638fcb6da17c
5
5
  SHA512:
6
- metadata.gz: 7cce36e27bb90ac8e05c1f29ac209e6d6804510d0074da10cde099972f90f67af2cf6660a276b9f405f71284f1e16d1f5d1e4880ff0ce7cb5e9cbe53b99986b9
7
- data.tar.gz: c1331df63412bfc9ecf623912257c3a25615e3e631edccc30f2a22daf5c925f18175b5dc4a0246a0e93a924d296e5fd5ef3d99242f1a950f8b224245f4dd8d92
6
+ metadata.gz: 7468e5b0d35b5fa2e1cbe357da384ea425ea49167d7d3069a9772e85925b717ec2835a1585e1be6ad9eadb87f72e593cfab81bc7e2ca0de4ce830277e2b440a3
7
+ data.tar.gz: 8d9061387cc4be3ea55fea1623c3208734bbd1721efbb87acba774743395dfe25d3d784886bc5a22011978728ce5c699a9bc64b68f2f8d6577d5366f8941881d
@@ -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.4]
7
+ - add AWS_EC2_REGION env to set the region for the cloudwatch log displayed url
8
+
6
9
  ## [1.4.3]
7
10
  - fix get_region when aws-ec2 called from an ec2 instance
8
11
 
@@ -107,14 +107,20 @@ module AwsEc2
107
107
  end
108
108
 
109
109
  def get_region
110
- # Highest precedence is the setting in ~/.aws/config and AWS_PROFILE used
110
+ # Highest precedence: AWS_EC2_REGION env variable. Only really used here.
111
+ if ENV['AWS_EC2_REGION']
112
+ return ENV['AWS_EC2_REGION']
113
+ end
114
+
115
+ # Pretty high in precedence: AWS_PROFILE and ~/.aws/config and
111
116
  aws_found = system("type aws > /dev/null")
112
117
  if aws_found
113
118
  region = `aws configure get region`.strip
114
119
  return region
115
120
  end
116
121
 
117
- # Assumes instace being launched in the same region as the calling ec2 instance
122
+ # Assumes instance same region as the calling ec2 instance.
123
+ # It is possible for curl not to be installed.
118
124
  curl_found = system("type curl > /dev/null")
119
125
  if curl_found
120
126
  region = `curl --connect-timeout 3 -s 169.254.169.254/latest/meta-data/placement/availability-zone | sed s'/.$//'`
@@ -1,3 +1,3 @@
1
1
  module AwsEc2
2
- VERSION = "1.4.3"
2
+ VERSION = "1.4.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-ec2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen