summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/bundler/rubygems_ext.rb19
-rw-r--r--spec/install/gems/simple_case_spec.rb4
-rw-r--r--spec/runtime/environment_rb_spec.rb13
-rw-r--r--spec/runtime/load_spec.rb3
-rw-r--r--spec/support/indexes.rb2
-rw-r--r--spec/support/sudo.rb2
6 files changed, 24 insertions, 19 deletions
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb
index a6ed2c8690..ea69427fa8 100644
--- a/lib/bundler/rubygems_ext.rb
+++ b/lib/bundler/rubygems_ext.rb
@@ -1,16 +1,15 @@
require 'pathname'
-unless defined? Gem
- require 'rubygems'
- require 'rubygems/specification'
+if defined?(Gem::QuickLoader)
+ # Gem Prelude makes me a sad panda :'(
+ Gem::QuickLoader.load_full_rubygems_library
end
+require 'rubygems'
+require 'rubygems/specification'
module Bundler
class DepProxy
- undef to_s
- undef type
-
attr_reader :required_by, :__platform, :dep
def initialize(dep, platform)
@@ -27,6 +26,14 @@ module Bundler
alias eql? ==
+ def type
+ @dep.type
+ end
+
+ def to_s
+ @dep.to_s
+ end
+
private
def method_missing(*args)
diff --git a/spec/install/gems/simple_case_spec.rb b/spec/install/gems/simple_case_spec.rb
index 15eb2ab987..983ac8eba6 100644
--- a/spec/install/gems/simple_case_spec.rb
+++ b/spec/install/gems/simple_case_spec.rb
@@ -330,7 +330,9 @@ describe "bundle install with gem sources" do
end
end
- it "warns when using --disable-shared-gems when not specifying a bundle path"
+ it "warns when using --disable-shared-gems when not specifying a bundle path" do
+ pending
+ end
it "does not use available system gems" do
gemfile <<-G
diff --git a/spec/runtime/environment_rb_spec.rb b/spec/runtime/environment_rb_spec.rb
index 0251f9035d..e0106597b8 100644
--- a/spec/runtime/environment_rb_spec.rb
+++ b/spec/runtime/environment_rb_spec.rb
@@ -125,14 +125,7 @@ describe "environment.rb file" do
bundle :lock
run "require 'bar'; puts BAR", :lite_runtime => true
out.should == "1.0"
- end if RUBY_VERSION < "1.9"
-
- it "error if the gemspec tries a relative require" do
- bundle :install
- out.should include("was a LoadError")
- out.should include("bar.gemspec")
- out.should include("require a relative path")
- end if RUBY_VERSION >= "1.9"
+ end
it "error intelligently if the gemspec has a LoadError" do
update_git "bar", :gemspec => false do |s|
@@ -179,7 +172,9 @@ describe "environment.rb file" do
err.should include("Please run `bundle lock` to relock.")
end
- it "regenerates if from an old bundler"
+ it "regenerates if from an old bundler" do
+ pending
+ end
it "requests regeneration if it's out of sync" do
pending
diff --git a/spec/runtime/load_spec.rb b/spec/runtime/load_spec.rb
index 9762e7c09f..b611ce7f09 100644
--- a/spec/runtime/load_spec.rb
+++ b/spec/runtime/load_spec.rb
@@ -78,6 +78,7 @@ describe "Bundler.load" do
bundle :lock
end
+ # This is obviously not true on 1.9 thanks to the AWEOME! gem prelude :'(
it "does not invoke setup inside env.rb" do
ruby <<-RUBY
require 'bundler'
@@ -86,7 +87,7 @@ describe "Bundler.load" do
RUBY
out.should == ""
- end
+ end if RUBY_VERSION < "1.9"
end
describe "not hurting brittle rubygems" do
diff --git a/spec/support/indexes.rb b/spec/support/indexes.rb
index 8beb644492..be5b2072bd 100644
--- a/spec/support/indexes.rb
+++ b/spec/support/indexes.rb
@@ -35,7 +35,7 @@ module Spec
got = resolve
flunk "The resolve succeeded with: #{got.map { |s| s.full_name }.sort.inspect}"
rescue Bundler::VersionConflict => e
- names.sort.should == e.conflicts.sort
+ Array(names).sort.should == e.conflicts.sort
end
end
diff --git a/spec/support/sudo.rb b/spec/support/sudo.rb
index b5c4020c75..d57ffcbbc7 100644
--- a/spec/support/sudo.rb
+++ b/spec/support/sudo.rb
@@ -2,7 +2,7 @@ module Spec
module Sudo
def self.sudo?
@which_sudo ||= `which sudo`.strip
- @which_sudo.any?
+ !@which_sudo.empty?
end
module Describe