Permalink
Browse files

Merge branch '1-1-stable'

Conflicts:
	lib/bundler.rb

1.1.1 release merge
  • Loading branch information...
2 parents a2a81b7 + 0c54578 commit b22351ca35365cde883033f28eeafa623c205e46 @hone hone committed Mar 14, 2012
View
15 CHANGELOG.md
@@ -1,3 +1,18 @@
+## 1.1.1 (March 14, 2012)
+
+Bugfixes:
+
+ - Rescue EAGAIN so the fetcher works on JRuby on Windows
+ - Stop asking users to report gem installation errors
+ - Clarify "no sources" message
+ - Use $\ so `bundle gem` gemspecs work on Windows (@postmodern)
+ - URI-encode gem names for dependency API (@rohit, #1672)
+ - Fix `cache` edge case in rubygems 1.3.7 (#1202)
+
+Performance:
+
+ - Reduce invocation of git ls-files in `bundle gem` gemspecs (@knu)
+
## 1.1.0 (Mar 7, 2012)
Bugfixes:
View
5 lib/bundler.rb
@@ -45,6 +45,7 @@ class GemfileNotFound < BundlerError; status_code(10) ; end
class GemNotFound < BundlerError; status_code(7) ; end
class GemfileError < BundlerError; status_code(4) ; end
class InstallError < BundlerError; status_code(5) ; end
+ class InstallHookError < BundlerError; status_code(6) ; end
class PathError < BundlerError; status_code(13) ; end
class GitError < BundlerError; status_code(11) ; end
class DeprecatedError < BundlerError; status_code(12) ; end
@@ -253,9 +254,9 @@ def which(executable)
if File.executable?(executable)
executable
else
- path = ENV['PATH'].split(File::PATH_SEPARATOR).find { |p|
+ path = ENV['PATH'].split(File::PATH_SEPARATOR).find do |p|
File.executable?(File.join(p, executable))
- }
+ end
path && File.expand_path(executable, path)
end
end
View
4 lib/bundler/cli.rb
@@ -240,7 +240,9 @@ def install
end
if Bundler.definition.no_sources?
- Bundler.ui.warn "Your Gemfile doesn't have any sources. You can add one with a line like 'source :rubygems'"
+ Bundler.ui.warn "Your Gemfile has no remote sources. If you need " \
+ "gems that are not already on\nyour machine, add a line like this " \
+ "to your Gemfile:\n source 'https://rubygems.org'"
end
raise e
end
View
3 lib/bundler/fetcher.rb
@@ -158,7 +158,8 @@ def fetch(uri, counter = 0)
# fetch from Gemcutter Dependency Endpoint API
def fetch_dependency_remote_specs(gem_names)
Bundler.ui.debug "Query Gemcutter Dependency Endpoint API: #{gem_names.join(' ')}"
- uri = URI.parse("#{@remote_uri}api/v1/dependencies?gems=#{gem_names.join(",")}")
+ encoded_gem_names = URI.encode(gem_names.join(","))
+ uri = URI.parse("#{@remote_uri}api/v1/dependencies?gems=#{encoded_gem_names}")
marshalled_deps = fetch(uri)
gem_list = Marshal.load(marshalled_deps)
deps_list = []
View
2 lib/bundler/installer.rb
@@ -116,7 +116,7 @@ def install_gem_from_spec(spec, standalone = false)
FileUtils.rm_rf(Bundler.tmp)
rescue Exception => e
# install hook failed
- raise e if e.is_a?(Gem::InstallError)
+ raise e if e.is_a?(Bundler::InstallHookError)
# other failure, likely a native extension build failure
Bundler.ui.info ""
View
10 lib/bundler/rubygems_integration.rb
@@ -265,6 +265,15 @@ def backport_segment_generation
end
end
+ # This backport fixes the marshaling of @segments.
+ def backport_yaml_initialize
+ Gem::Version.send(:define_method, :yaml_initialize) do |tag, map|
+ @version = map['version']
+ @segments = nil
+ @hash = nil
+ end
+ end
+
# This backports base_dir which replaces installation path
# Rubygems 1.8+
def backport_base_dir
@@ -301,6 +310,7 @@ def initialize
backport_base_dir
backport_cache_file
backport_spec_file
+ backport_yaml_initialize
end
def stub_rubygems(specs)
View
2 lib/bundler/source.rb
@@ -472,7 +472,7 @@ def run_hooks(type, installer)
if result == false
location = " at #{$1}" if hook.inspect =~ /@(.*:\d+)/
message = "#{type} hook#{location} failed for #{installer.spec.full_name}"
- raise Gem::InstallError, message
+ raise InstallHookError, message
end
end
end
View
2 lib/bundler/vendor/net/http/faster.rb
@@ -13,7 +13,7 @@ def rbuf_fill
if @io.respond_to? :read_nonblock then
begin
@rbuf << @io.read_nonblock(65536)
- rescue Errno::EWOULDBLOCK => e
+ rescue Errno::EWOULDBLOCK, Errno::EAGAIN => e
retry if IO.select [@io], nil, nil, @read_timeout
raise Timeout::Error, e.message
end
View
2 lib/bundler/version.rb
@@ -2,5 +2,5 @@ module Bundler
# We're doing this because we might write tests that deal
# with other versions of bundler and we are unsure how to
# handle this better.
- VERSION = "1.1.0" unless defined?(::Bundler::VERSION)
+ VERSION = "1.1.1" unless defined?(::Bundler::VERSION)
end
View
10 spec/install/gems/dependency_api_spec.rb
@@ -14,6 +14,16 @@
should_be_installed "rack 1.0.0"
end
+ it "should URI encode gem names" do
+ gemfile <<-G
+ source "#{source_uri}"
+ gem " sinatra"
+ G
+
+ bundle :install, :artifice => "endpoint"
+ out.should include("Could not find gem ' sinatra")
+ end
+
it "should handle nested dependencies" do
gemfile <<-G
source "#{source_uri}"
View
4 spec/install/gems/simple_case_spec.rb
@@ -291,7 +291,7 @@
G
bundle :install, :expect_err => true
- out.should =~ /Your Gemfile doesn't have any sources/i
+ out.should =~ /Your Gemfile has no remote sources/i
end
it "creates a Gemfile.lock on a blank Gemfile" do
@@ -486,7 +486,7 @@ def set_bundle_path(type, location)
G
bundle :install, :quiet => true
- out.should =~ /doesn't have any sources/
+ out.should =~ /Your Gemfile has no remote sources/
end
end
View
2 spec/install/git_spec.rb
@@ -642,7 +642,7 @@
bundle :install, :expect_err => true,
:requires => [lib_path('install_hooks.rb')]
- err.should include("failed for foo-1.0")
+ out.should include("failed for foo-1.0")
end
end
end
View
4 spec/other/clean_spec.rb
@@ -465,8 +465,8 @@ def should_not_have_gems(*gems)
sys_status "foo"
- exitstatus.should == 0
- out.should == "1.0"
+ exitstatus.should eq(0)
+ out.should eq("1.0")
end
it "doesn't blow up on path gems without a .gempsec" do
View
2 spec/quality_spec.rb
@@ -1,6 +1,6 @@
require "spec_helper"
-if defined?(Encoding)
+if defined?(Encoding) && Encoding.default_external != "UTF-8"
Encoding.default_external = "UTF-8"
end
View
3 spec/realworld/edgecases_spec.rb
@@ -14,7 +14,8 @@
it "bundle cache works with rubygems 1.3.7 and pre gems" do
install_gemfile <<-G
source :rubygems
- gem "rack", "1.3.0.beta2"
+ gem "rack", "1.3.0.beta2"
+ gem "will_paginate", "3.0.pre2"
G
bundle :cache
out.should_not include("Removing outdated .gem files from vendor/cache")

0 comments on commit b22351c

Please sign in to comment.