mirror of
https://github.com/inspec/inspec
synced 2024-12-01 00:49:24 +00:00
1a31425e81
* Initial Commit Signed-off-by: sfreeman <Steffanie.Freeman@d2l.com> * aws_iam_user uses lazy loading Signed-off-by: sfreeman <Steffanie.Freeman@d2l.com> * Disassociates convert call from list_users Signed-off-by: sfreeman <Steffanie.Freeman@d2l.com> * A real-world working AwsIamUsers (#71) * Add aws_iam_users Signed-off-by: Chris Redekop <chris.redekop@d2l.com> * Adding Filter table and Collect User Details to aws_iam_users.rb Signed-off-by: Chris Redekop <chris.redekop@d2l.com> * Adding Filter table and Collect User Details to aws_iam_users.rb Signed-off-by: Chris Redekop <chris.redekop@d2l.com> * Adding Filter table and Collect User Details to aws_iam_users.rb Signed-off-by: Chris Redekop <chris.redekop@d2l.com> * Get an aws_iam_users integration test to pass Signed-off-by: Chris Redekop <chris.redekop@d2l.com> * Fix RuboCop issues and tests Signed-off-by: Chris Redekop <chris.redekop@d2l.com> * Improving code based on PR feedback Signed-off-by: Chris Redekop <chris.redekop@d2l.com> * AWS IAM Users unit tests work with new lazy loading feature Signed-off-by: sfreeman <Steffanie.Freeman@d2l.com> * Fixes tests Signed-off-by: aduric <adnan.duric@d2l.com> * Users should only hold the returned user references, transfering responsibility to each user to fetch any details Signed-off-by: aduric <adnan.duric@d2l.com> * Create user details provider class Signed-off-by: sfreeman <Steffanie.Freeman@d2l.com> * Using details provider factory to delegate creation of detail providers, and updates tests Signed-off-by: aduric <adnan.duric@d2l.com> * Rubocop fixes Signed-off-by: aduric <adnan.duric@d2l.com> * Rename user details provider factory to initializer, and remove unnecessary instance variables Signed-off-by: sfreeman <Steffanie.Freeman@d2l.com>
18 lines
302 B
Ruby
18 lines
302 B
Ruby
# author: Alex Bedley
|
|
# author: Steffanie Freeman
|
|
|
|
module AwsIam
|
|
class UserProvider
|
|
def initialize(conn = AWSConnection.new)
|
|
@iam_resource = conn.iam_resource
|
|
end
|
|
|
|
def user(name)
|
|
@iam_resource.user(name)
|
|
end
|
|
|
|
def list_users
|
|
@iam_resource.users
|
|
end
|
|
end
|
|
end
|