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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 395e98d640b7d14ff1c16a02ed3c21ff21823317
4
- data.tar.gz: 33ca0a5a3b708ab237cf3c7bf90f16a86457e89d
3
+ metadata.gz: e643f465727a23bdecbf0b3bc4f562db6093bff1
4
+ data.tar.gz: 8d629337fa045ed9283d01345ded022168d65fde
5
5
  SHA512:
6
- metadata.gz: 5d047500df1fac79f523fca933d433879dfa174d2de09fbf137ddcc5ce8073310a51e874f42c88026a29ac5f81d3898327d63071e72ceb8166e86cf764ed1759
7
- data.tar.gz: 1b818b5f0a1aff57f1c9de4f2cfb7be3eada651693c400b5fc66319ebb7ab37358ddb5e8f3fd974674c823e930cc0f1c5d7c2329a721c325a3ca090cb4cac9b4
6
+ metadata.gz: 0f595c02ef0cd4fd4b0ba8b22fa1d5f6f785e291738df4e372fb8c6036e9735a4d95f680b7d04169d1a29ad9acc845c1a4a1e52c587c471c92fc54dc35bc60f3
7
+ data.tar.gz: 8f220e25fd5aaba1e88a8cd2e5b01dc5d12d720a4cf91cc05663a52a78bcca0a7b2788283b7c5b8752c11aa96217ebc5a750f97605aa1f16130f80a287c31873
@@ -0,0 +1 @@
1
+ inherit_from: .rubocop_todo.yml
@@ -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'
@@ -1,6 +1,10 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - '2.4.1'
4
+ - '2.3.0'
5
+ - '2.2.0'
6
+ - '2.1.0'
7
+ - '1.9.3'
4
8
  addons:
5
9
  code_climate:
6
10
  repo_token: cdb26718880608c44fda7463511e0151140ade238d92cb1044892472da13ca48
@@ -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 --root ../../my_code --after 2012-07-10 --config ../../foo/config/config.yml
19
- $ pairsee --extras --root ../../my_code
20
- $ pairsee --latest --after 2012-09-01 # this outputs pairings by most recent by all devs who have committed since given date (purpose of this is to exclude people who are no longer committers)
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
- --root, -r <s>: Folder in which .git folder is (default: .)
26
- --config, -c <s>: location of config file, example: ../../config/config.yml (default: bin/pairsee/../../config/config.yml)
27
- --after, -a <s>: Date since which you want to get commits, in yyyy-mm-dd format (default: 0-1-1)
28
- --extras, -e: See all commits without the name of any dev in them
29
- --latest, -l: See dates of most recent commits by pairs
30
- --recommended, -o: See active devs who have not paired (and therefore should)
31
- --cards, -d: See cards and number of commits on each
32
- --cards-per-person, -s: See cards for each dev
33
- --help, -h: Show this message
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
@@ -3,4 +3,4 @@ require 'rspec/core/rake_task'
3
3
 
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
- task :default => [:spec]
6
+ task default: [:spec]
data/TODO.md CHANGED
@@ -1,22 +1,5 @@
1
- - Fix bug in --extras where multi-name users are shown in extras
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
- - aggregate stats across multiple git repos
10
- - label for "BAD" to most-solo-commits view
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
@@ -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 "pathname"
11
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
- Pathname.new(__FILE__).realpath)
11
+ require 'pathname'
12
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
13
+ Pathname.new(__FILE__).realpath)
13
14
 
14
- require "rubygems"
15
- require "bundler/setup"
15
+ require 'rubygems'
16
+ require 'bundler/setup'
16
17
 
17
- load Gem.bin_path("bundler", "bundler")
18
+ load Gem.bin_path('bundler', 'bundler')
@@ -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 "pathname"
11
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
- Pathname.new(__FILE__).realpath)
11
+ require 'pathname'
12
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
13
+ Pathname.new(__FILE__).realpath)
13
14
 
14
- require "rubygems"
15
- require "bundler/setup"
15
+ require 'rubygems'
16
+ require 'bundler/setup'
16
17
 
17
- load Gem.bin_path("codeclimate-test-reporter", "cc-tddium-post-worker")
18
+ load Gem.bin_path('codeclimate-test-reporter', 'cc-tddium-post-worker')
@@ -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 "pathname"
11
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
- Pathname.new(__FILE__).realpath)
11
+ require 'pathname'
12
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
13
+ Pathname.new(__FILE__).realpath)
13
14
 
14
- require "rubygems"
15
- require "bundler/setup"
15
+ require 'rubygems'
16
+ require 'bundler/setup'
16
17
 
17
- load Gem.bin_path("coderay", "coderay")
18
+ load Gem.bin_path('coderay', 'coderay')
File without changes
@@ -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 "pathname"
11
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
- Pathname.new(__FILE__).realpath)
11
+ require 'pathname'
12
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
13
+ Pathname.new(__FILE__).realpath)
13
14
 
14
- require "rubygems"
15
- require "bundler/setup"
15
+ require 'rubygems'
16
+ require 'bundler/setup'
16
17
 
17
- load Gem.bin_path("diff-lcs", "htmldiff")
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 "pathname"
11
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
- Pathname.new(__FILE__).realpath)
11
+ require 'pathname'
12
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
13
+ Pathname.new(__FILE__).realpath)
13
14
 
14
- require "rubygems"
15
- require "bundler/setup"
15
+ require 'rubygems'
16
+ require 'bundler/setup'
16
17
 
17
- load Gem.bin_path("diff-lcs", "ldiff")
18
+ load Gem.bin_path('diff-lcs', 'ldiff')
@@ -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: "config/config.yml"
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 "Config file not found at: " + opts[:config] + " See config/config.yml.sample for an example. \n...exiting"
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
- names: config['names'].map {|i| PairSee::Person.new(i.split(' '))}, # todo rename "names" to "people"
27
- card_prefix: config['card_prefix'],
28
- after_date: opts[:after],
29
- repo_locations: config['roots']
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
- seer.pretty_card_data
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