bundler 1.4.0.rc.1 → 1.5.0.rc.1

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 (58) hide show
  1. data/.travis.yml +18 -15
  2. data/CHANGELOG.md +23 -2
  3. data/Rakefile +3 -1
  4. data/bundler.gemspec +1 -1
  5. data/lib/bundler.rb +3 -2
  6. data/lib/bundler/capistrano.rb +1 -0
  7. data/lib/bundler/cli.rb +19 -5
  8. data/lib/bundler/definition.rb +6 -2
  9. data/lib/bundler/dsl.rb +7 -3
  10. data/lib/bundler/endpoint_specification.rb +1 -1
  11. data/lib/bundler/fetcher.rb +22 -41
  12. data/lib/bundler/installer.rb +1 -11
  13. data/lib/bundler/lazy_specification.rb +1 -1
  14. data/lib/bundler/parallel_workers/unix_worker.rb +6 -0
  15. data/lib/bundler/remote_specification.rb +1 -1
  16. data/lib/bundler/retry.rb +4 -3
  17. data/lib/bundler/ruby_version.rb +1 -1
  18. data/lib/bundler/rubygems_ext.rb +7 -2
  19. data/lib/bundler/rubygems_integration.rb +31 -30
  20. data/lib/bundler/settings.rb +21 -0
  21. data/lib/bundler/source.rb +13 -2
  22. data/lib/bundler/source/git/git_proxy.rb +1 -1
  23. data/lib/bundler/source/rubygems.rb +43 -13
  24. data/lib/bundler/templates/newgem/README.md.tt +1 -1
  25. data/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +2 -2
  26. data/lib/bundler/version.rb +1 -1
  27. data/man/bundle-config.ronn +9 -0
  28. data/man/bundle-install.ronn +9 -5
  29. data/man/gemfile.5.ronn +6 -0
  30. data/spec/bundler/retry_spec.rb +26 -3
  31. data/spec/commands/config_spec.rb +14 -0
  32. data/spec/{integration/inject.rb → commands/inject_spec.rb} +0 -0
  33. data/spec/commands/newgem_spec.rb +2 -2
  34. data/spec/commands/outdated_spec.rb +17 -0
  35. data/spec/install/binstubs_spec.rb +24 -0
  36. data/spec/install/bundler_spec.rb +146 -0
  37. data/spec/install/{gemspec_spec.rb → gemfile/gemspec_spec.rb} +0 -0
  38. data/spec/install/{git_spec.rb → gemfile/git_spec.rb} +2 -2
  39. data/spec/install/gemfile/path_spec.rb +468 -0
  40. data/spec/install/gemfile_spec.rb +44 -0
  41. data/spec/install/gems/groups_spec.rb +236 -177
  42. data/spec/install/gems/mirror_spec.rb +39 -0
  43. data/spec/install/gems/platform_spec.rb +2 -14
  44. data/spec/install/gems/simple_case_spec.rb +1 -450
  45. data/spec/install/gemspecs_spec.rb +50 -0
  46. data/spec/install/path_spec.rb +91 -409
  47. data/spec/install/prereleases_spec.rb +43 -0
  48. data/spec/other/bundle_ruby_spec.rb +2 -2
  49. data/spec/other/ext_spec.rb +1 -1
  50. data/spec/other/platform_spec.rb +29 -2
  51. data/spec/realworld/parallel_install_spec.rb +2 -1
  52. data/spec/realworld/parallel_update_spec.rb +31 -0
  53. data/spec/runtime/platform_spec.rb +2 -2
  54. data/spec/spec_helper.rb +2 -2
  55. data/spec/support/{rubygems_hax/platform.rb → hax.rb} +0 -0
  56. metadata +110 -67
  57. checksums.yaml +0 -7
  58. data/spec/install/invalid_spec.rb +0 -50
