gem-depclean 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -23,7 +23,6 @@ class Gem::Commands::DepcleanCommand < Gem::Command
23
23
  return
24
24
  end
25
25
 
26
-
27
26
  targets.each do |t|
28
27
  say "#{t.name} (#{t.version})"
29
28
  end
@@ -7,8 +7,12 @@ class Gem::Commands::WorldCommand < Gem::Command
7
7
  command = Gem::CommandManager.instance['install']
8
8
  name = installer.spec.name
9
9
 
10
- if command.get_all_gem_names.include?(name)
11
- new.add name, command.options[:version]
10
+ begin
11
+ if command.get_all_gem_names.include?(name)
12
+ new.add name, command.options[:version]
13
+ end
14
+ rescue Gem::CommandLineError
15
+ # called by 'gem update'
12
16
  end
13
17
  end
14
18
 
@@ -63,7 +67,7 @@ class Gem::Commands::WorldCommand < Gem::Command
63
67
  f << Gem.source_index.map(&:last).select {|spec|
64
68
  spec.dependent_gems.empty?
65
69
  }.group_by(&:name).inject({}) {|h, (name, specs)|
66
- versions = specs.sort_by(&:version).map {|spec| spec.version }
70
+ versions = specs.map(&:version).sort
67
71
  versions[-1] = Gem::Requirement.default
68
72
 
69
73
  h.merge(name => versions.map(&:to_s))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-depclean
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keita Urashima
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-14 00:00:00 +09:00
12
+ date: 2009-10-18 00:00:00 +09:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency