summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTerence Lee <hone02@gmail.com>2011-02-01 19:45:09 -0600
committerTerence Lee <hone02@gmail.com>2011-02-01 19:45:09 -0600
commita7927d1cddc15f3115ae341316197eeb53053b3a (patch)
tree4dde9333090334feade9c0618b6d6322c27c99fe
parentfacde9d8e86b4dd48ae7155c3fbe8f6597a084ff (diff)
parent2c9d47949444dc6f0216c096d9bfdedac95db630 (diff)
downloadbundler-a7927d1cddc15f3115ae341316197eeb53053b3a.tar.gz
Merge branch '1-0-stable'
Conflicts: CHANGELOG.md lib/bundler/version.rb
-rw-r--r--CHANGELOG.md7
-rw-r--r--LICENSE2
-rw-r--r--Rakefile10
-rw-r--r--lib/bundler.rb11
-rw-r--r--lib/bundler/cli.rb1
-rw-r--r--lib/bundler/rubygems_ext.rb6
-rw-r--r--lib/bundler/source.rb1
-rw-r--r--lib/bundler/ui.rb5
-rw-r--r--spec/install/gems/simple_case_spec.rb9
-rw-r--r--spec/support/helpers.rb2
-rw-r--r--spec/support/rubygems_ext.rb2
11 files changed, 48 insertions, 8 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9f3d11518e..44da053218 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,13 @@ Removed:
- Removed bundle install --production
- Removed bundle install --disable-shared-gems
+## 1.0.10 (February 1, 2011)
+
+Bugfixes:
+
+ - Fix a regression loading YAML gemspecs from :git and :path gems
+ - Requires, namespaces, etc. to work with changes in Rubygems 1.5
+
## 1.0.9 (January 19, 2011)
Bugfixes:
diff --git a/LICENSE b/LICENSE
index 66f44e9729..4d62f8af36 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,8 @@
Portions copyright (c) 2010 Andre Arko
Portions copyright (c) 2009 Engine Yard
+MIT License
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
diff --git a/Rakefile b/Rakefile
index bddc63dc5a..6f9e3c4d7b 100644
--- a/Rakefile
+++ b/Rakefile
@@ -60,7 +60,7 @@ begin
namespace :rubygems do
# Rubygems 1.3.5, 1.3.6, and HEAD specs
rubyopt = ENV["RUBYOPT"]
- %w(master v1.3.5 v1.3.6 v1.3.7 v1.4.0 v1.4.1).each do |rg|
+ %w(master v1.3.6 v1.3.7 v1.4.0 v1.4.1 v1.5.0).each do |rg|
desc "Run specs with Rubygems #{rg}"
RSpec::Core::RakeTask.new(rg) do |t|
t.rspec_opts = %w(-fs --color)
@@ -68,10 +68,12 @@ begin
end
task "clone_rubygems_#{rg}" do
- unless File.directory?("tmp/rubygems_#{rg}")
- system("git clone git://github.com/rubygems/rubygems.git tmp/rubygems_#{rg} && cd tmp/rubygems_#{rg} && git reset --hard #{rg}")
+ unless File.directory?("tmp/rubygems")
+ system("git clone git://github.com/rubygems/rubygems.git tmp/rubygems")
end
- ENV["RUBYOPT"] = "-I#{File.expand_path("tmp/rubygems_#{rg}/lib")} #{rubyopt}"
+ system("cd tmp/rubygems && git checkout #{rg}")
+ system("git pull") if rg == "master"
+ ENV["RUBYOPT"] = "-I#{File.expand_path("tmp/rubygems/lib")} #{rubyopt}"
end
task rg => "clone_rubygems_#{rg}"
diff --git a/lib/bundler.rb b/lib/bundler.rb
index d489ddcd21..5e3b601f16 100644
--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -1,6 +1,12 @@
require 'rbconfig'
require 'fileutils'
require 'pathname'
+
+begin
+ require 'psych'
+rescue LoadError
+end
+
require 'yaml'
require 'bundler/rubygems_ext'
require 'bundler/version'
@@ -226,12 +232,13 @@ module Bundler
path = Pathname.new(file)
# Eval the gemspec from its parent directory
Dir.chdir(path.dirname.to_s) do
+ contents = File.read(path.basename.to_s)
begin
- Gem::Specification.from_yaml(path.basename.to_s)
+ Gem::Specification.from_yaml(contents)
# Raises ArgumentError if the file is not valid YAML
rescue ArgumentError, SyntaxError, Gem::EndOfYAMLException, Gem::Exception
begin
- eval(File.read(path.basename.to_s), TOPLEVEL_BINDING, path.expand_path.to_s)
+ eval(contents, TOPLEVEL_BINDING, path.expand_path.to_s)
rescue LoadError => e
original_line = e.backtrace.find { |line| line.include?(path.to_s) }
msg = "There was a LoadError while evaluating #{path.basename}:\n #{e.message}"
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index e922fc5c7a..5dacf47e5a 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -1,6 +1,7 @@
$:.unshift File.expand_path('../vendor', __FILE__)
require 'thor'
require 'thor/actions'
+require 'rubygems/user_interaction'
require 'rubygems/config_file'
# Work around a RubyGems bug
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb
index 29b12d79d4..f2c640c664 100644
--- a/lib/bundler/rubygems_ext.rb
+++ b/lib/bundler/rubygems_ext.rb
@@ -105,6 +105,12 @@ module Gem
alias eql? ==
+ def encode_with(coder)
+ to_yaml_properties.each do |ivar|
+ coder[ivar.to_s.sub(/^@/, '')] = instance_variable_get(ivar)
+ end
+ end
+
def to_yaml_properties
instance_variables.reject { |p| ["@source", "@groups"].include?(p.to_s) }
end
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb
index a49150780b..80307e652a 100644
--- a/lib/bundler/source.rb
+++ b/lib/bundler/source.rb
@@ -1,4 +1,5 @@
require "uri"
+require 'rubygems/user_interaction'
require "rubygems/installer"
require "rubygems/spec_fetcher"
require "rubygems/format"
diff --git a/lib/bundler/ui.rb b/lib/bundler/ui.rb
index e6331921aa..c483216aaf 100644
--- a/lib/bundler/ui.rb
+++ b/lib/bundler/ui.rb
@@ -1,3 +1,5 @@
+require 'rubygems/user_interaction'
+
module Bundler
class UI
def warn(message)
@@ -53,9 +55,10 @@ module Bundler
end
end
- class RGProxy < Gem::SilentUI
+ class RGProxy < ::Gem::SilentUI
def initialize(ui)
@ui = ui
+ super()
end
def say(message)
diff --git a/spec/install/gems/simple_case_spec.rb b/spec/install/gems/simple_case_spec.rb
index 0bb08257f6..456178fd55 100644
--- a/spec/install/gems/simple_case_spec.rb
+++ b/spec/install/gems/simple_case_spec.rb
@@ -531,6 +531,15 @@ describe "bundle install with gem sources" do
bundle :install
err.should be_empty
end
+
+ it "still installs correctly when using path" do
+ build_lib 'yaml_spec', :gemspec => :yaml
+
+ install_gemfile <<-G
+ gem 'yaml_spec', :path => "#{lib_path('yaml_spec-1.0')}"
+ G
+ err.should == ""
+ end
end
describe "bundler dependencies" do
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb
index 9f751feb99..541af944f8 100644
--- a/spec/support/helpers.rb
+++ b/spec/support/helpers.rb
@@ -3,7 +3,7 @@ module Spec
def reset!
@in_p, @out_p, @err_p = nil, nil, nil
Dir["#{tmp}/{gems/*,*}"].each do |dir|
- next if %(base remote1 gems rubygems_v1.3.5 rubygems_v1.3.6 rubygems_v1.3.7 rubygems_v1.4.0 rubygems_v1.4.1 rubygems_master).include?(File.basename(dir))
+ next if %(base remote1 gems rubygems).include?(File.basename(dir))
unless ENV['BUNDLER_SUDO_TESTS']
FileUtils.rm_rf(dir)
else
diff --git a/spec/support/rubygems_ext.rb b/spec/support/rubygems_ext.rb
index 68361f09aa..ab5185c8a6 100644
--- a/spec/support/rubygems_ext.rb
+++ b/spec/support/rubygems_ext.rb
@@ -1,3 +1,5 @@
+require 'rubygems/user_interaction'
+
module Spec
module Rubygems
def self.setup