bundler 1.1.0 → 1.1.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.

@@ -1,3 +1,18 @@
1
+ ## 1.1.1 (March 14, 2012)
2
+
3
+ Bugfixes:
4
+
5
+ - Rescue EAGAIN so the fetcher works on JRuby on Windows
6
+ - Stop asking users to report gem installation errors
7
+ - Clarify "no sources" message
8
+ - Use $\ so `bundle gem` gemspecs work on Windows (@postmodern)
9
+ - URI-encode gem names for dependency API (@rohit, #1672)
10
+ - Fix `cache` edge case in rubygems 1.3.7 (#1202)
11
+
12
+ Performance:
13
+
14
+ - Reduce invocation of git ls-files in `bundle gem` gemspecs (@knu)
15
+
1
16
  ## 1.1.0 (Mar 7, 2012)
2
17
 
3
18
  Bugfixes:
data/bin/bundle CHANGED
@@ -24,6 +24,8 @@ rescue SystemExit => e
24
24
  rescue Exception => e
25
25
  Bundler.ui.error "Unfortunately, a fatal error has occurred. " +
26
26
  "Please report this error to the Bundler issue tracker at " +
27
- "https://github.com/carlhuda/bundler/issues so that we can fix it. Thanks!"
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!"
28
30
  raise e
29
31
  end
@@ -45,6 +45,7 @@ module Bundler
45
45
  class GemNotFound < BundlerError; status_code(7) ; end
46
46
  class GemfileError < BundlerError; status_code(4) ; end
47
47
  class InstallError < BundlerError; status_code(5) ; end
48
+ class InstallHookError < BundlerError; status_code(6) ; end
48
49
  class PathError < BundlerError; status_code(13) ; end
49
50
  class GitError < BundlerError; status_code(11) ; end
50
51
  class DeprecatedError < BundlerError; status_code(12) ; end
@@ -251,9 +252,9 @@ module Bundler
251
252
  if File.executable?(executable)
252
253
  executable
253
254
  else
254
- path = ENV['PATH'].split(File::PATH_SEPARATOR).find { |path|
255
- File.executable?(File.join(path, executable))
256
- }
255
+ path = ENV['PATH'].split(File::PATH_SEPARATOR).find do |p|
256
+ File.executable?(File.join(p, executable))
257
+ end
257
258
  path && File.expand_path(executable, path)
258
259
  end
259
260
  end
@@ -240,7 +240,9 @@ module Bundler
240
240
  end
241
241
 
242
242
  if Bundler.definition.no_sources?
243
- Bundler.ui.warn "Your Gemfile doesn't have any sources. You can add one with a line like 'source :rubygems'"
243
+ Bundler.ui.warn "Your Gemfile has no remote sources. If you need " \
244
+ "gems that are not already on\nyour machine, add a line like this " \
245
+ "to your Gemfile:\n source 'https://rubygems.org'"
244
246
  end
245
247
  raise e
246
248
  end
@@ -158,7 +158,8 @@ module Bundler
158
158
  # fetch from Gemcutter Dependency Endpoint API
159
159
  def fetch_dependency_remote_specs(gem_names)
160
160
  Bundler.ui.debug "Query Gemcutter Dependency Endpoint API: #{gem_names.join(' ')}"
161
- uri = URI.parse("#{@remote_uri}api/v1/dependencies?gems=#{gem_names.join(",")}")
161
+ encoded_gem_names = URI.encode(gem_names.join(","))
162
+ uri = URI.parse("#{@remote_uri}api/v1/dependencies?gems=#{encoded_gem_names}")
162
163
  marshalled_deps = fetch(uri)
163
164
  gem_list = Marshal.load(marshalled_deps)
164
165
  deps_list = []
@@ -83,7 +83,7 @@ module Bundler
83
83
  FileUtils.rm_rf(Bundler.tmp)
84
84
  rescue Exception => e
85
85
  # install hook failed
86
- raise e if e.is_a?(Gem::InstallError)
86
+ raise e if e.is_a?(Bundler::InstallHookError)
87
87
 
88
88
  # other failure, likely a native extension build failure
89
89
  Bundler.ui.info ""
@@ -265,6 +265,15 @@ module Bundler
265
265
  end
266
266
  end
267
267
 
268
+ # This backport fixes the marshaling of @segments.
269
+ def backport_yaml_initialize
270
+ Gem::Version.send(:define_method, :yaml_initialize) do |tag, map|
271
+ @version = map['version']
272
+ @segments = nil
273
+ @hash = nil
274
+ end
275
+ end
276
+
268
277
  # This backports base_dir which replaces installation path
269
278
  # Rubygems 1.8+
270
279
  def backport_base_dir
@@ -301,6 +310,7 @@ module Bundler
301
310
  backport_base_dir
302
311
  backport_cache_file
303
312
  backport_spec_file
313
+ backport_yaml_initialize
304
314
  end
305
315
 
306
316
  def stub_rubygems(specs)
@@ -472,7 +472,7 @@ module Bundler
472
472
  if result == false
473
473
  location = " at #{$1}" if hook.inspect =~ /@(.*:\d+)/
474
474
  message = "#{type} hook#{location} failed for #{installer.spec.full_name}"
475
- raise Gem::InstallError, message
475
+ raise InstallHookError, message
476
476
  end
477
477
  end
478
478
  end
@@ -8,9 +8,9 @@ Gem::Specification.new do |gem|
8
8
  gem.summary = %q{TODO: Write a gem summary}
9
9
  gem.homepage = ""
10
10
 
11
- gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
12
- gem.files = `git ls-files`.split("\n")
13
- gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
11
+ gem.files = `git ls-files`.split($\)
12
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
14
  gem.name = <%=config[:name].inspect%>
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = <%=config[:constant_name]%>::VERSION
@@ -13,7 +13,7 @@ class Net::BufferedIO #:nodoc:
13
13
  if @io.respond_to? :read_nonblock then
14
14
  begin
15
15
  @rbuf << @io.read_nonblock(65536)
16
- rescue Errno::EWOULDBLOCK => e
16
+ rescue Errno::EWOULDBLOCK, Errno::EAGAIN => e
17
17
  retry if IO.select [@io], nil, nil, @read_timeout
18
18
  raise Timeout::Error, e.message
19
19
  end
@@ -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.0" unless defined?(::Bundler::VERSION)
5
+ VERSION = "1.1.1" unless defined?(::Bundler::VERSION)
6
6
  end
@@ -14,6 +14,16 @@ describe "gemcutter's dependency API" do
14
14
  should_be_installed "rack 1.0.0"
15
15
  end
16
16
 
17
+ it "should URI encode gem names" do
18
+ gemfile <<-G
19
+ source "#{source_uri}"
20
+ gem " sinatra"
21
+ G
22
+
23
+ bundle :install, :artifice => "endpoint"
24
+ out.should include("Could not find gem ' sinatra")
25
+ end
26
+
17
27
  it "should handle nested dependencies" do
18
28
  gemfile <<-G
19
29
  source "#{source_uri}"
@@ -291,7 +291,7 @@ describe "bundle install with gem sources" do
291
291
  G
292
292
 
293
293
  bundle :install, :expect_err => true
294
- out.should =~ /Your Gemfile doesn't have any sources/i
294
+ out.should =~ /Your Gemfile has no remote sources/i
295
295
  end
296
296
 
297
297
  it "creates a Gemfile.lock on a blank Gemfile" do
@@ -486,7 +486,7 @@ describe "bundle install with gem sources" do
486
486
  G
487
487
 
488
488
  bundle :install, :quiet => true
489
- out.should =~ /doesn't have any sources/
489
+ out.should =~ /Your Gemfile has no remote sources/
490
490
  end
491
491
  end
492
492
 
@@ -642,7 +642,7 @@ describe "bundle install with git sources" do
642
642
 
643
643
  bundle :install, :expect_err => true,
644
644
  :requires => [lib_path('install_hooks.rb')]
645
- err.should include("failed for foo-1.0")
645
+ out.should include("failed for foo-1.0")
646
646
  end
647
647
  end
648
648
  end
@@ -465,8 +465,8 @@ describe "bundle clean" do
465
465
 
466
466
  sys_status "foo"
467
467
 
468
- exitstatus.should == 0
469
- out.should == "1.0"
468
+ exitstatus.should eq(0)
469
+ out.should eq("1.0")
470
470
  end
471
471
 
472
472
  it "doesn't blow up on path gems without a .gempsec" do
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- if defined?(Encoding)
3
+ if defined?(Encoding) && Encoding.default_external != "UTF-8"
4
4
  Encoding.default_external = "UTF-8"
5
5
  end
6
6
 
@@ -14,7 +14,8 @@ describe "real world edgecases", :realworld => true do
14
14
  it "bundle cache works with rubygems 1.3.7 and pre gems" do
15
15
  install_gemfile <<-G
16
16
  source :rubygems
17
- gem "rack", "1.3.0.beta2"
17
+ gem "rack", "1.3.0.beta2"
18
+ gem "will_paginate", "3.0.pre2"
18
19
  G
19
20
  bundle :cache
20
21
  out.should_not include("Removing outdated .gem files from vendor/cache")
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: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 0
10
- version: 1.1.0
9
+ - 1
10
+ version: 1.1.1
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-07 00:00:00 Z
21
+ date: 2012-03-14 00:00:00 Z
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
24
24
  name: ronn