@@ -14,16 +14,11 @@ notifications:
14
14
  - secure: "bCcvqJT7YrBawtkXXwHhT+jOFth7r2Qv/30PkkbhQxk6Jb3xambjCOJ3U6vJ\ngYmiL50exi5lUp3oc3SEbHN5t2CrZqOZDQ6o7P8EAmB5c0oH2RrYaFOkI5Gt\nul/jGH/96A9sj0aMwG7JfdMSfhqj1DUKAm2PnnbXPL853VfmT24="
15
15
  # terence
16
16
  - secure: "MQ8eA5Jb8YzEpAo58DRGfVJklAPcEbAulpBZnTxp0am6ldneDtJHbQk21w6R\nj5GsDHlzr/lMp/GHIimtUZ7rLohfND8fj/W7fs1Dkd4eN02/ERt98x3pHlqv\nvZgSnZ39uVYv+OcphraE24QaRaGWLhWZAMYQTVe/Yz50NyG8g1U="
17
- irc:
18
- on_success: change
19
- on_failure: always
20
- channels:
21
- - "irc.freenode.org#bundler"
22
17
  campfire:
23
18
  on_success: change
24
19
  on_failure: always
25
20
  rooms:
26
- - secure: "geau3P+A9ZJHkA/OHN5v9Mcb8hAti1PllXw5DsHNJfLAWBAw5ReGGMA8Xfpf\nLdT7ktIUlQwzw94cKQ6sRZk8szXTiHncf3bxXTACJf2RpiKmbkoQU51TmCDq\nYSMuY1FIryk/3t9aZCrarufbIDI3DBscDEe4Bj9bERl+TJ8ArBY="
21
+ secure: MNTSGIySYwHia5gIgRiZxXtPMPDIP9KmzQk7Kq2ZoVvP3mIk8W1TMkvcyFkEf6uCasyVZZixzUBfY+E0BlHAz1ycQpTh1jvSpuIpEVYW48ShJldJ+8W8xfzafyOHii3z7VrDaomEffmMDdmHRsbQAfekMjdR4bTpXtT9V+wOXlg=
27
22
  rvm:
28
23
  - 2.0.0
29
24
  - 1.9.3
@@ -33,16 +28,15 @@ env:
33
28
  # We need to know if changes to rubygems will break bundler on release
34
29
  - RGV=master
35
30
  # Test the latest rubygems release with all of our supported rubies
36
- - RGV=v2.0.6
31
+ - RGV=v2.1.9
37
32
  # Test the latest stable branch so we know the next minor will work
38
- - RGV=2.0
33
+ - RGV=2.1
39
34
  matrix:
40
35
  allow_failures:
41
36
  # We want to know how we're doing with head, but not fail the build
42
37
  - rvm: ruby-head
43
38
  - env: RGV=master
44
- - env: RGV=2.0
45
- # 1.9.2 is simply too slow. it sometimes exceeds the 25m hard limit.
39
+ # 1.9.2 is simply too slow. it sometimes exceeds the Travis hard limit.
46
40
  - rvm: 1.9.2
47
41
  # Alternate implementations are good data points but not maintained
48
42
  - rvm: jruby
@@ -53,12 +47,21 @@ matrix:
53
47
  env: RGV=master
54
48
  # Alternate implementations
55
49
  - rvm: jruby
56
- env: RGV=v2.0.6
50
+ env: RGV=v2.1.9
57
51
  - rvm: rbx
58
- env: RGV=v2.0.6
52
+ env: RGV=v2.1.9
53
+ # Rubygems goes down to 2.0 on Ruby 2.0.0
54
+ - rvm: 2.0.0
55
+ env: RGV=v2.1.9
56
+ - rvm: 2.0.0
57
+ env: RGV=v2.0.12
59
58
  # Rubygems goes down to 1.5.3 on Ruby 1.9.3
60
59
  - rvm: 1.9.3
