miam 0.2.4.beta2 → 0.2.4.beta3

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
  SHA1:
3
- metadata.gz: b54f98f7a3202a43d486e7b1425d53628e09838b
4
- data.tar.gz: 923bfa25457393822614cc1159cb2eddd5058edf
3
+ metadata.gz: cdcd3a3de50a6ede639ee4df2f05aabea0413983
4
+ data.tar.gz: caeea997fa66b63a4b1ca0a174b5835c79d49f6c
5
5
  SHA512:
6
- metadata.gz: 289b709229bde1e6371cfb474a0058db2a4a96eb20125b3b64112901f3a9920e51224476ff24d3fc811be48a0dff58460c3afb6fb3d3a9574c0bb9ff207782e0
7
- data.tar.gz: 7e4a700c3fe02f2cbdde29f130e8f8ffe55fe1fd335cf0d4fb4dbb59040d4437a5423f9900a9f0a2ac2c2c711f79e68da7981a1e00ac128715538cb65e0875b9
6
+ metadata.gz: f931e1136b9ba6c6d524118d958be3d49437d19aab6743faed50ed7f986a847a8907d6f8d846a78339e3cd12446951845f7d5b9556cb0a8227d7d6a411cca6b0
7
+ data.tar.gz: eabb63a8dfb22cb32c207d9b13de53d2700f69fa1dfd9f5d4e849767ae61beb125d96fdf373e9fb6b9fb5a1034aba1c4966259a2506c6c40aa0b8cdde0161f17
@@ -455,7 +455,12 @@ class Miam::Driver
455
455
  yield unless @options[:dry_run]
456
456
  end
457
457
 
458
+ def account_id
459
+ # https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
460
+ @account_id ||= @iam.get_user.user.arn.split(':').fetch(4)
461
+ end
462
+
458
463
  def policy_arn(policy_name)
459
- "arn:aws:iam::#{@iam.get_user.user.user_id}:policy/#{policy_name}"
464
+ "arn:aws:iam::#{account_id}:policy/#{policy_name}"
460
465
  end
461
466
  end
@@ -1,3 +1,3 @@
1
1
  module Miam
2
- VERSION = '0.2.4.beta2'
2
+ VERSION = '0.2.4.beta3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miam
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4.beta2
4
+ version: 0.2.4.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara