pair_see 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c5d5bd766eaf71d59dde14e9aba95c54c2ff727e
4
- data.tar.gz: 27e261345062f50e6ee19570eafdc6a8154574ff
3
+ metadata.gz: 44029153ff3ea1d71f64f91a64838361f7c3c23e
4
+ data.tar.gz: 19a2a60b23c5405dd1baf2035472409d9cba17dd
5
5
  SHA512:
6
- metadata.gz: 9b1ede159db64a6a3ceb7b7e4ea6cfe99584a30cb2c2211dc62337961d2375f71f5a90a4f04f67606c2fb1380fca9b72be2b8467ddd68e22a29e8265f0724582
7
- data.tar.gz: cdb93f2ad075df36de48391d7fe1d201b3c07f5df89341423fc5c1492f4602474ba28179f8891d2e01f5bf7efe2a99ea5e2afaaf0ab7a5f5c2bc87e3b3e1347f
6
+ metadata.gz: db6b0146e6b446a2ae793dde5fb881ce04452789af62bb952018fdafcbb47840a983f7fb6507147adce3c60e7d827bd6590164869f30983c9563bdb031f1e2fd
7
+ data.tar.gz: d88f156a7a2d57bc5458412b5a85965e7976de2eb3ed307f19e2d8e785e600575247a23a08e5a40b72be02008ed38d4ff87f1ff7b1d795470770a650b9b8ab6d
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.2.1
1
+ 2.4.1
data/.travis.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
- - "2.2.1"
4
- script: CODECLIMATE_REPO_TOKEN=cdb26718880608c44fda7463511e0151140ade238d92cb1044892472da13ca48 bundle exec rake rspec
3
+ - "2.3.3"
4
+ script: CODECLIMATE_REPO_TOKEN=cdb26718880608c44fda7463511e0151140ade238d92cb1044892472da13ca48 bundle exec rake
5
5
  # script: CODECLIMATE_REPO_TOKEN=fdf133973df1a994c9201d11cb862686f00341915ba80834f7a6073f71a8a947 bundle exec rake
6
6
  notifications:
7
7
  email: false
data/Gemfile CHANGED
@@ -1 +1,2 @@
1
+ source 'https://rubygems.org'
1
2
  gemspec
data/Gemfile.lock CHANGED
@@ -1,65 +1,81 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pair_see (0.1.2)
5
- git (~> 1.2)
6
- trollop (~> 2.0)
4
+ pair_see (0.1.3)
5
+ git (~> 1.3)
6
+ trollop (~> 2.1)
7
7
  yamler (~> 0.1)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- ast (2.0.0)
13
- astrolabe (1.3.0)
14
- parser (>= 2.2.0.pre.3, < 3.0)
15
- codeclimate-test-reporter (0.4.7)
16
- simplecov (>= 0.7.1, < 1.0.0)
17
- diff-lcs (1.2.5)
12
+ ast (2.3.0)
13
+ codeclimate-test-reporter (1.0.8)
14
+ simplecov (<= 0.13)
15
+ coderay (1.1.1)
16
+ diff-lcs (1.3)
18
17
  docile (1.1.5)
19
- git (1.2.9.1)
20
- multi_json (1.11.0)
21
- parser (2.2.0.3)
22
- ast (>= 1.1, < 3.0)
23
- powerpack (0.1.0)
24
- rainbow (2.0.0)
25
- rake (10.4.2)
26
- rake_commit (1.1.0)
27
- rspec (3.2.0)
28
- rspec-core (~> 3.2.0)
29
- rspec-expectations (~> 3.2.0)
30
- rspec-mocks (~> 3.2.0)
31
- rspec-core (3.2.1)
32
- rspec-support (~> 3.2.0)
33
- rspec-expectations (3.2.0)
18
+ git (1.3.0)
19
+ json (2.1.0)
20
+ method_source (0.8.2)
21
+ parallel (1.11.2)
22
+ parser (2.4.0.0)
23
+ ast (~> 2.2)
24
+ powerpack (0.1.1)
25
+ pry (0.10.4)
26
+ coderay (~> 1.1.0)
27
+ method_source (~> 0.8.1)
28
+ slop (~> 3.4)
29
+ rainbow (2.2.2)
30
+ rake
31
+ rake (10.5.0)
32
+ rake_commit (1.3.0)
33
+ rake (>= 0.9.2.2, < 11)
34
+ word_wrap (~> 1.0)
35
+ rspec (3.6.0)
36
+ rspec-core (~> 3.6.0)
37
+ rspec-expectations (~> 3.6.0)
38
+ rspec-mocks (~> 3.6.0)
39
+ rspec-core (3.6.0)
40
+ rspec-support (~> 3.6.0)
41
+ rspec-expectations (3.6.0)
34
42
  diff-lcs (>= 1.2.0, < 2.0)
