Sha256: 42a0c78c04079cf2f7933ab08b28a806dc8aff107543967bb9a1c3bc7d7c7802

Contents?: true

Size: 1.2 KB

Versions: 13

Compression:

Stored size: 1.2 KB

Contents

# frozen_string_literal: true

module Neetob
  class CLI
    module MonthlyAudit
      module Databases
        class UsersUniqueEmailIndex < CLI::Base
          def initialize
            super()
          end

          def run
            repo_data = [[
              "Repository",
              "User table is indexed properly",
              "Comments",
              "Audit Passed"
              ]
            ]
            NeetoCompliance::NeetoRepos.products.keys.each do |repo|
              ui.info "Checking #{repo}...", print_to_audit_log: false
              code_audit_result = Neetob::CLI::Code::Audit.new([repo]).run[0]
              if code_audit_result[:error]
                repo_data << [repo, nil, code_audit_result[:error], "No"]
                next
              end
              unique_email_index_result = code_audit_result[:unique_email_index_result]
              if unique_email_index_result
                repo_data << [repo, "Yes", nil, "Yes"]
              else
                repo_data << [repo, "No", "Unique email index is not present for the users table", "No"]
              end
            end
            ui.print_table(repo_data)
          end
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
neetob-0.5.29 lib/neetob/cli/monthly_audit/databases/users_unique_email_index.rb
neetob-0.5.28 lib/neetob/cli/monthly_audit/databases/users_unique_email_index.rb
neetob-0.5.27 lib/neetob/cli/monthly_audit/databases/users_unique_email_index.rb
neetob-0.5.26 lib/neetob/cli/monthly_audit/databases/users_unique_email_index.rb
neetob-0.5.25 lib/neetob/cli/monthly_audit/databases/users_unique_email_index.rb
neetob-0.5.24 lib/neetob/cli/monthly_audit/databases/users_unique_email_index.rb
neetob-0.5.23 lib/neetob/cli/monthly_audit/databases/users_unique_email_index.rb
neetob-0.5.22 lib/neetob/cli/monthly_audit/databases/users_unique_email_index.rb
neetob-0.5.21 lib/neetob/cli/monthly_audit/databases/users_unique_email_index.rb
neetob-0.5.20 lib/neetob/cli/monthly_audit/databases/users_unique_email_index.rb
neetob-0.5.19 lib/neetob/cli/monthly_audit/databases/users_unique_email_index.rb
neetob-0.5.18 lib/neetob/cli/monthly_audit/databases/users_unique_email_index.rb
neetob-0.5.17 lib/neetob/cli/monthly_audit/databases/users_unique_email_index.rb