Method: Metior.report

Defined in:
lib/metior.rb

.report(type, repo_options, target_dir, range = nil, report = 'default') ⇒ Object

Generates a report for the given repository

Parameters:

  • type (Symbol)

    The type of the repository, e.g. :git

  • options (Array<Object>)

    The options to use for creating the new repository, e.g. a file system path

  • target_dir (String)

    The target directory to save the report to

  • range (String, Range) (defaults to: nil)

    The commit range to analyze for the report

  • report (String) (defaults to: 'default')

    The name of the report template to use

[View source]

36
37
38
39
40
# File 'lib/metior.rb', line 36

def self.report(type, repo_options, target_dir, range = nil, report = 'default')
  repo = repository type, *repo_options
  range ||= repo.vcs::DEFAULT_BRANCH
  Report.create(report, repo, range).generate target_dir
end