miam 0.2.3 → 0.2.4.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/miam/driver.rb +8 -3
- data/lib/miam/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46ae8287cf40059d9535dd41e33f6ffcef900b4e
|
4
|
+
data.tar.gz: 687a105db186ac0467401b0680da1185a7e24d36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54671933e0d7a29b099e8fa81f7b1f97d6473ac2707072ec28a4aa881e03befe38094baa62accdf99de6f26597aef162e7c2330a6df3662ba34123cb192687cf
|
7
|
+
data.tar.gz: f7fc9f686492a4afffa5c468669807ab5c5dcc74f3926366bd5af7d67ef6f8fb9f8c0d1f013bc968bf02999601c9f064c5a24a922e9ceb658306627ada9a8ee7
|
data/lib/miam/driver.rb
CHANGED
@@ -455,11 +455,16 @@ class Miam::Driver
|
|
455
455
|
yield unless @options[:dry_run]
|
456
456
|
end
|
457
457
|
|
458
|
-
def
|
459
|
-
|
458
|
+
def account_id
|
459
|
+
if not @account_id
|
460
|
+
resp = @iam.list_users({max_items: 1})
|
461
|
+
arn = resp.users[0].arn
|
462
|
+
@account_id = arn.match('^arn:aws:iam::([0-9]{12}):.*$')[1]
|
463
|
+
end
|
464
|
+
@account_id
|
460
465
|
end
|
461
466
|
|
462
467
|
def policy_arn(policy_name)
|
463
|
-
"arn:aws:iam::#{
|
468
|
+
"arn:aws:iam::#{account_id}:policy/#{policy_name}"
|
464
469
|
end
|
465
470
|
end
|
data/lib/miam/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: miam
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4.beta
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Genki Sugawara
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -224,9 +224,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
224
224
|
version: '0'
|
225
225
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
226
226
|
requirements:
|
227
|
-
- - "
|
227
|
+
- - ">"
|
228
228
|
- !ruby/object:Gem::Version
|
229
|
-
version:
|
229
|
+
version: 1.3.1
|
230
230
|
requirements: []
|
231
231
|
rubyforge_project:
|
232
232
|
rubygems_version: 2.4.5.1
|