Permalink
Browse files

Merge branch '1-0-stable'

Conflicts:
	CHANGELOG.md
	lib/bundler/version.rb
  • Loading branch information...
2 parents facde9d + 2c9d479 commit a7927d1cddc15f3115ae341316197eeb53053b3a @hone hone committed Feb 2, 2011
View
@@ -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:
View
@@ -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
View
@@ -60,18 +60,20 @@ 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)
t.ruby_opts = %w(-w)
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}"
View
@@ -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 @@ def load_gemspec(file)
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}"
View
@@ -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
@@ -105,6 +105,12 @@ class Dependency
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
View
@@ -1,4 +1,5 @@
require "uri"
+require 'rubygems/user_interaction'
require "rubygems/installer"
require "rubygems/spec_fetcher"
require "rubygems/format"
View
@@ -1,3 +1,5 @@
+require 'rubygems/user_interaction'
+
module Bundler
class UI
def warn(message)
@@ -53,9 +55,10 @@ def debug!
end
end
- class RGProxy < Gem::SilentUI
+ class RGProxy < ::Gem::SilentUI
def initialize(ui)
@ui = ui
+ super()
end
def say(message)
@@ -531,6 +531,15 @@ def set_bundle_path(type, location)
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
View
@@ -3,7 +3,7 @@ module Helpers
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
@@ -1,3 +1,5 @@
+require 'rubygems/user_interaction'
+
module Spec
module Rubygems
def self.setup

0 comments on commit a7927d1

Please sign in to comment.