35
- rspec-support (~> 3.2.0)
36
- rspec-mocks (3.2.1)
43
+ rspec-support (~> 3.6.0)
44
+ rspec-mocks (3.6.0)
37
45
  diff-lcs (>= 1.2.0, < 2.0)
38
- rspec-support (~> 3.2.0)
39
- rspec-support (3.2.2)
40
- rubocop (0.29.1)
41
- astrolabe (~> 1.3)
42
- parser (>= 2.2.0.1, < 3.0)
46
+ rspec-support (~> 3.6.0)
47
+ rspec-support (3.6.0)
48
+ rubocop (0.49.0)
49
+ parallel (~> 1.10)
50
+ parser (>= 2.3.3.1, < 3.0)
43
51
  powerpack (~> 0.1)
44
52
  rainbow (>= 1.99.1, < 3.0)
45
- ruby-progressbar (~> 1.4)
46
- ruby-progressbar (1.7.1)
47
- simplecov (0.9.2)
53
+ ruby-progressbar (~> 1.7)
54
+ unicode-display_width (~> 1.0, >= 1.0.1)
55
+ ruby-progressbar (1.8.1)
56
+ simplecov (0.13.0)
48
57
  docile (~> 1.1.0)
49
- multi_json (~> 1.0)
50
- simplecov-html (~> 0.9.0)
51
- simplecov-html (0.9.0)
58
+ json (>= 1.8, < 3)
59
+ simplecov-html (~> 0.10.0)
60
+ simplecov-html (0.10.1)
61
+ slop (3.6.0)
52
62
  trollop (2.1.2)
63
+ unicode-display_width (1.2.1)
64
+ word_wrap (1.0.0)
53
65
  yamler (0.1.0)
54
66
 
55
67
  PLATFORMS
56
68
  ruby
57
69
 
58
70
  DEPENDENCIES
59
- bundler (~> 1.8)
60
- codeclimate-test-reporter (~> 0.4.7)
71
+ bundler (~> 1.15)
72
+ codeclimate-test-reporter (~> 1.0.8)
61
73
  pair_see!
