Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Merge branch '1-0-stable'
Browse files Browse the repository at this point in the history
Conflicts:
	CHANGELOG.md
	Rakefile
	lib/bundler/cli.rb
	lib/bundler/templates/newgem/Rakefile.tt
	lib/bundler/templates/newgem/newgem.gemspec.tt
	lib/bundler/version.rb
	spec/other/newgem_spec.rb
	spec/support/rubygems_ext.rb
  • Loading branch information
indirect committed Jun 11, 2011
2 parents 10e3b9b + 3439848 commit e677283
Show file tree
Hide file tree
Showing 35 changed files with 325 additions and 176 deletions.
33 changes: 33 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,4 @@
<<<<<<< HEAD
## 1.1.pre.4 (5 May, 2011)

Bugfixes:
Expand Down Expand Up @@ -48,6 +49,38 @@ Removed:
- Removed bundle install <path>
- Removed bundle install --production
- Removed bundle install --disable-shared-gems
=======
## 1.0.15 (June 9, 2011)

Features:

- Improved Rubygems integration, removed many deprecation notices

Bugfixes:

- Escape URL arguments to git correctly on Windows (1.0.14 regression)

## 1.0.14 (May 27, 2011)

Features:

- Rubinius platform :rbx (@rkbodenner)
- Include gem rake tasks with "require 'bundler/gem_tasks" (@indirect)
- Include user name and email from git config in new gemspec (@ognevsky)

Bugfixes:

- Set file permissions after checking out git repos (@tissak)
- Remove deprecated call to Gem::SourceIndex#all_gems (@mpj)
- Require the version file in new gemspecs (@rubiii)
- Allow relative paths from the Gemfile in gems with no gemspec (@mbirk)
- Install gems that contain 'bundler', e.g. guard-bundler (@hone)
- Display installed path correctly on Windows (@tadman)
- Escape quotes in git URIs (@mheffner)
- Improve Rake 0.9 support (@quix)
- Handle certain directories already existing (@raggi)
- Escape filenames containing regex characters (@indirect)
>>>>>>> 1-0-stable
## 1.0.13 (May 4, 2011)

Expand Down
36 changes: 25 additions & 11 deletions ISSUES.md
@@ -1,8 +1,20 @@
# Bundler Issues

## Frequently encountered issues

### REE and Zlib::GzipFile::Error

Ruby Enterprise Edition users may see a `Zlib::GzipFile::Error` while installing gems. It is due to [a bug in REE](http://code.google.com/p/rubyenterpriseedition/issues/detail?id=45). You may be able to resolve the issue by upgrading REE, or changing to a different interpreter.

### Rake activation error

Anyone who has installed the Spork gem may see activation errors while running `rake` directly. This is because old versions of Spork would [install the newest rake using a mkmf file](https://github.com/timcharper/spork/issues/119). To resolve the issue, update the Spork version requirement in your Gemfile to at least `"~>0.8.5"` or `"~>0.9.0.rc8"`.

## Troubleshooting

Instructions for common Bundler use-cases can be found on the [Bundler documentation site](http://gembundler.com/v1.0/). Detailed information about each Bundler command, including help with common problems, can be found in the [Bundler man pages](http://gembundler.com/man/bundle.1.html).
Instructions for common Bundler use-cases can be found on the [Bundler documentation site](http://gembundler.com/v1.0/).

Detailed information about each Bundler command, including help with common problems, can be found in the [Bundler man pages](http://gembundler.com/man/bundle.1.html).

After reading the documentation, try these troubleshooting steps:

Expand All @@ -26,22 +38,24 @@ After reading the documentation, try these troubleshooting steps:

## Reporting unresolved problems

If you are still having problems, please report issues to the [Bundler issue tracker](http://github.com/carlhuda/bundler/issues/).

Instructions that allow the Bundler team to reproduce your issue are vitally important. When you report a bug, please create a gist of the following information and include a link in your ticket:
Instructions that allow the Bundler team to reproduce your issue are vitally important. When you report a bug, please include the following information:

- What version of bundler you are using
- What version of Ruby you are using
- Whether you are using RVM, and if so what version
- The command you ran
- Exception backtrace(s), if any
- Your Gemfile
- Your Gemfile.lock
- If you are on 0.9, whether you have locked or not
- If you are on 1.0, the result of `bundle config`
- The command you ran to generate exception(s)
- The exception backtrace(s)
- Your Bundler configuration settings (run `bundle config`)
- What version of bundler you are using (run `bundle -v`)
- What version of Ruby you are using (run `ruby -v`)
- What version of Rubygems you are using (run `gem -v`)
- Whether you are using RVM, and if so what version (run `rvm -v`)
- Whether you have the `rubygems-bundler` gem, which can break gem binares


If you are using Rails 2.3, please also include:

- Your boot.rb file
- Your preinitializer.rb file
- Your environment.rb file

[Create a gist](https://gist.github.com) containing all of that information, then visit the [Bundler issue tracker](https://github.com/carlhuda/bundler) and create a new ticket describing your problem and linking to your gist.
91 changes: 44 additions & 47 deletions Rakefile
@@ -1,15 +1,19 @@
# -*- encoding: utf-8 -*-
$:.unshift File.expand_path("../lib", __FILE__)
require 'bundler/gem_helper'
Bundler::GemHelper.install_tasks
require 'bundler/gem_tasks'

def sudo?
ENV['BUNDLER_SUDO_TESTS']
namespace :spec do
desc "Ensure spec dependencies are installed"
task :deps do
sh "gem list ronn | (grep 'ronn' 1> /dev/null) || gem install ronn --no-ri --no-rdoc"
sh "gem list rspec | (grep 'rspec (2.' 1> /dev/null) || gem install rspec --no-ri --no-rdoc"
end
end

begin
# set up rspec tasks
# running the specs needs both rspec and ronn
require 'rspec/core/rake_task'
require 'ronn'

desc "Run specs"
RSpec::Core::RakeTask.new do |t|
Expand All @@ -18,55 +22,38 @@ begin
end
task :spec => "man:build"

begin
require 'ci/reporter/rake/rspec'

namespace :ci do
desc "Run specs with Hudson output"
RSpec::Core::RakeTask.new(:spec)
task :spec => ["ci:setup:rspec", "man:build"]
end

rescue LoadError
namespace :ci do
task :spec do
abort "Run `rake ci:deps` to be able to run the CI specs"
end

desc "Install CI dependencies"
task :deps do
sh "gem list ci_reporter | (grep 'ci_reporter' 1> /dev/null) || gem install ci_reporter --no-ri --no-rdoc"
end
task :deps => "spec:deps"
namespace :spec do
task :clean do
rm_rf 'tmp'
end
end

namespace :spec do
desc "Run the spec suite with the sudo tests"
task :sudo => ["set_sudo", "clean", "spec"]
task :sudo => ["set_sudo", "spec", "clean_sudo"]

task :set_sudo do
ENV['BUNDLER_SUDO_TESTS'] = '1'
end

task :clean do
if sudo?
system "sudo rm -rf #{File.expand_path('../tmp', __FILE__)}"
else
rm_rf 'tmp'
end
task :clean_sudo do
puts "Cleaning up sudo test files..."
system "sudo rm -rf #{File.expand_path('../tmp/sudo_gem_home', __FILE__)}"
end

namespace :rubygems do
# Rubygems 1.3.5, 1.3.6, and HEAD specs
rubyopt = ENV["RUBYOPT"]
%w(master v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.1 v1.7.2).each do |rg|
%w(master v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.3).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

# Create tasks like spec:rubygems:v1.8.3:sudo to run the sudo specs
namespace rg do
task :sudo => ["set_sudo", rg, "clean_sudo"]
end

task "clone_rubygems_#{rg}" do
unless File.directory?("tmp/rubygems")
system("git clone git://github.com/rubygems/rubygems.git tmp/rubygems")
Expand Down Expand Up @@ -129,9 +116,6 @@ begin

end

# set up man tasks that use ronn
require 'ronn'

namespace :man do
directory "lib/bundler/man"

Expand Down Expand Up @@ -159,20 +143,33 @@ begin
end
end

begin
require 'ci/reporter/rake/rspec'

rescue LoadError
task :spec do
abort "Run `rake spec:deps` to be able to run the specs"
end
namespace :ci do
desc "Run specs with Hudson output"
RSpec::Core::RakeTask.new(:spec)
task :spec => ["ci:setup:rspec", "man:build"]
end

namespace :spec do
desc "Ensure spec dependencies are installed"
task :deps do
sh "gem list ronn | (grep 'ronn' 1> /dev/null) || gem install ronn --no-ri --no-rdoc"
sh "gem list rspec | (grep 'rspec (2.0' 1> /dev/null) || gem install rspec --no-ri --no-rdoc"
rescue LoadError
namespace :ci do
task :spec do
abort "Run `rake ci:deps` to be able to run the CI specs"
end

desc "Install CI dependencies"
task :deps do
sh "gem list ci_reporter | (grep 'ci_reporter' 1> /dev/null) || gem install ci_reporter --no-ri --no-rdoc"
end
task :deps => "spec:deps"
end
end

rescue LoadError
task :spec do
abort "Run `rake spec:deps` to be able to run the specs"
end
end

namespace :vendor do
Expand Down
7 changes: 2 additions & 5 deletions lib/bundler/cli.rb
@@ -1,6 +1,4 @@
$:.unshift File.expand_path('../vendor', __FILE__)
require 'thor'
require 'thor/actions'
require 'bundler/vendored_thor'
require 'rubygems/user_interaction'
require 'rubygems/config_file'

Expand Down Expand Up @@ -212,8 +210,7 @@ def install
Bundler.load.cache if Bundler.root.join("vendor/cache").exist? && !options["no-cache"]

if Bundler.settings[:path]
relative_path = Bundler.settings[:path]
relative_path = "./" + relative_path unless relative_path[0] == ?/
relative_path = File.expand_path(Bundler.settings[:path]).sub(/^#{File.expand_path('.')}/, '.')
Bundler.ui.confirm "Your bundle is complete! " +
"It was installed into #{relative_path}"
else
Expand Down
5 changes: 5 additions & 0 deletions lib/bundler/dependency.rb
Expand Up @@ -15,6 +15,7 @@ class Dependency < Gem::Dependency
:mri => Gem::Platform::RUBY,
:mri_18 => Gem::Platform::RUBY,
:mri_19 => Gem::Platform::RUBY,
:rbx => Gem::Platform::RUBY,
:jruby => Gem::Platform::JAVA,
:mswin => Gem::Platform::MSWIN,
:mingw => Gem::Platform::MINGW,
Expand Down Expand Up @@ -107,6 +108,10 @@ def mri_19?
mri? && RUBY_VERSION >= "1.9"
end

def rbx?
ruby? && defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx"
end

def jruby?
defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
end
Expand Down
9 changes: 2 additions & 7 deletions lib/bundler/gem_helper.rb
Expand Up @@ -2,15 +2,10 @@
require 'thor'
require 'bundler'

begin
# Support Rake > 0.8.7
require 'rake/dsl_definition'
include Rake::DSL
rescue LoadError
end

module Bundler
class GemHelper
include Rake::DSL if defined? Rake::DSL

def self.install_tasks(opts = {})
dir = opts[:dir] || Dir.pwd
self.new(dir, opts[:name]).install
Expand Down
2 changes: 2 additions & 0 deletions lib/bundler/gem_tasks.rb
@@ -0,0 +1,2 @@
require 'bundler/gem_helper'
Bundler::GemHelper.install_tasks
2 changes: 1 addition & 1 deletion lib/bundler/rubygems_ext.rb
Expand Up @@ -19,7 +19,7 @@ class Specification

def full_gem_path
source.respond_to?(:path) ?
Pathname.new(loaded_from).dirname.expand_path.to_s :
Pathname.new(loaded_from).dirname.expand_path(Bundler.root).to_s :
rg_full_gem_path
end

Expand Down

0 comments on commit e677283

Please sign in to comment.