git_ownership_insights 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2fa8a6909c32117aee3b0472a09e345027761f5e76ba9a3802b3207ec6305dc7
4
- data.tar.gz: add3ba1c16614cf20908fdc71188e9ec1b16f672a9953727c78e87171ae1fed9
3
+ metadata.gz: c8e4215542d1b1f05793def9ec7da4bf9c9cbdcc8b8fd0e00a912188ce877b85
4
+ data.tar.gz: 0b10b78de68c0f71013a9d6a9458b45dd824ed283bd3b0613c93f3146b0d1fc8
5
5
  SHA512:
6
- metadata.gz: e0b2d324e4063100bb30851dc221034d5caab9c1a80c5164ef23dd38e81ed8614f80b901e2f6f307cfd739b4a6481b1146575c340671a8a8a8b35ab01def9ed9
7
- data.tar.gz: 0fcb12355a628464d748e191068b67c3e7c09aac0ce3088c70fc3fb3409d55dd54bc2f5d877e871283c6296ea475533ecf69759876f0e84ddf9fe42d30866b04
6
+ metadata.gz: f0cd127fa863e8d06d868527b5d3f2ea662f560d6149f95bbef1df18ed3442c7d08b6eb27aa4ed8e223c5bdbb2772a37aa1c8de41fb6920e5f96d7fd3555e833
7
+ data.tar.gz: 58fcc55d06921ce4c57c008496c82af548992d2e007b24d3449a2b51b1957ac41aa5a0a87bf809d7435814cf5273e8e70aff80659bc5786772e4c8a144687ae3
@@ -4,16 +4,17 @@
4
4
  require 'date'
5
5
  require 'optparse'
6
6
  require 'pry'
7
+ require_relative '../lib/git_ownership_insights/version'
7
8
 
8
9
  options = {}
9
10
  OptionParser.new do |opts|
10
11
  opts.banner = 'Usage: git_ownership_insights [options]'
11
12
 
12
- opts.on('--debug', 'Enable debug mode') do
13
+ opts.on('-d', '--debug', 'Enable debug mode') do
13
14
  options[:debug] = true
14
15
  end
15
16
 
16
- opts.on('--ci', 'Do not print the info messages for better CI text parsing [default: false]') do
17
+ opts.on('-ci', '--ci', 'Do not print the info messages for better CI text parsing [default: false]') do
17
18
  options[:ci] = true
18
19
  end
19
20
 
@@ -21,59 +22,64 @@ OptionParser.new do |opts|
21
22
  options[:codeowners] = true
22
23
  end
23
24
 
24
- opts.on('--hotspot-files', 'Print the found hotspot files (big files touched by many) [default: false]') do
25
+ opts.on('-hf', '--hotspot-files', 'Print the found hotspot files (big files touched by many) [default: false]') do
25
26
  options[:hotspot_files] = true
26
27
  end
27
28
 
28
- opts.on('--excluded-contributors STRING', 'Comma-delimited list of excluded contributors [example: WEB,RAILS,MOBILE]') do |exclusions|
29
+ opts.on('-ec', '--excluded-contributors STRING', 'Comma-delimited list of excluded contributors [example: WEB,RAILS,MOBILE]') do |exclusions|
29
30
  options[:exclusions] = exclusions
30
31
  end
31
32
 
32
- opts.on('--excluded-files STRING', 'Comma-delimited list of excluded files [example: ViewController,AppDelegate.swift]') do |excluded_files|
33
+ opts.on('-ef', '--excluded-files STRING', 'Comma-delimited list of excluded files [example: ViewController,AppDelegate.swift]') do |excluded_files|
33
34
  options[:excluded_files] = excluded_files
34
35
  end
35
36
 
36
- opts.on('--steps STRING', 'Number of steps the script will go into the past [default: 1]') do |steps|
37
+ opts.on('-s', '--steps STRING', 'Number of steps the script will go into the past [default: 1]') do |steps|
37
38
  options[:steps] = steps
