git-recommend 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/git_recommend.rb +10 -0
  3. data/lib/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2b3bb536c881bc0b202f0abedb9a06375422634a
4
- data.tar.gz: 605d94d353fb38ff29e1d4a05fd732ad82b1a1e2
3
+ metadata.gz: 5a8c6fc1c30e588d383f9170e4fb8a00a600e170
4
+ data.tar.gz: e73e56ba11036ce69a7d8fb0c8d16dc73e07ce24
5
5
  SHA512:
6
- metadata.gz: 055b3a5cc3a1013ce5d493429f7c97883e4b3424a5d987393f219858fc756350b788fde6296c5059bf04a86b8ff15869ce8f5283ace77ae24499d647c987b707
7
- data.tar.gz: 253345f3bfe244c11be6ca1449334c226f9a4ecfe7e7715da5ad8b26f133917bebeed87cfadf85ba97764c37ff956e2068159caa29e8f88b63b842099ac61dac
6
+ metadata.gz: e70d838c4c4a099b62c58c96fdb798b5ef4e161330d13c4e96024ba701dfc1ca6d4b49abf94b3aea43fea3f7ad64e2c1f2d5732e1e2c6a7c3f2692a969f0a6ee
7
+ data.tar.gz: d1771a6757a53f9452dcd8655533f3d5fe986f2c0cd90ff800ec30e3e1d2d0f4fbcaff5c016c0e6c83cad873955cce84488bc955b7bbc1b97e16578c3f2b1158
data/lib/git_recommend.rb CHANGED
@@ -70,6 +70,16 @@ class GitRecommend < Thor
70
70
  max_size: options[:max_size],
71
71
  measures: options[:measures]})
72
72
  s.call
73
+ # 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
75
+ new_items = q - items_in_lhs
76
+ if new_items.size > 0
77
+ if new_items.size < 11
78
+ $stderr.puts "Unable to generate change recommendations for the following items, maybe update the history?:\n #{new_items.to_a.join("\n")}"
79
+ else
80
+ $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
+ end
82
+ end
73
83
  s.print
74
84
  else
75
85
  $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.2.0"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-recommend
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Rolfsnes