remove_stale_gems 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -49,16 +49,12 @@ class Gem::Commands::RemoveStaleCommand < Gem::Command
|
|
49
49
|
if options[:yes] || ask_yes_no('Remove gems?')
|
50
50
|
to_uninstall.each do |spec|
|
51
51
|
say "Attempting to uninstall #{spec.full_name}"
|
52
|
-
|
53
|
-
uninstall_options = {
|
54
|
-
:executables => (Gem.source_index.find_name(spec.name) - to_uninstall).length == 0,
|
55
|
-
:version => "= #{spec.version}",
|
56
|
-
:ignore => true
|
57
|
-
}
|
58
|
-
uninstaller = Gem::Uninstaller.new spec.name, uninstall_options
|
59
|
-
|
60
52
|
begin
|
61
|
-
|
53
|
+
Gem::Uninstaller.new(spec.name, {
|
54
|
+
:version => "= #{spec.version}",
|
55
|
+
:executables => true,
|
56
|
+
:ignore => true
|
57
|
+
}).uninstall
|
62
58
|
rescue Gem::DependencyRemovalException, Gem::InstallError, Gem::GemNotInHomeException => e
|
63
59
|
say "Unable to uninstall #{spec.full_name}:"
|
64
60
|
say " #{e.class}: #{e.message}"
|
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: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 1
|
10
|
+
version: 1.0.1
|
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: 2011-12-
|
18
|
+
date: 2011-12-20 00:00:00 Z
|
19
19
|
dependencies: []
|
20
20
|
|
21
21
|
description: Remove gems for which last use time is too old
|