62
- rake (~> 10.4)
63
- rake_commit (~> 1.1)
64
- rspec (~> 3.2)
65
- rubocop (~> 0.29)
74
+ pry
75
+ rake (~> 10)
76
+ rake_commit (~> 1.3)
77
+ rspec (~> 3.6)
78
+ rubocop (~> 0.49.0)
79
+
80
+ BUNDLED WITH
81
+ 1.15.0
data/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
  [![Test Coverage](https://codeclimate.com/github/compwron/pairSee/badges/coverage.svg)](https://codeclimate.com/github/compwron/pairSee)
5
5
  [![Build Status](https://travis-ci.org/compwron/pairSee.svg)](https://travis-ci.org/compwron/pairSee)
6
6
  [![Dependency Status](https://gemnasium.com/compwron/pairSee.png)](https://gemnasium.com/compwron/pairSee)
7
+ [![Gem Version](https://img.shields.io/gem/v/pair_see.svg)](https://rubygems.org/gems/pair_see)
8
+ [![License](http://img.shields.io/:license-mit-blue.svg)](http://doge.mit-license.org)
7
9
 
8
10
 
9
11
  Usage cases:
data/Rakefile CHANGED
@@ -1 +1,6 @@
1
- require 'bundler/gem_tasks'
1
+ require "bundler/gem_tasks"
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => [:spec]
data/TODO.md CHANGED
@@ -1,3 +1,10 @@
1
+ - multiple names as same person
2
+ - multiple codebases?
3
+ - sort --latest by commit date
4
+ - multiple card starters
5
+
6
+ - Rakefile / rake_commit
7
+ - Reduce number of git/filesystem interactions in spec
1
8
  - aggregate stats across multiple git repos
2
9
  - label for "BAD" to most-solo-commits view
3
10
  - Graph over time of cards worked on and duration
data/bin/bundler ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'bundler' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("bundler", "bundler")
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'cc-tddium-post-worker' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("codeclimate-test-reporter", "cc-tddium-post-worker")
data/bin/coderay ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'coderay' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("coderay", "coderay")
data/bin/htmldiff ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'htmldiff' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("diff-lcs", "htmldiff")
data/bin/ldiff ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'ldiff' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("diff-lcs", "ldiff")
data/bin/pairsee CHANGED
@@ -5,7 +5,7 @@ require 'trollop'
5
5
 
6
6
  opts = Trollop.options do
7
7
  opt :root, 'Folder in which .git folder is', default: '.'
8
- opt :config, 'location of config file, example: ../../config/config.yml', default: "#{__FILE__}/../../config/config.yml"
8
+ opt :config, 'location of config file, example: ../../config/config.yml', default: "config/config.yml"
9
9
  opt :after, 'Date since which you want to get commits, in yyyy-mm-dd format', default: '0-1-1'
10
10
  opt :extras, 'See all commits without the name of any dev in them', default: false
11
11
  opt :latest, 'See dates of most recent commits by pairs', default: false
@@ -15,12 +15,17 @@ opts = Trollop.options do
15
15
  end
16
16
 
17
17
  def run_command(opts)
18
- config = YAML.load_file(opts[:config])
18
+ begin
19
+ config = YAML.load_file(opts[:config])
20
+ rescue
21
+ puts "Config file not found at: " + opts[:config] + " See config/config.yml.sample for an example. ....exiting"
22
+ exit
23
+ end
19
24
  options = {
20
- names: config['names'].split(' '),
21
- card_prefix: config['card_prefix'],
22
- after_date: opts[:after],
23
- repo_location: opts[:root]
25
+ names: config['names'].split(' '),
26
+ card_prefix: config['card_prefix'],
27
+ after_date: opts[:after],
28
+ repo_location: opts[:root]
24
29
  }
25
30
 
26
31
  seer = PairSee::Seer.new(options)
data/bin/pry ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'pry' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("pry", "pry")
data/bin/rake ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'rake' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("rake", "rake")
data/bin/rake_commit ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'rake_commit' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("rake_commit", "rake_commit")
data/bin/rspec ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'rspec' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("rspec-core", "rspec")
data/bin/rubocop ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'rubocop' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("rubocop", "rubocop")
data/bin/ruby-parse ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'ruby-parse' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("parser", "ruby-parse")
data/bin/ruby-rewrite ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'ruby-rewrite' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("parser", "ruby-rewrite")
@@ -0,0 +1,3 @@
1
+ rake build
2
+ gem install pkg/pair_see-0.1.2.gem
3
+ pairsee
File without changes
@@ -0,0 +1,29 @@
1
+ module PairSee
2
+ class ActiveDevs
3
+ attr_reader :devs
4
+
5
+ def initialize(log_lines, options)
6
+ @log_lines = log_lines
7
+ @options = options
8
+ @devs = _active(options[:names])
9
+ end
10
+
11
+ def active_devs(config_file)
12
+ config = YAML.load_file(config_file)
13
+ devs_in_config = config['names'].split(' ')
14
+ devs_in_config.select do |dev|
15
+ _is_active?(dev)
16
+ end
17
+ end
18
+
19
+ def _active(devs)
20
+ devs.select do |dev|
21
+ _is_active?(dev)
22
+ end
23
+ end
24
+
25
+ def _is_active?(dev)
26
+ @log_lines.active? dev
27
+ end
28
+ end
29
+ end
data/lib/pair_see/card.rb CHANGED
@@ -16,5 +16,5 @@ module PairSee
16
16
  card_name == other.card_name
17
17
  number_of_commits == other.number_of_commits
18
18
  end
19
- end
19
+ end
20
20
  end
@@ -0,0 +1,43 @@
1
+ module PairSee
2
+ class CardsPerPerson
3
+ attr_reader :devs
4
+
5
+ def initialize(log_lines, options)
6
+ @log_lines = log_lines
7
+ @options = options
8
+ @devs = _active(options[:names])
9
+ end
10
+
11
+ def cards_per_person
12
+ @devs.map do |dev|
13
+ {dev => _cards_dev_worked_on(@log_lines, dev)}
14
+ end.inject({}) do |result, element|
15
+ result.merge(element)
16
+ end.map do |dev_name, cards_worked|
17
+ {dev_name => cards_worked.uniq}
18
+ end.inject({}) do |result, element|
19
+ result.merge(element)
20
+ end.map do |dev, cards|
21
+ "#{dev}: [#{cards.size} cards] #{cards.sort.join(', ')}"
22
+ end
23
+ end
24
+
25
+ def _cards_dev_worked_on(log_lines, dev)
26
+ log_lines.select do |log_line|
27
+ log_line.authored_by?(dev)
28
+ end.map do |log_line|
29
+ log_line.card_number(@options[:card_prefix])
30
+ end.compact
31
+ end
32
+
33
+ def _active(devs)
34
+ devs.select do |dev|
35
+ _is_active?(dev)
36
+ end
37
+ end
38
+
39
+ def _is_active?(dev)
40
+ @log_lines.active? dev
41
+ end
42
+ end
43
+ end
@@ -13,5 +13,5 @@ module PairSee
13
13
  def empty?
14
14
  count == 0
15
15
  end
16
- end
16
+ end
17
17
  end
@@ -5,15 +5,8 @@ module PairSee
5
5
 
6
6
  include Enumerable
7
7
 
8
- def initialize(git_home, date_string)
9
- @lines = _lines_from(git_home, date_string)
10
- end
11
-
12
- def _lines_from(git_home, date_string)
13
- g = Git.open(git_home)
14
- g.log.since(date_string).map do |l|
15
- LogLine.new("#{l.date} #{l.message}")
16
- end
8
+ def initialize(lines)
9
+ @lines = lines
17
10
  end
18
11
 
19
12
  def each(&block)
data/lib/pair_see/seer.rb CHANGED
@@ -5,46 +5,39 @@ module PairSee
5
5
  require_relative 'date_combo'
6
6
  require_relative 'log_lines'
7
7
  require_relative 'card'
8
+ require_relative 'cards_per_person'
9
+ require_relative 'active_devs'
8
10
 
9
11
  attr_reader :log_lines, :devs, :dev_pairs, :card_prefix
12
+ @@maximum_commits_to_parse = 9999
10
13
 
11
14
  def initialize(options)
12
- @log_lines = _lines_from(options[:repo_location], options[:after_date])
13
- @devs = _active(options[:names])
15
+ @log_lines = _lines_from(options[:repo_location], options[:after_date])
16
+ @sub_seer = CardsPerPerson.new(@log_lines, options)
17
+ @active_devs = ActiveDevs.new(@log_lines, options).devs
18
+ @devs = @sub_seer.devs
14
19
  @card_prefix = options[:card_prefix]
15
20
  @dev_pairs = devs.combination(2)
16
21
  end
17
22
 
18
- def _active(devs)
19
- devs.select do |dev|
20
- _is_active?(dev)
21
- end
22
- end
23
+ # seer.commits_not_by_known_pair
24
+ # seer.all_most_recent_commits
25
+ # seer.recommended_pairings
26
+ # seer.pretty_card_data
27
+ # seer.cards_per_person
28
+ # seer.all_commits
23
29
 
24
- def _lines_from(repo, after_date)
25
- LogLines.new(repo, after_date)
26
- end
27
30
 
28
31
  def cards_per_person
29
- @devs.map do |dev|
30
- { dev => cards_dev_worked_on(log_lines, dev) }
31
- end.inject({}) do |result, element|
32
- result.merge(element)
33
- end.map do |dev_name, cards_worked|
34
- { dev_name => cards_worked.uniq }
35
- end.inject({}) do |result, element|
36
- result.merge(element)
37
- end.map do|dev, cards|
38
- "#{dev}: [#{cards.size} cards] #{cards.sort.join(', ')}"
39
- end
32
+ @sub_seer.cards_per_person
40
33
  end
41
34
 
42
- def cards_dev_worked_on(log_lines, dev)
43
- log_lines.select do |log_line|
44
- log_line.authored_by?(dev)
45
- end.map do|log_line|
46
- log_line.card_number(@card_prefix)
47
- end.compact
35
+ def _lines_from(git_home, date_string)
36
+ g = Git.open(git_home)
37
+ lines = g.log(@@maximum_commits_to_parse).since(date_string).map do |l|
38
+ LogLine.new("#{l.date} #{l.message}")
39
+ end
40
+ LogLines.new(lines)
48
41
  end
49
42
 
50
43
  def pretty_card_data
@@ -78,15 +71,7 @@ module PairSee
78
71
  end
79
72
 
80
73
  def active_devs(config_file)
81
- config = YAML.load_file(config_file)
82
- devs_in_config = config['names'].split(' ')
83
- devs_in_config.select do |dev|
84
- _is_active?(dev)
85
- end
86
- end
87
-
88
- def _is_active?(dev)
89
- log_lines.active? dev
74
+ @active_devs
90
75
  end
91
76
 
92
77
  def pair_commits
@@ -142,5 +127,5 @@ module PairSee
142
127
  "#{person1}, #{person2}"
143
128
  end
144
129
  end
145
- end
130
+ end
146
131
  end
@@ -1,3 +1,3 @@
1
1
  module PairSee
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
data/pair_see.gemspec CHANGED
@@ -3,30 +3,31 @@ lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'pair_see/version'
5
5
 
6
- Gem::Specification.new do |spec|
7
- spec.name = 'pair_see'
8
- spec.version = PairSee::VERSION
9
- spec.authors = ['compwron']
10
- spec.email = ['compiledwrong@gmail.com']
6
+ Gem::Specification.new do |gem|
7
+ gem.name = 'pair_see'
8
+ gem.version = PairSee::VERSION
9
+ gem.authors = ['compwron']
10
+ gem.email = ['compiledwrong@gmail.com']
11
11
 
12
- spec.summary = 'See metrics about pair programming from the commandline'
13
- spec.description = 'See commits not by known pair, most recent commits by pairs, recommended pairings, card duration and pairing data, and cards each person has worked on'
14
- spec.homepage = 'https://github.com/compwron/pairsee'
15
- spec.license = 'MIT'
12
+ gem.summary = 'See metrics about pair programming from the commandline'
13
+ gem.description = 'See commits not by known pair, most recent commits by pairs, recommended pairings, card duration and pairing data, and cards each person has worked on'
14
+ gem.homepage = 'https://github.com/compwron/pairsee'
15
+ gem.license = 'MIT'
16
16
 
17
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
- spec.bindir = 'exe'
19
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
- spec.require_paths = ['lib']
17
+ gem.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ gem.bindir = 'bin'
19
+ gem.executables = ["pairsee"]
20
+ gem.require_paths = ['lib']
21
21
 
22
- spec.add_dependency 'yamler', '~> 0.1'
23
- spec.add_dependency 'trollop', '~> 2.0'
24
- spec.add_dependency 'git', '~> 1.2'
22
+ gem.add_dependency 'yamler', '~> 0.1'
23
+ gem.add_dependency 'trollop', '~> 2.1'
24
+ gem.add_dependency 'git', '~> 1.3'
25
25
 
26
- spec.add_development_dependency 'bundler', '~> 1.8'
27
- spec.add_development_dependency 'rake', '~> 10.4'
28
- spec.add_development_dependency 'rspec', '~> 3.2'
29
- spec.add_development_dependency 'rubocop', '~> 0.29'
30
- spec.add_development_dependency 'rake_commit', '~> 1.1'
31
- spec.add_development_dependency 'codeclimate-test-reporter', '~> 0.4.7'
26
+ gem.add_development_dependency 'bundler', '~> 1.15'
27
+ gem.add_development_dependency 'rake', '~> 10'
28
+ gem.add_development_dependency 'rspec', '~> 3.6'
29
+ gem.add_development_dependency 'rubocop', '~> 0.49.0'
30
+ gem.add_development_dependency 'pry'
31
+ gem.add_development_dependency 'rake_commit', '~> 1.3'
32
+ gem.add_development_dependency 'codeclimate-test-reporter', '~> 1.0.8'
32
33
  end
data/setup.sh ADDED
@@ -0,0 +1,2 @@
1
+ # use this when running locally, not as a gem (i.e. for development testing)
2
+ gem install yamler
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pair_see
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - compwron
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-12 00:00:00.000000000 Z
11
+ date: 2017-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yamler
@@ -30,117 +30,132 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '2.0'
33
+ version: '2.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '2.0'
40
+ version: '2.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: git
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.2'
47
+ version: '1.3'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.2'
54
+ version: '1.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.8'
61
+ version: '1.15'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '1.8'
68
+ version: '1.15'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '10.4'
75
+ version: '10'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '10.4'
82
+ version: '10'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '3.2'
89
+ version: '3.6'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '3.2'
96
+ version: '3.6'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rubocop
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0.29'
103
+ version: 0.49.0
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0.29'
110
+ version: 0.49.0
111
+ - !ruby/object:Gem::Dependency
112
+ name: pry
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: rake_commit
113
127
  requirement: !ruby/object:Gem::Requirement
114
128
  requirements:
115
129
  - - "~>"
116
130
  - !ruby/object:Gem::Version
117
- version: '1.1'
131
+ version: '1.3'
118
132
  type: :development
119
133
  prerelease: false
120
134
  version_requirements: !ruby/object:Gem::Requirement
121
135
  requirements:
122
136
  - - "~>"
123
137
  - !ruby/object:Gem::Version
124
- version: '1.1'
138
+ version: '1.3'
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: codeclimate-test-reporter
127
141
  requirement: !ruby/object:Gem::Requirement
128
142
  requirements:
129
143
  - - "~>"
130
144
  - !ruby/object:Gem::Version
131
- version: 0.4.7
145
+ version: 1.0.8
132
146
  type: :development
133
147
  prerelease: false
134
148
  version_requirements: !ruby/object:Gem::Requirement
135
149
  requirements:
136
150
  - - "~>"
137
151
  - !ruby/object:Gem::Version
138
- version: 0.4.7
152
+ version: 1.0.8
139
153
  description: See commits not by known pair, most recent commits by pairs, recommended
140
154
  pairings, card duration and pairing data, and cards each person has worked on
141
155
  email:
142
156
  - compiledwrong@gmail.com
143
- executables: []
157
+ executables:
158
+ - pairsee
144
159
  extensions: []
145
160
  extra_rdoc_files: []
146
161
  files:
@@ -155,13 +170,28 @@ files:
155
170
  - README.md
156
171
  - Rakefile
157
172
  - TODO.md
173
+ - bin/bundler
174
+ - bin/cc-tddium-post-worker
175
+ - bin/coderay
158
176
  - bin/console
177
+ - bin/htmldiff
178
+ - bin/ldiff
159
179
  - bin/pairsee
180
+ - bin/pry
181
+ - bin/rake
182
+ - bin/rake_commit
183
+ - bin/rspec
184
+ - bin/rubocop
185
+ - bin/ruby-parse
186
+ - bin/ruby-rewrite
160
187
  - bin/setup
161
- - config/sample_config.yml
188
+ - build_and_install.sh
189
+ - config/config.yml.sample
162
190
  - input/sample_input.log
163
191
  - lib/pair_see.rb
192
+ - lib/pair_see/active_devs.rb
164
193
  - lib/pair_see/card.rb
194
+ - lib/pair_see/cards_per_person.rb
165
195
  - lib/pair_see/combo.rb
166
196
  - lib/pair_see/date_combo.rb
167
197
  - lib/pair_see/log_line.rb
@@ -169,7 +199,7 @@ files:
169
199
  - lib/pair_see/seer.rb
170
200
  - lib/pair_see/version.rb
171
201
  - pair_see.gemspec
172
- - starterfile.txt
202
+ - setup.sh
173
203
  homepage: https://github.com/compwron/pairsee
174
204
  licenses:
175
205
  - MIT
@@ -190,7 +220,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
220
  version: '0'
191
221
  requirements: []
192
222
  rubyforge_project:
193
- rubygems_version: 2.4.5
223
+ rubygems_version: 2.6.12
194
224
  signing_key:
195
225
  specification_version: 4
196
226
  summary: See metrics about pair programming from the commandline
data/starterfile.txt DELETED
@@ -1 +0,0 @@
1
- hi