Module: GitSurvey

Defined in:
lib/git_survey.rb,
lib/git_survey/version.rb

Overview

Generates a report on a git project’s history

Constant Summary collapse

VERSION =
'0.1.0'.freeze

Class Method Summary collapse

Class Method Details

.main(_argv) ⇒ Object



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/git_survey.rb', line 37

def self.main(_argv)
  options = Parser.parse(ARGV)

  # Google JSON Style Guide (camel case for keys)
  # https://google.github.io/styleguide/jsoncstyleguide.xml

  result = {
    EXECUTABLE_NAME => executable_hash(options),
    'repo' => repo_hash(options),
    'hotFiles' => ShellAdapter.hot_files(options.anonymize,
                                         options.input_directory,
                                         options.number_of_hotfiles),
    'authors' => ShellAdapter.authors(options.anonymize,
                                      options.input_directory)
  }

  puts JSON.pretty_generate(result)

  exit 0
end