ec2-host 1.0.2 → 1.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: ad6de8f55b767b6131c58d34025197f7d50b5bf9
4
- data.tar.gz: '0586edf0954b7480db15634a168ae2eced6a0acf'
2
+ SHA256:
3
+ metadata.gz: b800a2a525114824606baa56c4f60a2862896dc360e4e5e99668da336fdd0010
4
+ data.tar.gz: edbc74281720267ab2fb471b997bbcc16aec9a4007fd57e47558f83369ac3116
5
5
  SHA512:
6
- metadata.gz: 5353b0fe64005d1f69f3197ac767d87058aafe0a03f9d101859491d6486c4d828761b1969571bffd69c9d4714b7e1267dad0971cfebccbca409defaac2d66fc6
7
- data.tar.gz: b6576721559e850cf1db0abe94aaf1bbb83272a7be7e562957df7cfab0e5d09fa7c19190db2e5428571de28943c3c6a1bff3ac66abfa2d59cfd57fea77ae1ae3
6
+ metadata.gz: ed0d98e82a21ba7979ac55dfbf8d842706272a2606e211eb876d3f64dce8347c4a11390caf767f2d67105cf11c78c61d780334f3412c3efd07ef22b09ab7db0e
7
+ data.tar.gz: a9bbc4ac73ea98b8b9b0af6ce784976106bdf2912ad7520e1ddad6c7ecc51d42685727cb22e5b649adef12e479681a3c67d9955e143da878b2f2a655774ea9c2
@@ -1,3 +1,9 @@
1
+ # 1.0.3 (2019/02/12)
2
+
3
+ Fixes:
4
+
5
+ * Fix assume-role was not working (thanks to @toyama0910)
6
+
1
7
  # 1.0.2 (2019/02/05)
2
8
 
3
9
  Enhancements:
data/README.md CHANGED
@@ -25,7 +25,7 @@ AWS SDK (CLI) parameters:
25
25
  * **AWS_SECRET_ACCESS_KEY**: AWS SDK (CLI) credentials. Default load a credentials file
26
26
  * **AWS_DEFAULT_REGION** (**AWS_REGION**); AWS SDK (CLI) region such as `ap-northeast-1`, `us-east-1`. Default obtains from `$HOME/.aws/config` with profile `AWS_DEFAULT_PROFILE`.
27
27
  * **AWS_DEFAULT_PROFILE** (**AWS_PROFILE**): The profile key of the AWS SDK (CLI) credentails file. Default is `default`
28
- * **AWS_CREDENTIAL_FILE** (**AWS_CREDENTIALS_FILE**): Path of the AWS SDK (CLI) credentails file. Default is `$HOME/.aws/credentials`. See [Configuring the AWS Command Line Interface](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-config-files) for details.
28
+ * **AWS_SHARED_CREDENTIALS_FILE** (**AWS_CREDENTIAL_FILE**, **AWS_CREDENTIALS_FILE**): Path of the AWS SDK (CLI) credentails file. Default is `$HOME/.aws/credentials`. See [Configuring the AWS Command Line Interface](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-config-files) for details.
29
29
 
30
30
  ec2-host parameters:
31
31
 
@@ -33,7 +33,7 @@ class EC2
33
33
  @aws_region ||=
34
34
  ENV['AWS_REGION'] || config.fetch('AWS_REGION', nil) || # ref. old aws cli
35
35
  ENV['AWS_DEFAULT_REGION'] || config.fetch('AWS_DEFAULT_REGION', nil) || # ref. aws cli and terraform
36
- aws_config['region'] || raise('AWS_REGION nor AWS_DEFAULT_REGION nor reagion in ~/.aws/config is not set')
36
+ aws_config['region'] || raise('AWS_REGION nor AWS_DEFAULT_REGION nor region in ~/.aws/config is not set')
37
37
  end
38
38
 
39
39
  def self.aws_profile
@@ -55,7 +55,7 @@ class EC2
55
55
  if Config.aws_config['role_arn']
56
56
  # wrapped by assume role if necessary
57
57
  Aws::AssumeRoleCredentials.new(
58
- client: Aws::STS::Client.new(raw_credentials),
58
+ client: Aws::STS::Client.new(region: Config.aws_region, credentials: raw_credentials),
59
59
  role_arn: Config.aws_config['role_arn'],
60
60
  role_session_name: "ec2-host-session-#{Time.now.to_i}"
61
61
  )
@@ -1,5 +1,5 @@
1
1
  class EC2
2
2
  class Host
3
- VERSION = '1.0.2'
3
+ VERSION = '1.0.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ec2-host
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naotoshi Seo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-05 00:00:00.000000000 Z
11
+ date: 2019-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-ec2
@@ -242,8 +242,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
242
242
  - !ruby/object:Gem::Version
243
243
  version: '0'
244
244
  requirements: []
245
- rubyforge_project:
246
- rubygems_version: 2.5.2.3
245
+ rubygems_version: 3.0.1
247
246
  signing_key:
248
247
  specification_version: 4
249
248
  summary: Search hosts on AWS EC2