pair_see 0.1.1 → 0.1.2
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 +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +1 -22
- data/bin/pairsee +14 -8
- data/lib/pair_see/seer.rb +16 -6
- data/lib/pair_see/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5d5bd766eaf71d59dde14e9aba95c54c2ff727e
|
4
|
+
data.tar.gz: 27e261345062f50e6ee19570eafdc6a8154574ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b1ede159db64a6a3ceb7b7e4ea6cfe99584a30cb2c2211dc62337961d2375f71f5a90a4f04f67606c2fb1380fca9b72be2b8467ddd68e22a29e8265f0724582
|
7
|
+
data.tar.gz: cdb93f2ad075df36de48391d7fe1d201b3c07f5df89341423fc5c1492f4602474ba28179f8891d2e01f5bf7efe2a99ea5e2afaaf0ab7a5f5c2bc87e3b3e1347f
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
pair_see (0.1.
|
4
|
+
pair_see (0.1.2)
|
5
5
|
git (~> 1.2)
|
6
6
|
trollop (~> 2.0)
|
7
7
|
yamler (~> 0.1)
|
@@ -60,6 +60,6 @@ DEPENDENCIES
|
|
60
60
|
codeclimate-test-reporter (~> 0.4.7)
|
61
61
|
pair_see!
|
62
62
|
rake (~> 10.4)
|
63
|
-
rake_commit (~> 1.1
|
63
|
+
rake_commit (~> 1.1)
|
64
64
|
rspec (~> 3.2)
|
65
65
|
rubocop (~> 0.29)
|
data/README.md
CHANGED
@@ -65,39 +65,18 @@ card_prefix: FOO-
|
|
65
65
|
```
|
66
66
|
|
67
67
|
To use PairSee with SVN, check out SVN codebase with git like: `git svn clone http://svn.example.com/project`
|
68
|
-
=======
|
69
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/pair_see`. To experiment with that code, run `bin/console` for an interactive prompt.
|
70
|
-
|
71
|
-
TODO: Delete this and the text above, and describe your gem
|
72
|
-
>>>>>>> gem framework rename
|
73
68
|
|
74
69
|
## Installation
|
75
70
|
|
76
71
|
Add this line to your application's Gemfile:
|
77
72
|
|
78
73
|
```ruby
|
79
|
-
<<<<<<< HEAD
|
80
|
-
gem 'pairSee'
|
81
|
-
=======
|
82
74
|
gem 'pair_see'
|
83
|
-
>>>>>>> gem framework rename
|
84
75
|
```
|
85
76
|
|
86
|
-
And then execute:
|
87
|
-
|
88
|
-
$ bundle
|
89
|
-
|
90
|
-
Or install it yourself as:
|
91
|
-
|
92
|
-
<<<<<<< HEAD
|
93
|
-
$ gem install pairSee
|
94
|
-
=======
|
95
|
-
$ gem install pair_see
|
96
|
-
>>>>>>> gem framework rename
|
97
|
-
|
98
77
|
## Usage
|
99
78
|
|
100
|
-
|
79
|
+
See example repo https://github.com/compwron/example_pair_see_use
|
101
80
|
|
102
81
|
## Development
|
103
82
|
|
data/bin/pairsee
CHANGED
@@ -15,21 +15,27 @@ opts = Trollop.options do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def run_command(opts)
|
18
|
-
|
18
|
+
config = YAML.load_file(opts[:config])
|
19
|
+
options = {
|
20
|
+
names: config['names'].split(' '),
|
21
|
+
card_prefix: config['card_prefix'],
|
22
|
+
after_date: opts[:after],
|
23
|
+
repo_location: opts[:root]
|
24
|
+
}
|
19
25
|
|
20
|
-
|
26
|
+
seer = PairSee::Seer.new(options)
|
21
27
|
if opts[:extras]
|
22
|
-
|
28
|
+
seer.commits_not_by_known_pair
|
23
29
|
elsif opts[:latest]
|
24
|
-
|
30
|
+
seer.all_most_recent_commits
|
25
31
|
elsif opts[:recommended]
|
26
|
-
|
32
|
+
seer.recommended_pairings
|
27
33
|
elsif opts[:cards]
|
28
|
-
|
34
|
+
seer.pretty_card_data
|
29
35
|
elsif opts[:cards_per_person]
|
30
|
-
|
36
|
+
seer.cards_per_person
|
31
37
|
else
|
32
|
-
|
38
|
+
seer.all_commits
|
33
39
|
end
|
34
40
|
end
|
35
41
|
|
data/lib/pair_see/seer.rb
CHANGED
@@ -8,11 +8,21 @@ module PairSee
|
|
8
8
|
|
9
9
|
attr_reader :log_lines, :devs, :dev_pairs, :card_prefix
|
10
10
|
|
11
|
-
def initialize(
|
12
|
-
@log_lines =
|
13
|
-
@devs =
|
11
|
+
def initialize(options)
|
12
|
+
@log_lines = _lines_from(options[:repo_location], options[:after_date])
|
13
|
+
@devs = _active(options[:names])
|
14
|
+
@card_prefix = options[:card_prefix]
|
14
15
|
@dev_pairs = devs.combination(2)
|
15
|
-
|
16
|
+
end
|
17
|
+
|
18
|
+
def _active(devs)
|
19
|
+
devs.select do |dev|
|
20
|
+
_is_active?(dev)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def _lines_from(repo, after_date)
|
25
|
+
LogLines.new(repo, after_date)
|
16
26
|
end
|
17
27
|
|
18
28
|
def cards_per_person
|
@@ -71,11 +81,11 @@ module PairSee
|
|
71
81
|
config = YAML.load_file(config_file)
|
72
82
|
devs_in_config = config['names'].split(' ')
|
73
83
|
devs_in_config.select do |dev|
|
74
|
-
|
84
|
+
_is_active?(dev)
|
75
85
|
end
|
76
86
|
end
|
77
87
|
|
78
|
-
def
|
88
|
+
def _is_active?(dev)
|
79
89
|
log_lines.active? dev
|
80
90
|
end
|
81
91
|
|
data/lib/pair_see/version.rb
CHANGED