git_ownership_insights 1.0.3 → 1.0.4

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: c8e4215542d1b1f05793def9ec7da4bf9c9cbdcc8b8fd0e00a912188ce877b85
4
- data.tar.gz: 0b10b78de68c0f71013a9d6a9458b45dd824ed283bd3b0613c93f3146b0d1fc8
3
+ metadata.gz: eed900c5cbbf25ebae6d25b453a5d994518875986a5fd757d7554b546d9a7dbe
4
+ data.tar.gz: c63e8d5565b97f970bc80c0b311f131116a619fa93743270e08395d99a3d8cf3
5
5
  SHA512:
6
- metadata.gz: f0cd127fa863e8d06d868527b5d3f2ea662f560d6149f95bbef1df18ed3442c7d08b6eb27aa4ed8e223c5bdbb2772a37aa1c8de41fb6920e5f96d7fd3555e833
7
- data.tar.gz: 58fcc55d06921ce4c57c008496c82af548992d2e007b24d3449a2b51b1957ac41aa5a0a87bf809d7435814cf5273e8e70aff80659bc5786772e4c8a144687ae3
6
+ metadata.gz: 7229e4d3b818bd48dc85dd88aada8f259f7d2ea0bb4e96e0947700e367d9d3d87250e4cb5107c30fe71bc34543085e675c9f30028c87eb6d5b43b575ac0a4957
7
+ data.tar.gz: 2b061059f5ff9b61ec3ee80b71df8e54cb8b6ed157c5e49c175e6c72f3c2cac40b59ebc7d78fc1b9202b108eb546f188dee3ed61a71bef8a39953fa56c8573dd
data/Gemfile.lock CHANGED
@@ -1,8 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- git_ownership_insights (0.1.4)
5
- awesome_print
4
+ git_ownership_insights (1.0.4)
6
5
  date
7
6
  pry
8
7
 
@@ -10,7 +9,6 @@ GEM
10
9
  remote: https://rubygems.org/
11
10
  specs:
12
11
  ast (2.4.2)
13
- awesome_print (1.9.2)
14
12
  coderay (1.1.3)
15
13
  date (3.3.4)
16
14
  diff-lcs (1.5.0)
@@ -10,11 +10,11 @@ options = {}
10
10
  OptionParser.new do |opts|
11
11
  opts.banner = 'Usage: git_ownership_insights [options]'
12
12
 
13
- opts.on('-d', '--debug', 'Enable debug mode') do
13
+ opts.on('--debug', 'Enable debug mode') do
14
14
  options[:debug] = true
15
15
  end
16
16
 
17
- opts.on('-ci', '--ci', 'Do not print the info messages for better CI text parsing [default: false]') do
17
+ opts.on('--ci', 'Do not print the info messages for better CI text parsing [default: false]') do
18
18
  options[:ci] = true
19
19
  end
20
20
 
@@ -22,56 +22,56 @@ OptionParser.new do |opts|
22
22
  options[:codeowners] = true
23
23
  end
24
24
 
25
- opts.on('-hf', '--hotspot-files', 'Print the found hotspot files (big files touched by many) [default: false]') do
25
+ opts.on('--hotspot-files', 'Print the found hotspot files (big files touched by many) [default: false]') do
26
26
  options[:hotspot_files] = true
27
27
  end
28
28
 
29
- opts.on('-ec', '--excluded-contributors STRING', 'Comma-delimited list of excluded contributors [example: WEB,RAILS,MOBILE]') do |exclusions|
29
+ opts.on('--excluded-contributors STRING', 'Comma-delimited list of excluded contributors [example: WEB,RAILS,MOBILE]') do |exclusions|
30
30
  options[:exclusions] = exclusions
31
31
  end
32
32
 
33
- opts.on('-ef', '--excluded-files STRING', 'Comma-delimited list of excluded files [example: ViewController,AppDelegate.swift]') do |excluded_files|
33
+ opts.on('--excluded-files STRING', 'Comma-delimited list of excluded files [example: ViewController,AppDelegate.swift]') do |excluded_files|
34
34
  options[:excluded_files] = excluded_files
35
35
  end
36
36
 
