fog 0.3.32 → 0.3.33
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/fog.gemspec +2 -2
- data/lib/fog.rb +1 -1
- data/lib/fog/aws/iam.rb +1 -0
- data/lib/fog/aws/parsers/iam/get_user.rb +27 -0
- data/lib/fog/aws/requests/iam/get_user.rb +44 -0
- data/lib/fog/core/credentials.rb +6 -2
- metadata +6 -4
data/Gemfile.lock
CHANGED
data/fog.gemspec
CHANGED
@@ -7,8 +7,8 @@ Gem::Specification.new do |s|
|
|
7
7
|
## If your rubyforge_project name is different, then edit it and comment out
|
8
8
|
## the sub! line in the Rakefile
|
9
9
|
s.name = 'fog'
|
10
|
-
s.version = '0.3.
|
11
|
-
s.date = '2010-12-
|
10
|
+
s.version = '0.3.33'
|
11
|
+
s.date = '2010-12-22'
|
12
12
|
s.rubyforge_project = 'fog'
|
13
13
|
|
14
14
|
## Make sure your summary is short. The description may be as long
|
data/lib/fog.rb
CHANGED
data/lib/fog/aws/iam.rb
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module AWS
|
4
|
+
module IAM
|
5
|
+
|
6
|
+
class GetUser < Fog::Parsers::Base
|
7
|
+
# http://docs.amazonwebservices.com/IAM/latest/APIReference/API_GetUser.html
|
8
|
+
|
9
|
+
def reset
|
10
|
+
@response = { 'User' => {} }
|
11
|
+
end
|
12
|
+
|
13
|
+
def end_element(name)
|
14
|
+
case name
|
15
|
+
when 'Arn', 'UserId', 'UserName', 'Path'
|
16
|
+
@response['User'][name] = @value
|
17
|
+
when 'RequestId'
|
18
|
+
@response[name] = @value
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module Fog
|
2
|
+
module AWS
|
3
|
+
class IAM
|
4
|
+
class Real
|
5
|
+
|
6
|
+
require 'fog/aws/parsers/iam/get_user'
|
7
|
+
|
8
|
+
# Get User
|
9
|
+
#
|
10
|
+
# ==== Parameters
|
11
|
+
# * options<~Hash>:
|
12
|
+
# * 'UserName'<~String>: Name of the User. Defaults to current user
|
13
|
+
#
|
14
|
+
# ==== Returns
|
15
|
+
# * response<~Excon::Response>:
|
16
|
+
# * body<~Hash>:
|
17
|
+
# * 'User'<~Hash> - User
|
18
|
+
# * Arn<~String> -
|
19
|
+
# * UserId<~String> -
|
20
|
+
# * UserName<~String> -
|
21
|
+
# * Path<~String> -
|
22
|
+
#
|
23
|
+
# ==== See Also
|
24
|
+
# http://docs.amazonwebservices.com/IAM/latest/APIReference/API_Getuser.html
|
25
|
+
#
|
26
|
+
def get_user(options = {})
|
27
|
+
request({
|
28
|
+
'Action' => 'GetUser',
|
29
|
+
:parser => Fog::Parsers::AWS::IAM::GetUser.new
|
30
|
+
}.merge!(options))
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
class Mock
|
36
|
+
|
37
|
+
def get_user(options = {})
|
38
|
+
Fog::Mock.not_implemented
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
data/lib/fog/core/credentials.rb
CHANGED
@@ -31,8 +31,12 @@ module Fog
|
|
31
31
|
# @raise [LoadError] Configuration unavailable in configuration file
|
32
32
|
def self.credentials
|
33
33
|
@credentials ||= begin
|
34
|
-
|
35
|
-
|
34
|
+
if File.exists?(credentials_path)
|
35
|
+
credentials = YAML.load_file(credentials_path)
|
36
|
+
(credentials && credentials[credential]) or raise LoadError.new missing_credentials
|
37
|
+
else
|
38
|
+
{}
|
39
|
+
end
|
36
40
|
end
|
37
41
|
end
|
38
42
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 81
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 33
|
10
|
+
version: 0.3.33
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- geemus (Wesley Beary)
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-12-
|
18
|
+
date: 2010-12-22 00:00:00 -08:00
|
19
19
|
default_executable: fog
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -286,6 +286,7 @@ files:
|
|
286
286
|
- lib/fog/aws/parsers/iam/create_access_key.rb
|
287
287
|
- lib/fog/aws/parsers/iam/create_group.rb
|
288
288
|
- lib/fog/aws/parsers/iam/create_user.rb
|
289
|
+
- lib/fog/aws/parsers/iam/get_user.rb
|
289
290
|
- lib/fog/aws/parsers/iam/list_access_keys.rb
|
290
291
|
- lib/fog/aws/parsers/iam/list_groups.rb
|
291
292
|
- lib/fog/aws/parsers/iam/list_policies.rb
|
@@ -379,6 +380,7 @@ files:
|
|
379
380
|
- lib/fog/aws/requests/iam/delete_group_policy.rb
|
380
381
|
- lib/fog/aws/requests/iam/delete_user.rb
|
381
382
|
- lib/fog/aws/requests/iam/delete_user_policy.rb
|
383
|
+
- lib/fog/aws/requests/iam/get_user.rb
|
382
384
|
- lib/fog/aws/requests/iam/list_access_keys.rb
|
383
385
|
- lib/fog/aws/requests/iam/list_group_policies.rb
|
384
386
|
- lib/fog/aws/requests/iam/list_groups.rb
|