bundler 1.1.pre.4 → 1.1.pre.5

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bundler might be problematic. Click here for more details.

Files changed (65) hide show
  1. data/.travis.yml +1 -0
  2. data/CHANGELOG.md +51 -2
  3. data/ISSUES.md +25 -11
  4. data/README.md +3 -3
  5. data/Rakefile +44 -48
  6. data/lib/bundler.rb +21 -20
  7. data/lib/bundler/cli.rb +46 -11
  8. data/lib/bundler/definition.rb +6 -4
  9. data/lib/bundler/dependency.rb +5 -0
  10. data/lib/bundler/dsl.rb +1 -7
  11. data/lib/bundler/endpoint_specification.rb +22 -0
  12. data/lib/bundler/fetcher.rb +76 -22
  13. data/lib/bundler/gem_helper.rb +2 -7
  14. data/lib/bundler/gem_tasks.rb +2 -0
  15. data/lib/bundler/index.rb +48 -41
  16. data/lib/bundler/installer.rb +5 -0
  17. data/lib/bundler/lazy_specification.rb +7 -6
  18. data/lib/bundler/resolver.rb +1 -1
  19. data/lib/bundler/rubygems_ext.rb +1 -1
  20. data/lib/bundler/rubygems_integration.rb +69 -31
  21. data/lib/bundler/runtime.rb +2 -2
  22. data/lib/bundler/setup.rb +3 -0
  23. data/lib/bundler/shared_helpers.rb +2 -2
  24. data/lib/bundler/source.rb +48 -46
  25. data/lib/bundler/spec_set.rb +1 -0
  26. data/lib/bundler/templates/newgem/Gemfile.tt +1 -1
  27. data/lib/bundler/templates/newgem/Rakefile.tt +2 -2
  28. data/lib/bundler/templates/newgem/bin/newgem.tt +1 -1
  29. data/lib/bundler/templates/newgem/gitignore.tt +14 -1
  30. data/lib/bundler/templates/newgem/lib/newgem.rb.tt +2 -0
  31. data/lib/bundler/templates/newgem/newgem.gemspec.tt +13 -17
  32. data/lib/bundler/ui.rb +29 -15
  33. data/lib/bundler/vendor/net/http/persistent.rb +4 -0
  34. data/lib/bundler/vendored_thor.rb +7 -0
  35. data/lib/bundler/version.rb +1 -1
  36. data/man/bundle-install.ronn +7 -0
  37. data/man/bundle.ronn +6 -0
  38. data/man/gemfile.5.ronn +2 -0
  39. data/spec/cache/gems_spec.rb +11 -0
  40. data/spec/install/deploy_spec.rb +1 -1
  41. data/spec/install/gems/dependency_api_spec.rb +62 -7
  42. data/spec/install/gems/groups_spec.rb +3 -3
  43. data/spec/install/gems/post_install_spec.rb +47 -0
  44. data/spec/install/gems/sudo_spec.rb +3 -2
  45. data/spec/install/git_spec.rb +1 -2
  46. data/spec/install/path_spec.rb +1 -1
  47. data/spec/lock/lockfile_spec.rb +1 -1
  48. data/spec/other/check_spec.rb +30 -6
  49. data/spec/other/exec_spec.rb +4 -33
  50. data/spec/other/init_spec.rb +3 -3
  51. data/spec/other/newgem_spec.rb +5 -1
  52. data/spec/other/outdated_spec.rb +36 -6
  53. data/spec/quality_spec.rb +5 -1
  54. data/spec/runtime/require_spec.rb +10 -10
  55. data/spec/runtime/setup_spec.rb +31 -8
  56. data/spec/spec_helper.rb +1 -5
  57. data/spec/support/artifice/endpoint.rb +4 -0
  58. data/spec/support/artifice/endpoint_basic_authentication.rb +13 -0
  59. data/spec/support/artifice/endpoint_fallback.rb +0 -4
  60. data/spec/support/artifice/endpoint_redirect.rb +4 -0
  61. data/spec/support/builders.rb +6 -1
  62. data/spec/support/matchers.rb +1 -1
  63. data/spec/support/rubygems_ext.rb +4 -3
  64. data/spec/update/git_spec.rb +2 -2
  65. metadata +55 -143
