pair_see 0.1.1 → 0.1.2

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: 91867b4aa809ce97b3d2ebd3c89d4f63bcc4235d
4
- data.tar.gz: 810cb42dcf300ae3d17b3fc5de02b130a8a1b865
3
+ metadata.gz: c5d5bd766eaf71d59dde14e9aba95c54c2ff727e
4
+ data.tar.gz: 27e261345062f50e6ee19570eafdc6a8154574ff
5
5
  SHA512:
6
- metadata.gz: fb5a8d573a3938fc02cc839d10358b74a09e4016a2bacad1bf9344944626ab218b32bbe64aeb9ecacd89d2efdd79bb153d94d5240ae1d24e73b0c8e15943e70d
7
- data.tar.gz: 4589340a27248139639bc0693feb6a395cd5ee5a26d97247e0bf855a64dd809e670edabdc2aa10c1408d1d9d1da22b743e3cdbac9b235127c9db27912c2a1ff3
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.0)
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.0)
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
- TODO: Write usage instructions here
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
- log_lines = PairSee::LogLines.new(opts[:root], opts[:after])
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
- pair_see = PairSee::Seer.new(log_lines, opts[:config])
26
+ seer = PairSee::Seer.new(options)
21
27
  if opts[:extras]
22
- pair_see.commits_not_by_known_pair
28
+ seer.commits_not_by_known_pair
23
29
  elsif opts[:latest]
24
- pair_see.all_most_recent_commits
30
+ seer.all_most_recent_commits
25
31
  elsif opts[:recommended]
26
- pair_see.recommended_pairings
32
+ seer.recommended_pairings
27
33
  elsif opts[:cards]
28
- pair_see.pretty_card_data
34
+ seer.pretty_card_data
29
35
  elsif opts[:cards_per_person]
30
- pair_see.cards_per_person
36
+ seer.cards_per_person
31
37
  else
32
- pair_see.all_commits
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(log_lines, config_file)
12
- @log_lines = log_lines
13
- @devs = active_devs(config_file)
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
- @card_prefix = get_card_prefix(config_file)
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
- is_active(dev)
84
+ _is_active?(dev)
75
85
  end
76
86
  end
77
87
 
78
- def is_active(dev)
88
+ def _is_active?(dev)
79
89
  log_lines.active? dev
80
90
  end
81
91
 
@@ -1,3 +1,3 @@
1
1
  module PairSee
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pair_see
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - compwron