38
39
  end
39
40
 
40
- opts.on('--duration-in-days STRING',
41
+ opts.on('-d', '--duration-in-days STRING',
41
42
  'Number of days to aggregate the changes for [default: 30]') do |duration_in_days|
42
43
  options[:duration_in_days] = duration_in_days
43
44
  end
44
45
 
45
- opts.on('--path STRING', 'Path to the directory or file to calculate the ownership [default: "."]') do |path|
46
+ opts.on('-p', '--path STRING', 'Path to the directory or file to calculate the ownership [default: "."]') do |path|
46
47
  options[:path] = path
47
48
  end
48
49
 
49
- opts.on('--team-regex STRING', 'Regex that will identify the team name [default: "[A-Za-z]+"]') do |team_regex|
50
+ opts.on('-reg', '--team-regex STRING', 'Regex that will identify the team name [default: "[A-Za-z]+"]') do |team_regex|
50
51
  options[:team_regex] = team_regex
51
52
  end
52
53
 
53
- opts.on('--top-contributing-team STRING', 'Limit of top contributed to the directory teams in codeownership data [default: 5]') do |top_contributing_team|
54
+ opts.on('-t', '--top-contributing-team STRING', 'Limit of top contributed to the directory teams in codeownership data [default: 5]') do |top_contributing_team|
54
55
  options[:top_contributing_team] = top_contributing_team
55
56
  end
56
57
 
57
- opts.on('--top-touched-files STRING', 'Limit of top touched files by individual contributors in codeownership data [default: 5]') do |top_touched_files|
58
+ opts.on('-files', '--top-touched-files STRING', 'Limit of top touched files by individual contributors in codeownership data [default: 5]') do |top_touched_files|
58
59
  options[:top_touched_files] = top_touched_files
59
60
  end
60
61
 
61
- opts.on('--codeowners-path STRING', 'Path to CODEOWNERS file [default: .github/CODEOWNERS]') do |codeowners_path|
62
+ opts.on('-cp', '--codeowners-path STRING', 'Path to CODEOWNERS file [default: .github/CODEOWNERS]') do |codeowners_path|
62
63
  options[:codeowners_path] = codeowners_path
63
64
  end
64
65
 
65
- opts.on('--big-file-size STRING', 'The amount of lines in the file to be considered big [default: 250]') do |big_file_size|
66
+ opts.on('-s', '--big-file-size STRING', 'The amount of lines in the file to be considered big [default: 250]') do |big_file_size|
66
67
  options[:big_file_size] = big_file_size
67
68
  end
68
69
 
69
- opts.on('--default-branch STRING', 'The default branch to pull and run metrics for [default: master]') do |default_branch|
70
+ opts.on('-b', '--default-branch STRING', 'The default branch to pull and run metrics for [default: master]') do |default_branch|
70
71
  options[:default_branch] = default_branch
71
72
  end
72
73
 
73
- opts.on('--code-extensions STRING', 'The file extensions that consider to be code [default: ".kt, .swift"]') do |code_extension|
74
+ opts.on('-ext', '--code-extensions STRING', 'The file extensions that consider to be code [default: ".kt, .swift"]') do |code_extension|
74
75
  options[:code_extension] = code_extension
75
76
  end
76
77
 
78
+ opts.on('-v', '--version', 'Display the version of the gem') do
79
+ puts "git_ownership_insights version #{GitOwnershipInsights::VERSION}"
80
+ exit
81
+ end
82
+
77
83
  opts.on('-h', '--help', 'Display this help message') do
78
84
  puts opts
79
85
  puts <<~EXAMPLES
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GitOwnershipInsights
4
- VERSION = '1.0.2'
4
+ VERSION = '1.0.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_ownership_insights
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Serghei Moret
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-22 00:00:00.000000000 Z
11
+ date: 2024-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: date