bundler 1.1.3 → 1.1.4

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.

@@ -1,3 +1,13 @@
1
+ ## 1.1.4 (May 27, 2012)
2
+
3
+ Bugfixes:
4
+
5
+ - Use `latest_release` in Capistrano and Vlad integration (#1264)
6
+ - Unknown exceptions now link to ISSUES for help instead of a new ticket
7
+ - When OpenSSL is missing, provide instructions for fixing (#1776 etc.)
8
+ - Correct inline help for `clean --force` (@dougbarth, #1911)
9
+ - Work around a Ruby 1.9.3p194 bug in Psych when config files are empty
10
+
1
11
  ## 1.1.3 (March 23, 2012)
2
12
 
3
13
  Bugfixes:
data/ISSUES.md CHANGED
@@ -1,11 +1,21 @@
1
1
  # Bundler Issues
2
2
 
3
- ## Troubleshooting
3
+ So! You're having problems with Bundler. This file is here to help. If you're running into an error, try reading the rest of this file for help. If you can't figure out how to solve your problem, there are also instructions on how to report a bug.
4
+
5
+ ## Documentation
4
6
 
5
- Instructions for common Bundler use-cases can be found on the [Bundler documentation site](http://gembundler.com/v1.0/).
7
+ Instructions for common Bundler uses can be found on the [Bundler documentation site](http://gembundler.com/v1.0/).
6
8
 
7
9
  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).
8
10
 
11
+ ## Troubleshooting
12
+
13
+ ### Heroku errors
14
+
15
+ Please open a ticket with Heroku if you're having trouble deploying. They have a professional support team who can help you resolve Heroku issues far better than the Bundler team can. If the problem that you are having turns out to be a bug in Bundler itself, Heroku support can get the exact details to us.
16
+
17
+ ### Something else
18
+
9
19
  After reading the documentation, try these troubleshooting steps:
10
20
 
11
21
  # remove user-specific gems and git repos
@@ -26,24 +36,9 @@ After reading the documentation, try these troubleshooting steps:
26
36
  # try to install one more time
27
37
  bundle install
28
38
 
29
- ## Frequently encountered issues
30
-
31
- ### Heroku errors
32
-
33
- Open a ticket with Heroku. If the issue somehow turns out to be with Bundler itself, the Heroku support team will forward the details of your issue to us.
34
-
35
- ### REE and Zlib::GzipFile::Error
36
-
37
- 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.
38
-
39
- ### Rake activation error
40
-
41
- 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"`.
42
-
43
-
44
39
  ## Reporting unresolved problems
45
40
 
46
- Instructions that allow the Bundler team to reproduce your issue are vitally important. When you report a bug, please include the following information:
41
+ The Bundler team needs to know some things in order to diagnose and hopefully fix the bug you've found. When you report a bug, please include the following information:
47
42
 
48
43
  - The command you ran
49
44
  - Exception backtrace(s), if any
@@ -57,11 +52,12 @@ Instructions that allow the Bundler team to reproduce your issue are vitally imp
57
52
  - Whether you have the `rubygems-bundler` gem, which can break gem binares
58
53
  - Whether you have the `open_gem` gem, which can cause rake activation conflicts
59
54
 
60
-
61
55
  If you are using Rails 2.3, please also include:
62
56
 
63
57
  - Your boot.rb file
64
58
  - Your preinitializer.rb file
65
59
  - Your environment.rb file
66
60
 
67
- [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.
61
+ [Create a gist](https://gist.github.com) containing all of that information, then visit the [Bundler issue tracker](https://github.com/carlhuda/bundler/issues) and [create a new ticket](https://github.com/carlhuda/bundler/issues/new) describing your problem and linking to your gist.
62
+
63
+ Thanks for reporting issues and making Bundler better!
data/Rakefile CHANGED
@@ -11,6 +11,10 @@ rescue
11
11
  false
12
12
  end
13
13
 
14
+ def sudo_task(task)
15
+ system("sudo -E rake #{task}")
16
+ end
17
+
14
18
  namespace :spec do
15
19
  desc "Ensure spec dependencies are installed"
16
20
  task :deps do
@@ -116,7 +120,8 @@ begin
116
120
  Rake::Task["spec:rubygems:#{rg}"].reenable
117
121
 
118
122
  puts "\n\e[1;33m[Travis CI] Running bundler sudo specs against rubygems #{rg}\e[m\n\n"
119
- sudos = safe_task { Rake::Task["spec:rubygems:#{rg}:sudo"].invoke }
123
+ sudos = sudo_task "spec:rubygems:#{rg}:sudo"
124
+ chown = system("sudo chown -R #{ENV['USER']} #{File.join(File.dirname(__FILE__), 'tmp')}")
120
125
 
121
126
  Rake::Task["spec:rubygems:#{rg}"].reenable
122
127
 
data/bin/bundle CHANGED
@@ -22,10 +22,8 @@ rescue Interrupt => e
22
22
  rescue SystemExit => e
23
23
  exit e.status
24
24
  rescue Exception => e
25
- Bundler.ui.error "Unfortunately, a fatal error has occurred. " +
26
- "Please report this error to the Bundler issue tracker at " +
27
- "https://github.com/carlhuda/bundler/issues so that we can fix it. " +
28
- "Please include the full output of the command, your Gemfile and Gemfile.lock. " +
29
- "Thanks!"
25
+ Bundler.ui.error(
26
+ "Unfortunately, a fatal error has occurred. Please see the Bundler \n" \
27
+ "troubleshooting documentation at http://bit.ly/bundler-issues. Thanks! \n")
30
28
  raise e
31
29
  end
@@ -5,7 +5,7 @@
5
5
  require 'bundler/deployment'
6
6
 
7
7
  Capistrano::Configuration.instance(:must_exist).load do
8
- after "deploy:finalize_update", "bundle:install"
8
+ before "deploy:finalize_update", "bundle:install"
9
9
  Bundler::Deployment.define_task(self, :task, :except => { :no_release => true })
10
10
  set :rake, lambda { "#{fetch(:bundle_cmd, "bundle")} exec rake" }
11
11
  end
@@ -573,7 +573,7 @@ module Bundler
573
573
 
574
574
  desc "clean", "Cleans up unused gems in your bundler directory"
575
575
  method_option "force", :type => :boolean, :default => false, :banner =>
576
- "forces clean even if --path is set"
576
+ "forces clean even if --path is not set"
577
577
  def clean
578
578
  if Bundler.settings[:path] || options[:force]
579
579
  Bundler.load.clean
@@ -41,16 +41,16 @@ module Bundler
41
41
  bundle_dir = context.fetch(:bundle_dir, File.join(context.fetch(:shared_path), 'bundle'))
42
42
  bundle_gemfile = context.fetch(:bundle_gemfile, "Gemfile")
43
43
  bundle_without = [*context.fetch(:bundle_without, [:development, :test])].compact
44
- current_release = context.fetch(:current_release)
45
- if current_release.to_s.empty?
44
+ app_path = context.fetch(:latest_release)
45
+ if app_path.to_s.empty?
46
46
  raise error_type.new("Cannot detect current release path - make sure you have deployed at least once.")
47
47
  end
48
- args = ["--gemfile #{File.join(current_release, bundle_gemfile)}"]
48
+ args = ["--gemfile #{File.join(app_path, bundle_gemfile)}"]
49
49
  args << "--path #{bundle_dir}" unless bundle_dir.to_s.empty?
50
50
  args << bundle_flags.to_s
51
51
  args << "--without #{bundle_without.join(" ")}" unless bundle_without.empty?
52
52
 
53
- run "cd #{current_release} && #{bundle_cmd} install #{args.join(' ')}"
53
+ run "cd #{app_path} && #{bundle_cmd} install #{args.join(' ')}"
54
54
  end
55
55
  end
56
56
  end
@@ -1,5 +1,5 @@
1
1
  require 'uri'
2
- require 'net/http/persistent'
2
+ require 'bundler/vendored_persistent'
3
3
 
4
4
  module Bundler
5
5
  # Handles all the fetching with the rubygems server
@@ -104,6 +104,16 @@ module Bundler
104
104
  end
105
105
 
106
106
  index
107
+ rescue LoadError => e
108
+ if e.message.include?("cannot load such file -- openssl")
109
+ raise InstallError,
110
+ "\nCould not load OpenSSL." \
111
+ "\nYou must recompile Ruby with OpenSSL support or change the sources in your" \
112
+ "\nGemfile from 'https' to 'http'. Instructions for compiling with OpenSSL" \
113
+ "\nusing RVM are available at rvm.io/packages/openssl."
114
+ else
115
+ raise e
116
+ end
107
117
  end
108
118
 
109
119
  # fetch index
@@ -207,7 +217,7 @@ module Bundler
207
217
  Bundler.ui.debug "Could not fetch prerelease specs from #{strip_user_pass_from_uri(@remote_uri)}"
208
218
  end
209
219
  rescue Gem::RemoteFetcher::FetchError
210
- raise Bundler::HTTPError, "Could not reach #{strip_user_pass_from_uri(@remote_uri)}"
220
+ raise HTTPError, "Could not reach #{strip_user_pass_from_uri(@remote_uri)}"
211
221
  end
212
222
 
213
223
  return spec_list
@@ -91,6 +91,7 @@ module Bundler
91
91
  msg = "An error occured while installing #{spec.name} (#{spec.version}),"
92
92
  msg << " and Bundler cannot continue.\nMake sure that `gem install"
93
93
  msg << " #{spec.name} -v '#{spec.version}'` succeeds before bundling."
94
+ Bundler.ui.debug e.backtrace.join("\n")
94
95
  raise Bundler::InstallError, msg
95
96
  end
96
97
 
@@ -2,8 +2,8 @@ module Bundler
2
2
  class Settings
3
3
  def initialize(root)
4
4
  @root = root
5
- @local_config = (File.exist?(local_config_file) && yaml = YAML.load_file(local_config_file)) ? yaml : {}
6
- @global_config = (File.exist?(global_config_file) && yaml = YAML.load_file(global_config_file)) ? yaml : {}
5
+ @local_config = load_config(local_config_file)
6
+ @global_config = load_config(global_config_file)
7
7
  end
8
8
 
9
9
  def [](key)
@@ -111,5 +111,13 @@ module Bundler
111
111
  def local_config_file
112
112
  Pathname.new("#{@root}/config")
113
113
  end
114
+
115
+ def load_config(config_file)
116
+ if config_file.exist? && !config_file.size.zero?
117
+ yaml = YAML.load_file(config_file)
118
+ end
119
+ yaml || {}
120
+ end
121
+
114
122
  end
115
123
  end
@@ -0,0 +1,3 @@
1
+ vendor = File.expand_path('../vendor', __FILE__)
2
+ $:.unshift(vendor) unless $:.include?(vendor)
3
+ require 'net/http/persistent'
@@ -2,6 +2,7 @@ if defined?(Thor)
2
2
  Bundler.ui.warn "Thor has already been required. " +
3
3
  "This may cause Bundler to malfunction in unexpected ways."
4
4
  end
5
- $:.unshift File.expand_path('../vendor', __FILE__)
5
+ vendor = File.expand_path('../vendor', __FILE__)
6
+ $:.unshift(vendor) unless $:.include?(vendor)
6
7
  require 'thor'
7
8
  require 'thor/actions'
@@ -2,5 +2,5 @@ module Bundler
2
2
  # We're doing this because we might write tests that deal
3
3
  # with other versions of bundler and we are unsure how to
4
4
  # handle this better.
5
- VERSION = "1.1.3" unless defined?(::Bundler::VERSION)
5
+ VERSION = "1.1.4" unless defined?(::Bundler::VERSION)
6
6
  end
@@ -158,7 +158,7 @@ describe "gemcutter's dependency API" do
158
158
  out.should match(/Too many redirects/)
159
159
  end
160
160
 
161
- it "should use the modern index when the --full-index" do
161
+ it "uses the modern index when --full-index is passed" do
162
162
  gemfile <<-G
163
163
  source "#{source_uri}"
164
164
  gem "rack"
@@ -386,4 +386,38 @@ OUTPUT
386
386
  out.should_not include("#{user}:#{password}")
387
387
  end
388
388
  end
389
+
390
+ context "when ruby is compiled without openssl" do
391
+ before do
392
+ # Install a monkeypatch that reproduces the effects of openssl being
393
+ # missing when the fetcher runs, as happens in real life. The reason
394
+ # we can't just overwrite openssl.rb is that Artifice uses it.
395
+ bundled_app("broken_ssl").mkpath
396
+ bundled_app("broken_ssl/openssl.rb").open("w") do |f|
397
+ f.write <<-RUBY
398
+ $:.delete File.expand_path("..", __FILE__)
399
+ require 'openssl'
400
+
401
+ require 'bundler'
402
+ class Bundler::Fetcher
403
+ def fetch(*)
404
+ raise LoadError, "cannot load such file -- openssl"
405
+ end
406
+ end
407
+ RUBY
408
+ end
409
+ end
410
+
411
+ it "explains what to do to get it" do
412
+ gemfile <<-G
413
+ source "#{source_uri.gsub(/http/, 'https')}"
414
+ gem "rack"
415
+ G
416
+
417
+ bundle :install, :artifice => "endpoint",
418
+ :env => {"RUBYOPT" => "-I#{bundled_app("broken_ssl")}"}
419
+ out.should include("Could not load OpenSSL.")
420
+ end
421
+ end
422
+
389
423
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 3
10
- version: 1.1.3
9
+ - 4
10
+ version: 1.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Andr\xC3\xA9 Arko"
@@ -18,7 +18,7 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2012-03-24 00:00:00 Z
21
+ date: 2012-05-28 00:00:00 Z
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
24
24
  name: ronn
@@ -145,6 +145,7 @@ files:
145
145
  - lib/bundler/vendor/thor/task.rb
146
146
  - lib/bundler/vendor/thor/util.rb
147
147
  - lib/bundler/vendor/thor/version.rb
148
+ - lib/bundler/vendored_persistent.rb
148
149
  - lib/bundler/vendored_thor.rb
149
150
  - lib/bundler/version.rb
150
151
  - lib/bundler/vlad.rb
@@ -233,20 +234,20 @@ files:
233
234
  - spec/update/gems_spec.rb
234
235
  - spec/update/git_spec.rb
235
236
  - spec/update/source_spec.rb
236
- - lib/bundler/man/bundle-exec
237
237
  - lib/bundler/man/bundle
238
+ - lib/bundler/man/bundle-config
239
+ - lib/bundler/man/bundle-config.txt
240
+ - lib/bundler/man/bundle-exec
241
+ - lib/bundler/man/bundle-exec.txt
238
242
  - lib/bundler/man/bundle-install
239
- - lib/bundler/man/gemfile.5
243
+ - lib/bundler/man/bundle-install.txt
240
244
  - lib/bundler/man/bundle-package
245
+ - lib/bundler/man/bundle-package.txt
241
246
  - lib/bundler/man/bundle-update
242
- - lib/bundler/man/bundle-exec.txt
243
- - lib/bundler/man/gemfile.5.txt
244
247
  - lib/bundler/man/bundle-update.txt
245
- - lib/bundler/man/bundle-config
246
- - lib/bundler/man/bundle-config.txt
247
248
  - lib/bundler/man/bundle.txt
248
- - lib/bundler/man/bundle-package.txt
249
- - lib/bundler/man/bundle-install.txt
249
+ - lib/bundler/man/gemfile.5
250
+ - lib/bundler/man/gemfile.5.txt
250
251
  homepage: http://gembundler.com
251
252
  licenses: []
252
253
 
@@ -280,9 +281,85 @@ required_rubygems_version: !ruby/object:Gem::Requirement
280
281
  requirements: []
281
282
 
282
283
  rubyforge_project: bundler
283
- rubygems_version: 1.8.17
284
+ rubygems_version: 1.8.24
284
285
  signing_key:
285
286
  specification_version: 3
286
287
  summary: The best way to manage your application's dependencies
287
- test_files: []
288
-
288
+ test_files:
289
+ - spec/bundler/dsl_spec.rb
290
+ - spec/bundler/gem_helper_spec.rb
291
+ - spec/bundler/source_spec.rb
292
+ - spec/cache/gems_spec.rb
293
+ - spec/cache/git_spec.rb
294
+ - spec/cache/path_spec.rb
295
+ - spec/cache/platform_spec.rb
296
+ - spec/install/deploy_spec.rb
297
+ - spec/install/deprecated_spec.rb
298
+ - spec/install/gems/c_ext_spec.rb
299
+ - spec/install/gems/dependency_api_spec.rb
300
+ - spec/install/gems/env_spec.rb
301
+ - spec/install/gems/flex_spec.rb
302
+ - spec/install/gems/groups_spec.rb
303
+ - spec/install/gems/packed_spec.rb
304
+ - spec/install/gems/platform_spec.rb
305
+ - spec/install/gems/post_install_spec.rb
306
+ - spec/install/gems/resolving_spec.rb
307
+ - spec/install/gems/simple_case_spec.rb
308
+ - spec/install/gems/standalone_spec.rb
309
+ - spec/install/gems/sudo_spec.rb
310
+ - spec/install/gems/win32_spec.rb
311
+ - spec/install/gemspec_spec.rb
312
+ - spec/install/git_spec.rb
313
+ - spec/install/invalid_spec.rb
314
+ - spec/install/path_spec.rb
315
+ - spec/install/upgrade_spec.rb
316
+ - spec/lock/git_spec.rb
317
+ - spec/lock/lockfile_spec.rb
318
+ - spec/other/check_spec.rb
319
+ - spec/other/clean_spec.rb
320
+ - spec/other/config_spec.rb
321
+ - spec/other/console_spec.rb
322
+ - spec/other/exec_spec.rb
323
+ - spec/other/ext_spec.rb
324
+ - spec/other/help_spec.rb
325
+ - spec/other/init_spec.rb
326
+ - spec/other/newgem_spec.rb
327
+ - spec/other/open_spec.rb
328
+ - spec/other/outdated_spec.rb
329
+ - spec/other/show_spec.rb
330
+ - spec/quality_spec.rb
331
+ - spec/realworld/edgecases_spec.rb
332
+ - spec/resolver/basic_spec.rb
333
+ - spec/resolver/platform_spec.rb
334
+ - spec/runtime/executable_spec.rb
335
+ - spec/runtime/load_spec.rb
336
+ - spec/runtime/platform_spec.rb
337
+ - spec/runtime/require_spec.rb
338
+ - spec/runtime/setup_spec.rb
339
+ - spec/runtime/with_clean_env_spec.rb
340
+ - spec/spec_helper.rb
341
+ - spec/support/artifice/endopint_marshal_fail_basic_authentication.rb
342
+ - spec/support/artifice/endpoint.rb
343
+ - spec/support/artifice/endpoint_500.rb
344
+ - spec/support/artifice/endpoint_api_missing.rb
345
+ - spec/support/artifice/endpoint_basic_authentication.rb
346
+ - spec/support/artifice/endpoint_extra.rb
347
+ - spec/support/artifice/endpoint_extra_missing.rb
348
+ - spec/support/artifice/endpoint_fallback.rb
349
+ - spec/support/artifice/endpoint_marshal_fail.rb
350
+ - spec/support/artifice/endpoint_redirect.rb
351
+ - spec/support/builders.rb
352
+ - spec/support/fakeweb/rack-1.0.0.marshal
353
+ - spec/support/fakeweb/windows.rb
354
+ - spec/support/helpers.rb
355
+ - spec/support/indexes.rb
356
+ - spec/support/matchers.rb
357
+ - spec/support/path.rb
358
+ - spec/support/platforms.rb
359
+ - spec/support/ruby_ext.rb
360
+ - spec/support/rubygems_ext.rb
361
+ - spec/support/rubygems_hax/platform.rb
362
+ - spec/support/sudo.rb
363
+ - spec/update/gems_spec.rb
364
+ - spec/update/git_spec.rb
365
+ - spec/update/source_spec.rb