outdated-gems 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,3 @@
1
+ pkg/*
2
+ *.gem
3
+ .bundle
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in outdated-gems.gemspec
4
+ gemspec
data/README CHANGED
@@ -1,3 +1 @@
1
- Given a Gemfile.lock, list gems that have new versions on rubyforge.org.
2
-
3
- Run `outdated_gems` in a directory containing a Gemfile.lock and it will print the results.
1
+ Run `outdated_gems` after `bundle update`/`bundle install` to see which of your gems are outdated.
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,5 @@
1
+ module Outdated
2
+ module Gems
3
+ VERSION = "0.5.0"
4
+ end
5
+ end
data/lib/outdated-gems.rb CHANGED
@@ -6,20 +6,46 @@ if (bundle = `bundle show`) && !bundle.include?("Could not locate Gemfile")
6
6
  end
7
7
  end
8
8
  outdated_gems = {}
9
+ outdated_edge_gems = {}
10
+ unfound_gems = []
9
11
  gem_list = Gem::SpecFetcher.new.list.values.first
12
+ edge_gem_list = Gem::SpecFetcher.new.list(false, true).values.first
10
13
  gems.each do |name, v_current|
11
14
  latest_gem = gem_list.detect { |g| g.first == name }
12
- if latest_gem[2] == "ruby" && latest_gem[1] > Gem::Version.create(v_current)
13
- outdated_gems[name] = "#{v_current} => #{latest_gem[1].version}"
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
14
25
  end
15
26
  end
16
- if outdated_gems.empty?
27
+ if outdated_gems.empty? && outdated_edge_gems.empty?
17
28
  puts "No outdated gems."
18
29
  else
19
- puts "Outdated gems:"
20
- outdated_gems.each do |name, change|
21
- puts "#{name}: #{change}"
30
+ unless outdated_gems.empty?
31
+ puts "\nOutdated gems:"
32
+ puts "---"
33
+ outdated_gems.each do |name, change|
34
+ puts "#{name}: #{change}"
35
+ end
36
+ puts "---\n"
22
37
  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}"
43
+ end
44
+ puts "---\n"
45
+ end
46
+ end
47
+ unless unfound_gems.empty?
48
+ puts "Could not find: #{unfound_gems.inspect}."
23
49
  end
24
50
  else
25
51
  puts bundle
@@ -1,46 +1,21 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
1
  # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "outdated-gems/version"
5
4
 
6
5
  Gem::Specification.new do |s|
7
- s.name = %q{outdated-gems}
8
- s.version = "0.4.0"
6
+ s.name = "outdated-gems"
7
+ s.version = Outdated::Gems::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Aaron Gibralter"]
10
+ s.email = ["aaron.gibralter@gmail.com"]
11
+ s.homepage = "http://rubygems.org/gems/outdated-gems"
12
+ s.summary = %q{Run `outdated_gems` after `bundle update/install` to see which of your gems are outdated.}
13
+ s.description = %q{Run `outdated_gems` after `bundle update/install` to see which of your gems are outdated.}
9
14
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Aaron Gibralter"]
12
- s.date = %q{2010-06-30}
13
- s.default_executable = %q{outdated_gems}
14
- s.description = %q{Run `outdated_gems` in a directory containing a Gemfile.lock and it will print the results.}
15
- s.email = %q{aaron.gibralter@gmail.com}
16
- s.executables = ["outdated_gems"]
17
- s.extra_rdoc_files = [
18
- "README"
19
- ]
20
- s.files = [
21
- "README",
22
- "VERSION",
23
- "bin/outdated_gems",
24
- "lib/outdated-gems.rb",
25
- "outdated-gems.gemspec"
26
- ]
27
- s.homepage = %q{http://github.com/agibralter/outdated-gems}
28
- s.rdoc_options = ["--charset=UTF-8"]
29
- s.require_paths = ["lib"]
30
- s.rubygems_version = %q{1.3.6}
31
- s.summary = %q{Given a Gemfile.lock, list gems that have new versions on rubyforge.org.}
32
-
33
- if s.respond_to? :specification_version then
34
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
35
- s.specification_version = 3
15
+ s.rubyforge_project = "outdated-gems"
36
16
 
37
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
38
- s.add_runtime_dependency(%q<bundler>, [">= 0.9.26"])
39
- else
40
- s.add_dependency(%q<bundler>, [">= 0.9.26"])
41
- end
42
- else
43
- s.add_dependency(%q<bundler>, [">= 0.9.26"])
44
- end
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ s.require_paths = ["lib"]
45
21
  end
46
-
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: outdated-gems
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 11
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
- - 4
8
+ - 5
8
9
  - 0
9
- version: 0.4.0
10
+ version: 0.5.0
10
11
  platform: ruby
11
12
  authors:
12
13
  - Aaron Gibralter
@@ -14,66 +15,61 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-06-30 00:00:00 -04:00
18
- default_executable: outdated_gems
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: bundler
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- - 9
30
- - 26
31
- version: 0.9.26
32
- type: :runtime
33
- version_requirements: *id001
34
- description: Run `outdated_gems` in a directory containing a Gemfile.lock and it will print the results.
35
- email: aaron.gibralter@gmail.com
18
+ date: 2010-10-27 00:00:00 -04:00
19
+ default_executable:
20
+ dependencies: []
21
+
22
+ description: Run `outdated_gems` after `bundle update/install` to see which of your gems are outdated.
23
+ email:
24
+ - aaron.gibralter@gmail.com
36
25
  executables:
37
26
  - outdated_gems
38
27
  extensions: []
39
28
 
40
- extra_rdoc_files:
41
- - README
29
+ extra_rdoc_files: []
30
+
42
31
  files:
32
+ - .gitignore
33
+ - Gemfile
43
34
  - README
44
- - VERSION
35
+ - Rakefile
45
36
  - bin/outdated_gems
46
37
  - lib/outdated-gems.rb
38
+ - lib/outdated-gems/version.rb
47
39
  - outdated-gems.gemspec
48
40
  has_rdoc: true
49
- homepage: http://github.com/agibralter/outdated-gems
41
+ homepage: http://rubygems.org/gems/outdated-gems
50
42
  licenses: []
51
43
 
52
44
  post_install_message:
53
- rdoc_options:
54
- - --charset=UTF-8
45
+ rdoc_options: []
46
+
55
47
  require_paths:
56
48
  - lib
57
49
  required_ruby_version: !ruby/object:Gem::Requirement
50
+ none: false
58
51
  requirements:
59
52
  - - ">="
60
53
  - !ruby/object:Gem::Version
54
+ hash: 3
61
55
  segments:
62
56
  - 0
63
57
  version: "0"
64
58
  required_rubygems_version: !ruby/object:Gem::Requirement
59
+ none: false
65
60
  requirements:
66
61
  - - ">="
67
62
  - !ruby/object:Gem::Version
63
+ hash: 3
68
64
  segments:
69
65
  - 0
70
66
  version: "0"
71
67
  requirements: []
72
68
 
73
- rubyforge_project:
74
- rubygems_version: 1.3.6
69
+ rubyforge_project: outdated-gems
70
+ rubygems_version: 1.3.7
75
71
  signing_key:
76
72
  specification_version: 3
77
- summary: Given a Gemfile.lock, list gems that have new versions on rubyforge.org.
73
+ summary: Run `outdated_gems` after `bundle update/install` to see which of your gems are outdated.
78
74
  test_files: []
79
75
 
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.4.0