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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb232253b3506a0387caa0817c099a76b0d5ec5f
4
- data.tar.gz: e10d873066aef538049bb703bf2977064c1ab586
3
+ metadata.gz: 46ae8287cf40059d9535dd41e33f6ffcef900b4e
4
+ data.tar.gz: 687a105db186ac0467401b0680da1185a7e24d36
5
5
  SHA512:
6
- metadata.gz: d07415f6abcf2efa6d0572bf61302ee6d5334cc76f2a7739dbde62cf8b3b0cc0ceece4cf9613bbcc66776e0ad3758bfb5cf75196a286cfe47d95de467f02fa33
7
- data.tar.gz: eb2ecd520a5d43173249082dfdb29dd0b31fa36acc254cb356a57b04d9dd2befc4caaae70f4a7376189ffda32395b425195f7f014c0f223501dc1ac96d324f9b
6
+ metadata.gz: 54671933e0d7a29b099e8fa81f7b1f97d6473ac2707072ec28a4aa881e03befe38094baa62accdf99de6f26597aef162e7c2330a6df3662ba34123cb192687cf
7
+ data.tar.gz: f7fc9f686492a4afffa5c468669807ab5c5dcc74f3926366bd5af7d67ef6f8fb9f8c0d1f013bc968bf02999601c9f064c5a24a922e9ceb658306627ada9a8ee7
@@ -455,11 +455,16 @@ class Miam::Driver
455
455
  yield unless @options[:dry_run]
456
456
  end
457
457
 
458
- def user_id
459
- @user_id ||= @iam.get_user.user.user_id
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::#{user_id}:policy/#{policy_name}"
468
+ "arn:aws:iam::#{account_id}:policy/#{policy_name}"
464
469
  end
465
470
  end
@@ -1,3 +1,3 @@
1
1
  module Miam
2
- VERSION = '0.2.3'
2
+ VERSION = '0.2.4.beta'
3
3
  end
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.3
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-29 00:00:00.000000000 Z
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: '0'
229
+ version: 1.3.1
230
230
  requirements: []
231
231
  rubyforge_project:
232
232
  rubygems_version: 2.4.5.1