Class: Gjp::ListKitMissingSourcesCommand

Inherits:
BaseCommand
  • Object
show all
Defined in:
lib/gjp/commands/list_kit_missing_sources.rb

Instance Method Summary collapse

Methods inherited from BaseCommand

#checking_exceptions, #configure_log_level, #ensure_dry_running, #format_path, #print_generation_result, #verbose=, #very_verbose=, #very_very_verbose=

Methods included from Logging

#log

Instance Method Details

#executeObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/gjp/commands/list_kit_missing_sources.rb', line 5

def execute
  checking_exceptions do
    project = Gjp::Project.new(".")
    kit_checker = Gjp::KitChecker.new(project)

    ensure_dry_running(false, project) do
      puts "Some source files were not found in these archives:"
      kit_checker.unsourced_archives.each do |archive|
        percentage = "%.2f" % (100.0 * archive[:unsourced_class_names].length / archive[:class_names].length)
        puts "#{format_path(archive[:archive], project)} (~#{percentage}% missing)"
      end
    end
  end
end