git-recommend 0.6.0 → 0.6.1

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: 7dcb382ae28e749803477ed0a508f0e86ed8768e
4
- data.tar.gz: b626e2449e9edb8b355122ae08ce944cada99d7e
3
+ metadata.gz: f040a80a831e1a88d78f93fecb757a2ae2869316
4
+ data.tar.gz: 3620018ffd2cc07e0c609edcc8c05b51175abff3
5
5
  SHA512:
6
- metadata.gz: 21d0b9d197c7f56252873cf9e626d2dd86e341e7e1bb9cb7502b58329e16754db06c96da5e4e16d74d9679968cd9e5a02133a3e6d4cf30b88bf464e46ac58d8f
7
- data.tar.gz: 0bc7ce53718967075d7ed586627c314b5743e731ddf9604ed12edd7075bd5efab370ac6c0b65a1d6b9d2846b7ae296836449d90ff39d91faed54dad560717c88
6
+ metadata.gz: 4d4319df6131751cd5b0f87c3bc3ece01d26f6c1dbc334326292c74200e397e76eed638c32e9ab516020f8f59ffe3876592e396b7f0a70aac15e363303048c4a
7
+ data.tar.gz: aa663bb2c6f0b05642932d1bdddc3c8b9c8938b077b506a8471abf62f3c7ccb6185a7cb8026858b5cad5b910ac1aa43dacd190a255af933b2b81c791cbebb610
data/.gitignore CHANGED
@@ -8,3 +8,4 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  *~
11
+ /.history
data/lib/git_recommend.rb CHANGED
@@ -69,9 +69,15 @@ class GitRecommend < Thor
69
69
  aggregator: options[:aggregator],
70
70
  max_size: options[:max_size],
71
71
  measures: options[:measures]})
72
- s.call
72
+ recommendation = Evoc::RecommendationCache.get_recommendation(algorithm: s.algorithm,
73
+ query: s.query,
74
+ model_start: s.model_start,
75
+ model_end: s.model_end,
76
+ max_size: s.max_size,
77
+ aggregator: s.aggregator,
78
+ measures: s.measures)
73
79
  # check if there were some items in the query which could not be found in the history
74
- items_in_lhs = s.recommendation.map {|r| r.human_lhs}.flatten.uniq
80
+ items_in_lhs = recommendation.map {|r| r.human_lhs}.flatten.uniq
75
81
  new_items = q - items_in_lhs
76
82
  if new_items.size > 0
77
83
  if new_items.size < 11
@@ -80,7 +86,7 @@ class GitRecommend < Thor
80
86
  $stderr.puts "Unable to generate change recommendations for #{new_items.size} items, maybe update the history?. The first 10 were: \n #{new_items.take(10).join("\n")}"
81
87
  end
82
88
  end
83
- s.print
89
+ recommendation.print(s.measures)
84
90
  exit 0
85
91
  else
86
92
  $stderr.puts "No changed files detected. Change some files or run with --help for more options."
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Git
2
2
  module Recommend
3
- VERSION = "0.6.0"
3
+ VERSION = "0.6.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-recommend
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Rolfsnes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-16 00:00:00.000000000 Z
11
+ date: 2017-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor