Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
indirect committed Jan 18, 2011
1 parent 4d6c3da commit 6dfc075
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
1 change: 1 addition & 0 deletions bin/bundle
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@


# Check if an older version of bundler is installed # Check if an older version of bundler is installed
require 'bundler' require 'bundler'
$STDERR.puts Bundler::VERSION
$:.each do |path| $:.each do |path|
if path =~ %r'/bundler-0.(\d+)' && $1.to_i < 9 if path =~ %r'/bundler-0.(\d+)' && $1.to_i < 9
abort "Please remove older versions of bundler. This can be done by running `gem cleanup bundler`." abort "Please remove older versions of bundler. This can be done by running `gem cleanup bundler`."
Expand Down
11 changes: 11 additions & 0 deletions spec/install/gems/packed_spec.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -68,5 +68,16 @@
out.should == "1.0.0 RUBY" out.should == "1.0.0 RUBY"
end end
end end

it "does not update the cache if --no-cache is passed" do
gemfile <<-G
source "file://#{gem_repo1}"
gem "rack"
G
bundled_app("vendor/cache").mkpath

bundle "install --no-cache"
bundled_app("vendor/cache").children.should be_empty
end
end end
end end
5 changes: 3 additions & 2 deletions spec/other/help_spec.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,10 +1,11 @@
require "spec_helper" require "spec_helper"


describe "bundle help" do describe "bundle help" do
it "complains if older versions of bundler are installed" do fit "complains if older versions of bundler are installed" do
system_gems "bundler-0.8.1" system_gems "bundler-0.8.1"


bundle "help", :expect_err => true ruby "STDERR.puts $:.inspect"
# bundle "help", :expect_err => true
err.should == "Please remove older versions of bundler. This can be done by running `gem cleanup bundler`." err.should == "Please remove older versions of bundler. This can be done by running `gem cleanup bundler`."
end end


Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@


Spec::Rubygems.setup Spec::Rubygems.setup
FileUtils.rm_rf(Spec::Path.gem_repo1) FileUtils.rm_rf(Spec::Path.gem_repo1)
ENV['RUBYOPT'] = "-I#{Spec::Path.root}/spec/support/rubygems_hax #{ENV['RUBYOPT']}" ENV['RUBYOPT'] = "#{ENV['RUBYOPT']} -r#{Spec::Path.root}/spec/support/rubygems_hax/platform.rb"
ENV['BUNDLE_SPEC_RUN'] = "true" ENV['BUNDLE_SPEC_RUN'] = "true"


RSpec.configure do |config| RSpec.configure do |config|
Expand Down
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,5 @@
require 'rubygems'

class Gem::Platform class Gem::Platform
@local = new(ENV['BUNDLER_SPEC_PLATFORM']) if ENV['BUNDLER_SPEC_PLATFORM'] @local = new(ENV['BUNDLER_SPEC_PLATFORM']) if ENV['BUNDLER_SPEC_PLATFORM']
end end
Expand Down

0 comments on commit 6dfc075

Please sign in to comment.