train 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -2
- data/lib/train/transports/aws.rb +2 -3
- data/lib/train/version.rb +1 -1
- data/test/unit/transports/aws_test.rb +10 -13
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f569e5004298f46f664132758d6ebda808d0d4d
|
4
|
+
data.tar.gz: 51a9051bf0a91c152c340326d5e44b2d48635b11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4752da1809eb1f1ad136f13879596d0c8154b4b6c4eee474789406919aa6d67fe54fcc4220b3f2fc6a32c641017178eca10583a48653f9f591a51192b2d07e15
|
7
|
+
data.tar.gz: 03045744dd116b3e766242a255fbe277c978bf98708fcd14e7af7c77d59db5077a24eaa0d43df5e6dd8588b1c36b583ec9f55ace9f5876183344edf4f82495f6
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,18 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [1.4.
|
4
|
-
[Full Changelog](https://github.com/chef/train/compare/v1.4.
|
3
|
+
## [1.4.2](https://github.com/chef/train/tree/1.4.2) (2018-04-26)
|
4
|
+
[Full Changelog](https://github.com/chef/train/compare/v1.4.1...1.4.2)
|
5
5
|
|
6
6
|
**Merged pull requests:**
|
7
7
|
|
8
|
+
- switched method of determining aws account id to STS [\#286](https://github.com/chef/train/pull/286) ([tkrueger](https://github.com/tkrueger))
|
9
|
+
|
10
|
+
## [v1.4.1](https://github.com/chef/train/tree/v1.4.1) (2018-04-19)
|
11
|
+
[Full Changelog](https://github.com/chef/train/compare/v1.4.0...v1.4.1)
|
12
|
+
|
13
|
+
**Merged pull requests:**
|
14
|
+
|
15
|
+
- Release 1.4.1 [\#287](https://github.com/chef/train/pull/287) ([jquick](https://github.com/jquick))
|
8
16
|
- Add UUID for Cisco IOS and Nexus devices [\#285](https://github.com/chef/train/pull/285) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
|
9
17
|
- Add handling for privileged exec mode [\#284](https://github.com/chef/train/pull/284) ([jerryaldrichiii](https://github.com/jerryaldrichiii))
|
10
18
|
|
data/lib/train/transports/aws.rb
CHANGED
@@ -62,9 +62,8 @@ module Train::Transports
|
|
62
62
|
|
63
63
|
def unique_identifier
|
64
64
|
# use aws account id
|
65
|
-
client = aws_client(::Aws::
|
66
|
-
|
67
|
-
arn.split(':')[4]
|
65
|
+
client = aws_client(::Aws::STS::Client)
|
66
|
+
client.get_caller_identity.account
|
68
67
|
end
|
69
68
|
end
|
70
69
|
end
|
data/lib/train/version.rb
CHANGED
@@ -98,26 +98,23 @@ describe 'aws transport' do
|
|
98
98
|
end
|
99
99
|
|
100
100
|
describe 'unique_identifier' do
|
101
|
-
class AwsArn
|
102
|
-
def arn
|
103
|
-
'arn:aws:iam::158551926027:user/test-fixture-maker'
|
104
|
-
end
|
105
|
-
end
|
106
101
|
|
107
|
-
class
|
108
|
-
def
|
109
|
-
|
102
|
+
class AwsCallerId
|
103
|
+
def account
|
104
|
+
"123456789012"
|
110
105
|
end
|
111
106
|
end
|
112
107
|
|
113
|
-
class
|
114
|
-
def
|
115
|
-
|
108
|
+
class StsClient
|
109
|
+
def get_caller_identity
|
110
|
+
AwsCallerId.new
|
116
111
|
end
|
117
112
|
end
|
113
|
+
|
118
114
|
it 'returns an account id' do
|
119
|
-
connection.stubs(:aws_client).returns(
|
120
|
-
connection.unique_identifier.must_equal '
|
115
|
+
connection.stubs(:aws_client).returns(StsClient.new)
|
116
|
+
connection.unique_identifier.must_equal '123456789012'
|
121
117
|
end
|
122
118
|
end
|
119
|
+
|
123
120
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: train
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dominik Richter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|