61
- env: RGV=v1.8.25
60
+ env: RGV=v2.1.9
61
+ - rvm: 1.9.3
62
+ env: RGV=v2.0.12
63
+ - rvm: 1.9.3
64
+ env: RGV=v1.8.28
62
65
  - rvm: 1.9.3
63
66
  env: RGV=v1.7.2
64
67
  - rvm: 1.9.3
@@ -67,10 +70,10 @@ matrix:
67
70
  env: RGV=v1.5.3
68
71
  # We only want an overview of how 1.9.2 is doing
69
72
  - rvm: 1.9.2
70
- env: RGV=v2.0.6
73
+ env: RGV=v2.1.9
71
74
  # Rubygems goes down to 1.3.6 on Ruby 1.8.7
72
75
  - rvm: 1.8.7
73
- env: RGV=v1.8.25
76
+ env: RGV=v1.8.28
74
77
  - rvm: 1.8.7
75
78
  env: RGV=v1.7.2
76
79
  - rvm: 1.8.7
@@ -1,3 +1,24 @@
1
+ ## 1.5.0.rc.1 (2013-11-09)
2
+
3
+ Features:
4
+
5
+ - bundle update also accepts --jobs (#2692, @mrkn)
6
+ - add fork URL to README for new `bundle gem` (#2665, @zzak)
7
+ - add `bundle outdated --strict` (#2685, @rhysd)
8
+ - warn if same gem/version is added twice (#2679, @jendiamond)
9
+ - don't redownload installed specs for `bundle install` (#2680, @cainlevy)
10
+ - override gem sources with mirrors (#2650, @danielsdeleo, @mkristian)
11
+
12
+ Bugfixes:
13
+
14
+ - fix sharing same SSL socket when forking workers for parallel install (#2632)
15
+ - fix msg typo in GitNotAllowedError (#2654, @joyicecloud)
16
+ - fix Bundler.which for directories (#2697, @rhysd)
17
+ - properly require `Capistrano::Version` (#2690, @steveklabnik)
18
+ - search for git.exe and git
19
+ - fix the bug that downloads every spec when API fetcher encouters an error
20
+ - only retry network requests
21
+
1
22
  ## 1.4.0.rc.1 (2013-09-29)
2
23
 
3
24
  Features:
@@ -6,7 +27,7 @@ Features:
6
27
  - add :patchlevel option to ruby DSL
7
28
  - add `bundler` bin (#2598, @kirs)
8
29
  - friendly ambiguous error messages (#2581, #2550, @jlsuttles, @jendiamond, @joyicecloud)
9
- - add `:jruby_18` and `:jruby_19` paltform options (@mcfiredrill)
30
+ - add `:jruby_18` and `:jruby_19` platform options (@mcfiredrill)
10
31
  - add X.509 client certificates for auth without passwords (@snackbandit)
11
32
  - add `exec --keep-file-descriptors` for Ruby 1.9-like behavior on 2.0 (@steved555)
12
33
  - print a better error when git is not installed (@joyicecloud)
@@ -68,7 +89,7 @@ Bugfixes:
68
89
  - use basic auth even when SSL is not available (@jayniz)
69
90
  - installing git gems without dependencies in deployment now works
70
91
 
71
- ## 1.3.4 (15 March 2103)
92
+ ## 1.3.4 (15 March 2013)
72
93
 
73
94
  Bugfixes:
74
95
 
data/Rakefile CHANGED
@@ -91,7 +91,9 @@ begin
91
91
  namespace :rubygems do
92
92
  rubyopt = ENV["RUBYOPT"]
93
93
  # When editing this list, also edit .travis.yml!
94
- %w(master 2.0 v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.25 v2.0.6).each do |rg|
94
+ branches = %w(master 2.1)
95
+ releases = %w(v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.28 v2.0.12 v2.1.9)
96
+ (branches + releases).each do |rg|
95
97
  desc "Run specs with Rubygems #{rg}"
96
98
  RSpec::Core::RakeTask.new(rg) do |t|
97
99
  t.rspec_opts = %w(-fs --color)
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.required_rubygems_version = '>= 1.3.6'
18
18
 
19
19
  spec.add_development_dependency 'ronn', '~> 0.7.3'
20
- spec.add_development_dependency 'rspec', '~> 2.11'
20
+ spec.add_development_dependency 'rspec', '~> 2.99.0.beta1'
21
21
 
22
22
  spec.files = `git ls-files`.split($/)
23
23
  spec.files += Dir.glob('lib/bundler/man/**/*') # man/ is ignored by git
@@ -290,7 +290,7 @@ module Bundler
290
290
  end
291
291
 
292
292
  def which(executable)
293
- if File.executable?(executable)
293
+ if File.file?(executable) && File.executable?(executable)
294
294
  executable
295
295
  elsif ENV['PATH']
296
296
  path = ENV['PATH'].split(File::PATH_SEPARATOR).find do |p|
@@ -354,7 +354,8 @@ module Bundler
354
354
  end
355
355
 
356
356
  def git_present?
357
- @git_present ||= Bundler.which("git")
357
+ return @git_present if defined?(@git_present)
358
+ @git_present = Bundler.which("git") || Bundler.which("git.exe")
358
359
  end
359
360
 
360
361
  def ruby_version
@@ -3,6 +3,7 @@
3
3
  # Just add "require 'bundler/capistrano'" in your Capistrano deploy.rb, and
4
4
  # Bundler will be activated after each new deployment.
5
5
  require 'bundler/deployment'
6
+ require 'capistrano/version'
6
7
 
7
8
  if defined?(Capistrano::Version) && Gem::Version.new(Capistrano::Version).release >= Gem::Version.new("3.0")
8
9
  raise "For Capistrano 3.x integration, please use http://github.com/capistrano/bundler"
@@ -302,6 +302,8 @@ module Bundler
302
302
  "Only output warnings and errors."
303
303
  method_option "full-index", :type => :boolean, :banner =>
304
304
  "Use the rubygems modern index instead of the API endpoint"
305
+ method_option "jobs", :aliases => "-j", :type => :numeric, :banner =>
306
+ "Specify the number of jobs to run in parallel"
305
307
  def update(*gems)
306
308
  sources = Array(options[:source])
307
309
  Bundler.ui.level = "warn" if options[:quiet]
@@ -321,7 +323,12 @@ module Bundler
321
323
 
322
324
  Bundler::Fetcher.disable_endpoint = options["full-index"]
323
325
 
324
- opts = {"update" => true, "local" => options[:local]}
326
+ opts = options.dup
327
+ opts["update"] = true
328
+ opts["local"] = options[:local]
329
+
330
+ Bundler.settings[:jobs] = opts["jobs"] if opts["jobs"]
331
+
325
332
  # rubygems plugins sometimes hook into the gem install process
326
333
  Gem.load_env_plugins if Gem.respond_to?(:load_env_plugins)
327
334
 
@@ -416,6 +423,8 @@ module Bundler
416
423
  method_option "source", :type => :array, :banner => "Check against a specific source"
417
424
  method_option "local", :type => :boolean, :banner =>
418
425
  "Do not attempt to fetch gems remotely and use the gem cache instead"
426
+ method_option "strict", :type => :boolean, :banner =>
427
+ "Only list newer versions allowed by your Gemfile requirements"
419
428
  def outdated(*gems)
420
429
  sources = Array(options[:source])
421
430
 
@@ -444,13 +453,19 @@ module Bundler
444
453
  [gemfile_specs.sort_by(&:name), dependency_specs.sort_by(&:name)].flatten.each do |current_spec|
445
454
  next if !gems.empty? && !gems.include?(current_spec.name)
446
455
 
447
- active_spec = definition.index[current_spec.name].sort_by { |b| b.version }
456
+ dependency = current_dependencies[current_spec.name]
448
457
 
458
+ active_spec = definition.index[current_spec.name].sort_by { |b| b.version }
449
459
  if !current_spec.version.prerelease? && !options[:pre] && active_spec.size > 1
450
460
  active_spec = active_spec.delete_if { |b| b.respond_to?(:version) && b.version.prerelease? }
451
461
  end
452
-
453
- active_spec = active_spec.last
462
+ if options["strict"]
463
+ active_spec = active_spec.reverse.detect do |b|
464
+ dependency && b.respond_to?(:version) && dependency.requirement.satisfied_by?(b.version)
465
+ end || active_spec.last
466
+ else
467
+ active_spec = active_spec.last
468
+ end
454
469
  next if active_spec.nil?
455
470
 
456
471
  gem_outdated = Gem::Version.new(active_spec.version) > Gem::Version.new(current_spec.version)
@@ -466,7 +481,6 @@ module Bundler
466
481
 
467
482
  spec_version = "#{active_spec.version}#{active_spec.git_version}"
468
483
  current_version = "#{current_spec.version}#{current_spec.git_version}"
469
- dependency = current_dependencies[current_spec.name]
470
484
  dependency_version = %|Gemfile specifies "#{dependency.requirement}"| if dependency && dependency.specific?
471
485
  Bundler.ui.info " * #{active_spec.name} (#{spec_version} > #{current_version}) #{dependency_version}".rstrip
472
486
  out_count += 1
@@ -53,7 +53,7 @@ module Bundler
53
53
  @lockfile_contents = ""
54
54
  @ruby_version = ruby_version
55
55
 
56
- if lockfile && File.exists?(lockfile)
56
+ if lockfile && File.exist?(lockfile)
57
57
  @lockfile_contents = Bundler.read_file(lockfile)
58
58
  locked = LockfileParser.new(@lockfile_contents)
59
59
  @platforms = locked.platforms
@@ -380,7 +380,11 @@ module Bundler
380
380
  when :engine_version
381
381
  "Your #{Bundler.ruby_version.engine} version is #{actual}, but your Gemfile specified #{ruby_version.engine} #{expected}"
382
382
  when :patchlevel
383
- "Your Ruby patchlevel is #{actual}, but your Gemfile specified #{expected}"
383
+ if !expected.is_a?(String)
384
+ "The Ruby patchlevel in your Gemfile must be a string"
385
+ else
386
+ "Your Ruby patchlevel is #{actual}, but your Gemfile specified #{expected}"
387
+ end
384
388
  end
385
389
 
386
390
  raise RubyVersionMismatch, msg
@@ -83,10 +83,14 @@ module Bundler
83
83
  elsif dep.type == :development
84
84
  return
85
85
  else
86
- raise GemfileError, "You cannot specify the same gem twice with different version requirements. \n" \
87
- "You specified: #{current.name} (#{current.requirement}) and " \
88
- "#{dep.name} (#{dep.requirement})\n"
86
+ raise GemfileError, "You cannot specify the same gem twice with different version requirements.\n" \
87
+ "You specified: #{current.name} (#{current.requirement}) and #{dep.name} (#{dep.requirement})"
89
88
  end
89
+
90
+ else
91
+ Bundler.ui.warn "Your Gemfile lists the gem #{current.name} (#{current.requirement}) more than once.\n" \
92
+ "You should probably keep only one of them.\n" \
93
+ "While it's not a problem now, it could cause errors if you change the version of just one of them later."
90
94
  end
91
95
 
92
96
  if current.source != dep.source
@@ -4,7 +4,7 @@ module Bundler
4
4
  include MatchPlatform
5
5
 
6
6
  attr_reader :name, :version, :platform, :dependencies
7
- attr_accessor :source
7
+ attr_accessor :source, :source_uri
8
8
 
9
9
  def initialize(name, version, platform, dependencies)
10
10
  @name = name
@@ -31,17 +31,6 @@ module Bundler
31
31
  class << self
32
32
  attr_accessor :disable_endpoint, :api_timeout, :redirect_limit, :max_retries
33
33
 
34
- @@spec_fetch_map ||= {}
35
-
36
- def fetch(spec)
37
- spec, uri = @@spec_fetch_map[spec.full_name]
38
- if spec
39
- path = download_gem_from_uri(spec, uri)
40
- s = Bundler.rubygems.spec_from_gem(path, Bundler.settings["trust-policy"])
41
- spec.__swap__(s)
42
- end
43
- end
44
-
45
34
  def download_gem_from_uri(spec, uri)
46
35
  spec.fetch_platform
47
36
 
@@ -82,6 +71,7 @@ module Bundler
82
71
  end
83
72
 
84
73
  def initialize(remote_uri)
74
+
85
75
  # How many redirects to allew in one request
86
76
  @redirect_limit = 5
87
77
  # How long to wait for each gemcutter API call
@@ -89,8 +79,8 @@ module Bundler
89
79
  # How many retries for the gemcutter API call
90
80
  @max_retries = 3
91
81
 
92
- @remote_uri = remote_uri
93
- @public_uri = remote_uri.dup
82
+ @remote_uri = Bundler::Source.mirror_for(remote_uri)
83
+ @public_uri = @remote_uri.dup
94
84
  @public_uri.user, @public_uri.password = nil, nil # don't print these
95
85
 
96
86
  Socket.do_not_reverse_lookup = true
@@ -124,6 +114,10 @@ module Bundler
124
114
  @connection
125
115
  end
126
116
 
117
+ def uri
118
+ @public_uri
119
+ end
120
+
127
121
  # fetch a gem specification
128
122
  def fetch_spec(spec)
129
123
  spec = spec - [nil, 'ruby', '']
@@ -155,18 +149,16 @@ module Bundler
155
149
  use_full_source_index = !gem_names || @remote_uri.scheme == "file" || Bundler::Fetcher.disable_endpoint
156
150
 
157
151
  if gem_names && use_api
158
- Bundler.ui.info "Fetching gem metadata from #{@public_uri}", Bundler.ui.debug?
159
152
  specs = fetch_remote_specs(gem_names)
160
- # new line now that the dots are over
161
- Bundler.ui.info "" if specs && !Bundler.ui.debug?
162
153
  end
163
154
 
164
155
  if specs.nil?
165
156
  # API errors mean we should treat this as a non-API source
166
157
  @use_api = false
167
158
 
168
- Bundler.ui.info "Fetching source index from #{@public_uri}"
169
- specs = fetch_all_remote_specs
159
+ specs = Bundler::Retry.new("source fetch").attempts do
160
+ fetch_all_remote_specs
161
+ end
170
162
  end
171
163
 
172
164
  specs[@remote_uri].each do |name, version, platform, dependencies|
@@ -178,7 +170,7 @@ module Bundler
178
170
  spec = RemoteSpecification.new(name, version, platform, self)
179
171
  end
180
172
  spec.source = source
181
- @@spec_fetch_map[spec.full_name] = [spec, @remote_uri]
173
+ spec.source_uri = @remote_uri
182
174
  index << spec
183
175
  end
184
176
 
@@ -201,27 +193,16 @@ module Bundler
201
193
 
202
194
  return {@remote_uri => last_spec_list} if query_list.empty?
203
195
 
204
- spec_list, deps_list = fetch_dependency_remote_specs(query_list)
205
- returned_gems = spec_list.map {|spec| spec.first }.uniq
196
+ remote_specs = Bundler::Retry.new("dependency api").attempts do
197
+ fetch_dependency_remote_specs(query_list)
198
+ end
206
199
 
200
+ spec_list, deps_list = remote_specs
201
+ returned_gems = spec_list.map {|spec| spec.first }.uniq
207
202
  fetch_remote_specs(deps_list, full_dependency_list + returned_gems, spec_list + last_spec_list)
208
- # fall back to the legacy index in the following cases
209
- # 1. Gemcutter Endpoint doesn't return a 200
210
- # 2. Marshal blob doesn't load properly
211
- # 3. One of the YAML gemspecs has the Syck::DefaultKey problem
212
203
  rescue HTTPError, MarshalError, GemspecError => e
213
- # new line now that the dots are over
214
- Bundler.ui.info "" unless Bundler.ui.debug?
215
-
216
- Bundler.ui.debug "Error during API request. #{e.class}: #{e.message}"
217
- Bundler.ui.debug e.backtrace.join(" ")
218
-
219
- @current_retries ||= 0
220
- if @current_retries < @max_retries
221
- @current_retries += 1
222
- retry
223
- end
224
-
204
+ Bundler.ui.info "" unless Bundler.ui.debug? # new line now that the dots are over
205
+ Bundler.ui.debug "could not fetch from the dependency API, trying the full index"
225
206
  @use_api = false
226
207
  return nil
227
208
  end
@@ -239,7 +220,7 @@ module Bundler
239
220
  end
240
221
 
241
222
  def inspect
242
- "#<#{self.class}:0x#{object_id} uri=#{@public_uri.to_s}>"
223
+ "#<#{self.class}:0x#{object_id} uri=#{uri}>"
243
224
  end
244
225
 
245
226
  private
@@ -260,7 +241,7 @@ module Bundler
260
241
  req.basic_auth(uri.user, uri.password) if uri.user
261
242
  response = connection.request(uri, req)
262
243
  rescue OpenSSL::SSL::SSLError
263
- raise CertificateFailureError.new(@public_uri)
244
+ raise CertificateFailureError.new(uri)
264
245
  rescue *HTTP_ERRORS
265
246
  raise HTTPError, "Network error while fetching #{uri}"
266
247
  end
@@ -316,10 +297,10 @@ module Bundler
316
297
  Bundler.rubygems.fetch_all_remote_specs
317
298
  rescue Gem::RemoteFetcher::FetchError, OpenSSL::SSL::SSLError => e
318
299
  if e.message.match("certificate verify failed")
319
- raise CertificateFailureError.new(@public_uri)
300
+ raise CertificateFailureError.new(uri)
320
301
  else
321
302
  Bundler.ui.trace e
322
- raise HTTPError, "Could not fetch specs from #{@public_uri}"
303
+ raise HTTPError, "Could not fetch specs from #{uri}"
323
304
  end
324
305
  end
325
306
 
@@ -79,13 +79,7 @@ module Bundler
79
79
  # Since we are installing, we can resolve the definition
80
80
  # using remote specs
81
81
  unless local
82
- if options["local"]
83
- @definition.resolve_with_cache!
84
- else
85
- Bundler::Retry.new("source fetch").attempts do
86
- @definition.resolve_remotely!
87
- end
88
- end
82
+ options["local"] ? @definition.resolve_with_cache! : @definition.resolve_remotely!
89
83
  end
90
84
  # Must install gems in the order that the resolver provides
91
85
  # as dependencies might actually affect the installation of
@@ -108,10 +102,6 @@ module Bundler
108
102
  end
109
103
 
110
104
  def install_gem_from_spec(spec, standalone = false, worker = 0)
111
- # Download the gem to get the spec, because some specs that are returned
112
- # by rubygems.org are broken and wrong.
113
- Bundler::Fetcher.fetch(spec) if spec.source.is_a?(Bundler::Source::Rubygems)
114
-
115
105
  # Fetch the build settings, if there are any
116
106
  settings = Bundler.settings["build.#{spec.name}"]
117
107
  install_message = nil
@@ -7,7 +7,7 @@ module Bundler
7
7
  include MatchPlatform
8
8
 
9
9
  attr_reader :name, :version, :dependencies, :platform
10
- attr_accessor :source
10
+ attr_accessor :source, :source_uri
11
11
 
12
12
  def initialize(name, version, platform, source = nil)
13
13
  @name = name