Class: Neetob::CLI::Users::Audit
- Defined in:
- lib/neetob/cli/users/audit.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#sandbox ⇒ Object
Returns the value of attribute sandbox.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(sandbox = false) ⇒ Audit
constructor
A new instance of Audit.
- #run ⇒ Object
Methods included from Utils
#camel_case_to_slug, #is_upper?, #symbolize_keys
Constructor Details
#initialize(sandbox = false) ⇒ Audit
Returns a new instance of Audit.
11 12 13 14 |
# File 'lib/neetob/cli/users/audit.rb', line 11 def initialize(sandbox = false) super() @sandbox = sandbox end |
Instance Attribute Details
#sandbox ⇒ Object
Returns the value of attribute sandbox.
9 10 11 |
# File 'lib/neetob/cli/users/audit.rb', line 9 def sandbox @sandbox end |
Instance Method Details
#run ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/neetob/cli/users/audit.rb', line 16 def run users_data = users_for_all_available_apps users = extract_values_from_user_data(users_data) email_repos_map = create_email_repos_map(users) unique_users = users.uniq { |user| [user[0], user[1]] }.sort ui.info("\nUsers with multiple emails:") find_users_with_multiple_emails(unique_users.transpose, email_repos_map) ui.info("Users with emails having 3rd party domains:") find_users_with_invalid_emails(unique_users.transpose, email_repos_map) end |