Sha256: 6ab776d04744d5db981b9e2800f105bf431b3f300e3535de7b50f58454b78c38
Contents?: true
Size: 1.78 KB
Versions: 60
Compression:
Stored size: 1.78 KB
Contents
module GovukPublishingComponents class AuditController < GovukPublishingComponents::ApplicationController def show application_dirs = %w[ collections collections-publisher content-data-admin content-publisher datagovuk_find email-alert-frontend feedback finder-frontend frontend government-frontend govspeak-preview govuk-account-manager-prototype govuk-coronavirus-vulnerable-people-form info-frontend licence-finder manuals-frontend release search-admin service-manual-frontend signon smart-answers static travel-advice-publisher whitehall ].sort application_dirs = [GovukPublishingComponents::ApplicationHelper.get_application_name_from_path(Rails.root)] unless ENV["MAIN_COMPONENT_GUIDE"] gem_path = Gem.loaded_specs["govuk_publishing_components"].full_gem_path gem_path = Dir.pwd if ENV["MAIN_COMPONENT_GUIDE"] components = AuditComponents.new(gem_path, false) applications = analyse_applications(File.expand_path("..", gem_path), application_dirs) compared_data = AuditComparer.new(components.data, applications, false) @applications = compared_data.applications_data || [] @components = compared_data.gem_data || [] end private def analyse_applications(path, application_dirs) results = [] @applications_found = false application_dirs.each do |application| application_path = [path, application].join("/") app = AuditApplications.new(application_path, application) @applications_found = true if app.data[:application_found] results << app.data end results end end end
Version data entries
60 entries across 60 versions & 1 rubygems