37
- opts.on('-s', '--steps STRING', 'Number of steps the script will go into the past [default: 1]') do |steps|
37
+ opts.on('--steps STRING', 'Number of steps the script will go into the past [default: 1]') do |steps|
38
38
  options[:steps] = steps
39
39
  end
40
40
 
41
- opts.on('-d', '--duration-in-days STRING',
41
+ opts.on('--duration-in-days STRING',
42
42
  'Number of days to aggregate the changes for [default: 30]') do |duration_in_days|
43
43
  options[:duration_in_days] = duration_in_days
44
44
  end
45
45
 
46
- opts.on('-p', '--path STRING', 'Path to the directory or file to calculate the ownership [default: "."]') do |path|
46
+ opts.on('--path STRING', 'Path to the directory or file to calculate the ownership [default: "."]') do |path|
47
47
  options[:path] = path
48
48
  end
49
49
 
50
- opts.on('-reg', '--team-regex STRING', 'Regex that will identify the team name [default: "[A-Za-z]+"]') do |team_regex|
50
+ opts.on('--team-regex STRING', 'Regex that will identify the team name [default: "[A-Za-z]+"]') do |team_regex|
51
51
  options[:team_regex] = team_regex
52
52
  end
53
53
 
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
+ opts.on('--top-contributing-team STRING', 'Limit of top contributed to the directory teams in codeownership data [default: 5]') do |top_contributing_team|
55
55
  options[:top_contributing_team] = top_contributing_team
56
56
  end
57
57
 
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
+ opts.on('--top-touched-files STRING', 'Limit of top touched files by individual contributors in codeownership data [default: 5]') do |top_touched_files|
59
59
  options[:top_touched_files] = top_touched_files
60
60
  end
61
61
 
62
- opts.on('-cp', '--codeowners-path STRING', 'Path to CODEOWNERS file [default: .github/CODEOWNERS]') do |codeowners_path|
62
+ opts.on('--codeowners-path STRING', 'Path to CODEOWNERS file [default: .github/CODEOWNERS]') do |codeowners_path|
63
63
  options[:codeowners_path] = codeowners_path
64
64
  end
65
65
 
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
+ opts.on('--big-file-size STRING', 'The amount of lines in the file to be considered big [default: 250]') do |big_file_size|
67
67
  options[:big_file_size] = big_file_size
68
68
  end
69
69
 
70
- opts.on('-b', '--default-branch STRING', 'The default branch to pull and run metrics for [default: master]') do |default_branch|
70
+ opts.on('--default-branch STRING', 'The default branch to pull and run metrics for [default: master]') do |default_branch|
71
71
  options[:default_branch] = default_branch
72
72
  end
73
73
 
74
- opts.on('-ext', '--code-extensions STRING', 'The file extensions that consider to be code [default: ".kt, .swift"]') do |code_extension|
74
+ opts.on('--code-extensions STRING', 'The file extensions that consider to be code [default: ".kt, .swift"]') do |code_extension|
75
75
  options[:code_extension] = code_extension
76
76
  end
77
77
 
@@ -145,6 +145,7 @@ def find_owners(file_path, codeowners)
145
145
  end
146
146
 
147
147
  def count_big_files(directory_path, size: BIG_FILE_SIZE)
148
+ size = size.to_i
148
149
  # Get a list of all files in the specified directory
149
150
  files = Dir.glob(File.join(directory_path, '**', '*')).select { |file| File.file?(file) }
150
151
 
@@ -313,7 +314,7 @@ unless CI
313
314
  end
314
315
 
315
316
  system("git checkout #{DEFAULT_BRANCH}", [ :out ] => File::NULL)
316
- system("git pull", [ :out ] => File::NULL)
317
+ system("git pull", [ :out, :err ] => File::NULL)
317
318
 
318
319
  contribution_message(duration_in_days: options[:duration_in_days] || 30, directory_path: REPO_PATH,
319
320
  begin_time: DateTime.now, steps: options[:steps].to_i, debug: options[:debug])
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GitOwnershipInsights
4
- VERSION = '1.0.3'
4
+ VERSION = '1.0.4'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_ownership_insights
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Serghei Moret