remove_stale_gems 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
- uninstaller.uninstall
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}"
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'remove_stale_gems'
5
- s.version = '1.0.0'
5
+ s.version = '1.0.1'
6
6
  s.summary = %q{Remove unused gems}
7
7
  s.description = %q{Remove gems for which last use time is too old}
8
8
  s.homepage = "http://github.com/toy/#{s.name}"
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: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.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-16 00:00:00 Z
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