remove_stale_gems 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -43,8 +43,15 @@ class Gem::Commands::RemoveStaleCommand < Gem::Command
|
|
43
43
|
puts 'No stale gems found.'
|
44
44
|
else
|
45
45
|
puts 'Stale gems:'
|
46
|
-
to_uninstall.each do |
|
47
|
-
|
46
|
+
to_uninstall.group_by(&:name).sort.each do |name, specs|
|
47
|
+
all_versions = Gem::Specification.find_all_by_name(name).map(&:version)
|
48
|
+
versions_to_uninstall = specs.map(&:version).sort
|
49
|
+
versions_to_leave = all_versions - versions_to_uninstall
|
50
|
+
line = " #{name}: #{versions_to_uninstall.join(', ')}"
|
51
|
+
unless versions_to_leave.empty?
|
52
|
+
line << " (leaving versions: #{versions_to_leave.join(', ')})"
|
53
|
+
end
|
54
|
+
puts line
|
48
55
|
end
|
49
56
|
if options[:yes] || ask_yes_no('Remove gems?')
|
50
57
|
to_uninstall.each do |spec|
|
data/remove_stale_gems.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: remove_stale_gems
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 2
|
10
|
+
version: 1.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ivan Kuchin
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2012-01-22 00:00:00 Z
|
19
19
|
dependencies: []
|
20
20
|
|
21
21
|
description: Remove gems for which last use time is too old
|
@@ -63,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
63
63
|
requirements: []
|
64
64
|
|
65
65
|
rubyforge_project: remove_stale_gems
|
66
|
-
rubygems_version: 1.8.
|
66
|
+
rubygems_version: 1.8.13
|
67
67
|
signing_key:
|
68
68
|
specification_version: 3
|
69
69
|
summary: Remove unused gems
|