30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# File 'lib/code_stats/code_stats.rb', line 30
def analyze_and_report *args
options = args.
paths = args
options.validate_options! *(FileSet::AVAILIABLE_OPTIONS + Project::AVAILIABLE_OPTIONS)
project_options = options.select{|k, v| Project::AVAILIABLE_OPTIONS.include? k}
lang_options = options.select{|k, v| FileSet::AVAILIABLE_OPTIONS.include? k}
projects = analyze *(paths << project_options)
report = Report.new(*(projects << lang_options)).render
report_file = "./projects_statistics.html".to_file
report_file.write report
info "done, statistics are in #{report_file}"
Kernel.exec "open #{report_file}"
end
|