@@ -5,3 +5,4 @@ rvm:
5
5
  - jruby
6
6
  - rbx
7
7
  - ree
8
+ - ruby-head
@@ -1,10 +1,28 @@
1
- ## 1.1.pre.4 (5 May, 2011)
1
+ ## 1.1.pre.5 (June 11, 2011)
2
+
3
+ Bugfixes:
4
+
5
+ - Fix LazySpecification on Ruby 1.9 (@dpiddy, #1232)
6
+ - Fix HTTP proxy support (@leobessa, #878)
7
+
8
+ Features:
9
+
10
+ - Speed up `install --deployment` by using the API endpoint
11
+ - Support Basic HTTP Auth for the API endpoint (@dpiddy, #1229)
12
+ - Add `install --full-index` to disable the API endpoint, just in case
13
+ - Significantly speed up install by removing unneeded gemspec fetches
14
+ - `outdated` command shows outdated gems (@joelmoss, #1130)
15
+ - Print gem post install messages (@csquared, #1155)
16
+ - Reduce memory use by removing Specification.new inside method_missing (@tenderlove, #1222)
17
+ - Allow `check --path`
18
+
19
+ ## 1.1.pre.4 (May 5, 2011)
2
20
 
3
21
  Bugfixes:
4
22
 
5
23
  - Fix bug that could prevent installing new gems
6
24
 
7
- ## 1.1.pre.3 (4 May, 2011)
25
+ ## 1.1.pre.3 (May 4, 2011)
8
26
 
9
27
  Features:
10
28
 
@@ -48,6 +66,37 @@ Removed:
48
66
  - Removed bundle install <path>
49
67
  - Removed bundle install --production
50
68
  - Removed bundle install --disable-shared-gems
69
+ =======
70
+ ## 1.0.15 (June 9, 2011)
71
+
72
+ Features:
73
+
74
+ - Improved Rubygems integration, removed many deprecation notices
75
+
76
+ Bugfixes:
77
+
78
+ - Escape URL arguments to git correctly on Windows (1.0.14 regression)
79
+
80
+ ## 1.0.14 (May 27, 2011)
81
+
82
+ Features:
83
+
84
+ - Rubinius platform :rbx (@rkbodenner)
85
+ - Include gem rake tasks with "require 'bundler/gem_tasks" (@indirect)
86
+ - Include user name and email from git config in new gemspec (@ognevsky)
87
+
88
+ Bugfixes:
89
+
90
+ - Set file permissions after checking out git repos (@tissak)
91
+ - Remove deprecated call to Gem::SourceIndex#all_gems (@mpj)
92
+ - Require the version file in new gemspecs (@rubiii)
93
+ - Allow relative paths from the Gemfile in gems with no gemspec (@mbirk)
94
+ - Install gems that contain 'bundler', e.g. guard-bundler (@hone)
95
+ - Display installed path correctly on Windows (@tadman)
96
+ - Escape quotes in git URIs (@mheffner)
97
+ - Improve Rake 0.9 support (@quix)
98
+ - Handle certain directories already existing (@raggi)
99
+ - Escape filenames containing regex characters (@indirect)
51
100
 
52
101
  ## 1.0.13 (May 4, 2011)
53
102
 
data/ISSUES.md CHANGED
@@ -1,8 +1,20 @@
1
1
  # Bundler Issues
2
2
 
3
+ ## Frequently encountered issues
4
+
5
+ ### REE and Zlib::GzipFile::Error
6
+
7
+ Ruby Enterprise Edition users may see a `Zlib::GzipFile::Error` while installing gems. It is due to [a bug in REE](http://code.google.com/p/rubyenterpriseedition/issues/detail?id=45). You may be able to resolve the issue by upgrading REE, or changing to a different interpreter.
8
+
9
+ ### Rake activation error
10
+
11
+ Anyone who has installed the Spork gem may see activation errors while running `rake` directly. This is because old versions of Spork would [install the newest rake using a mkmf file](https://github.com/timcharper/spork/issues/119). To resolve the issue, update the Spork version requirement in your Gemfile to at least `"~>0.8.5"` or `"~>0.9.0.rc8"`.
12
+
3
13
  ## Troubleshooting
4
14
 
5
- Instructions for common Bundler use-cases can be found on the [Bundler documentation site](http://gembundler.com/v1.0/). Detailed information about each Bundler command, including help with common problems, can be found in the [Bundler man pages](http://gembundler.com/man/bundle.1.html).
15
+ Instructions for common Bundler use-cases can be found on the [Bundler documentation site](http://gembundler.com/v1.0/).
16
+
17
+ Detailed information about each Bundler command, including help with common problems, can be found in the [Bundler man pages](http://gembundler.com/man/bundle.1.html).
6
18
 
7
19
  After reading the documentation, try these troubleshooting steps:
8
20
 
@@ -26,22 +38,24 @@ After reading the documentation, try these troubleshooting steps:
26
38
 
27
39
  ## Reporting unresolved problems
28
40
 
29
- If you are still having problems, please report issues to the [Bundler issue tracker](http://github.com/carlhuda/bundler/issues/).
30
-
31
- Instructions that allow the Bundler team to reproduce your issue are vitally important. When you report a bug, please create a gist of the following information and include a link in your ticket:
41
+ Instructions that allow the Bundler team to reproduce your issue are vitally important. When you report a bug, please include the following information:
32
42
 
33
- - What version of bundler you are using
34
- - What version of Ruby you are using
35
- - Whether you are using RVM, and if so what version
43
+ - The command you ran
44
+ - Exception backtrace(s), if any
36
45
  - Your Gemfile
37
46
  - Your Gemfile.lock
38
- - If you are on 0.9, whether you have locked or not
39
- - If you are on 1.0, the result of `bundle config`
40
- - The command you ran to generate exception(s)
41
- - The exception backtrace(s)
47
+ - Your Bundler configuration settings (run `bundle config`)
48
+ - What version of bundler you are using (run `bundle -v`)
49
+ - What version of Ruby you are using (run `ruby -v`)
50
+ - What version of Rubygems you are using (run `gem -v`)
51
+ - Whether you are using RVM, and if so what version (run `rvm -v`)
52
+ - Whether you have the `rubygems-bundler` gem, which can break gem binares
53
+
42
54
 
43
55
  If you are using Rails 2.3, please also include:
44
56
 
45
57
  - Your boot.rb file
46
58
  - Your preinitializer.rb file
47
59
  - Your environment.rb file
60
+
61
+ [Create a gist](https://gist.github.com) containing all of that information, then visit the [Bundler issue tracker](https://github.com/carlhuda/bundler) and create a new ticket describing your problem and linking to your gist.
data/README.md CHANGED
@@ -12,17 +12,17 @@ See [gembundler.com](http://gembundler.com) for up-to-date installation and usag
12
12
 
13
13
  ### Troubleshooting
14
14
 
15
- For help with common problems, see [ISSUES](http://github.com/carlhuda/bundler/blob/master/ISSUES.md).
15
+ For help with common problems, see [ISSUES](https://github.com/carlhuda/bundler/blob/master/ISSUES.md).
16
16
 
17
17
  ### Development
18
18
 
19
- To see what has changed in recent versions of bundler, see the [CHANGELOG](http://github.com/carlhuda/bundler/blob/master/CHANGELOG.md).
19
+ To see what has changed in recent versions of bundler, see the [CHANGELOG](https://github.com/carlhuda/bundler/blob/master/CHANGELOG.md).
20
20
 
21
21
  The `master` branch contains our current progress towards version 1.1. Because of that, please submit bugfix pull requests against the `1-0-stable` branch.
22
22
 
23
23
  ### Upgrading from Bundler 0.8 to 0.9 and above
24
24
 
25
- See [UPGRADING](http://github.com/carlhuda/bundler/blob/master/UPGRADING.md).
25
+ See [UPGRADING](https://github.com/carlhuda/bundler/blob/master/UPGRADING.md).
26
26
 
27
27
  ### Other questions
28
28
 
data/Rakefile CHANGED
@@ -1,15 +1,19 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  $:.unshift File.expand_path("../lib", __FILE__)
3
- require 'bundler/gem_helper'
4
- Bundler::GemHelper.install_tasks
3
+ require 'bundler/gem_tasks'
5
4
 
6
- def sudo?
7
- ENV['BUNDLER_SUDO_TESTS']
5
+ namespace :spec do
6
+ desc "Ensure spec dependencies are installed"
7
+ task :deps do
8
+ sh "gem list ronn | (grep 'ronn' 1> /dev/null) || gem install ronn --no-ri --no-rdoc"
9
+ sh "gem list rspec | (grep 'rspec (2.' 1> /dev/null) || gem install rspec --no-ri --no-rdoc"
10
+ end
8
11
  end
9
12
 
10
13
  begin
11
- # set up rspec tasks
14
+ # running the specs needs both rspec and ronn
12
15
  require 'rspec/core/rake_task'
16
+ require 'ronn'
13
17
 
14
18
  desc "Run specs"
15
19
  RSpec::Core::RakeTask.new do |t|
@@ -18,55 +22,38 @@ begin
18
22
  end
19
23
  task :spec => "man:build"
20
24
 
21
- begin
22
- require 'ci/reporter/rake/rspec'
23
-
24
- namespace :ci do
25
- desc "Run specs with Hudson output"
26
- RSpec::Core::RakeTask.new(:spec)
27
- task :spec => ["ci:setup:rspec", "man:build"]
28
- end
29
-
30
- rescue LoadError
31
- namespace :ci do
32
- task :spec do
33
- abort "Run `rake ci:deps` to be able to run the CI specs"
34
- end
35
-
36
- desc "Install CI dependencies"
37
- task :deps do
38
- sh "gem list ci_reporter | (grep 'ci_reporter' 1> /dev/null) || gem install ci_reporter --no-ri --no-rdoc"
39
- end
40
- task :deps => "spec:deps"
25
+ namespace :spec do
26
+ task :clean do
27
+ rm_rf 'tmp'
41
28
  end
42
- end
43
29
 
44
- namespace :spec do
45
30
  desc "Run the spec suite with the sudo tests"
46
- task :sudo => ["set_sudo", "clean", "spec"]
31
+ task :sudo => ["set_sudo", "spec", "clean_sudo"]
47
32
 
48
33
  task :set_sudo do
49
34
  ENV['BUNDLER_SUDO_TESTS'] = '1'
50
35
  end
51
36
 
52
- task :clean do
53
- if sudo?
54
- system "sudo rm -rf #{File.expand_path('../tmp', __FILE__)}"
55
- else
56
- rm_rf 'tmp'
57
- end
37
+ task :clean_sudo do
38
+ puts "Cleaning up sudo test files..."
39
+ system "sudo rm -rf #{File.expand_path('../tmp/sudo_gem_home', __FILE__)}"
58
40
  end
59
41
 
60
42
  namespace :rubygems do
61
43
  # Rubygems 1.3.5, 1.3.6, and HEAD specs
62
44
  rubyopt = ENV["RUBYOPT"]
63
- %w(master v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.1 v1.7.2).each do |rg|
45
+ %w(master v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.3).each do |rg|
64
46
  desc "Run specs with Rubygems #{rg}"
65
47
  RSpec::Core::RakeTask.new(rg) do |t|
66
48
  t.rspec_opts = %w(-fs --color)
67
49
  t.ruby_opts = %w(-w)
68
50
  end
69
51
 
52
+ # Create tasks like spec:rubygems:v1.8.3:sudo to run the sudo specs
53
+ namespace rg do
54
+ task :sudo => ["set_sudo", rg, "clean_sudo"]
55
+ end
56
+
70
57
  task "clone_rubygems_#{rg}" do
71
58
  unless File.directory?("tmp/rubygems")
72
59
  system("git clone git://github.com/rubygems/rubygems.git tmp/rubygems")
@@ -129,10 +116,6 @@ begin
129
116
 
130
117
  end
131
118
 
132
-
133
- # set up man tasks that use ronn
134
- require 'ronn'
135
-
136
119
  namespace :man do
137
120
  directory "lib/bundler/man"
138
121
 
@@ -160,20 +143,33 @@ begin
160
143
  end
161
144
  end
162
145
 
146
+ begin
147
+ require 'ci/reporter/rake/rspec'
163
148
 
164
- rescue LoadError
165
- task :spec do
166
- abort "Run `rake spec:deps` to be able to run the specs"
167
- end
149
+ namespace :ci do
150
+ desc "Run specs with Hudson output"
151
+ RSpec::Core::RakeTask.new(:spec)
152
+ task :spec => ["ci:setup:rspec", "man:build"]
153
+ end
168
154
 
169
- namespace :spec do
170
- desc "Ensure spec dependencies are installed"
171
- task :deps do
172
- sh "gem list ronn | (grep 'ronn' 1> /dev/null) || gem install ronn --no-ri --no-rdoc"
173
- sh "gem list rspec | (grep 'rspec (2.0' 1> /dev/null) || gem install rspec --no-ri --no-rdoc"
155
+ rescue LoadError
156
+ namespace :ci do
157
+ task :spec do
158
+ abort "Run `rake ci:deps` to be able to run the CI specs"
159
+ end
160
+
161
+ desc "Install CI dependencies"
162
+ task :deps do
163
+ sh "gem list ci_reporter | (grep 'ci_reporter' 1> /dev/null) || gem install ci_reporter --no-ri --no-rdoc"
164
+ end
165
+ task :deps => "spec:deps"
174
166
  end
175
167
  end
176
168
 
169
+ rescue LoadError
170
+ task :spec do
171
+ abort "Run `rake spec:deps` to be able to run the specs"
172
+ end
177
173
  end
178
174
 
179
175
  namespace :vendor do
@@ -15,26 +15,27 @@ require 'bundler/version'
15
15
  module Bundler
16
16
  ORIGINAL_ENV = ENV.to_hash
17
17
 
18
- autoload :Definition, 'bundler/definition'
19
- autoload :Dependency, 'bundler/dependency'
20
- autoload :Dsl, 'bundler/dsl'
21
- autoload :Environment, 'bundler/environment'
22
- autoload :Fetcher, 'bundler/fetcher'
23
- autoload :GemHelper, 'bundler/gem_helper'
24
- autoload :Graph, 'bundler/graph'
25
- autoload :Index, 'bundler/index'
26
- autoload :Installer, 'bundler/installer'
27
- autoload :LazySpecification, 'bundler/lazy_specification'
28
- autoload :LockfileParser, 'bundler/lockfile_parser'
29
- autoload :RemoteSpecification, 'bundler/remote_specification'
30
- autoload :Resolver, 'bundler/resolver'
31
- autoload :Runtime, 'bundler/runtime'
32
- autoload :Settings, 'bundler/settings'
33
- autoload :SharedHelpers, 'bundler/shared_helpers'
34
- autoload :SpecSet, 'bundler/spec_set'
35
- autoload :Source, 'bundler/source'
36
- autoload :Specification, 'bundler/shared_helpers'
37
- autoload :UI, 'bundler/ui'
18
+ autoload :Definition, 'bundler/definition'
19
+ autoload :Dependency, 'bundler/dependency'
20
+ autoload :Dsl, 'bundler/dsl'
21
+ autoload :EndpointSpecification, 'bundler/endpoint_specification'
22
+ autoload :Environment, 'bundler/environment'
23
+ autoload :Fetcher, 'bundler/fetcher'
24
+ autoload :GemHelper, 'bundler/gem_helper'
25
+ autoload :Graph, 'bundler/graph'
26
+ autoload :Index, 'bundler/index'
27
+ autoload :Installer, 'bundler/installer'
28
+ autoload :LazySpecification, 'bundler/lazy_specification'
29
+ autoload :LockfileParser, 'bundler/lockfile_parser'
30
+ autoload :RemoteSpecification, 'bundler/remote_specification'
31
+ autoload :Resolver, 'bundler/resolver'
32
+ autoload :Runtime, 'bundler/runtime'
33
+ autoload :Settings, 'bundler/settings'
34
+ autoload :SharedHelpers, 'bundler/shared_helpers'
35
+ autoload :SpecSet, 'bundler/spec_set'
36
+ autoload :Source, 'bundler/source'
37
+ autoload :Specification, 'bundler/shared_helpers'
38
+ autoload :UI, 'bundler/ui'
38
39
 
39
40
  class BundlerError < StandardError
40
41
  def self.status_code(code = nil)
@@ -1,6 +1,4 @@
1
- $:.unshift File.expand_path('../vendor', __FILE__)
2
- require 'thor'
3
- require 'thor/actions'
1
+ require 'bundler/vendored_thor'
4
2
  require 'rubygems/user_interaction'
5
3
  require 'rubygems/config_file'
6
4
 
@@ -94,8 +92,12 @@ module Bundler
94
92
  D
95
93
  method_option "gemfile", :type => :string, :banner =>
96
94
  "Use the specified gemfile instead of Gemfile"
95
+ method_option "path", :type => :string, :banner =>
96
+ "Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME). Bundler will remember this value for future installs on this machine"
97
97
  def check
98
98
  ENV['BUNDLE_GEMFILE'] = File.expand_path(options[:gemfile]) if options[:gemfile]
99
+
100
+ Bundler.settings[:path] = File.expand_path(options[:path]) if options[:path]
99
101
  begin
100
102
  not_installed = Bundler.definition.missing_specs
101
103
  rescue GemNotFound, VersionConflict
@@ -150,6 +152,8 @@ module Bundler
150
152
  "Install using defaults tuned for deployment environments"
151
153
  method_option "standalone", :type => :array, :lazy_default => [], :banner =>
152
154
  "Make a bundle that can work without the Bundler runtime"
155
+ method_option "full-index", :tpye => :boolean, :banner =>
156
+ "Use the rubygems modern index instead of the API endpoint"
153
157
  def install
154
158
  opts = options.dup
155
159
  opts[:without] ||= []
@@ -204,18 +208,22 @@ module Bundler
204
208
  Bundler.settings.without = opts[:without] unless opts[:without].empty?
205
209
  Bundler.ui.be_quiet! if opts[:quiet]
206
210
 
211
+ Bundler::Fetcher.disable_endpoint = opts["full-index"]
212
+
207
213
  Installer.install(Bundler.root, Bundler.definition, opts)
208
214
  Bundler.load.cache if Bundler.root.join("vendor/cache").exist? && !options["no-cache"]
209
215
 
210
216
  if Bundler.settings[:path]
211
- relative_path = Bundler.settings[:path]
212
- relative_path = "./" + relative_path unless relative_path[0] == ?/
217
+ relative_path = File.expand_path(Bundler.settings[:path]).sub(/^#{File.expand_path('.')}/, '.')
213
218
  Bundler.ui.confirm "Your bundle is complete! " +
214
219
  "It was installed into #{relative_path}"
215
220
  else
216
221
  Bundler.ui.confirm "Your bundle is complete! " +
217
222
  "Use `bundle show [gemname]` to see where a bundled gem is installed."
218
223
  end
224
+ Installer.post_install_messages.to_a.each do |name, msg|
225
+ Bundler.ui.confirm "Post-install message from #{name}:\n#{msg}"
226
+ end
219
227
  rescue GemNotFound => e
220
228
  if opts[:local] && Bundler.app_cache.exist?
221
229
  Bundler.ui.warn "Some gems seem to be missing from your vendor/cache directory."
@@ -272,16 +280,19 @@ module Bundler
272
280
  end
273
281
  map %w(list) => "show"
274
282
 
275
- desc "outdated", "Returns a list of installed gems that are outdated."
283
+ desc "outdated [GEM]", "list installed gems with newer versions available"
276
284
  long_desc <<-D
277
- Outdated lists the names and versions of all gems that are outdated when compared to the source.
278
- Calling outdated with [GEM [GEM]] will check only the given gems.
285
+ Outdated lists the names and versions of gems that have a newer version available
286
+ in the given source. Calling outdated with [GEM [GEM]] will only check for newer
287
+ versions of the given gems. By default, available prerelease gems will be ignored.
279
288
  D
289
+ method_option "pre", :type => :boolean, :banner => "Check for newer pre-release gems"
280
290
  method_option "source", :type => :array, :banner => "Check against a specific source"
281
291
  method_option "local", :type => :boolean, :banner =>
282
292
  "Do not attempt to fetch gems remotely and use the gem cache instead"
283
293
  def outdated(*gems)
284
294
  sources = Array(options[:source])
295
+ current_specs = Bundler.load.specs
285
296
 
286
297
  if gems.empty? && sources.empty?
287
298
  # We're doing a full update
@@ -289,14 +300,38 @@ module Bundler
289
300
  else
290
301
  definition = Bundler.definition(:gems => gems, :sources => sources)
291
302
  end
292
-
293
303
  options["local"] ? definition.resolve_with_cache! : definition.resolve_remotely!
294
304
 
305
+ Bundler.ui.info "Outdated gems included in the bundle:"
295
306
  definition.specs.each do |spec|
307
+ next if !gems.empty? && !gems.include?(spec.name)
308
+
296
309
  spec.source.fetch(spec) if spec.source.respond_to?(:fetch)
297
- spec.source.outdated(spec)
298
- Bundler.ui.debug "from #{spec.loaded_from} "
310
+
311
+ if spec.git_version
312
+ current = current_specs.find{|s| spec.name == s.name }
313
+ else
314
+ current = spec
315
+ spec = definition.index[current.name].sort_by{|b| b.version }
316
+
317
+ if !options[:pre] && spec.size > 1
318
+ spec = spec.delete_if{|b| b.respond_to?(:version) && b.version.prerelease? }
319
+ end
320
+
321
+ spec = spec.last
322
+ end
323
+
324
+ gem_outdated = Gem::Version.new(spec.version) > Gem::Version.new(current.version)
325
+ git_outdated = current.git_version != spec.git_version
326
+ if gem_outdated || git_outdated
327
+ spec_version = "#{spec.version}#{spec.git_version}"
328
+ current_version = "#{current.version}#{current.git_version}"
329
+ Bundler.ui.info " * #{spec.name} (#{spec_version} > #{current_version})"
330
+ end
331
+ Bundler.ui.debug "from #{spec.loaded_from}"
299
332
  end
333
+
334
+ Bundler.ui.info ""
300
335
  end
301
336
 
302
337
  desc "cache", "Cache all the gems to vendor/cache", :hide => true