pair_see 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -0
- data/.rubocop_todo.yml +98 -0
- data/.travis.yml +4 -0
- data/CHANGELOG.md +8 -0
- data/README.md +35 -43
- data/Rakefile +1 -1
- data/TODO.md +3 -20
- data/bin/bundler +7 -6
- data/bin/cc-tddium-post-worker +7 -6
- data/bin/coderay +7 -6
- data/bin/console +0 -0
- data/bin/htmldiff +7 -6
- data/bin/ldiff +7 -6
- data/bin/pairsee +22 -8
- data/bin/pry +7 -6
- data/bin/rake +7 -6
- data/bin/rake_commit +7 -6
- data/bin/rspec +7 -6
- data/bin/rubocop +7 -6
- data/bin/ruby-parse +7 -6
- data/bin/ruby-rewrite +7 -6
- data/config/config.yml.example +11 -0
- data/lib/pair_see.rb +1 -1
- data/lib/pair_see/active_devs.rb +3 -12
- data/lib/pair_see/card.rb +5 -4
- data/lib/pair_see/card_knowledge_summary.rb +25 -0
- data/lib/pair_see/cards_per_person.rb +35 -25
- data/lib/pair_see/date_combo.rb +2 -1
- data/lib/pair_see/knowledge_debt.rb +31 -0
- data/lib/pair_see/log_line.rb +38 -40
- data/lib/pair_see/log_line_parse.rb +24 -0
- data/lib/pair_see/log_lines.rb +6 -10
- data/lib/pair_see/{combo.rb → pair_commit_count.rb} +3 -2
- data/lib/pair_see/pair_recency.rb +27 -0
- data/lib/pair_see/pairing_event.rb +24 -0
- data/lib/pair_see/person.rb +0 -1
- data/lib/pair_see/seer.rb +25 -101
- data/lib/pair_see/too_much_stuff.rb +157 -0
- data/lib/pair_see/version.rb +1 -1
- data/pair_see.gemspec +1 -0
- metadata +13 -5
- data/config/config.yml.sample +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e643f465727a23bdecbf0b3bc4f562db6093bff1
|
4
|
+
data.tar.gz: 8d629337fa045ed9283d01345ded022168d65fde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f595c02ef0cd4fd4b0ba8b22fa1d5f6f785e291738df4e372fb8c6036e9735a4d95f680b7d04169d1a29ad9acc845c1a4a1e52c587c471c92fc54dc35bc60f3
|
7
|
+
data.tar.gz: 8f220e25fd5aaba1e88a8cd2e5b01dc5d12d720a4cf91cc05663a52a78bcca0a7b2788283b7c5b8752c11aa96217ebc5a750f97605aa1f16130f80a287c31873
|
data/.rubocop.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2017-10-25 01:55:47 -0200 using RuboCop version 0.49.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 2
|
10
|
+
Lint/AmbiguousOperator:
|
11
|
+
Exclude:
|
12
|
+
- 'lib/pair_see/log_lines.rb'
|
13
|
+
- 'lib/pair_see/too_much_stuff.rb'
|
14
|
+
|
15
|
+
# Offense count: 1
|
16
|
+
Lint/ScriptPermission:
|
17
|
+
Exclude:
|
18
|
+
- 'bin/console'
|
19
|
+
|
20
|
+
# Offense count: 1
|
21
|
+
Lint/Void:
|
22
|
+
Exclude:
|
23
|
+
- 'lib/pair_see/card.rb'
|
24
|
+
|
25
|
+
# Offense count: 1
|
26
|
+
Metrics/AbcSize:
|
27
|
+
Max: 34
|
28
|
+
|
29
|
+
# Offense count: 10
|
30
|
+
# Configuration parameters: CountComments, ExcludedMethods.
|
31
|
+
Metrics/BlockLength:
|
32
|
+
Max: 127
|
33
|
+
|
34
|
+
# Offense count: 1
|
35
|
+
# Configuration parameters: CountComments.
|
36
|
+
Metrics/ClassLength:
|
37
|
+
Max: 127
|
38
|
+
|
39
|
+
# Offense count: 1
|
40
|
+
Metrics/CyclomaticComplexity:
|
41
|
+
Max: 10
|
42
|
+
|
43
|
+
# Offense count: 63
|
44
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
45
|
+
# URISchemes: http, https
|
46
|
+
Metrics/LineLength:
|
47
|
+
Max: 172
|
48
|
+
|
49
|
+
# Offense count: 3
|
50
|
+
# Configuration parameters: CountComments.
|
51
|
+
Metrics/MethodLength:
|
52
|
+
Max: 34
|
53
|
+
|
54
|
+
# Offense count: 1
|
55
|
+
Metrics/PerceivedComplexity:
|
56
|
+
Max: 12
|
57
|
+
|
58
|
+
# Offense count: 1
|
59
|
+
Style/ClassVars:
|
60
|
+
Exclude:
|
61
|
+
- 'lib/pair_see/log_line_parse.rb'
|
62
|
+
|
63
|
+
# Offense count: 16
|
64
|
+
Style/Documentation:
|
65
|
+
Enabled: false
|
66
|
+
|
67
|
+
# Offense count: 35
|
68
|
+
# Cop supports --auto-correct.
|
69
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
70
|
+
# SupportedStyles: when_needed, always, never
|
71
|
+
Style/FrozenStringLiteralComment:
|
72
|
+
Enabled: false
|
73
|
+
|
74
|
+
# Offense count: 2
|
75
|
+
Style/MultilineBlockChain:
|
76
|
+
Exclude:
|
77
|
+
- 'lib/pair_see/too_much_stuff.rb'
|
78
|
+
|
79
|
+
# Offense count: 2
|
80
|
+
# Cop supports --auto-correct.
|
81
|
+
# Configuration parameters: AutoCorrect, EnforcedStyle, SupportedStyles.
|
82
|
+
# SupportedStyles: predicate, comparison
|
83
|
+
Style/NumericPredicate:
|
84
|
+
Exclude:
|
85
|
+
- 'spec/**/*'
|
86
|
+
- 'lib/pair_see/pair_commit_count.rb'
|
87
|
+
- 'lib/pair_see/too_much_stuff.rb'
|
88
|
+
|
89
|
+
# Offense count: 2
|
90
|
+
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
|
91
|
+
# NamePrefix: is_, has_, have_
|
92
|
+
# NamePrefixBlacklist: is_, has_, have_
|
93
|
+
# NameWhitelist: is_a?
|
94
|
+
Style/PredicateName:
|
95
|
+
Exclude:
|
96
|
+
- 'spec/**/*'
|
97
|
+
- 'lib/pair_see/card_knowledge_summary.rb'
|
98
|
+
- 'lib/pair_see/too_much_stuff.rb'
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
0.1.16
|
2
|
+
======
|
3
|
+
|
4
|
+
* refactoring & tests
|
5
|
+
* knowledge debt
|
6
|
+
* add sorting option --cards-by-commits This goes with --cards and sorts by number of commits instead of active card days
|
7
|
+
* add view --my-pairs Most recent dates of pairing for user
|
8
|
+
|
1
9
|
0.1.5
|
2
10
|
=====
|
3
11
|
* adding support for multiple git repositories specified by full path
|
data/README.md
CHANGED
@@ -15,22 +15,40 @@ Usage cases:
|
|
15
15
|
|
16
16
|
Example usage:
|
17
17
|
```
|
18
|
-
$ pairsee --
|
19
|
-
$ pairsee --extras
|
20
|
-
$ pairsee --
|
18
|
+
$ pairsee --after 2012-07-10 --config ../../foo/config/config.yml
|
19
|
+
$ pairsee --extras
|
20
|
+
$ pairsee --cards
|
21
21
|
```
|
22
22
|
|
23
23
|
```
|
24
24
|
Options:
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
--cards-per-person
|
33
|
-
|
25
|
+
-c, --config=<s> location of config file, example: ../../config/config.yml (default: config/config.yml)
|
26
|
+
-a, --after=<s> Date since which you want to get commits, in yyyy-mm-dd format (default: 0-1-1)
|
27
|
+
-e, --extras See all commits without the name of any dev in them
|
28
|
+
-l, --latest See dates of most recent commits by pairs
|
29
|
+
-r, --recommended See active devs who have not paired (and therefore should)
|
30
|
+
-d, --cards See cards and number of commits on each
|
31
|
+
-s, --cards-by-commits This goes with --cards and sorts by number of commits instead of active card days
|
32
|
+
-p, --cards-per-person See cards for each dev
|
33
|
+
-k, --knowledge-debt Knowledge debt (cards that only one person worked on)
|
34
|
+
-m, --my-pairs Most recent dates of pairing for user
|
35
|
+
-h, --help Show this message
|
36
|
+
|
37
|
+
```
|
38
|
+
|
39
|
+
Example config file (see also config/config.yml.sample)
|
40
|
+
```
|
41
|
+
names:
|
42
|
+
- Person1
|
43
|
+
- Person2
|
44
|
+
- ManyNamesPerson mnperson mprss
|
45
|
+
card_prefix:
|
46
|
+
- FOO-
|
47
|
+
- BAR-
|
48
|
+
roots:
|
49
|
+
- /Users/foo/repo1/
|
50
|
+
- /Users/foo/repositories/repo2
|
51
|
+
- /Users/foo/repositories/baz/repo3
|
34
52
|
```
|
35
53
|
|
36
54
|
to put on path:
|
@@ -46,42 +64,16 @@ rspec
|
|
46
64
|
rake_commit
|
47
65
|
```
|
48
66
|
|
49
|
-
Config file: `config/config.yml`
|
50
|
-
contains names and card prefix, a la
|
51
|
-
```
|
52
|
-
names: Person1 Person2 Person3
|
53
|
-
card_prefix: FOO-
|
54
|
-
```
|
55
|
-
|
56
|
-
So if your commit log looks like
|
57
|
-
```
|
58
|
-
"Bob/Alice [FOO-1] wrote code"
|
59
|
-
"Alice [FOO-1] stuff"
|
60
|
-
"Sarah|Alice [FOO-2] code and stuff"
|
61
|
-
```
|
62
|
-
|
63
|
-
Then your config file will look like:
|
64
|
-
```
|
65
|
-
names: Bob Alice Sarah
|
66
|
-
card_prefix: FOO-
|
67
|
-
```
|
68
|
-
|
69
67
|
To use PairSee with SVN, check out SVN codebase with git like: `git svn clone http://svn.example.com/project`
|
70
68
|
|
71
|
-
## Installation
|
72
|
-
|
73
|
-
Add this line to your application's Gemfile:
|
74
|
-
|
75
|
-
```ruby
|
76
|
-
gem 'pair_see'
|
77
|
-
```
|
78
|
-
|
79
|
-
## Usage
|
80
|
-
|
81
|
-
See example repo https://github.com/compwron/example_pair_see_use
|
82
69
|
|
83
70
|
## Development
|
84
71
|
|
85
72
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
|
86
73
|
|
87
74
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
75
|
+
|
76
|
+
```
|
77
|
+
rubocop --auto-correct
|
78
|
+
rubocop --auto-gen-config
|
79
|
+
```
|
data/Rakefile
CHANGED
data/TODO.md
CHANGED
@@ -1,22 +1,5 @@
|
|
1
|
-
-
|
2
|
-
- multiple codebases?
|
1
|
+
- see devs on longest running cards
|
3
2
|
- fix bug in "last commit" in -d, dates are not accurate
|
4
|
-
- sort --latest by commit date
|
5
|
-
- multiple card starters
|
6
|
-
|
7
|
-
- Rakefile / rake_commit
|
8
3
|
- Reduce number of git/filesystem interactions in spec
|
9
|
-
-
|
10
|
-
-
|
11
|
-
- Graph over time of cards worked on and duration
|
12
|
-
- add COLOR to graph / outputs - use vlad's color library?
|
13
|
-
- sort -s by # cards worked
|
14
|
-
|
15
|
-
- standardize quotes
|
16
|
-
|
17
|
-
Fix this bug:
|
18
|
-
DMM-103 - - - commits: 7 - - - duration: 0 days - - - last commit: 2017-03-07 - - - commits per day: Infinity
|
19
|
-
DMM-17 - - - commits: 71 - - - duration: -1 days - - - last commit: 2017-04-06 - - - commits per day: -71.0
|
20
|
-
DMM-39 - - - commits: 6 - - - duration: -6 days - - - last commit: 2017-04-12 - - - commits per day: -1.0
|
21
|
-
DMM-81 - - - commits: 3 - - - duration: -6 days - - - last commit: 2017-03-08 - - - commits per day: -0.5
|
22
|
-
DMM-136 - - - commits: 33 - - - duration: -33 days - - - last commit: 2017-05-30 - - - commits per day: -1.0
|
4
|
+
- increase test coverage
|
5
|
+
- refactor away too_much_stuff.rb into objects
|
data/bin/bundler
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
|
+
|
3
4
|
#
|
4
5
|
# This file was generated by Bundler.
|
5
6
|
#
|
@@ -7,11 +8,11 @@
|
|
7
8
|
# this file is here to facilitate running it.
|
8
9
|
#
|
9
10
|
|
10
|
-
require
|
11
|
-
ENV[
|
12
|
-
|
11
|
+
require 'pathname'
|
12
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
|
13
|
+
Pathname.new(__FILE__).realpath)
|
13
14
|
|
14
|
-
require
|
15
|
-
require
|
15
|
+
require 'rubygems'
|
16
|
+
require 'bundler/setup'
|
16
17
|
|
17
|
-
load Gem.bin_path(
|
18
|
+
load Gem.bin_path('bundler', 'bundler')
|
data/bin/cc-tddium-post-worker
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
|
+
|
3
4
|
#
|
4
5
|
# This file was generated by Bundler.
|
5
6
|
#
|
@@ -7,11 +8,11 @@
|
|
7
8
|
# this file is here to facilitate running it.
|
8
9
|
#
|
9
10
|
|
10
|
-
require
|
11
|
-
ENV[
|
12
|
-
|
11
|
+
require 'pathname'
|
12
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
|
13
|
+
Pathname.new(__FILE__).realpath)
|
13
14
|
|
14
|
-
require
|
15
|
-
require
|
15
|
+
require 'rubygems'
|
16
|
+
require 'bundler/setup'
|
16
17
|
|
17
|
-
load Gem.bin_path(
|
18
|
+
load Gem.bin_path('codeclimate-test-reporter', 'cc-tddium-post-worker')
|
data/bin/coderay
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
|
+
|
3
4
|
#
|
4
5
|
# This file was generated by Bundler.
|
5
6
|
#
|
@@ -7,11 +8,11 @@
|
|
7
8
|
# this file is here to facilitate running it.
|
8
9
|
#
|
9
10
|
|
10
|
-
require
|
11
|
-
ENV[
|
12
|
-
|
11
|
+
require 'pathname'
|
12
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
|
13
|
+
Pathname.new(__FILE__).realpath)
|
13
14
|
|
14
|
-
require
|
15
|
-
require
|
15
|
+
require 'rubygems'
|
16
|
+
require 'bundler/setup'
|
16
17
|
|
17
|
-
load Gem.bin_path(
|
18
|
+
load Gem.bin_path('coderay', 'coderay')
|
data/bin/console
CHANGED
File without changes
|
data/bin/htmldiff
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
|
+
|
3
4
|
#
|
4
5
|
# This file was generated by Bundler.
|
5
6
|
#
|
@@ -7,11 +8,11 @@
|
|
7
8
|
# this file is here to facilitate running it.
|
8
9
|
#
|
9
10
|
|
10
|
-
require
|
11
|
-
ENV[
|
12
|
-
|
11
|
+
require 'pathname'
|
12
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
|
13
|
+
Pathname.new(__FILE__).realpath)
|
13
14
|
|
14
|
-
require
|
15
|
-
require
|
15
|
+
require 'rubygems'
|
16
|
+
require 'bundler/setup'
|
16
17
|
|
17
|
-
load Gem.bin_path(
|
18
|
+
load Gem.bin_path('diff-lcs', 'htmldiff')
|
data/bin/ldiff
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
|
+
|
3
4
|
#
|
4
5
|
# This file was generated by Bundler.
|
5
6
|
#
|
@@ -7,11 +8,11 @@
|
|
7
8
|
# this file is here to facilitate running it.
|
8
9
|
#
|
9
10
|
|
10
|
-
require
|
11
|
-
ENV[
|
12
|
-
|
11
|
+
require 'pathname'
|
12
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
|
13
|
+
Pathname.new(__FILE__).realpath)
|
13
14
|
|
14
|
-
require
|
15
|
-
require
|
15
|
+
require 'rubygems'
|
16
|
+
require 'bundler/setup'
|
16
17
|
|
17
|
-
load Gem.bin_path(
|
18
|
+
load Gem.bin_path('diff-lcs', 'ldiff')
|
data/bin/pairsee
CHANGED
@@ -2,31 +2,37 @@
|
|
2
2
|
|
3
3
|
require_relative '../lib/pair_see/seer'
|
4
4
|
require_relative '../lib/pair_see/person'
|
5
|
+
require_relative '../lib/pair_see/knowledge_debt'
|
6
|
+
require_relative '../lib/pair_see/card_knowledge_summary'
|
7
|
+
require_relative '../lib/pair_see/pairing_event'
|
8
|
+
require_relative '../lib/pair_see/pair_recency'
|
5
9
|
require 'trollop'
|
6
|
-
require 'pry'
|
7
10
|
|
8
11
|
opts = Trollop.options do
|
9
|
-
opt :config, 'location of config file, example: ../../config/config.yml', default:
|
12
|
+
opt :config, 'location of config file, example: ../../config/config.yml', default: 'config/config.yml'
|
10
13
|
opt :after, 'Date since which you want to get commits, in yyyy-mm-dd format', default: '0-1-1'
|
11
14
|
opt :extras, 'See all commits without the name of any dev in them', default: false
|
12
15
|
opt :latest, 'See dates of most recent commits by pairs', default: false
|
13
16
|
opt :recommended, 'See active devs who have not paired (and therefore should)', default: false
|
14
17
|
opt :cards, 'See cards and number of commits on each', default: false
|
18
|
+
opt :cards_by_commits, 'This goes with --cards and sorts by number of commits instead of active card days', default: false
|
15
19
|
opt :cards_per_person, 'See cards for each dev', default: false
|
20
|
+
opt :knowledge_debt, 'Knowledge debt (cards that only one person worked on)', default: false
|
21
|
+
opt :my_pairs, 'Most recent dates of pairing for user', default: false
|
16
22
|
end
|
17
23
|
|
18
24
|
def run_command(opts)
|
19
25
|
begin
|
20
26
|
config = YAML.load_file(opts[:config])
|
21
27
|
rescue
|
22
|
-
puts
|
28
|
+
puts 'Config file not found at: ' + opts[:config] + " See config/config.yml.sample for an example. \n...exiting"
|
23
29
|
exit
|
24
30
|
end
|
25
31
|
options = {
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
32
|
+
names: config['names'].map { |i| PairSee::Person.new(i.split(' ')) }, # TODO: rename "names" to "people"
|
33
|
+
card_prefix: config['card_prefix'],
|
34
|
+
after_date: opts[:after],
|
35
|
+
repo_locations: config['roots']
|
30
36
|
}
|
31
37
|
|
32
38
|
seer = PairSee::Seer.new(options)
|
@@ -37,9 +43,17 @@ def run_command(opts)
|
|
37
43
|
elsif opts[:recommended]
|
38
44
|
seer.recommended_pairings
|
39
45
|
elsif opts[:cards]
|
40
|
-
|
46
|
+
if opts[:cards_by_commits]
|
47
|
+
seer.pretty_card_data_by_commits
|
48
|
+
else
|
49
|
+
seer.pretty_card_data
|
50
|
+
end
|
41
51
|
elsif opts[:cards_per_person]
|
42
52
|
seer.cards_per_person
|
53
|
+
elsif opts[:knowledge_debt]
|
54
|
+
seer.knowledge_debt
|
55
|
+
elsif opts[:my_pairs]
|
56
|
+
seer.pair_recency
|
43
57
|
else
|
44
58
|
seer.all_commits
|
45
59
|
end
|