outdated-gems 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  pkg/*
2
2
  *.gem
3
3
  .bundle
4
+ *~
data/lib/outdated-gems.rb CHANGED
@@ -5,47 +5,51 @@ if (bundle = `bundle show`) && !bundle.include?("Could not locate Gemfile")
5
5
  gems[$~[1]] = $~[2]
6
6
  end
7
7
  end
8
- outdated_gems = {}
9
- outdated_edge_gems = {}
10
- unfound_gems = []
11
- gem_list = Gem::SpecFetcher.new.list.values.first.reverse
12
- edge_gem_list = Gem::SpecFetcher.new.list(false, true).values.first.reverse
13
- gems.each do |name, v_current|
14
- latest_gem = gem_list.detect { |g| g.first == name }
15
- latest_edge_gem = edge_gem_list.detect { |g| g.first == name }
16
- if !latest_gem && !latest_edge_gem
17
- unfound_gems << name
18
- else
19
- if latest_gem && latest_gem[2] == "ruby" && latest_gem[1] > Gem::Version.create(v_current)
20
- outdated_gems[name] = "#{v_current} => #{latest_gem[1].version}"
21
- end
22
- if latest_edge_gem && latest_edge_gem[2] == "ruby" && latest_edge_gem[1] > Gem::Version.create(v_current)
23
- outdated_edge_gems[name] = "#{v_current} => #{latest_edge_gem[1].version}"
24
- end
25
- end
26
- end
27
- if outdated_gems.empty? && outdated_edge_gems.empty?
28
- puts "No outdated gems."
8
+ if gems.empty?
9
+ puts bundle
29
10
  else
30
- unless outdated_gems.empty?
31
- puts "\nOutdated gems:"
32
- puts "---"
33
- outdated_gems.each do |name, change|
34
- puts "#{name}: #{change}"
11
+ outdated_gems = {}
12
+ outdated_edge_gems = {}
13
+ unfound_gems = []
14
+ gem_list = Gem::SpecFetcher.new.list.values.first.reverse
15
+ edge_gem_list = Gem::SpecFetcher.new.list(false, true).values.first.reverse
16
+ gems.each do |name, v_current|
17
+ latest_gem = gem_list.detect { |g| g.first == name }
18
+ latest_edge_gem = edge_gem_list.detect { |g| g.first == name }
19
+ if !latest_gem && !latest_edge_gem
20
+ unfound_gems << name
21
+ else
22
+ if latest_gem && latest_gem[2] == "ruby" && latest_gem[1] > Gem::Version.create(v_current)
23
+ outdated_gems[name] = "#{v_current} => #{latest_gem[1].version}"
24
+ end
25
+ if latest_edge_gem && latest_edge_gem[2] == "ruby" && latest_edge_gem[1] > Gem::Version.create(v_current)
26
+ outdated_edge_gems[name] = "#{v_current} => #{latest_edge_gem[1].version}"
27
+ end
35
28
  end
36
- puts "---\n"
37
29
  end
38
- unless outdated_edge_gems.empty?
39
- puts "\nOutdated gems (including prereleases):"
40
- puts "---"
41
- outdated_edge_gems.each do |name, change|
42
- puts "#{name}: #{change}"
30
+ if outdated_gems.empty? && outdated_edge_gems.empty?
31
+ puts "No outdated gems."
32
+ else
33
+ unless outdated_gems.empty?
34
+ puts "\nOutdated gems:"
35
+ puts "---"
36
+ outdated_gems.each do |name, change|
37
+ puts "#{name}: #{change}"
38
+ end
39
+ puts "---\n"
40
+ end
41
+ unless outdated_edge_gems.empty?
42
+ puts "\nOutdated gems (including prereleases):"
43
+ puts "---"
44
+ outdated_edge_gems.each do |name, change|
45
+ puts "#{name}: #{change}"
46
+ end
47
+ puts "---\n"
43
48
  end
44
- puts "---\n"
45
49
  end
46
- end
47
- unless unfound_gems.empty?
48
- puts "Could not find: #{unfound_gems.inspect}."
50
+ unless unfound_gems.empty?
51
+ puts "Could not find: #{unfound_gems.inspect}."
52
+ end
49
53
  end
50
54
  else
51
55
  puts bundle
@@ -1,5 +1,5 @@
1
1
  module Outdated
2
2
  module Gems
3
- VERSION = "0.5.1"
3
+ VERSION = "0.6.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: outdated-gems
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 5
9
- - 1
10
- version: 0.5.1
4
+ prerelease:
5
+ version: 0.6.0
11
6
  platform: ruby
12
7
  authors:
13
8
  - Aaron Gibralter
@@ -15,7 +10,7 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2010-12-06 00:00:00 -05:00
13
+ date: 2011-02-03 00:00:00 -05:00
19
14
  default_executable:
20
15
  dependencies: []
21
16
 
@@ -51,23 +46,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
51
46
  requirements:
52
47
  - - ">="
53
48
  - !ruby/object:Gem::Version
54
- hash: 3
55
- segments:
56
- - 0
57
49
  version: "0"
58
50
  required_rubygems_version: !ruby/object:Gem::Requirement
59
51
  none: false
60
52
  requirements:
61
53
  - - ">="
62
54
  - !ruby/object:Gem::Version
63
- hash: 3
64
- segments:
65
- - 0
66
55
  version: "0"
67
56
  requirements: []
68
57
 
69
58
  rubyforge_project: outdated-gems
70
- rubygems_version: 1.3.7
59
+ rubygems_version: 1.5.0
71
60
  signing_key:
72
61
  specification_version: 3
73
62
  summary: Run `outdated_gems` after `bundle update/install` to see which of your gems are outdated.