[DRE-commits] [bundler] 01/03: Imported Upstream version 1.5.0~rc.1
Christian Hofstaedtler
zeha at moszumanska.debian.org
Sat Nov 30 10:58:24 UTC 2013
This is an automated email from the git hooks/post-receive script.
zeha pushed a commit to branch master
in repository bundler.
commit 7e51085070d2c77c1af8b0a2a81bd87f1be94dcf
Author: Christian Hofstaedtler <zeha at debian.org>
Date: Sat Nov 30 11:56:31 2013 +0100
Imported Upstream version 1.5.0~rc.1
---
.travis.yml | 33 +-
CHANGELOG.md | 25 +-
Rakefile | 4 +-
bundler.gemspec | 2 +-
lib/bundler.rb | 5 +-
lib/bundler/capistrano.rb | 1 +
lib/bundler/cli.rb | 24 +-
lib/bundler/definition.rb | 8 +-
lib/bundler/dsl.rb | 10 +-
lib/bundler/endpoint_specification.rb | 2 +-
lib/bundler/fetcher.rb | 63 +--
lib/bundler/installer.rb | 12 +-
lib/bundler/lazy_specification.rb | 2 +-
lib/bundler/man/bundle | 116 +++++
lib/bundler/man/bundle-config | 161 +++++++
lib/bundler/man/bundle-config.txt | 184 ++++++++
lib/bundler/man/bundle-exec | 159 +++++++
lib/bundler/man/bundle-exec.txt | 163 +++++++
lib/bundler/man/bundle-install | 327 ++++++++++++++
lib/bundler/man/bundle-install.txt | 387 ++++++++++++++++
lib/bundler/man/bundle-package | 49 ++
lib/bundler/man/bundle-package.txt | 67 +++
lib/bundler/man/bundle-platform | 61 +++
lib/bundler/man/bundle-platform.txt | 57 +++
lib/bundler/man/bundle-update | 202 +++++++++
lib/bundler/man/bundle-update.txt | 207 +++++++++
lib/bundler/man/bundle.txt | 97 ++++
lib/bundler/man/gemfile.5 | 492 ++++++++++++++++++++
lib/bundler/man/gemfile.5.txt | 448 ++++++++++++++++++
lib/bundler/parallel_workers/unix_worker.rb | 6 +
lib/bundler/remote_specification.rb | 2 +-
lib/bundler/retry.rb | 7 +-
lib/bundler/ruby_version.rb | 2 +-
lib/bundler/rubygems_ext.rb | 9 +-
lib/bundler/rubygems_integration.rb | 61 +--
lib/bundler/settings.rb | 21 +
lib/bundler/source.rb | 15 +-
lib/bundler/source/git/git_proxy.rb | 2 +-
lib/bundler/source/rubygems.rb | 56 ++-
lib/bundler/templates/newgem/README.md.tt | 2 +-
.../templates/newgem/spec/newgem_spec.rb.tt | 4 +-
lib/bundler/version.rb | 2 +-
man/bundle-config.ronn | 9 +
man/bundle-install.ronn | 14 +-
man/gemfile.5.ronn | 6 +
metadata.yml | 467 +++++++++++++++++++
spec/bundler/retry_spec.rb | 29 +-
spec/commands/config_spec.rb | 14 +
.../inject.rb => commands/inject_spec.rb} | 0
spec/commands/newgem_spec.rb | 4 +-
spec/commands/outdated_spec.rb | 17 +
spec/install/binstubs_spec.rb | 24 +
spec/install/bundler_spec.rb | 146 ++++++
spec/install/{ => gemfile}/gemspec_spec.rb | 0
spec/install/{ => gemfile}/git_spec.rb | 4 +-
spec/install/{ => gemfile}/path_spec.rb | 0
spec/install/gemfile_spec.rb | 44 ++
spec/install/gems/groups_spec.rb | 413 +++++++++--------
spec/install/gems/mirror_spec.rb | 39 ++
spec/install/gems/platform_spec.rb | 16 +-
spec/install/gems/simple_case_spec.rb | 451 +------------------
spec/install/gemspecs_spec.rb | 50 +++
spec/install/invalid_spec.rb | 50 ---
spec/install/path_spec.rb | 500 ++++-----------------
spec/install/prereleases_spec.rb | 43 ++
spec/other/bundle_ruby_spec.rb | 4 +-
spec/other/ext_spec.rb | 2 +-
spec/other/platform_spec.rb | 31 +-
spec/realworld/parallel_install_spec.rb | 3 +-
spec/realworld/parallel_update_spec.rb | 31 ++
spec/runtime/platform_spec.rb | 4 +-
spec/spec_helper.rb | 4 +-
spec/support/{rubygems_hax/platform.rb => hax.rb} | 0
73 files changed, 4712 insertions(+), 1264 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index cd8c3b4..c6347cf 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,16 +14,11 @@ notifications:
- secure: "bCcvqJT7YrBawtkXXwHhT+jOFth7r2Qv/30PkkbhQxk6Jb3xambjCOJ3U6vJ\ngYmiL50exi5lUp3oc3SEbHN5t2CrZqOZDQ6o7P8EAmB5c0oH2RrYaFOkI5Gt\nul/jGH/96A9sj0aMwG7JfdMSfhqj1DUKAm2PnnbXPL853VfmT24="
# terence
- secure: "MQ8eA5Jb8YzEpAo58DRGfVJklAPcEbAulpBZnTxp0am6ldneDtJHbQk21w6R\nj5GsDHlzr/lMp/GHIimtUZ7rLohfND8fj/W7fs1Dkd4eN02/ERt98x3pHlqv\nvZgSnZ39uVYv+OcphraE24QaRaGWLhWZAMYQTVe/Yz50NyG8g1U="
- irc:
- on_success: change
- on_failure: always
- channels:
- - "irc.freenode.org#bundler"
campfire:
on_success: change
on_failure: always
rooms:
- - secure: "geau3P+A9ZJHkA/OHN5v9Mcb8hAti1PllXw5DsHNJfLAWBAw5ReGGMA8Xfpf\nLdT7ktIUlQwzw94cKQ6sRZk8szXTiHncf3bxXTACJf2RpiKmbkoQU51TmCDq\nYSMuY1FIryk/3t9aZCrarufbIDI3DBscDEe4Bj9bERl+TJ8ArBY="
+ secure: MNTSGIySYwHia5gIgRiZxXtPMPDIP9KmzQk7Kq2ZoVvP3mIk8W1TMkvcyFkEf6uCasyVZZixzUBfY+E0BlHAz1ycQpTh1jvSpuIpEVYW48ShJldJ+8W8xfzafyOHii3z7VrDaomEffmMDdmHRsbQAfekMjdR4bTpXtT9V+wOXlg=
rvm:
- 2.0.0
- 1.9.3
@@ -33,16 +28,15 @@ env:
# We need to know if changes to rubygems will break bundler on release
- RGV=master
# Test the latest rubygems release with all of our supported rubies
- - RGV=v2.0.6
+ - RGV=v2.1.9
# Test the latest stable branch so we know the next minor will work
- - RGV=2.0
+ - RGV=2.1
matrix:
allow_failures:
# We want to know how we're doing with head, but not fail the build
- rvm: ruby-head
- env: RGV=master
- - env: RGV=2.0
- # 1.9.2 is simply too slow. it sometimes exceeds the 25m hard limit.
+ # 1.9.2 is simply too slow. it sometimes exceeds the Travis hard limit.
- rvm: 1.9.2
# Alternate implementations are good data points but not maintained
- rvm: jruby
@@ -53,12 +47,21 @@ matrix:
env: RGV=master
# Alternate implementations
- rvm: jruby
- env: RGV=v2.0.6
+ env: RGV=v2.1.9
- rvm: rbx
- env: RGV=v2.0.6
+ env: RGV=v2.1.9
+ # Rubygems goes down to 2.0 on Ruby 2.0.0
+ - rvm: 2.0.0
+ env: RGV=v2.1.9
+ - rvm: 2.0.0
+ env: RGV=v2.0.12
# Rubygems goes down to 1.5.3 on Ruby 1.9.3
- rvm: 1.9.3
- env: RGV=v1.8.25
+ env: RGV=v2.1.9
+ - rvm: 1.9.3
+ env: RGV=v2.0.12
+ - rvm: 1.9.3
+ env: RGV=v1.8.28
- rvm: 1.9.3
env: RGV=v1.7.2
- rvm: 1.9.3
@@ -67,10 +70,10 @@ matrix:
env: RGV=v1.5.3
# We only want an overview of how 1.9.2 is doing
- rvm: 1.9.2
- env: RGV=v2.0.6
+ env: RGV=v2.1.9
# Rubygems goes down to 1.3.6 on Ruby 1.8.7
- rvm: 1.8.7
- env: RGV=v1.8.25
+ env: RGV=v1.8.28
- rvm: 1.8.7
env: RGV=v1.7.2
- rvm: 1.8.7
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e773fec..ffc9b03 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,24 @@
+## 1.5.0.rc.1 (2013-11-09)
+
+Features:
+
+ - bundle update also accepts --jobs (#2692, @mrkn)
+ - add fork URL to README for new `bundle gem` (#2665, @zzak)
+ - add `bundle outdated --strict` (#2685, @rhysd)
+ - warn if same gem/version is added twice (#2679, @jendiamond)
+ - don't redownload installed specs for `bundle install` (#2680, @cainlevy)
+ - override gem sources with mirrors (#2650, @danielsdeleo, @mkristian)
+
+Bugfixes:
+
+ - fix sharing same SSL socket when forking workers for parallel install (#2632)
+ - fix msg typo in GitNotAllowedError (#2654, @joyicecloud)
+ - fix Bundler.which for directories (#2697, @rhysd)
+ - properly require `Capistrano::Version` (#2690, @steveklabnik)
+ - search for git.exe and git
+ - fix the bug that downloads every spec when API fetcher encouters an error
+ - only retry network requests
+
## 1.4.0.rc.1 (2013-09-29)
Features:
@@ -6,7 +27,7 @@ Features:
- add :patchlevel option to ruby DSL
- add `bundler` bin (#2598, @kirs)
- friendly ambiguous error messages (#2581, #2550, @jlsuttles, @jendiamond, @joyicecloud)
- - add `:jruby_18` and `:jruby_19` paltform options (@mcfiredrill)
+ - add `:jruby_18` and `:jruby_19` platform options (@mcfiredrill)
- add X.509 client certificates for auth without passwords (@snackbandit)
- add `exec --keep-file-descriptors` for Ruby 1.9-like behavior on 2.0 (@steved555)
- print a better error when git is not installed (@joyicecloud)
@@ -68,7 +89,7 @@ Bugfixes:
- use basic auth even when SSL is not available (@jayniz)
- installing git gems without dependencies in deployment now works
-## 1.3.4 (15 March 2103)
+## 1.3.4 (15 March 2013)
Bugfixes:
diff --git a/Rakefile b/Rakefile
index e886271..278a91e 100644
--- a/Rakefile
+++ b/Rakefile
@@ -91,7 +91,9 @@ begin
namespace :rubygems do
rubyopt = ENV["RUBYOPT"]
# When editing this list, also edit .travis.yml!
- %w(master 2.0 v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.25 v2.0.6).each do |rg|
+ branches = %w(master 2.1)
+ releases = %w(v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.28 v2.0.12 v2.1.9)
+ (branches + releases).each do |rg|
desc "Run specs with Rubygems #{rg}"
RSpec::Core::RakeTask.new(rg) do |t|
t.rspec_opts = %w(-fs --color)
diff --git a/bundler.gemspec b/bundler.gemspec
index 6344e2d..37c320e 100644
--- a/bundler.gemspec
+++ b/bundler.gemspec
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
spec.required_rubygems_version = '>= 1.3.6'
spec.add_development_dependency 'ronn', '~> 0.7.3'
- spec.add_development_dependency 'rspec', '~> 2.11'
+ spec.add_development_dependency 'rspec', '~> 2.99.0.beta1'
spec.files = `git ls-files`.split($/)
spec.files += Dir.glob('lib/bundler/man/**/*') # man/ is ignored by git
diff --git a/lib/bundler.rb b/lib/bundler.rb
index b537ed7..50fed96 100644
--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -290,7 +290,7 @@ module Bundler
end
def which(executable)
- if File.executable?(executable)
+ if File.file?(executable) && File.executable?(executable)
executable
elsif ENV['PATH']
path = ENV['PATH'].split(File::PATH_SEPARATOR).find do |p|
@@ -354,7 +354,8 @@ module Bundler
end
def git_present?
- @git_present ||= Bundler.which("git")
+ return @git_present if defined?(@git_present)
+ @git_present = Bundler.which("git") || Bundler.which("git.exe")
end
def ruby_version
diff --git a/lib/bundler/capistrano.rb b/lib/bundler/capistrano.rb
index 336f04c..e372a1a 100644
--- a/lib/bundler/capistrano.rb
+++ b/lib/bundler/capistrano.rb
@@ -3,6 +3,7 @@
# Just add "require 'bundler/capistrano'" in your Capistrano deploy.rb, and
# Bundler will be activated after each new deployment.
require 'bundler/deployment'
+require 'capistrano/version'
if defined?(Capistrano::Version) && Gem::Version.new(Capistrano::Version).release >= Gem::Version.new("3.0")
raise "For Capistrano 3.x integration, please use http://github.com/capistrano/bundler"
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index c9d2771..20c6826 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -302,6 +302,8 @@ module Bundler
"Only output warnings and errors."
method_option "full-index", :type => :boolean, :banner =>
"Use the rubygems modern index instead of the API endpoint"
+ method_option "jobs", :aliases => "-j", :type => :numeric, :banner =>
+ "Specify the number of jobs to run in parallel"
def update(*gems)
sources = Array(options[:source])
Bundler.ui.level = "warn" if options[:quiet]
@@ -321,7 +323,12 @@ module Bundler
Bundler::Fetcher.disable_endpoint = options["full-index"]
- opts = {"update" => true, "local" => options[:local]}
+ opts = options.dup
+ opts["update"] = true
+ opts["local"] = options[:local]
+
+ Bundler.settings[:jobs] = opts["jobs"] if opts["jobs"]
+
# rubygems plugins sometimes hook into the gem install process
Gem.load_env_plugins if Gem.respond_to?(:load_env_plugins)
@@ -416,6 +423,8 @@ module Bundler
method_option "source", :type => :array, :banner => "Check against a specific source"
method_option "local", :type => :boolean, :banner =>
"Do not attempt to fetch gems remotely and use the gem cache instead"
+ method_option "strict", :type => :boolean, :banner =>
+ "Only list newer versions allowed by your Gemfile requirements"
def outdated(*gems)
sources = Array(options[:source])
@@ -444,13 +453,19 @@ module Bundler
[gemfile_specs.sort_by(&:name), dependency_specs.sort_by(&:name)].flatten.each do |current_spec|
next if !gems.empty? && !gems.include?(current_spec.name)
- active_spec = definition.index[current_spec.name].sort_by { |b| b.version }
+ dependency = current_dependencies[current_spec.name]
+ active_spec = definition.index[current_spec.name].sort_by { |b| b.version }
if !current_spec.version.prerelease? && !options[:pre] && active_spec.size > 1
active_spec = active_spec.delete_if { |b| b.respond_to?(:version) && b.version.prerelease? }
end
-
- active_spec = active_spec.last
+ if options["strict"]
+ active_spec = active_spec.reverse.detect do |b|
+ dependency && b.respond_to?(:version) && dependency.requirement.satisfied_by?(b.version)
+ end || active_spec.last
+ else
+ active_spec = active_spec.last
+ end
next if active_spec.nil?
gem_outdated = Gem::Version.new(active_spec.version) > Gem::Version.new(current_spec.version)
@@ -466,7 +481,6 @@ module Bundler
spec_version = "#{active_spec.version}#{active_spec.git_version}"
current_version = "#{current_spec.version}#{current_spec.git_version}"
- dependency = current_dependencies[current_spec.name]
dependency_version = %|Gemfile specifies "#{dependency.requirement}"| if dependency && dependency.specific?
Bundler.ui.info " * #{active_spec.name} (#{spec_version} > #{current_version}) #{dependency_version}".rstrip
out_count += 1
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 6c6a60b..3dfa484 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -53,7 +53,7 @@ module Bundler
@lockfile_contents = ""
@ruby_version = ruby_version
- if lockfile && File.exists?(lockfile)
+ if lockfile && File.exist?(lockfile)
@lockfile_contents = Bundler.read_file(lockfile)
locked = LockfileParser.new(@lockfile_contents)
@platforms = locked.platforms
@@ -380,7 +380,11 @@ module Bundler
when :engine_version
"Your #{Bundler.ruby_version.engine} version is #{actual}, but your Gemfile specified #{ruby_version.engine} #{expected}"
when :patchlevel
- "Your Ruby patchlevel is #{actual}, but your Gemfile specified #{expected}"
+ if !expected.is_a?(String)
+ "The Ruby patchlevel in your Gemfile must be a string"
+ else
+ "Your Ruby patchlevel is #{actual}, but your Gemfile specified #{expected}"
+ end
end
raise RubyVersionMismatch, msg
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index 947aca7..6d4d1e7 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -83,10 +83,14 @@ module Bundler
elsif dep.type == :development
return
else
- raise GemfileError, "You cannot specify the same gem twice with different version requirements. \n" \
- "You specified: #{current.name} (#{current.requirement}) and " \
- "#{dep.name} (#{dep.requirement})\n"
+ raise GemfileError, "You cannot specify the same gem twice with different version requirements.\n" \
+ "You specified: #{current.name} (#{current.requirement}) and #{dep.name} (#{dep.requirement})"
end
+
+ else
+ Bundler.ui.warn "Your Gemfile lists the gem #{current.name} (#{current.requirement}) more than once.\n" \
+ "You should probably keep only one of them.\n" \
+ "While it's not a problem now, it could cause errors if you change the version of just one of them later."
end
if current.source != dep.source
diff --git a/lib/bundler/endpoint_specification.rb b/lib/bundler/endpoint_specification.rb
index 4d599c5..4ab6b1b 100644
--- a/lib/bundler/endpoint_specification.rb
+++ b/lib/bundler/endpoint_specification.rb
@@ -4,7 +4,7 @@ module Bundler
include MatchPlatform
attr_reader :name, :version, :platform, :dependencies
- attr_accessor :source
+ attr_accessor :source, :source_uri
def initialize(name, version, platform, dependencies)
@name = name
diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb
index a3d678b..548002f 100644
--- a/lib/bundler/fetcher.rb
+++ b/lib/bundler/fetcher.rb
@@ -31,17 +31,6 @@ module Bundler
class << self
attr_accessor :disable_endpoint, :api_timeout, :redirect_limit, :max_retries
- @@spec_fetch_map ||= {}
-
- def fetch(spec)
- spec, uri = @@spec_fetch_map[spec.full_name]
- if spec
- path = download_gem_from_uri(spec, uri)
- s = Bundler.rubygems.spec_from_gem(path, Bundler.settings["trust-policy"])
- spec.__swap__(s)
- end
- end
-
def download_gem_from_uri(spec, uri)
spec.fetch_platform
@@ -82,6 +71,7 @@ module Bundler
end
def initialize(remote_uri)
+
# How many redirects to allew in one request
@redirect_limit = 5
# How long to wait for each gemcutter API call
@@ -89,8 +79,8 @@ module Bundler
# How many retries for the gemcutter API call
@max_retries = 3
- @remote_uri = remote_uri
- @public_uri = remote_uri.dup
+ @remote_uri = Bundler::Source.mirror_for(remote_uri)
+ @public_uri = @remote_uri.dup
@public_uri.user, @public_uri.password = nil, nil # don't print these
Socket.do_not_reverse_lookup = true
@@ -124,6 +114,10 @@ module Bundler
@connection
end
+ def uri
+ @public_uri
+ end
+
# fetch a gem specification
def fetch_spec(spec)
spec = spec - [nil, 'ruby', '']
@@ -155,18 +149,16 @@ module Bundler
use_full_source_index = !gem_names || @remote_uri.scheme == "file" || Bundler::Fetcher.disable_endpoint
if gem_names && use_api
- Bundler.ui.info "Fetching gem metadata from #{@public_uri}", Bundler.ui.debug?
specs = fetch_remote_specs(gem_names)
- # new line now that the dots are over
- Bundler.ui.info "" if specs && !Bundler.ui.debug?
end
if specs.nil?
# API errors mean we should treat this as a non-API source
@use_api = false
- Bundler.ui.info "Fetching source index from #{@public_uri}"
- specs = fetch_all_remote_specs
+ specs = Bundler::Retry.new("source fetch").attempts do
+ fetch_all_remote_specs
+ end
end
specs[@remote_uri].each do |name, version, platform, dependencies|
@@ -178,7 +170,7 @@ module Bundler
spec = RemoteSpecification.new(name, version, platform, self)
end
spec.source = source
- @@spec_fetch_map[spec.full_name] = [spec, @remote_uri]
+ spec.source_uri = @remote_uri
index << spec
end
@@ -201,27 +193,16 @@ module Bundler
return {@remote_uri => last_spec_list} if query_list.empty?
- spec_list, deps_list = fetch_dependency_remote_specs(query_list)
- returned_gems = spec_list.map {|spec| spec.first }.uniq
+ remote_specs = Bundler::Retry.new("dependency api").attempts do
+ fetch_dependency_remote_specs(query_list)
+ end
+ spec_list, deps_list = remote_specs
+ returned_gems = spec_list.map {|spec| spec.first }.uniq
fetch_remote_specs(deps_list, full_dependency_list + returned_gems, spec_list + last_spec_list)
- # fall back to the legacy index in the following cases
- # 1. Gemcutter Endpoint doesn't return a 200
- # 2. Marshal blob doesn't load properly
- # 3. One of the YAML gemspecs has the Syck::DefaultKey problem
rescue HTTPError, MarshalError, GemspecError => e
- # new line now that the dots are over
- Bundler.ui.info "" unless Bundler.ui.debug?
-
- Bundler.ui.debug "Error during API request. #{e.class}: #{e.message}"
- Bundler.ui.debug e.backtrace.join(" ")
-
- @current_retries ||= 0
- if @current_retries < @max_retries
- @current_retries += 1
- retry
- end
-
+ Bundler.ui.info "" unless Bundler.ui.debug? # new line now that the dots are over
+ Bundler.ui.debug "could not fetch from the dependency API, trying the full index"
@use_api = false
return nil
end
@@ -239,7 +220,7 @@ module Bundler
end
def inspect
- "#<#{self.class}:0x#{object_id} uri=#{@public_uri.to_s}>"
+ "#<#{self.class}:0x#{object_id} uri=#{uri}>"
end
private
@@ -260,7 +241,7 @@ module Bundler
req.basic_auth(uri.user, uri.password) if uri.user
response = connection.request(uri, req)
rescue OpenSSL::SSL::SSLError
- raise CertificateFailureError.new(@public_uri)
+ raise CertificateFailureError.new(uri)
rescue *HTTP_ERRORS
raise HTTPError, "Network error while fetching #{uri}"
end
@@ -316,10 +297,10 @@ module Bundler
Bundler.rubygems.fetch_all_remote_specs
rescue Gem::RemoteFetcher::FetchError, OpenSSL::SSL::SSLError => e
if e.message.match("certificate verify failed")
- raise CertificateFailureError.new(@public_uri)
+ raise CertificateFailureError.new(uri)
else
Bundler.ui.trace e
- raise HTTPError, "Could not fetch specs from #{@public_uri}"
+ raise HTTPError, "Could not fetch specs from #{uri}"
end
end
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index ebc36f4..8d193a7 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -79,13 +79,7 @@ module Bundler
# Since we are installing, we can resolve the definition
# using remote specs
unless local
- if options["local"]
- @definition.resolve_with_cache!
- else
- Bundler::Retry.new("source fetch").attempts do
- @definition.resolve_remotely!
- end
- end
+ options["local"] ? @definition.resolve_with_cache! : @definition.resolve_remotely!
end
# Must install gems in the order that the resolver provides
# as dependencies might actually affect the installation of
@@ -108,10 +102,6 @@ module Bundler
end
def install_gem_from_spec(spec, standalone = false, worker = 0)
- # Download the gem to get the spec, because some specs that are returned
- # by rubygems.org are broken and wrong.
- Bundler::Fetcher.fetch(spec) if spec.source.is_a?(Bundler::Source::Rubygems)
-
# Fetch the build settings, if there are any
settings = Bundler.settings["build.#{spec.name}"]
install_message = nil
diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb
index 966d107..bdcf2df 100644
--- a/lib/bundler/lazy_specification.rb
+++ b/lib/bundler/lazy_specification.rb
@@ -7,7 +7,7 @@ module Bundler
include MatchPlatform
attr_reader :name, :version, :dependencies, :platform
- attr_accessor :source
+ attr_accessor :source, :source_uri
def initialize(name, version, platform, source = nil)
@name = name
diff --git a/lib/bundler/man/bundle b/lib/bundler/man/bundle
new file mode 100644
index 0000000..44d4a19
--- /dev/null
+++ b/lib/bundler/man/bundle
@@ -0,0 +1,116 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE" "1" "August 2013" "" ""
+.
+.SH "NAME"
+\fBbundle\fR \- Ruby Dependency Management
+.
+.SH "SYNOPSIS"
+\fBbundle\fR COMMAND [\-\-no\-color] [\-\-verbose] [ARGS]
+.
+.SH "DESCRIPTION"
+Bundler manages an \fBapplication\'s dependencies\fR through its entire life across many machines systematically and repeatably\.
+.
+.P
+See the bundler website \fIhttp://bundler\.io\fR for information on getting started, and Gemfile(5) for more information on the \fBGemfile\fR format\.
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-\-no\-color\fR
+Prints all output without color
+.
+.TP
+\fB\-\-verbose\fR
+Prints out additional logging information
+.
+.SH "BUNDLE COMMANDS"
+We divide \fBbundle\fR subcommands into primary commands and utilities\.
+.
+.SH "PRIMARY COMMANDS"
+.
+.TP
+bundle install(1) \fIbundle\-install\.1\.html\fR
+Install the gems specified by the \fBGemfile\fR or \fBGemfile\.lock\fR
+.
+.TP
+bundle update(1) \fIbundle\-update\.1\.html\fR
+Update dependencies to their latest versions
+.
+.TP
+bundle package(1) \fIbundle\-package\.1\.html\fR
+Package the \.gem files required by your application into the \fBvendor/cache\fR directory
+.
+.TP
+bundle exec(1) \fIbundle\-exec\.1\.html\fR
+Execute a script in the context of the current bundle
+.
+.TP
+bundle config(1) \fIbundle\-config\.1\.html\fR
+Specify and read configuration options for bundler
+.
+.TP
+\fBbundle help(1)\fR
+Displays detailed help for each subcommand
+.
+.SH "UTILITIES"
+.
+.TP
+\fBbundle check(1)\fR
+Determine whether the requirements for your application are installed and available to bundler
+.
+.TP
+\fBbundle list(1)\fR
+Show all of the gems in the current bundle
+.
+.TP
+\fBbundle show(1)\fR
+Show the source location of a particular gem in the bundle
+.
+.TP
+\fBbundle outdated(1)\fR
+Show all of the outdated gems in the current bundle
+.
+.TP
+\fBbundle console(1)\fR
+Start an IRB session in the context of the current bundle
+.
+.TP
+\fBbundle open(1)\fR
+Open an installed gem in the editor
+.
+.TP
+\fBbundle viz(1)\fR
+Generate a visual representation of your dependencies
+.
+.TP
+\fBbundle init(1)\fR
+Generate a simple \fBGemfile\fR, placed in the current directory
+.
+.TP
+\fBbundle gem(1)\fR
+Create a simple gem, suitable for development with bundler
+.
+.TP
+bundle platform(1) \fIbundle\-platform\.1\.html\fR
+Displays platform compatibility information
+.
+.TP
+\fBbundle clean(1)\fR
+Cleans up unused gems in your bundler directory
+.
+.SH "OBSOLETE"
+These commands are obsolete and should no longer be used
+.
+.IP "\(bu" 4
+\fBbundle lock(1)\fR
+.
+.IP "\(bu" 4
+\fBbundle unlock(1)\fR
+.
+.IP "\(bu" 4
+\fBbundle cache(1)\fR
+.
+.IP "" 0
+
diff --git a/lib/bundler/man/bundle-config b/lib/bundler/man/bundle-config
new file mode 100644
index 0000000..9aeed33
--- /dev/null
+++ b/lib/bundler/man/bundle-config
@@ -0,0 +1,161 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-CONFIG" "1" "November 2013" "" ""
+.
+.SH "NAME"
+\fBbundle\-config\fR \- Set bundler configuration options
+.
+.SH "SYNOPSIS"
+\fBbundle config\fR [\fIname\fR [\fIvalue\fR]]
+.
+.SH "DESCRIPTION"
+This command allows you to interact with bundler\'s configuration system\. Bundler retrieves its configuration from the local application (\fBapp/\.bundle/config\fR), environment variables, and the user\'s home directory (\fB~/\.bundle/config\fR), in that order of priority\.
+.
+.P
+Executing \fBbundle config\fR with no parameters will print a list of all bundler configuration for the current bundle, and where that configuration was set\.
+.
+.P
+Executing \fBbundle config <name>\fR will print the value of that configuration setting, and where it was set\.
+.
+.P
+Executing \fBbundle config <name> <value>\fR will set that configuration to the value specified for all bundles executed as the current user\. The configuration will be stored in \fB~/\.bundle/config\fR\. If \fIname\fR already is set, \fIname\fR will be overridden and user will be warned\.
+.
+.P
+Executing \fBbundle config \-\-global <name> <value>\fR works the same as above\.
+.
+.P
+Executing \fBbundle config \-\-local <name> <value>\fR will set that configuration to the local application\. The configuration will be stored in \fBapp/\.bundle/config\fR\.
+.
+.P
+Executing \fBbundle config \-\-delete <name>\fR will delete the configuration in both local and global sources\. Not compatible with \-\-global or \-\-local flag\.
+.
+.P
+Executing bundle with the \fBBUNDLE_IGNORE_CONFIG\fR environment variable set will cause it to ignore all configuration\.
+.
+.SH "BUILD OPTIONS"
+You can use \fBbundle config\fR to give bundler the flags to pass to the gem installer every time bundler tries to install a particular gem\.
+.
+.P
+A very common example, the \fBmysql\fR gem, requires Snow Leopard users to pass configuration flags to \fBgem install\fR to specify where to find the \fBmysql_config\fR executable\.
+.
+.IP "" 4
+.
+.nf
+
+gem install mysql \-\- \-\-with\-mysql\-config=/usr/local/mysql/bin/mysql_config
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Since the specific location of that executable can change from machine to machine, you can specify these flags on a per\-machine basis\.
+.
+.IP "" 4
+.
+.nf
+
+bundle config build\.mysql \-\-with\-mysql\-config=/usr/local/mysql/bin/mysql_config
+.
+.fi
+.
+.IP "" 0
+.
+.P
+After running this command, every time bundler needs to install the \fBmysql\fR gem, it will pass along the flags you specified\.
+.
+.SH "CONFIGURATION KEYS"
+Configuration keys in bundler have two forms: the canonical form and the environment variable form\.
+.
+.P
+For instance, passing the \fB\-\-without\fR flag to bundle install(1) \fIbundle\-install\.1\.html\fR prevents Bundler from installing certain groups specified in the Gemfile(5)\. Bundler persists this value in \fBapp/\.bundle/config\fR so that calls to \fBBundler\.setup\fR do not try to find gems from the \fBGemfile\fR that you didn\'t install\. Additionally, subsequent calls to bundle install(1) \fIbundle\-install\.1\.html\fR remember this setting and skip those groups\.
+.
+.P
+The canonical form of this configuration is \fB"without"\fR\. To convert the canonical form to the environment variable form, capitalize it, and prepend \fBBUNDLE_\fR\. The environment variable form of \fB"without"\fR is \fBBUNDLE_WITHOUT\fR\.
+.
+.SH "LIST OF AVAILABLE KEYS"
+The following is a list of all configuration keys and their purpose\. You can learn more about their operation in bundle install(1) \fIbundle\-install\.1\.html\fR\.
+.
+.TP
+\fBpath\fR (\fBBUNDLE_PATH\fR)
+The location on disk to install gems\. Defaults to \fB$GEM_HOME\fR in development and \fBvendor/bundler\fR when \fB\-\-deployment\fR is used
+.
+.TP
+\fBfrozen\fR (\fBBUNDLE_FROZEN\fR)
+Disallow changes to the \fBGemfile\fR\. Defaults to \fBtrue\fR when \fB\-\-deployment\fR is used\.
+.
+.TP
+\fBwithout\fR (\fBBUNDLE_WITHOUT\fR)
+A \fB:\fR\-separated list of groups whose gems bundler should not install
+.
+.TP
+\fBbin\fR (\fBBUNDLE_BIN\fR)
+Install executables from gems in the bundle to the specified directory\. Defaults to \fBfalse\fR\.
+.
+.TP
+\fBgemfile\fR (\fBBUNDLE_GEMFILE\fR)
+The name of the file that bundler should use as the \fBGemfile\fR\. This location of this file also sets the root of the project, which is used to resolve relative paths in the \fBGemfile\fR, among other things\. By default, bundler will search up from the current working directory until it finds a \fBGemfile\fR\.
+.
+.TP
+\fBssl_ca_cert\fR (\fBBUNDLE_SSL_CA_CERT\fR)
+Path to a designated CA certificate file or folder containing multiple certificates for trusted CAs in PEM format\.
+.
+.TP
+\fBssl_client_cert\fR (\fBBUNDLE_SSL_CLIENT_CERT\fR)
+Path to a designated file containing a X\.509 client certificate and key in PEM format\.
+.
+.P
+In general, you should set these settings per\-application by using the applicable flag to the bundle install(1) \fIbundle\-install\.1\.html\fR command\.
+.
+.P
+You can set them globally either via environment variables or \fBbundle config\fR, whichever is preferable for your setup\. If you use both, environment variables will take preference over global settings\.
+.
+.SH "LOCAL GIT REPOS"
+Bundler also allows you to work against a git repository locally instead of using the remote version\. This can be achieved by setting up a local override:
+.
+.IP "" 4
+.
+.nf
+
+bundle config local\.GEM_NAME /path/to/local/git/repository
+.
+.fi
+.
+.IP "" 0
+.
+.P
+For example, in order to use a local Rack repository, a developer could call:
+.
+.IP "" 4
+.
+.nf
+
+bundle config local\.rack ~/Work/git/rack
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Now instead of checking out the remote git repository, the local override will be used\. Similar to a path source, every time the local git repository change, changes will be automatically picked up by Bundler\. This means a commit in the local git repo will update the revision in the \fBGemfile\.lock\fR to the local git repo revision\. This requires the same attention as git submodules\. Before pushing to the remote, you need to ensure the local override was pushed, otherwise you may po [...]
+.
+.P
+Bundler does many checks to ensure a developer won\'t work with invalid references\. Particularly, we force a developer to specify a branch in the \fBGemfile\fR in order to use this feature\. If the branch specified in the \fBGemfile\fR and the current branch in the local git repository do not match, Bundler will abort\. This ensures that a developer is always working against the correct branches, and prevents accidental locking to a different branch\.
+.
+.P
+Finally, Bundler also ensures that the current revision in the \fBGemfile\.lock\fR exists in the local git repository\. By doing this, Bundler forces you to fetch the latest changes in the remotes\.
+.
+.SH "MIRRORS OF GEM REPOSITORIES"
+Bundler supports overriding gem sources with mirrors\. This allows you to configure rubygems\.org as the gem source in your Gemfile while still using your mirror to fetch gems\.
+.
+.IP "" 4
+.
+.nf
+
+bundle config mirror\.http://rubygems\.org http://rubygems\-mirror\.org
+.
+.fi
+.
+.IP "" 0
+
diff --git a/lib/bundler/man/bundle-config.txt b/lib/bundler/man/bundle-config.txt
new file mode 100644
index 0000000..e5b60d5
--- /dev/null
+++ b/lib/bundler/man/bundle-config.txt
@@ -0,0 +1,184 @@
+BUNDLE-CONFIG(1) BUNDLE-CONFIG(1)
+
+
+
+NAME
+ bundle-config - Set bundler configuration options
+
+SYNOPSIS
+ bundle config [name [value]]
+
+DESCRIPTION
+ This command allows you to interact with bundler's configuration sys-
+ tem. Bundler retrieves its configuration from the local application
+ (app/.bundle/config), environment variables, and the user's home direc-
+ tory (~/.bundle/config), in that order of priority.
+
+ Executing bundle config with no parameters will print a list of all
+ bundler configuration for the current bundle, and where that configura-
+ tion was set.
+
+ Executing bundle config <name> will print the value of that configura-
+ tion setting, and where it was set.
+
+ Executing bundle config <name> <value> will set that configuration to
+ the value specified for all bundles executed as the current user. The
+ configuration will be stored in ~/.bundle/config. If name already is
+ set, name will be overridden and user will be warned.
+
+ Executing bundle config --global <name> <value> works the same as
+ above.
+
+ Executing bundle config --local <name> <value> will set that configura-
+ tion to the local application. The configuration will be stored in
+ app/.bundle/config.
+
+ Executing bundle config --delete <name> will delete the configuration
+ in both local and global sources. Not compatible with --global or
+ --local flag.
+
+ Executing bundle with the BUNDLE_IGNORE_CONFIG environment variable set
+ will cause it to ignore all configuration.
+
+BUILD OPTIONS
+ You can use bundle config to give bundler the flags to pass to the gem
+ installer every time bundler tries to install a particular gem.
+
+ A very common example, the mysql gem, requires Snow Leopard users to
+ pass configuration flags to gem install to specify where to find the
+ mysql_config executable.
+
+
+
+ gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
+
+
+
+ Since the specific location of that executable can change from machine
+ to machine, you can specify these flags on a per-machine basis.
+
+
+
+ bundle config build.mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config
+
+
+
+ After running this command, every time bundler needs to install the
+ mysql gem, it will pass along the flags you specified.
+
+CONFIGURATION KEYS
+ Configuration keys in bundler have two forms: the canonical form and
+ the environment variable form.
+
+ For instance, passing the --without flag to bundle install(1) bun-
+ dle-install.1.html prevents Bundler from installing certain groups
+ specified in the Gemfile(5). Bundler persists this value in app/.bun-
+ dle/config so that calls to Bundler.setup do not try to find gems from
+ the Gemfile that you didn't install. Additionally, subsequent calls to
+ bundle install(1) bundle-install.1.html remember this setting and skip
+ those groups.
+
+ The canonical form of this configuration is "without". To convert the
+ canonical form to the environment variable form, capitalize it, and
+ prepend BUNDLE_. The environment variable form of "without" is BUN-
+ DLE_WITHOUT.
+
+LIST OF AVAILABLE KEYS
+ The following is a list of all configuration keys and their purpose.
+ You can learn more about their operation in bundle install(1) bun-
+ dle-install.1.html.
+
+ path (BUNDLE_PATH)
+ The location on disk to install gems. Defaults to $GEM_HOME in
+ development and vendor/bundler when --deployment is used
+
+ frozen (BUNDLE_FROZEN)
+ Disallow changes to the Gemfile. Defaults to true when --deploy-
+ ment is used.
+
+ without (BUNDLE_WITHOUT)
+ A :-separated list of groups whose gems bundler should not
+ install
+
+ bin (BUNDLE_BIN)
+ Install executables from gems in the bundle to the specified
+ directory. Defaults to false.
+
+ gemfile (BUNDLE_GEMFILE)
+ The name of the file that bundler should use as the Gemfile.
+ This location of this file also sets the root of the project,
+ which is used to resolve relative paths in the Gemfile, among
+ other things. By default, bundler will search up from the cur-
+ rent working directory until it finds a Gemfile.
+
+ ssl_ca_cert (BUNDLE_SSL_CA_CERT)
+ Path to a designated CA certificate file or folder containing
+ multiple certificates for trusted CAs in PEM format.
+
+ ssl_client_cert (BUNDLE_SSL_CLIENT_CERT)
+ Path to a designated file containing a X.509 client certificate
+ and key in PEM format.
+
+ In general, you should set these settings per-application by using the
+ applicable flag to the bundle install(1) bundle-install.1.html command.
+
+ You can set them globally either via environment variables or bundle
+ config, whichever is preferable for your setup. If you use both, envi-
+ ronment variables will take preference over global settings.
+
+LOCAL GIT REPOS
+ Bundler also allows you to work against a git repository locally
+ instead of using the remote version. This can be achieved by setting up
+ a local override:
+
+
+
+ bundle config local.GEM_NAME /path/to/local/git/repository
+
+
+
+ For example, in order to use a local Rack repository, a developer could
+ call:
+
+
+
+ bundle config local.rack ~/Work/git/rack
+
+
+
+ Now instead of checking out the remote git repository, the local over-
+ ride will be used. Similar to a path source, every time the local git
+ repository change, changes will be automatically picked up by Bundler.
+ This means a commit in the local git repo will update the revision in
+ the Gemfile.lock to the local git repo revision. This requires the same
+ attention as git submodules. Before pushing to the remote, you need to
+ ensure the local override was pushed, otherwise you may point to a com-
+ mit that only exists in your local machine.
+
+ Bundler does many checks to ensure a developer won't work with invalid
+ references. Particularly, we force a developer to specify a branch in
+ the Gemfile in order to use this feature. If the branch specified in
+ the Gemfile and the current branch in the local git repository do not
+ match, Bundler will abort. This ensures that a developer is always
+ working against the correct branches, and prevents accidental locking
+ to a different branch.
+
+ Finally, Bundler also ensures that the current revision in the Gem-
+ file.lock exists in the local git repository. By doing this, Bundler
+ forces you to fetch the latest changes in the remotes.
+
+MIRRORS OF GEM REPOSITORIES
+ Bundler supports overriding gem sources with mirrors. This allows you
+ to configure rubygems.org as the gem source in your Gemfile while still
+ using your mirror to fetch gems.
+
+
+
+ bundle config mirror.http://rubygems.org http://rubygems-mirror.org
+
+
+
+
+
+
+ November 2013 BUNDLE-CONFIG(1)
diff --git a/lib/bundler/man/bundle-exec b/lib/bundler/man/bundle-exec
new file mode 100644
index 0000000..4234779
--- /dev/null
+++ b/lib/bundler/man/bundle-exec
@@ -0,0 +1,159 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-EXEC" "1" "September 2013" "" ""
+.
+.SH "NAME"
+\fBbundle\-exec\fR \- Execute a command in the context of the bundle
+.
+.SH "SYNOPSIS"
+\fBbundle exec\fR [\-\-keep\-file\-descriptors] \fIcommand\fR
+.
+.SH "DESCRIPTION"
+This command executes the command, making all gems specified in the \fBGemfile(5)\fR available to \fBrequire\fR in Ruby programs\.
+.
+.P
+Essentially, if you would normally have run something like \fBrspec spec/my_spec\.rb\fR, and you want to use the gems specified in the \fBGemfile(5)\fR and installed via bundle install(1) \fIbundle\-install\.1\.html\fR, you should run \fBbundle exec rspec spec/my_spec\.rb\fR\.
+.
+.P
+Note that \fBbundle exec\fR does not require that an executable is available on your shell\'s \fB$PATH\fR\.
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-\-keep\-file\-descriptors\fR
+Exec in Ruby 2\.0 began discarding non\-standard file descriptors\. When this flag is passed, exec will revert to the 1\.9 behaviour of passing all file descriptors to the new process\.
+.
+.SH "BUNDLE INSTALL \-\-BINSTUBS"
+If you use the \fB\-\-binstubs\fR flag in bundle install(1) \fIbundle\-install\.1\.html\fR, Bundler will automatically create a directory (which defaults to \fBapp_root/bin\fR) containing all of the executables available from gems in the bundle\.
+.
+.P
+After using \fB\-\-binstubs\fR, \fBbin/rspec spec/my_spec\.rb\fR is identical to \fBbundle exec rspec spec/my_spec\.rb\fR\.
+.
+.SH "ENVIRONMENT MODIFICATIONS"
+\fBbundle exec\fR makes a number of changes to the shell environment, then executes the command you specify in full\.
+.
+.IP "\(bu" 4
+make sure that it\'s still possible to shell out to \fBbundle\fR from inside a command invoked by \fBbundle exec\fR (using \fB$BUNDLE_BIN_PATH\fR)
+.
+.IP "\(bu" 4
+put the directory containing executables (like \fBrails\fR, \fBrspec\fR, \fBrackup\fR) for your bundle on \fB$PATH\fR
+.
+.IP "\(bu" 4
+make sure that if bundler is invoked in the subshell, it uses the same \fBGemfile\fR (by setting \fBBUNDLE_GEMFILE\fR)
+.
+.IP "\(bu" 4
+add \fB\-rbundler/setup\fR to \fB$RUBYOPT\fR, which makes sure that Ruby programs invoked in the subshell can see the gems in the bundle
+.
+.IP "" 0
+.
+.P
+It also modifies Rubygems:
+.
+.IP "\(bu" 4
+disallow loading additional gems not in the bundle
+.
+.IP "\(bu" 4
+modify the \fBgem\fR method to be a no\-op if a gem matching the requirements is in the bundle, and to raise a \fBGem::LoadError\fR if it\'s not
+.
+.IP "\(bu" 4
+Define \fBGem\.refresh\fR to be a no\-op, since the source index is always frozen when using bundler, and to prevent gems from the system leaking into the environment
+.
+.IP "\(bu" 4
+Override \fBGem\.bin_path\fR to use the gems in the bundle, making system executables work
+.
+.IP "\(bu" 4
+Add all gems in the bundle into Gem\.loaded_specs
+.
+.IP "" 0
+.
+.SS "Shelling out"
+Any Ruby code that opens a subshell (like \fBsystem\fR, backticks, or \fB%x{}\fR) will automatically use the current Bundler environment\. If you need to shell out to a Ruby command that is not part of your current bundle, use the \fBwith_clean_env\fR method with a block\. Any subshells created inside the block will be given the environment present before Bundler was activated\. For example, Homebrew commands run Ruby, but don\'t work inside a bundle:
+.
+.IP "" 4
+.
+.nf
+
+Bundler\.with_clean_env do
+ `brew install wget`
+end
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Using \fBwith_clean_env\fR is also necessary if you are shelling out to a different bundle\. Any Bundler commands run in a subshell will inherit the current Gemfile, so commands that need to run in the context of a different bundle also need to use \fBwith_clean_env\fR\.
+.
+.IP "" 4
+.
+.nf
+
+Bundler\.with_clean_env do
+ Dir\.chdir "/other/bundler/project" do
+ `bundle exec \./script`
+ end
+end
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Bundler provides convenience helpers that wrap \fBsystem\fR and \fBexec\fR, and they can be used like this:
+.
+.IP "" 4
+.
+.nf
+
+Bundler\.clean_system(\'brew install wget\')
+Bundler\.clean_exec(\'brew install wget\')
+.
+.fi
+.
+.IP "" 0
+.
+.SH "RUBYGEMS PLUGINS"
+At present, the Rubygems plugin system requires all files named \fBrubygems_plugin\.rb\fR on the load path of \fIany\fR installed gem when any Ruby code requires \fBrubygems\.rb\fR\. This includes executables installed into the system, like \fBrails\fR, \fBrackup\fR, and \fBrspec\fR\.
+.
+.P
+Since Rubygems plugins can contain arbitrary Ruby code, they commonly end up activating themselves or their dependencies\.
+.
+.P
+For instance, the \fBgemcutter 0\.5\fR gem depended on \fBjson_pure\fR\. If you had that version of gemcutter installed (even if you \fIalso\fR had a newer version without this problem), Rubygems would activate \fBgemcutter 0\.5\fR and \fBjson_pure <latest>\fR\.
+.
+.P
+If your Gemfile(5) also contained \fBjson_pure\fR (or a gem with a dependency on \fBjson_pure\fR), the latest version on your system might conflict with the version in your Gemfile(5), or the snapshot version in your \fBGemfile\.lock\fR\.
+.
+.P
+If this happens, bundler will say:
+.
+.IP "" 4
+.
+.nf
+
+You have already activated json_pure 1\.4\.6 but your Gemfile
+requires json_pure 1\.4\.3\. Consider using bundle exec\.
+.
+.fi
+.
+.IP "" 0
+.
+.P
+In this situation, you almost certainly want to remove the underlying gem with the problematic gem plugin\. In general, the authors of these plugins (in this case, the \fBgemcutter\fR gem) have released newer versions that are more careful in their plugins\.
+.
+.P
+You can find a list of all the gems containing gem plugins by running
+.
+.IP "" 4
+.
+.nf
+
+ruby \-rubygems \-e "puts Gem\.find_files(\'rubygems_plugin\.rb\')"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+At the very least, you should remove all but the newest version of each gem plugin, and also remove all gem plugins that you aren\'t using (\fBgem uninstall gem_name\fR)\.
diff --git a/lib/bundler/man/bundle-exec.txt b/lib/bundler/man/bundle-exec.txt
new file mode 100644
index 0000000..94cde24
--- /dev/null
+++ b/lib/bundler/man/bundle-exec.txt
@@ -0,0 +1,163 @@
+BUNDLE-EXEC(1) BUNDLE-EXEC(1)
+
+
+
+NAME
+ bundle-exec - Execute a command in the context of the bundle
+
+SYNOPSIS
+ bundle exec [--keep-file-descriptors] command
+
+DESCRIPTION
+ This command executes the command, making all gems specified in the
+ Gemfile(5) available to require in Ruby programs.
+
+ Essentially, if you would normally have run something like rspec
+ spec/my_spec.rb, and you want to use the gems specified in the Gem-
+ file(5) and installed via bundle install(1) bundle-install.1.html, you
+ should run bundle exec rspec spec/my_spec.rb.
+
+ Note that bundle exec does not require that an executable is available
+ on your shell's $PATH.
+
+OPTIONS
+ --keep-file-descriptors
+ Exec in Ruby 2.0 began discarding non-standard file descriptors.
+ When this flag is passed, exec will revert to the 1.9 behaviour
+ of passing all file descriptors to the new process.
+
+BUNDLE INSTALL --BINSTUBS
+ If you use the --binstubs flag in bundle install(1) bun-
+ dle-install.1.html, Bundler will automatically create a directory
+ (which defaults to app_root/bin) containing all of the executables
+ available from gems in the bundle.
+
+ After using --binstubs, bin/rspec spec/my_spec.rb is identical to bun-
+ dle exec rspec spec/my_spec.rb.
+
+ENVIRONMENT MODIFICATIONS
+ bundle exec makes a number of changes to the shell environment, then
+ executes the command you specify in full.
+
+ o make sure that it's still possible to shell out to bundle from
+ inside a command invoked by bundle exec (using $BUNDLE_BIN_PATH)
+
+ o put the directory containing executables (like rails, rspec,
+ rackup) for your bundle on $PATH
+
+ o make sure that if bundler is invoked in the subshell, it uses the
+ same Gemfile (by setting BUNDLE_GEMFILE)
+
+ o add -rbundler/setup to $RUBYOPT, which makes sure that Ruby pro-
+ grams invoked in the subshell can see the gems in the bundle
+
+
+
+ It also modifies Rubygems:
+
+ o disallow loading additional gems not in the bundle
+
+ o modify the gem method to be a no-op if a gem matching the require-
+ ments is in the bundle, and to raise a Gem::LoadError if it's not
+
+ o Define Gem.refresh to be a no-op, since the source index is always
+ frozen when using bundler, and to prevent gems from the system
+ leaking into the environment
+
+ o Override Gem.bin_path to use the gems in the bundle, making system
+ executables work
+
+ o Add all gems in the bundle into Gem.loaded_specs
+
+
+
+ Shelling out
+ Any Ruby code that opens a subshell (like system, backticks, or %x{})
+ will automatically use the current Bundler environment. If you need to
+ shell out to a Ruby command that is not part of your current bundle,
+ use the with_clean_env method with a block. Any subshells created
+ inside the block will be given the environment present before Bundler
+ was activated. For example, Homebrew commands run Ruby, but don't work
+ inside a bundle:
+
+
+
+ Bundler.with_clean_env do
+ `brew install wget`
+ end
+
+
+
+ Using with_clean_env is also necessary if you are shelling out to a
+ different bundle. Any Bundler commands run in a subshell will inherit
+ the current Gemfile, so commands that need to run in the context of a
+ different bundle also need to use with_clean_env.
+
+
+
+ Bundler.with_clean_env do
+ Dir.chdir "/other/bundler/project" do
+ `bundle exec ./script`
+ end
+ end
+
+
+
+ Bundler provides convenience helpers that wrap system and exec, and
+ they can be used like this:
+
+
+
+ Bundler.clean_system('brew install wget')
+ Bundler.clean_exec('brew install wget')
+
+
+
+RUBYGEMS PLUGINS
+ At present, the Rubygems plugin system requires all files named
+ rubygems_plugin.rb on the load path of any installed gem when any Ruby
+ code requires rubygems.rb. This includes executables installed into the
+ system, like rails, rackup, and rspec.
+
+ Since Rubygems plugins can contain arbitrary Ruby code, they commonly
+ end up activating themselves or their dependencies.
+
+ For instance, the gemcutter 0.5 gem depended on json_pure. If you had
+ that version of gemcutter installed (even if you also had a newer ver-
+ sion without this problem), Rubygems would activate gemcutter 0.5 and
+ json_pure <latest>.
+
+ If your Gemfile(5) also contained json_pure (or a gem with a dependency
+ on json_pure), the latest version on your system might conflict with
+ the version in your Gemfile(5), or the snapshot version in your Gem-
+ file.lock.
+
+ If this happens, bundler will say:
+
+
+
+ You have already activated json_pure 1.4.6 but your Gemfile
+ requires json_pure 1.4.3. Consider using bundle exec.
+
+
+
+ In this situation, you almost certainly want to remove the underlying
+ gem with the problematic gem plugin. In general, the authors of these
+ plugins (in this case, the gemcutter gem) have released newer versions
+ that are more careful in their plugins.
+
+ You can find a list of all the gems containing gem plugins by running
+
+
+
+ ruby -rubygems -e "puts Gem.find_files('rubygems_plugin.rb')"
+
+
+
+ At the very least, you should remove all but the newest version of each
+ gem plugin, and also remove all gem plugins that you aren't using (gem
+ uninstall gem_name).
+
+
+
+ September 2013 BUNDLE-EXEC(1)
diff --git a/lib/bundler/man/bundle-install b/lib/bundler/man/bundle-install
new file mode 100644
index 0000000..9fd469f
--- /dev/null
+++ b/lib/bundler/man/bundle-install
@@ -0,0 +1,327 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-INSTALL" "1" "November 2013" "" ""
+.
+.SH "NAME"
+\fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
+.
+.SH "SYNOPSIS"
+\fBbundle install\fR [\-\-gemfile=GEMFILE]
+.
+.IP "" 4
+.
+.nf
+
+ [\-\-path PATH] [\-\-system]
+ [\-\-without=GROUP1[ GROUP2\.\.\.]]
+ [\-\-local] [\-\-deployment]
+ [\-\-binstubs[=DIRECTORY]]
+ [\-\-standalone[=GROUP1[ GROUP2\.\.\.]]]
+ [\-\-trust\-policy=POLICY]
+ [\-\-jobs=SIZE]
+ [\-\-retry=TRIES]
+ [\-\-no\-cache]
+ [\-\-quiet]
+.
+.fi
+.
+.IP "" 0
+.
+.SH "DESCRIPTION"
+Install the gems specified in your Gemfile(5)\. If this is the first time you run bundle install (and a \fBGemfile\.lock\fR does not exist), bundler will fetch all remote sources, resolve dependencies and install all needed gems\.
+.
+.P
+If a \fBGemfile\.lock\fR does exist, and you have not updated your Gemfile(5), bundler will fetch all remote sources, but use the dependencies specified in the \fBGemfile\.lock\fR instead of resolving dependencies\.
+.
+.P
+If a \fBGemfile\.lock\fR does exist, and you have updated your Gemfile(5), bundler will use the dependencies in the \fBGemfile\.lock\fR for all gems that you did not update, but will re\-resolve the dependencies of gems that you did update\. You can find more information about this update process below under \fICONSERVATIVE UPDATING\fR\.
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-\-gemfile=<gemfile>\fR
+The location of the Gemfile(5) that bundler should use\. This defaults to a gemfile in the current working directory\. In general, bundler will assume that the location of the Gemfile(5) is also the project root, and will look for the \fBGemfile\.lock\fR and \fBvendor/cache\fR relative to it\.
+.
+.TP
+\fB\-\-path=<path>\fR
+The location to install the gems in the bundle to\. This defaults to Rubygems\' gem home, which is also the default location where \fBgem install\fR installs gems\. This means that, by default, gems installed without a \fB\-\-path\fR setting will show up in \fBgem list\fR\. This setting is a \fIremembered option\fR\.
+.
+.TP
+\fB\-\-system\fR
+Installs the gems in the bundle to the system location\. This overrides any previous \fIremembered\fR use of \fB\-\-path\fR\.
+.
+.TP
+\fB\-\-without=<list>\fR
+A space\-separated list of groups to skip installing\. This is a \fIremembered option\fR\.
+.
+.TP
+\fB\-\-local\fR
+Do not attempt to connect to \fBrubygems\.org\fR, instead using just the gems already present in Rubygems\' cache or in \fBvendor/cache\fR\. Note that if a more appropriate platform\-specific gem exists on \fBrubygems\.org\fR, it will not be found\. This option implies \fB\-\-no\-cache\fR\.
+.
+.TP
+\fB\-\-deployment\fR
+Switches bundler\'s defaults into \fIdeployment mode\fR\. Do not use this flag on development machines\.
+.
+.TP
+\fB\-\-binstubs[=<directory>]\fR
+Create a directory (defaults to \fBbin\fR) containing an executable that runs in the context of the bundle\. For instance, if the \fBrails\fR gem comes with a \fBrails\fR executable, this flag will create a \fBbin/rails\fR executable that ensures that all dependencies used come from the bundled gems\.
+.
+.TP
+\fB\-\-shebang ruby\-install\-name\fR
+Uses the ruby executable (usually \fBruby\fR) provided to execute the scripts created with \-\-binstubs\. For instance, if you use \-\-binstubs with \fB\-\-shebang jruby\fR, all executables will be created to use jruby instead\.
+.
+.TP
+\fB\-\-standalone[=<list>]\fR
+Make a bundle that can work without Ruby Gems or Bundler at runtime\. It takes a space separated list of groups to install\. It creates a \fBbundle\fR directory and installs the bundle there\. It also generates a \fBbundle/bundler/setup\.rb\fR file to replace Bundler\'s own setup\.
+.
+.TP
+\fB\-\-trust\-policy=[<policy>]\fR
+Apply the Rubygems security policy named \fIpolicy\fR, where policy is one of HighSecurity, MediumSecurity, LowSecurity, or NoSecurity\. For more detail, see the Rubygems signing documentation, linked below in \fISEE ALSO\fR\.
+.
+.TP
+\fB\-\-jobs=[<size>]\fR
+Install gems parallely by starting \fIsize\fR number of parallel workers\.
+.
+.TP
+\fB\-\-retry[<tries]\fR
+Retries failed network or git requests \fItries\fR times\.
+.
+.TP
+\fB\-\-no\-cache\fR
+Do not update the cache in \fBvendor/cache\fR with the newly bundled gems\. This does not remove any existing cached gems, only stops the newly bundled gems from being cached during the install\.
+.
+.TP
+\fB\-\-quiet\fR
+Do not print progress information to stdout\. Instead, communicate the success of the install operation via exit status code\.
+.
+.SH "DEPLOYMENT MODE"
+Bundler\'s defaults are optimized for development\. To switch to defaults optimized for deployment, use the \fB\-\-deployment\fR flag\. Do not activate deployment mode on development machines, as it will cause in an error when the Gemfile is modified\.
+.
+.IP "1." 4
+A \fBGemfile\.lock\fR is required\.
+.
+.IP
+To ensure that the same versions of the gems you developed with and tested with are also used in deployments, a \fBGemfile\.lock\fR is required\.
+.
+.IP
+This is mainly to ensure that you remember to check your \fBGemfile\.lock\fR into version control\.
+.
+.IP "2." 4
+The \fBGemfile\.lock\fR must be up to date
+.
+.IP
+In development, you can modify your Gemfile(5) and re\-run \fBbundle install\fR to \fIconservatively update\fR your \fBGemfile\.lock\fR snapshot\.
+.
+.IP
+In deployment, your \fBGemfile\.lock\fR should be up\-to\-date with changes made in your Gemfile(5)\.
+.
+.IP "3." 4
+Gems are installed to \fBvendor/bundle\fR not your default system location
+.
+.IP
+In development, it\'s convenient to share the gems used in your application with other applications and other scripts run on the system\.
+.
+.IP
+In deployment, isolation is a more important default\. In addition, the user deploying the application may not have permission to install gems to the system, or the web server may not have permission to read them\.
+.
+.IP
+As a result, \fBbundle install \-\-deployment\fR installs gems to the \fBvendor/bundle\fR directory in the application\. This may be overridden using the \fB\-\-path\fR option\.
+.
+.IP "" 0
+.
+.SH "SUDO USAGE"
+By default, bundler installs gems to the same location as \fBgem install\fR\.
+.
+.P
+In some cases, that location may not be writable by your Unix user\. In that case, bundler will stage everything in a temporary directory, then ask you for your \fBsudo\fR password in order to copy the gems into their system location\.
+.
+.P
+From your perspective, this is identical to installing them gems directly into the system\.
+.
+.P
+You should never use \fBsudo bundle install\fR\. This is because several other steps in \fBbundle install\fR must be performed as the current user:
+.
+.IP "\(bu" 4
+Updating your \fBGemfile\.lock\fR
+.
+.IP "\(bu" 4
+Updating your \fBvendor/cache\fR, if necessary
+.
+.IP "\(bu" 4
+Checking out private git repositories using your user\'s SSH keys
+.
+.IP "" 0
+.
+.P
+Of these three, the first two could theoretically be performed by \fBchown\fRing the resulting files to \fB$SUDO_USER\fR\. The third, however, can only be performed by actually invoking the \fBgit\fR command as the current user\. Therefore, git gems are downloaded and installed into \fB~/\.bundle\fR rather than $GEM_HOME or $BUNDLE_PATH\.
+.
+.P
+As a result, you should run \fBbundle install\fR as the current user, and bundler will ask for your password if it is needed to put the gems into their final location\.
+.
+.SH "INSTALLING GROUPS"
+By default, \fBbundle install\fR will install all gems in all groups in your Gemfile(5), except those declared for a different platform\.
+.
+.P
+However, you can explicitly tell bundler to skip installing certain groups with the \fB\-\-without\fR option\. This option takes a space\-separated list of groups\.
+.
+.P
+While the \fB\-\-without\fR option will skip \fIinstalling\fR the gems in the specified groups, it will still \fIdownload\fR those gems and use them to resolve the dependencies of every gem in your Gemfile(5)\.
+.
+.P
+This is so that installing a different set of groups on another machine (such as a production server) will not change the gems and versions that you have already developed and tested against\.
+.
+.P
+\fBBundler offers a rock\-solid guarantee that the third\-party code you are running in development and testing is also the third\-party code you are running in production\. You can choose to exclude some of that code in different environments, but you will never be caught flat\-footed by different versions of third\-party code being used in different environments\.\fR
+.
+.P
+For a simple illustration, consider the following Gemfile(5):
+.
+.IP "" 4
+.
+.nf
+
+source "https://rubygems\.org"
+
+gem "sinatra"
+
+group :production do
+ gem "rack\-perftools\-profiler"
+end
+.
+.fi
+.
+.IP "" 0
+.
+.P
+In this case, \fBsinatra\fR depends on any version of Rack (\fB>= 1\.0\fR, while \fBrack\-perftools\-profiler\fR depends on 1\.x (\fB~> 1\.0\fR)\.
+.
+.P
+When you run \fBbundle install \-\-without production\fR in development, we look at the dependencies of \fBrack\-perftools\-profiler\fR as well\. That way, you do not spend all your time developing against Rack 2\.0, using new APIs unavailable in Rack 1\.x, only to have bundler switch to Rack 1\.2 when the \fBproduction\fR group \fIis\fR used\.
+.
+.P
+This should not cause any problems in practice, because we do not attempt to \fBinstall\fR the gems in the excluded groups, and only evaluate as part of the dependency resolution process\.
+.
+.P
+This also means that you cannot include different versions of the same gem in different groups, because doing so would result in different sets of dependencies used in development and production\. Because of the vagaries of the dependency resolution process, this usually affects more than just the gems you list in your Gemfile(5), and can (surprisingly) radically change the gems you are using\.
+.
+.SH "REMEMBERED OPTIONS"
+Some options (marked above in the \fIOPTIONS\fR section) are remembered between calls to \fBbundle install\fR, and by the Bundler runtime\.
+.
+.P
+For instance, if you run \fBbundle install \-\-without test\fR, a subsequent call to \fBbundle install\fR that does not include a \fB\-\-without\fR flag will remember your previous choice\.
+.
+.P
+In addition, a call to \fBBundler\.setup\fR will not attempt to make the gems in those groups available on the Ruby load path, as they were not installed\.
+.
+.P
+The settings that are remembered are:
+.
+.TP
+\fB\-\-deployment\fR
+At runtime, this remembered setting will also result in Bundler raising an exception if the \fBGemfile\.lock\fR is out of date\.
+.
+.TP
+\fB\-\-path\fR
+Subsequent calls to \fBbundle install\fR will install gems to the directory originally passed to \fB\-\-path\fR\. The Bundler runtime will look for gems in that location\. You can revert this option by running \fBbundle install \-\-system\fR\.
+.
+.TP
+\fB\-\-binstubs\fR
+Bundler will update the executables every subsequent call to \fBbundle install\fR\.
+.
+.TP
+\fB\-\-without\fR
+As described above, Bundler will skip the gems specified by \fB\-\-without\fR in subsequent calls to \fBbundle install\fR\. The Bundler runtime will also not try to make the gems in the skipped groups available\.
+.
+.SH "THE GEMFILE\.LOCK"
+When you run \fBbundle install\fR, Bundler will persist the full names and versions of all gems that you used (including dependencies of the gems specified in the Gemfile(5)) into a file called \fBGemfile\.lock\fR\.
+.
+.P
+Bundler uses this file in all subsequent calls to \fBbundle install\fR, which guarantees that you always use the same exact code, even as your application moves across machines\.
+.
+.P
+Because of the way dependency resolution works, even a seemingly small change (for instance, an update to a point\-release of a dependency of a gem in your Gemfile(5)) can result in radically different gems being needed to satisfy all dependencies\.
+.
+.P
+As a result, you \fBSHOULD\fR check your \fBGemfile\.lock\fR into version control\. If you do not, every machine that checks out your repository (including your production server) will resolve all dependencies again, which will result in different versions of third\-party code being used if \fBany\fR of the gems in the Gemfile(5) or any of their dependencies have been updated\.
+.
+.SH "CONSERVATIVE UPDATING"
+When you make a change to the Gemfile(5) and then run \fBbundle install\fR, Bundler will update only the gems that you modified\.
+.
+.P
+In other words, if a gem that you \fBdid not modify\fR worked before you called \fBbundle install\fR, it will continue to use the exact same versions of all dependencies as it used before the update\.
+.
+.P
+Let\'s take a look at an example\. Here\'s your original Gemfile(5):
+.
+.IP "" 4
+.
+.nf
+
+source "https://rubygems\.org"
+
+gem "actionpack", "2\.3\.8"
+gem "activemerchant"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+In this case, both \fBactionpack\fR and \fBactivemerchant\fR depend on \fBactivesupport\fR\. The \fBactionpack\fR gem depends on \fBactivesupport 2\.3\.8\fR and \fBrack ~> 1\.1\.0\fR, while the \fBactivemerchant\fR gem depends on \fBactivesupport >= 2\.3\.2\fR, \fBbraintree >= 2\.0\.0\fR, and \fBbuilder >= 2\.0\.0\fR\.
+.
+.P
+When the dependencies are first resolved, Bundler will select \fBactivesupport 2\.3\.8\fR, which satisfies the requirements of both gems in your Gemfile(5)\.
+.
+.P
+Next, you modify your Gemfile(5) to:
+.
+.IP "" 4
+.
+.nf
+
+source "https://rubygems\.org"
+
+gem "actionpack", "3\.0\.0\.rc"
+gem "activemerchant"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+The \fBactionpack 3\.0\.0\.rc\fR gem has a number of new dependencies, and updates the \fBactivesupport\fR dependency to \fB= 3\.0\.0\.rc\fR and the \fBrack\fR dependency to \fB~> 1\.2\.1\fR\.
+.
+.P
+When you run \fBbundle install\fR, Bundler notices that you changed the \fBactionpack\fR gem, but not the \fBactivemerchant\fR gem\. It evaluates the gems currently being used to satisfy its requirements:
+.
+.TP
+\fBactivesupport 2\.3\.8\fR
+also used to satisfy a dependency in \fBactivemerchant\fR, which is not being updated
+.
+.TP
+\fBrack ~> 1\.1\.0\fR
+not currently being used to satisfy another dependency
+.
+.P
+Because you did not explicitly ask to update \fBactivemerchant\fR, you would not expect it to suddenly stop working after updating \fBactionpack\fR\. However, satisfying the new \fBactivesupport 3\.0\.0\.rc\fR dependency of actionpack requires updating one of its dependencies\.
+.
+.P
+Even though \fBactivemerchant\fR declares a very loose dependency that theoretically matches \fBactivesupport 3\.0\.0\.rc\fR, bundler treats gems in your Gemfile(5) that have not changed as an atomic unit together with their dependencies\. In this case, the \fBactivemerchant\fR dependency is treated as \fBactivemerchant 1\.7\.1 + activesupport 2\.3\.8\fR, so \fBbundle install\fR will report that it cannot update \fBactionpack\fR\.
+.
+.P
+To explicitly update \fBactionpack\fR, including its dependencies which other gems in the Gemfile(5) still depend on, run \fBbundle update actionpack\fR (see \fBbundle update(1)\fR)\.
+.
+.P
+\fBSummary\fR: In general, after making a change to the Gemfile(5) , you should first try to run \fBbundle install\fR, which will guarantee that no other gems in the Gemfile(5) are impacted by the change\. If that does not work, run bundle update(1) \fIbundle\-update\.1\.html\fR\.
+.
+.SH "SEE ALSO"
+.
+.IP "\(bu" 4
+Gem install docs: http://docs\.rubygems\.org/read/chapter/2
+.
+.IP "\(bu" 4
+Rubygems signing docs: http://docs\.rubygems\.org/read/chapter/21
+.
+.IP "" 0
+
diff --git a/lib/bundler/man/bundle-install.txt b/lib/bundler/man/bundle-install.txt
new file mode 100644
index 0000000..543804d
--- /dev/null
+++ b/lib/bundler/man/bundle-install.txt
@@ -0,0 +1,387 @@
+BUNDLE-INSTALL(1) BUNDLE-INSTALL(1)
+
+
+
+NAME
+ bundle-install - Install the dependencies specified in your Gemfile
+
+SYNOPSIS
+ bundle install [--gemfile=GEMFILE]
+
+
+
+ [--path PATH] [--system]
+ [--without=GROUP1[ GROUP2...]]
+ [--local] [--deployment]
+ [--binstubs[=DIRECTORY]]
+ [--standalone[=GROUP1[ GROUP2...]]]
+ [--trust-policy=POLICY]
+ [--jobs=SIZE]
+ [--retry=TRIES]
+ [--no-cache]
+ [--quiet]
+
+
+
+DESCRIPTION
+ Install the gems specified in your Gemfile(5). If this is the first
+ time you run bundle install (and a Gemfile.lock does not exist),
+ bundler will fetch all remote sources, resolve dependencies and install
+ all needed gems.
+
+ If a Gemfile.lock does exist, and you have not updated your Gemfile(5),
+ bundler will fetch all remote sources, but use the dependencies speci-
+ fied in the Gemfile.lock instead of resolving dependencies.
+
+ If a Gemfile.lock does exist, and you have updated your Gemfile(5),
+ bundler will use the dependencies in the Gemfile.lock for all gems that
+ you did not update, but will re-resolve the dependencies of gems that
+ you did update. You can find more information about this update process
+ below under CONSERVATIVE UPDATING.
+
+OPTIONS
+ --gemfile=<gemfile>
+ The location of the Gemfile(5) that bundler should use. This
+ defaults to a gemfile in the current working directory. In gen-
+ eral, bundler will assume that the location of the Gemfile(5) is
+ also the project root, and will look for the Gemfile.lock and
+ vendor/cache relative to it.
+
+ --path=<path>
+ The location to install the gems in the bundle to. This defaults
+ to Rubygems' gem home, which is also the default location where
+ gem install installs gems. This means that, by default, gems
+ installed without a --path setting will show up in gem list.
+ This setting is a remembered option.
+
+ --system
+ Installs the gems in the bundle to the system location. This
+ overrides any previous remembered use of --path.
+
+ --without=<list>
+ A space-separated list of groups to skip installing. This is a
+ remembered option.
+
+ --local
+ Do not attempt to connect to rubygems.org, instead using just
+ the gems already present in Rubygems' cache or in vendor/cache.
+ Note that if a more appropriate platform-specific gem exists on
+ rubygems.org, it will not be found. This option implies
+ --no-cache.
+
+ --deployment
+ Switches bundler's defaults into deployment mode. Do not use
+ this flag on development machines.
+
+ --binstubs[=<directory>]
+ Create a directory (defaults to bin) containing an executable
+ that runs in the context of the bundle. For instance, if the
+ rails gem comes with a rails executable, this flag will create a
+ bin/rails executable that ensures that all dependencies used
+ come from the bundled gems.
+
+ --shebang ruby-install-name
+ Uses the ruby executable (usually ruby) provided to execute the
+ scripts created with --binstubs. For instance, if you use --bin-
+ stubs with --shebang jruby, all executables will be created to
+ use jruby instead.
+
+ --standalone[=<list>]
+ Make a bundle that can work without Ruby Gems or Bundler at run-
+ time. It takes a space separated list of groups to install. It
+ creates a bundle directory and installs the bundle there. It
+ also generates a bundle/bundler/setup.rb file to replace
+ Bundler's own setup.
+
+ --trust-policy=[<policy>]
+ Apply the Rubygems security policy named policy, where policy is
+ one of HighSecurity, MediumSecurity, LowSecurity, or NoSecurity.
+ For more detail, see the Rubygems signing documentation, linked
+ below in SEE ALSO.
+
+ --jobs=[<size>]
+ Install gems parallely by starting size number of parallel work-
+ ers.
+
+ --retry[<tries]
+ Retries failed network or git requests tries times.
+
+ --no-cache
+ Do not update the cache in vendor/cache with the newly bundled
+ gems. This does not remove any existing cached gems, only stops
+ the newly bundled gems from being cached during the install.
+
+ --quiet
+ Do not print progress information to stdout. Instead, communi-
+ cate the success of the install operation via exit status code.
+
+DEPLOYMENT MODE
+ Bundler's defaults are optimized for development. To switch to defaults
+ optimized for deployment, use the --deployment flag. Do not activate
+ deployment mode on development machines, as it will cause in an error
+ when the Gemfile is modified.
+
+ 1. A Gemfile.lock is required.
+
+ To ensure that the same versions of the gems you developed with and
+ tested with are also used in deployments, a Gemfile.lock is
+ required.
+
+ This is mainly to ensure that you remember to check your Gem-
+ file.lock into version control.
+
+ 2. The Gemfile.lock must be up to date
+
+ In development, you can modify your Gemfile(5) and re-run bundle
+ install to conservatively update your Gemfile.lock snapshot.
+
+ In deployment, your Gemfile.lock should be up-to-date with changes
+ made in your Gemfile(5).
+
+ 3. Gems are installed to vendor/bundle not your default system loca-
+ tion
+
+ In development, it's convenient to share the gems used in your
+ application with other applications and other scripts run on the
+ system.
+
+ In deployment, isolation is a more important default. In addition,
+ the user deploying the application may not have permission to
+ install gems to the system, or the web server may not have permis-
+ sion to read them.
+
+ As a result, bundle install --deployment installs gems to the ven-
+ dor/bundle directory in the application. This may be overridden
+ using the --path option.
+
+
+
+SUDO USAGE
+ By default, bundler installs gems to the same location as gem install.
+
+ In some cases, that location may not be writable by your Unix user. In
+ that case, bundler will stage everything in a temporary directory, then
+ ask you for your sudo password in order to copy the gems into their
+ system location.
+
+ From your perspective, this is identical to installing them gems
+ directly into the system.
+
+ You should never use sudo bundle install. This is because several other
+ steps in bundle install must be performed as the current user:
+
+ o Updating your Gemfile.lock
+
+ o Updating your vendor/cache, if necessary
+
+ o Checking out private git repositories using your user's SSH keys
+
+
+
+ Of these three, the first two could theoretically be performed by
+ chowning the resulting files to $SUDO_USER. The third, however, can
+ only be performed by actually invoking the git command as the current
+ user. Therefore, git gems are downloaded and installed into ~/.bundle
+ rather than $GEM_HOME or $BUNDLE_PATH.
+
+ As a result, you should run bundle install as the current user, and
+ bundler will ask for your password if it is needed to put the gems into
+ their final location.
+
+INSTALLING GROUPS
+ By default, bundle install will install all gems in all groups in your
+ Gemfile(5), except those declared for a different platform.
+
+ However, you can explicitly tell bundler to skip installing certain
+ groups with the --without option. This option takes a space-separated
+ list of groups.
+
+ While the --without option will skip installing the gems in the speci-
+ fied groups, it will still download those gems and use them to resolve
+ the dependencies of every gem in your Gemfile(5).
+
+ This is so that installing a different set of groups on another machine
+ (such as a production server) will not change the gems and versions
+ that you have already developed and tested against.
+
+ Bundler offers a rock-solid guarantee that the third-party code you are
+ running in development and testing is also the third-party code you are
+ running in production. You can choose to exclude some of that code in
+ different environments, but you will never be caught flat-footed by
+ different versions of third-party code being used in different environ-
+ ments.
+
+ For a simple illustration, consider the following Gemfile(5):
+
+
+
+ source "https://rubygems.org"
+
+ gem "sinatra"
+
+ group :production do
+ gem "rack-perftools-profiler"
+ end
+
+
+
+ In this case, sinatra depends on any version of Rack (>= 1.0, while
+ rack-perftools-profiler depends on 1.x (~> 1.0).
+
+ When you run bundle install --without production in development, we
+ look at the dependencies of rack-perftools-profiler as well. That way,
+ you do not spend all your time developing against Rack 2.0, using new
+ APIs unavailable in Rack 1.x, only to have bundler switch to Rack 1.2
+ when the production group is used.
+
+ This should not cause any problems in practice, because we do not
+ attempt to install the gems in the excluded groups, and only evaluate
+ as part of the dependency resolution process.
+
+ This also means that you cannot include different versions of the same
+ gem in different groups, because doing so would result in different
+ sets of dependencies used in development and production. Because of the
+ vagaries of the dependency resolution process, this usually affects
+ more than just the gems you list in your Gemfile(5), and can (surpris-
+ ingly) radically change the gems you are using.
+
+REMEMBERED OPTIONS
+ Some options (marked above in the OPTIONS section) are remembered
+ between calls to bundle install, and by the Bundler runtime.
+
+ For instance, if you run bundle install --without test, a subsequent
+ call to bundle install that does not include a --without flag will
+ remember your previous choice.
+
+ In addition, a call to Bundler.setup will not attempt to make the gems
+ in those groups available on the Ruby load path, as they were not
+ installed.
+
+ The settings that are remembered are:
+
+ --deployment
+ At runtime, this remembered setting will also result in Bundler
+ raising an exception if the Gemfile.lock is out of date.
+
+ --path Subsequent calls to bundle install will install gems to the
+ directory originally passed to --path. The Bundler runtime will
+ look for gems in that location. You can revert this option by
+ running bundle install --system.
+
+ --binstubs
+ Bundler will update the executables every subsequent call to
+ bundle install.
+
+ --without
+ As described above, Bundler will skip the gems specified by
+ --without in subsequent calls to bundle install. The Bundler
+ runtime will also not try to make the gems in the skipped groups
+ available.
+
+THE GEMFILE.LOCK
+ When you run bundle install, Bundler will persist the full names and
+ versions of all gems that you used (including dependencies of the gems
+ specified in the Gemfile(5)) into a file called Gemfile.lock.
+
+ Bundler uses this file in all subsequent calls to bundle install, which
+ guarantees that you always use the same exact code, even as your appli-
+ cation moves across machines.
+
+ Because of the way dependency resolution works, even a seemingly small
+ change (for instance, an update to a point-release of a dependency of a
+ gem in your Gemfile(5)) can result in radically different gems being
+ needed to satisfy all dependencies.
+
+ As a result, you SHOULD check your Gemfile.lock into version control.
+ If you do not, every machine that checks out your repository (including
+ your production server) will resolve all dependencies again, which will
+ result in different versions of third-party code being used if any of
+ the gems in the Gemfile(5) or any of their dependencies have been
+ updated.
+
+CONSERVATIVE UPDATING
+ When you make a change to the Gemfile(5) and then run bundle install,
+ Bundler will update only the gems that you modified.
+
+ In other words, if a gem that you did not modify worked before you
+ called bundle install, it will continue to use the exact same versions
+ of all dependencies as it used before the update.
+
+ Let's take a look at an example. Here's your original Gemfile(5):
+
+
+
+ source "https://rubygems.org"
+
+ gem "actionpack", "2.3.8"
+ gem "activemerchant"
+
+
+
+ In this case, both actionpack and activemerchant depend on activesup-
+ port. The actionpack gem depends on activesupport 2.3.8 and rack ~>
+ 1.1.0, while the activemerchant gem depends on activesupport >= 2.3.2,
+ braintree >= 2.0.0, and builder >= 2.0.0.
+
+ When the dependencies are first resolved, Bundler will select
+ activesupport 2.3.8, which satisfies the requirements of both gems in
+ your Gemfile(5).
+
+ Next, you modify your Gemfile(5) to:
+
+
+
+ source "https://rubygems.org"
+
+ gem "actionpack", "3.0.0.rc"
+ gem "activemerchant"
+
+
+
+ The actionpack 3.0.0.rc gem has a number of new dependencies, and
+ updates the activesupport dependency to = 3.0.0.rc and the rack depen-
+ dency to ~> 1.2.1.
+
+ When you run bundle install, Bundler notices that you changed the
+ actionpack gem, but not the activemerchant gem. It evaluates the gems
+ currently being used to satisfy its requirements:
+
+ activesupport 2.3.8
+ also used to satisfy a dependency in activemerchant, which is
+ not being updated
+
+ rack ~> 1.1.0
+ not currently being used to satisfy another dependency
+
+ Because you did not explicitly ask to update activemerchant, you would
+ not expect it to suddenly stop working after updating actionpack. How-
+ ever, satisfying the new activesupport 3.0.0.rc dependency of action-
+ pack requires updating one of its dependencies.
+
+ Even though activemerchant declares a very loose dependency that theo-
+ retically matches activesupport 3.0.0.rc, bundler treats gems in your
+ Gemfile(5) that have not changed as an atomic unit together with their
+ dependencies. In this case, the activemerchant dependency is treated as
+ activemerchant 1.7.1 + activesupport 2.3.8, so bundle install will
+ report that it cannot update actionpack.
+
+ To explicitly update actionpack, including its dependencies which other
+ gems in the Gemfile(5) still depend on, run bundle update actionpack
+ (see bundle update(1)).
+
+ Summary: In general, after making a change to the Gemfile(5) , you
+ should first try to run bundle install, which will guarantee that no
+ other gems in the Gemfile(5) are impacted by the change. If that does
+ not work, run bundle update(1) bundle-update.1.html.
+
+SEE ALSO
+ o Gem install docs: http://docs.rubygems.org/read/chapter/2
+
+ o Rubygems signing docs: http://docs.rubygems.org/read/chapter/21
+
+
+
+
+
+
+ November 2013 BUNDLE-INSTALL(1)
diff --git a/lib/bundler/man/bundle-package b/lib/bundler/man/bundle-package
new file mode 100644
index 0000000..d397765
--- /dev/null
+++ b/lib/bundler/man/bundle-package
@@ -0,0 +1,49 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-PACKAGE" "1" "March 2013" "" ""
+.
+.SH "NAME"
+\fBbundle\-package\fR \- Package your needed \fB\.gem\fR files into your application
+.
+.SH "SYNOPSIS"
+\fBbundle package\fR
+.
+.SH "DESCRIPTION"
+Copy all of the \fB\.gem\fR files needed to run the application into the \fBvendor/cache\fR directory\. In the future, when running bundle install(1) \fIbundle\-install\.1\.html\fR, use the gems in the cache in preference to the ones on \fBrubygems\.org\fR\.
+.
+.SH "GIT AND PATH GEMS"
+Since Bundler 1\.2, the \fBbundle package\fR command can also package \fB:git\fR and \fB:path\fR dependencies besides \.gem files\. This needs to be explicitly enabled via the \fB\-\-all\fR option\. Once used, the \fB\-\-all\fR option will be remembered\.
+.
+.SH "REMOTE FETCHING"
+By default, if you simply run bundle install(1) \fIbundle\-install\.1\.html\fR after running bundle package(1) \fIbundle\-package\.1\.html\fR, bundler will still connect to \fBrubygems\.org\fR to check whether a platform\-specific gem exists for any of the gems in \fBvendor/cache\fR\.
+.
+.P
+For instance, consider this Gemfile(5):
+.
+.IP "" 4
+.
+.nf
+
+source "https://rubygems\.org"
+
+gem "nokogiri"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+If you run \fBbundle package\fR under C Ruby, bundler will retrieve the version of \fBnokogiri\fR for the \fB"ruby"\fR platform\. If you deploy to JRuby and run \fBbundle install\fR, bundler is forced to check to see whether a \fB"java"\fR platformed \fBnokogiri\fR exists\.
+.
+.P
+Even though the \fBnokogiri\fR gem for the Ruby platform is \fItechnically\fR acceptable on JRuby, it actually has a C extension that does not run on JRuby\. As a result, bundler will, by default, still connect to \fBrubygems\.org\fR to check whether it has a version of one of your gems more specific to your platform\.
+.
+.P
+This problem is also not just limited to the \fB"java"\fR platform\. A similar (common) problem can happen when developing on Windows and deploying to Linux, or even when developing on OSX and deploying to Linux\.
+.
+.P
+If you know for sure that the gems packaged in \fBvendor/cache\fR are appropriate for the platform you are on, you can run \fBbundle install \-\-local\fR to skip checking for more appropriate gems, and just use the ones in \fBvendor/cache\fR\.
+.
+.P
+One way to be sure that you have the right platformed versions of all your gems is to run \fBbundle package\fR on an identical machine and check in the gems\. For instance, you can run \fBbundle package\fR on an identical staging box during your staging process, and check in the \fBvendor/cache\fR before deploying to production\.
diff --git a/lib/bundler/man/bundle-package.txt b/lib/bundler/man/bundle-package.txt
new file mode 100644
index 0000000..b50a5e8
--- /dev/null
+++ b/lib/bundler/man/bundle-package.txt
@@ -0,0 +1,67 @@
+BUNDLE-PACKAGE(1) BUNDLE-PACKAGE(1)
+
+
+
+NAME
+ bundle-package - Package your needed .gem files into your application
+
+SYNOPSIS
+ bundle package
+
+DESCRIPTION
+ Copy all of the .gem files needed to run the application into the ven-
+ dor/cache directory. In the future, when running bundle install(1) bun-
+ dle-install.1.html, use the gems in the cache in preference to the ones
+ on rubygems.org.
+
+GIT AND PATH GEMS
+ Since Bundler 1.2, the bundle package command can also package :git and
+ :path dependencies besides .gem files. This needs to be explicitly
+ enabled via the --all option. Once used, the --all option will be
+ remembered.
+
+REMOTE FETCHING
+ By default, if you simply run bundle install(1) bundle-install.1.html
+ after running bundle package(1) bundle-package.1.html, bundler will
+ still connect to rubygems.org to check whether a platform-specific gem
+ exists for any of the gems in vendor/cache.
+
+ For instance, consider this Gemfile(5):
+
+
+
+ source "https://rubygems.org"
+
+ gem "nokogiri"
+
+
+
+ If you run bundle package under C Ruby, bundler will retrieve the ver-
+ sion of nokogiri for the "ruby" platform. If you deploy to JRuby and
+ run bundle install, bundler is forced to check to see whether a "java"
+ platformed nokogiri exists.
+
+ Even though the nokogiri gem for the Ruby platform is technically
+ acceptable on JRuby, it actually has a C extension that does not run on
+ JRuby. As a result, bundler will, by default, still connect to
+ rubygems.org to check whether it has a version of one of your gems more
+ specific to your platform.
+
+ This problem is also not just limited to the "java" platform. A similar
+ (common) problem can happen when developing on Windows and deploying to
+ Linux, or even when developing on OSX and deploying to Linux.
+
+ If you know for sure that the gems packaged in vendor/cache are appro-
+ priate for the platform you are on, you can run bundle install --local
+ to skip checking for more appropriate gems, and just use the ones in
+ vendor/cache.
+
+ One way to be sure that you have the right platformed versions of all
+ your gems is to run bundle package on an identical machine and check in
+ the gems. For instance, you can run bundle package on an identical
+ staging box during your staging process, and check in the vendor/cache
+ before deploying to production.
+
+
+
+ March 2013 BUNDLE-PACKAGE(1)
diff --git a/lib/bundler/man/bundle-platform b/lib/bundler/man/bundle-platform
new file mode 100644
index 0000000..e5ffd39
--- /dev/null
+++ b/lib/bundler/man/bundle-platform
@@ -0,0 +1,61 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-PLATFORM" "1" "March 2013" "" ""
+.
+.SH "NAME"
+\fBbundle\-platform\fR \- Displays platform compatibility information
+.
+.SH "SYNOPSIS"
+\fBbundle platform\fR [\-\-ruby]
+.
+.SH "DESCRIPTION"
+\fBplatform\fR will display information from your Gemfile, Gemfile\.lock, and Ruby VM about your platform\.
+.
+.P
+For instance, using this Gemfile(5):
+.
+.IP "" 4
+.
+.nf
+
+source "https://rubygems\.org"
+
+ruby "1\.9\.3"
+
+gem "rack"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+If you run \fBbundle platform\fR on Ruby 1\.9\.3, it will display the following output:
+.
+.IP "" 4
+.
+.nf
+
+Your platform is: x86_64\-linux
+
+Your app has gems that work on these platforms:
+* ruby
+
+Your Gemfile specifies a Ruby version requirement:
+* ruby 1\.9\.3
+
+Your current platform satisfies the Ruby version requirement\.
+.
+.fi
+.
+.IP "" 0
+.
+.P
+\fBplatform\fR will list all the platforms in your \fBGemfile\.lock\fR as well as the \fBruby\fR directive if applicable from your Gemfile(5)\. It will also let you know if the \fBruby\fR directive requirement has been met\. If \fBruby\fR directive doesn\'t match the running Ruby VM, it will tell you what part does not\.
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-\-ruby\fR
+It will just display the ruby directive information, so you don\'t have to parse it from the Gemfile(5)\.
+
diff --git a/lib/bundler/man/bundle-platform.txt b/lib/bundler/man/bundle-platform.txt
new file mode 100644
index 0000000..7e0136b
--- /dev/null
+++ b/lib/bundler/man/bundle-platform.txt
@@ -0,0 +1,57 @@
+BUNDLE-PLATFORM(1) BUNDLE-PLATFORM(1)
+
+
+
+NAME
+ bundle-platform - Displays platform compatibility information
+
+SYNOPSIS
+ bundle platform [--ruby]
+
+DESCRIPTION
+ platform will display information from your Gemfile, Gemfile.lock, and
+ Ruby VM about your platform.
+
+ For instance, using this Gemfile(5):
+
+
+
+ source "https://rubygems.org"
+
+ ruby "1.9.3"
+
+ gem "rack"
+
+
+
+ If you run bundle platform on Ruby 1.9.3, it will display the following
+ output:
+
+
+
+ Your platform is: x86_64-linux
+
+ Your app has gems that work on these platforms:
+ * ruby
+
+ Your Gemfile specifies a Ruby version requirement:
+ * ruby 1.9.3
+
+ Your current platform satisfies the Ruby version requirement.
+
+
+
+ platform will list all the platforms in your Gemfile.lock as well as
+ the ruby directive if applicable from your Gemfile(5). It will also let
+ you know if the ruby directive requirement has been met. If ruby direc-
+ tive doesn't match the running Ruby VM, it will tell you what part does
+ not.
+
+OPTIONS
+ --ruby It will just display the ruby directive information, so you
+ don't have to parse it from the Gemfile(5).
+
+
+
+
+ March 2013 BUNDLE-PLATFORM(1)
diff --git a/lib/bundler/man/bundle-update b/lib/bundler/man/bundle-update
new file mode 100644
index 0000000..a54b623
--- /dev/null
+++ b/lib/bundler/man/bundle-update
@@ -0,0 +1,202 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "BUNDLE\-UPDATE" "1" "March 2013" "" ""
+.
+.SH "NAME"
+\fBbundle\-update\fR \- Update your gems to the latest available versions
+.
+.SH "SYNOPSIS"
+\fBbundle update\fR \fI*gems\fR [\-\-source=NAME]
+.
+.SH "DESCRIPTION"
+Update the gems specified (all gems, if none are specified), ignoring the previously installed gems specified in the \fBGemfile\.lock\fR\. In general, you should use bundle install(1) \fIbundle\-install\.1\.html\fR to install the same exact gems and versions across machines\.
+.
+.P
+You would use \fBbundle update\fR to explicitly update the version of a gem\.
+.
+.SH "OPTIONS"
+.
+.TP
+\fB\-\-source=<name>\fR
+The name of a \fB:git\fR or \fB:path\fR source used in the Gemfile(5)\. For instance, with a \fB:git\fR source of \fBhttp://github\.com/rails/rails\.git\fR, you would call \fBbundle update \-\-source rails\fR
+.
+.SH "UPDATING ALL GEMS"
+If you run \fBbundle update\fR with no parameters, bundler will ignore any previously installed gems and resolve all dependencies again based on the latest versions of all gems available in the sources\.
+.
+.P
+Consider the following Gemfile(5):
+.
+.IP "" 4
+.
+.nf
+
+source "https://rubygems\.org"
+
+gem "rails", "3\.0\.0\.rc"
+gem "nokogiri"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+When you run bundle install(1) \fIbundle\-install\.1\.html\fR the first time, bundler will resolve all of the dependencies, all the way down, and install what you need:
+.
+.IP "" 4
+.
+.nf
+
+Fetching source index for https://rubygems\.org/
+Installing rake (10\.0\.2)
+Installing abstract (1\.0\.0)
+Installing activesupport (3\.0\.0\.rc)
+Installing builder (2\.1\.2)
+Installing i18n (0\.4\.1)
+Installing activemodel (3\.0\.0\.rc)
+Installing erubis (2\.6\.6)
+Installing rack (1\.2\.1)
+Installing rack\-mount (0\.6\.9)
+Installing rack\-test (0\.5\.4)
+Installing tzinfo (0\.3\.22)
+Installing actionpack (3\.0\.0\.rc)
+Installing mime\-types (1\.16)
+Installing polyglot (0\.3\.1)
+Installing treetop (1\.4\.8)
+Installing mail (2\.2\.5)
+Installing actionmailer (3\.0\.0\.rc)
+Installing arel (0\.4\.0)
+Installing activerecord (3\.0\.0\.rc)
+Installing activeresource (3\.0\.0\.rc)
+Installing bundler (1\.0\.0\.rc\.3)
+Installing nokogiri (1\.4\.3\.1) with native extensions
+Installing thor (0\.14\.0)
+Installing railties (3\.0\.0\.rc)
+Installing rails (3\.0\.0\.rc)
+
+Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed\.
+.
+.fi
+.
+.IP "" 0
+.
+.P
+As you can see, even though you have just two gems in the Gemfile(5), your application actually needs 25 different gems in order to run\. Bundler remembers the exact versions it installed in \fBGemfile\.lock\fR\. The next time you run bundle install(1) \fIbundle\-install\.1\.html\fR, bundler skips the dependency resolution and installs the same gems as it installed last time\.
+.
+.P
+After checking in the \fBGemfile\.lock\fR into version control and cloning it on another machine, running bundle install(1) \fIbundle\-install\.1\.html\fR will \fIstill\fR install the gems that you installed last time\. You don\'t need to worry that a new release of \fBerubis\fR or \fBmail\fR changes the gems you use\.
+.
+.P
+However, from time to time, you might want to update the gems you are using to the newest versions that still match the gems in your Gemfile(5)\.
+.
+.P
+To do this, run \fBbundle update\fR, which will ignore the \fBGemfile\.lock\fR, and resolve all the dependencies again\. Keep in mind that this process can result in a significantly different set of the 25 gems, based on the requirements of new gems that the gem authors released since the last time you ran \fBbundle update\fR\.
+.
+.SH "UPDATING A LIST OF GEMS"
+Sometimes, you want to update a single gem in the Gemfile(5), and leave the rest of the gems that you specified locked to the versions in the \fBGemfile\.lock\fR\.
+.
+.P
+For instance, in the scenario above, imagine that \fBnokogiri\fR releases version \fB1\.4\.4\fR, and you want to update it \fIwithout\fR updating Rails and all of its dependencies\. To do this, run \fBbundle update nokogiri\fR\.
+.
+.P
+Bundler will update \fBnokogiri\fR and any of its dependencies, but leave alone Rails and its dependencies\.
+.
+.SH "OVERLAPPING DEPENDENCIES"
+Sometimes, multiple gems declared in your Gemfile(5) are satisfied by the same second\-level dependency\. For instance, consider the case of \fBthin\fR and \fBrack\-perftools\-profiler\fR\.
+.
+.IP "" 4
+.
+.nf
+
+source "https://rubygems\.org"
+
+gem "thin"
+gem "rack\-perftools\-profiler"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+The \fBthin\fR gem depends on \fBrack >= 1\.0\fR, while \fBrack\-perftools\-profiler\fR depends on \fBrack ~> 1\.0\fR\. If you run bundle install, you get:
+.
+.IP "" 4
+.
+.nf
+
+Fetching source index for https://rubygems\.org/
+Installing daemons (1\.1\.0)
+Installing eventmachine (0\.12\.10) with native extensions
+Installing open4 (1\.0\.1)
+Installing perftools\.rb (0\.4\.7) with native extensions
+Installing rack (1\.2\.1)
+Installing rack\-perftools_profiler (0\.0\.2)
+Installing thin (1\.2\.7) with native extensions
+Using bundler (1\.0\.0\.rc\.3)
+.
+.fi
+.
+.IP "" 0
+.
+.P
+In this case, the two gems have their own set of dependencies, but they share \fBrack\fR in common\. If you run \fBbundle update thin\fR, bundler will update \fBdaemons\fR, \fBeventmachine\fR and \fBrack\fR, which are dependencies of \fBthin\fR, but not \fBopen4\fR or \fBperftools\.rb\fR, which are dependencies of \fBrack\-perftools_profiler\fR\. Note that \fBbundle update thin\fR will update \fBrack\fR even though it\'s \fIalso\fR a dependency of \fBrack\-perftools_profiler\fR\.
+.
+.P
+\fBIn short\fR, when you update a gem using \fBbundle update\fR, bundler will update all dependencies of that gem, including those that are also dependencies of another gem\.
+.
+.P
+In this scenario, updating the \fBthin\fR version manually in the Gemfile(5), and then running bundle install(1) \fIbundle\-install\.1\.html\fR will only update \fBdaemons\fR and \fBeventmachine\fR, but not \fBrack\fR\. For more information, see the \fBCONSERVATIVE UPDATING\fR section of bundle install(1) \fIbundle\-install\.1\.html\fR\.
+.
+.SH "RECOMMENDED WORKFLOW"
+In general, when working with an application managed with bundler, you should use the following workflow:
+.
+.IP "\(bu" 4
+After you create your Gemfile(5) for the first time, run
+.
+.IP
+$ bundle install
+.
+.IP "\(bu" 4
+Check the resulting \fBGemfile\.lock\fR into version control
+.
+.IP
+$ git add Gemfile\.lock
+.
+.IP "\(bu" 4
+When checking out this repository on another development machine, run
+.
+.IP
+$ bundle install
+.
+.IP "\(bu" 4
+When checking out this repository on a deployment machine, run
+.
+.IP
+$ bundle install \-\-deployment
+.
+.IP "\(bu" 4
+After changing the Gemfile(5) to reflect a new or update dependency, run
+.
+.IP
+$ bundle install
+.
+.IP "\(bu" 4
+Make sure to check the updated \fBGemfile\.lock\fR into version control
+.
+.IP
+$ git add Gemfile\.lock
+.
+.IP "\(bu" 4
+If bundle install(1) \fIbundle\-install\.1\.html\fR reports a conflict, manually update the specific gems that you changed in the Gemfile(5)
+.
+.IP
+$ bundle update rails thin
+.
+.IP "\(bu" 4
+If you want to update all the gems to the latest possible versions that still match the gems listed in the Gemfile(5), run
+.
+.IP
+$ bundle update
+.
+.IP "" 0
+
diff --git a/lib/bundler/man/bundle-update.txt b/lib/bundler/man/bundle-update.txt
new file mode 100644
index 0000000..b40827d
--- /dev/null
+++ b/lib/bundler/man/bundle-update.txt
@@ -0,0 +1,207 @@
+BUNDLE-UPDATE(1) BUNDLE-UPDATE(1)
+
+
+
+NAME
+ bundle-update - Update your gems to the latest available versions
+
+SYNOPSIS
+ bundle update *gems [--source=NAME]
+
+DESCRIPTION
+ Update the gems specified (all gems, if none are specified), ignoring
+ the previously installed gems specified in the Gemfile.lock. In gen-
+ eral, you should use bundle install(1) bundle-install.1.html to install
+ the same exact gems and versions across machines.
+
+ You would use bundle update to explicitly update the version of a gem.
+
+OPTIONS
+ --source=<name>
+ The name of a :git or :path source used in the Gemfile(5). For
+ instance, with a :git source of
+ http://github.com/rails/rails.git, you would call bundle update
+ --source rails
+
+UPDATING ALL GEMS
+ If you run bundle update with no parameters, bundler will ignore any
+ previously installed gems and resolve all dependencies again based on
+ the latest versions of all gems available in the sources.
+
+ Consider the following Gemfile(5):
+
+
+
+ source "https://rubygems.org"
+
+ gem "rails", "3.0.0.rc"
+ gem "nokogiri"
+
+
+
+ When you run bundle install(1) bundle-install.1.html the first time,
+ bundler will resolve all of the dependencies, all the way down, and
+ install what you need:
+
+
+
+ Fetching source index for https://rubygems.org/
+ Installing rake (10.0.2)
+ Installing abstract (1.0.0)
+ Installing activesupport (3.0.0.rc)
+ Installing builder (2.1.2)
+ Installing i18n (0.4.1)
+ Installing activemodel (3.0.0.rc)
+ Installing erubis (2.6.6)
+ Installing rack (1.2.1)
+ Installing rack-mount (0.6.9)
+ Installing rack-test (0.5.4)
+ Installing tzinfo (0.3.22)
+ Installing actionpack (3.0.0.rc)
+ Installing mime-types (1.16)
+ Installing polyglot (0.3.1)
+ Installing treetop (1.4.8)
+ Installing mail (2.2.5)
+ Installing actionmailer (3.0.0.rc)
+ Installing arel (0.4.0)
+ Installing activerecord (3.0.0.rc)
+ Installing activeresource (3.0.0.rc)
+ Installing bundler (1.0.0.rc.3)
+ Installing nokogiri (1.4.3.1) with native extensions
+ Installing thor (0.14.0)
+ Installing railties (3.0.0.rc)
+ Installing rails (3.0.0.rc)
+
+ Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
+
+
+
+ As you can see, even though you have just two gems in the Gemfile(5),
+ your application actually needs 25 different gems in order to run.
+ Bundler remembers the exact versions it installed in Gemfile.lock. The
+ next time you run bundle install(1) bundle-install.1.html, bundler
+ skips the dependency resolution and installs the same gems as it
+ installed last time.
+
+ After checking in the Gemfile.lock into version control and cloning it
+ on another machine, running bundle install(1) bundle-install.1.html
+ will still install the gems that you installed last time. You don't
+ need to worry that a new release of erubis or mail changes the gems you
+ use.
+
+ However, from time to time, you might want to update the gems you are
+ using to the newest versions that still match the gems in your Gem-
+ file(5).
+
+ To do this, run bundle update, which will ignore the Gemfile.lock, and
+ resolve all the dependencies again. Keep in mind that this process can
+ result in a significantly different set of the 25 gems, based on the
+ requirements of new gems that the gem authors released since the last
+ time you ran bundle update.
+
+UPDATING A LIST OF GEMS
+ Sometimes, you want to update a single gem in the Gemfile(5), and leave
+ the rest of the gems that you specified locked to the versions in the
+ Gemfile.lock.
+
+ For instance, in the scenario above, imagine that nokogiri releases
+ version 1.4.4, and you want to update it without updating Rails and all
+ of its dependencies. To do this, run bundle update nokogiri.
+
+ Bundler will update nokogiri and any of its dependencies, but leave
+ alone Rails and its dependencies.
+
+OVERLAPPING DEPENDENCIES
+ Sometimes, multiple gems declared in your Gemfile(5) are satisfied by
+ the same second-level dependency. For instance, consider the case of
+ thin and rack-perftools-profiler.
+
+
+
+ source "https://rubygems.org"
+
+ gem "thin"
+ gem "rack-perftools-profiler"
+
+
+
+ The thin gem depends on rack >= 1.0, while rack-perftools-profiler
+ depends on rack ~> 1.0. If you run bundle install, you get:
+
+
+
+ Fetching source index for https://rubygems.org/
+ Installing daemons (1.1.0)
+ Installing eventmachine (0.12.10) with native extensions
+ Installing open4 (1.0.1)
+ Installing perftools.rb (0.4.7) with native extensions
+ Installing rack (1.2.1)
+ Installing rack-perftools_profiler (0.0.2)
+ Installing thin (1.2.7) with native extensions
+ Using bundler (1.0.0.rc.3)
+
+
+
+ In this case, the two gems have their own set of dependencies, but they
+ share rack in common. If you run bundle update thin, bundler will
+ update daemons, eventmachine and rack, which are dependencies of thin,
+ but not open4 or perftools.rb, which are dependencies of
+ rack-perftools_profiler. Note that bundle update thin will update rack
+ even though it's also a dependency of rack-perftools_profiler.
+
+ In short, when you update a gem using bundle update, bundler will
+ update all dependencies of that gem, including those that are also
+ dependencies of another gem.
+
+ In this scenario, updating the thin version manually in the Gemfile(5),
+ and then running bundle install(1) bundle-install.1.html will only
+ update daemons and eventmachine, but not rack. For more information,
+ see the CONSERVATIVE UPDATING section of bundle install(1) bun-
+ dle-install.1.html.
+
+RECOMMENDED WORKFLOW
+ In general, when working with an application managed with bundler, you
+ should use the following workflow:
+
+ o After you create your Gemfile(5) for the first time, run
+
+ $ bundle install
+
+ o Check the resulting Gemfile.lock into version control
+
+ $ git add Gemfile.lock
+
+ o When checking out this repository on another development machine,
+ run
+
+ $ bundle install
+
+ o When checking out this repository on a deployment machine, run
+
+ $ bundle install --deployment
+
+ o After changing the Gemfile(5) to reflect a new or update depen-
+ dency, run
+
+ $ bundle install
+
+ o Make sure to check the updated Gemfile.lock into version control
+
+ $ git add Gemfile.lock
+
+ o If bundle install(1) bundle-install.1.html reports a conflict, man-
+ ually update the specific gems that you changed in the Gemfile(5)
+
+ $ bundle update rails thin
+
+ o If you want to update all the gems to the latest possible versions
+ that still match the gems listed in the Gemfile(5), run
+
+ $ bundle update
+
+
+
+
+
+
+ March 2013 BUNDLE-UPDATE(1)
diff --git a/lib/bundler/man/bundle.txt b/lib/bundler/man/bundle.txt
new file mode 100644
index 0000000..29d23fb
--- /dev/null
+++ b/lib/bundler/man/bundle.txt
@@ -0,0 +1,97 @@
+BUNDLE(1) BUNDLE(1)
+
+
+
+NAME
+ bundle - Ruby Dependency Management
+
+SYNOPSIS
+ bundle COMMAND [--no-color] [--verbose] [ARGS]
+
+DESCRIPTION
+ Bundler manages an application's dependencies through its entire life
+ across many machines systematically and repeatably.
+
+ See the bundler website http://bundler.io for information on getting
+ started, and Gemfile(5) for more information on the Gemfile format.
+
+OPTIONS
+ --no-color
+ Prints all output without color
+
+ --verbose
+ Prints out additional logging information
+
+BUNDLE COMMANDS
+ We divide bundle subcommands into primary commands and utilities.
+
+PRIMARY COMMANDS
+ bundle install(1) bundle-install.1.html
+ Install the gems specified by the Gemfile or Gemfile.lock
+
+ bundle update(1) bundle-update.1.html
+ Update dependencies to their latest versions
+
+ bundle package(1) bundle-package.1.html
+ Package the .gem files required by your application into the
+ vendor/cache directory
+
+ bundle exec(1) bundle-exec.1.html
+ Execute a script in the context of the current bundle
+
+ bundle config(1) bundle-config.1.html
+ Specify and read configuration options for bundler
+
+ bundle help(1)
+ Displays detailed help for each subcommand
+
+UTILITIES
+ bundle check(1)
+ Determine whether the requirements for your application are
+ installed and available to bundler
+
+ bundle list(1)
+ Show all of the gems in the current bundle
+
+ bundle show(1)
+ Show the source location of a particular gem in the bundle
+
+ bundle outdated(1)
+ Show all of the outdated gems in the current bundle
+
+ bundle console(1)
+ Start an IRB session in the context of the current bundle
+
+ bundle open(1)
+ Open an installed gem in the editor
+
+ bundle viz(1)
+ Generate a visual representation of your dependencies
+
+ bundle init(1)
+ Generate a simple Gemfile, placed in the current directory
+
+ bundle gem(1)
+ Create a simple gem, suitable for development with bundler
+
+ bundle platform(1) bundle-platform.1.html
+ Displays platform compatibility information
+
+ bundle clean(1)
+ Cleans up unused gems in your bundler directory
+
+OBSOLETE
+ These commands are obsolete and should no longer be used
+
+ o bundle lock(1)
+
+ o bundle unlock(1)
+
+ o bundle cache(1)
+
+
+
+
+
+
+ August 2013 BUNDLE(1)
diff --git a/lib/bundler/man/gemfile.5 b/lib/bundler/man/gemfile.5
new file mode 100644
index 0000000..2268992
--- /dev/null
+++ b/lib/bundler/man/gemfile.5
@@ -0,0 +1,492 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "GEMFILE" "5" "November 2013" "" ""
+.
+.SH "NAME"
+\fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
+.
+.SH "SYNOPSIS"
+A \fBGemfile\fR describes the gem dependencies required to execute associated Ruby code\.
+.
+.P
+Place the \fBGemfile\fR in the root of the directory containing the associated code\. For instance, in a Rails application, place the \fBGemfile\fR in the same directory as the \fBRakefile\fR\.
+.
+.SH "SYNTAX"
+A \fBGemfile\fR is evaluated as Ruby code, in a context which makes available a number of methods used to describe the gem requirements\.
+.
+.SH "SOURCES (#source)"
+At the top of the \fBGemfile\fR, add one line for each \fBRubygems\fR source that might contain the gems listed in the \fBGemfile\fR\.
+.
+.IP "" 4
+.
+.nf
+
+source "https://rubygems\.org"
+source "http://gems\.github\.com"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Each of these _source_s \fBMUST\fR be a valid Rubygems repository\. Sources are checked for gems following the heuristics described in \fISOURCE PRIORITY\fR\.
+.
+.SH "RUBY (#ruby)"
+If your application requires a specific Ruby version or engine, specify your requirements using the \fBruby\fR method, with the following arguments\. All parameters are \fBOPTIONAL\fR unless otherwise specified\.
+.
+.SS "VERSION (required)"
+The version of Ruby that your application requires\. If your application requires an alternate Ruby engine, such as JRuby or Rubinius, this should be the Ruby version that the engine is compatible with\.
+.
+.IP "" 4
+.
+.nf
+
+ruby "1\.9\.3"
+.
+.fi
+.
+.IP "" 0
+.
+.SS "ENGINE (:engine)"
+Each application \fImay\fR specify a Ruby engine\. If an engine is specified, an engine version \fImust\fR also be specified\.
+.
+.SS "ENGINE VERSION (:engine_version)"
+Each application \fImay\fR specify a Ruby engine version\. If an engine version is specified, an engine \fImust\fR also be specified\. If the engine is "ruby" the engine version specified \fImust\fR match the Ruby version\.
+.
+.IP "" 4
+.
+.nf
+
+ruby "1\.8\.7", :engine => "jruby", :engine_version => "1\.6\.7"
+.
+.fi
+.
+.IP "" 0
+.
+.SS "PATCHLEVEL (:patchlevel)"
+Each application \fImay\fR specify a Ruby patchlevel\.
+.
+.IP "" 4
+.
+.nf
+
+ruby "2\.0\.0", :patchlevel => "247"
+.
+.fi
+.
+.IP "" 0
+.
+.SH "GEMS (#gem)"
+Specify gem requirements using the \fBgem\fR method, with the following arguments\. All parameters are \fBOPTIONAL\fR unless otherwise specified\.
+.
+.SS "NAME (required)"
+For each gem requirement, list a single \fIgem\fR line\.
+.
+.IP "" 4
+.
+.nf
+
+gem "nokogiri"
+.
+.fi
+.
+.IP "" 0
+.
+.SS "VERSION"
+Each \fIgem\fR \fBMAY\fR have one or more version specifiers\.
+.
+.IP "" 4
+.
+.nf
+
+gem "nokogiri", ">= 1\.4\.2"
+gem "RedCloth", ">= 4\.1\.0", "< 4\.2\.0"
+.
+.fi
+.
+.IP "" 0
+.
+.SS "REQUIRE AS (:require)"
+Each \fIgem\fR \fBMAY\fR specify files that should be used when autorequiring via \fBBundler\.require\fR\. You may pass an array with multiple files or \fBtrue\fR if file you want \fBrequired\fR has same name as \fIgem\fR or \fBfalse\fR to prevent any file from being autorequired\.
+.
+.IP "" 4
+.
+.nf
+
+gem "redis", :require => ["redis/connection/hiredis", "redis"]
+gem "webmock", :require => false
+gem "debugger", :require => true
+.
+.fi
+.
+.IP "" 0
+.
+.P
+The argument defaults to the name of the gem\. For example, these are identical:
+.
+.IP "" 4
+.
+.nf
+
+gem "nokogiri"
+gem "nokogiri", :require => "nokogiri"
+gem "nokogiri", :require => true
+.
+.fi
+.
+.IP "" 0
+.
+.SS "GROUPS (:group or :groups)"
+Each \fIgem\fR \fBMAY\fR specify membership in one or more groups\. Any \fIgem\fR that does not specify membership in any group is placed in the \fBdefault\fR group\.
+.
+.IP "" 4
+.
+.nf
+
+gem "rspec", :group => :test
+gem "wirble", :groups => [:development, :test]
+.
+.fi
+.
+.IP "" 0
+.
+.P
+The Bundler runtime allows its two main methods, \fBBundler\.setup\fR and \fBBundler\.require\fR, to limit their impact to particular groups\.
+.
+.IP "" 4
+.
+.nf
+
+# setup adds gems to Ruby\'s load path
+Bundler\.setup # defaults to all groups
+require "bundler/setup" # same as Bundler\.setup
+Bundler\.setup(:default) # only set up the _default_ group
+Bundler\.setup(:test) # only set up the _test_ group (but `not` _default_)
+Bundler\.setup(:default, :test) # set up the _default_ and _test_ groups, but no others
+
+# require requires all of the gems in the specified groups
+Bundler\.require # defaults to just the _default_ group
+Bundler\.require(:default) # identical
+Bundler\.require(:default, :test) # requires the _default_ and _test_ groups
+Bundler\.require(:test) # requires just the _test_ group
+.
+.fi
+.
+.IP "" 0
+.
+.P
+The Bundler CLI allows you to specify a list of groups whose gems \fBbundle install\fR should not install with the \fB\-\-without\fR option\. To specify multiple groups to ignore, specify a list of groups separated by spaces\.
+.
+.IP "" 4
+.
+.nf
+
+bundle install \-\-without test
+bundle install \-\-without development test
+.
+.fi
+.
+.IP "" 0
+.
+.P
+After running \fBbundle install \-\-without test\fR, bundler will remember that you excluded the test group in the last installation\. The next time you run \fBbundle install\fR, without any \fB\-\-without option\fR, bundler will recall it\.
+.
+.P
+Also, calling \fBBundler\.setup\fR with no parameters, or calling \fBrequire "bundler/setup"\fR will setup all groups except for the ones you excluded via \fB\-\-without\fR (since they are obviously not available)\.
+.
+.P
+Note that on \fBbundle install\fR, bundler downloads and evaluates all gems, in order to create a single canonical list of all of the required gems and their dependencies\. This means that you cannot list different versions of the same gems in different groups\. For more details, see Understanding Bundler \fIhttp://bundler\.io/rationale\.html\fR\.
+.
+.SS "PLATFORMS (:platforms)"
+If a gem should only be used in a particular platform or set of platforms, you can specify them\. Platforms are essentially identical to groups, except that you do not need to use the \fB\-\-without\fR install\-time flag to exclude groups of gems for other platforms\.
+.
+.P
+There are a number of \fBGemfile\fR platforms:
+.
+.TP
+\fBruby\fR
+C Ruby (MRI) or Rubinius, but \fBNOT\fR Windows
+.
+.TP
+\fBruby_18\fR
+\fIruby\fR \fBAND\fR version 1\.8
+.
+.TP
+\fBruby_19\fR
+\fIruby\fR \fBAND\fR version 1\.9
+.
+.TP
+\fBruby_20\fR
+\fIruby\fR \fBAND\fR version 2\.0
+.
+.TP
+\fBruby_21\fR
+\fIruby\fR \fBAND\fR version 2\.1
+.
+.TP
+\fBmri\fR
+Same as \fIruby\fR, but not Rubinius
+.
+.TP
+\fBmri_18\fR
+\fImri\fR \fBAND\fR version 1\.8
+.
+.TP
+\fBmri_19\fR
+\fImri\fR \fBAND\fR version 1\.9
+.
+.TP
+\fBmri_20\fR
+\fImri\fR \fBAND\fR version 2\.0
+.
+.TP
+\fBmri_21\fR
+\fImri\fR \fBAND\fR version 2\.1
+.
+.TP
+\fBrbx\fR
+Same as \fIruby\fR, but only Rubinius (not MRI)
+.
+.TP
+\fBjruby\fR
+JRuby
+.
+.TP
+\fBmswin\fR
+Windows
+.
+.TP
+\fBmingw\fR
+Windows 32 bit \'mingw32\' platform (aka RubyInstaller)
+.
+.TP
+\fBmingw_18\fR
+\fImingw\fR \fBAND\fR version 1\.8
+.
+.TP
+\fBmingw_19\fR
+\fImingw\fR \fBAND\fR version 1\.9
+.
+.TP
+\fBmingw_20\fR
+\fImingw\fR \fBAND\fR version 2\.0
+.
+.TP
+\fBmingw_21\fR
+\fImingw\fR \fBAND\fR version 2\.1
+.
+.TP
+\fBx64_mingw\fR
+Windows 64 bit \'mingw32\' platform (aka RubyInstaller x64)
+.
+.TP
+\fBx64_mingw_20\fR
+\fIx64_mingw\fR \fBAND\fR version 2\.0
+.
+.TP
+\fBx64_mingw_21\fR
+\fIx64_mingw\fR \fBAND\fR version 2\.1
+.
+.P
+As with groups, you can specify one or more platforms:
+.
+.IP "" 4
+.
+.nf
+
+gem "weakling", :platforms => :jruby
+gem "ruby\-debug", :platforms => :mri_18
+gem "nokogiri", :platforms => [:mri_18, :jruby]
+.
+.fi
+.
+.IP "" 0
+.
+.P
+All operations involving groups (\fBbundle install\fR, \fBBundler\.setup\fR, \fBBundler\.require\fR) behave exactly the same as if any groups not matching the current platform were explicitly excluded\.
+.
+.SS "GIT (:git)"
+If necessary, you can specify that a gem is located at a particular git repository\. The repository can be public (\fBhttp://github\.com/rails/rails\.git\fR) or private (\fBgit at github\.com:rails/rails\.git\fR)\. If the repository is private, the user that you use to run \fBbundle install\fR \fBMUST\fR have the appropriate keys available in their \fB$HOME/\.ssh\fR\.
+.
+.P
+Git repositories are specified using the \fB:git\fR parameter\. The \fBgroup\fR, \fBplatforms\fR, and \fBrequire\fR options are available and behave exactly the same as they would for a normal gem\.
+.
+.IP "" 4
+.
+.nf
+
+gem "rails", :git => "git://github\.com/rails/rails\.git"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+A git repository \fBSHOULD\fR have at least one file, at the root of the directory containing the gem, with the extension \fB\.gemspec\fR\. This file \fBMUST\fR contain a valid gem specification, as expected by the \fBgem build\fR command\. It \fBMUST NOT\fR have any dependencies, other than on the files in the git repository itself and any built\-in functionality of Ruby or Rubygems\.
+.
+.P
+If a git repository does not have a \fB\.gemspec\fR, bundler will attempt to create one, but it will not contain any dependencies, executables, or C extension compilation instructions\. As a result, it may fail to properly integrate into your application\.
+.
+.P
+If a git repository does have a \fB\.gemspec\fR for the gem you attached it to, a version specifier, if provided, means that the git repository is only valid if the \fB\.gemspec\fR specifies a version matching the version specifier\. If not, bundler will print a warning\.
+.
+.IP "" 4
+.
+.nf
+
+gem "rails", "2\.3\.8", :git => "git://github\.com/rails/rails\.git"
+# bundle install will fail, because the \.gemspec in the rails
+# repository\'s master branch specifies version 3\.0\.0
+.
+.fi
+.
+.IP "" 0
+.
+.P
+If a git repository does \fBnot\fR have a \fB\.gemspec\fR for the gem you attached it to, a version specifier \fBMUST\fR be provided\. Bundler will use this version in the simple \fB\.gemspec\fR it creates\.
+.
+.P
+Git repositories support a number of additional options\.
+.
+.TP
+\fBbranch\fR, \fBtag\fR, and \fBref\fR
+You \fBMUST\fR only specify at most one of these options\. The default is \fB:branch => "master"\fR
+.
+.TP
+\fBsubmodules\fR
+Specify \fB:submodules => true\fR to cause bundler to expand any submodules included in the git repository
+.
+.P
+If a git repository contains multiple \fB\.gemspecs\fR, each \fB\.gemspec\fR represents a gem located at the same place in the file system as the \fB\.gemspec\fR\.
+.
+.IP "" 4
+.
+.nf
+
+|~rails [git root]
+| |\-rails\.gemspec [rails gem located here]
+|~actionpack
+| |\-actionpack\.gemspec [actionpack gem located here]
+|~activesupport
+| |\-activesupport\.gemspec [activesupport gem located here]
+|\.\.\.
+.
+.fi
+.
+.IP "" 0
+.
+.P
+To install a gem located in a git repository, bundler changes to the directory containing the gemspec, runs \fBgem build name\.gemspec\fR and then installs the resulting gem\. The \fBgem build\fR command, which comes standard with Rubygems, evaluates the \fB\.gemspec\fR in the context of the directory in which it is located\.
+.
+.SS "GITHUB (:github)"
+If the git repository you want to use is hosted on GitHub and is public, you can use the :github shorthand to specify just the github username and repository name (without the trailing "\.git"), separated by a slash\. If both the username and repository name are the same, you can omit one\.
+.
+.IP "" 4
+.
+.nf
+
+gem "rails", :github => "rails/rails"
+gem "rails", :github => "rails"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Are both equivalent to
+.
+.IP "" 4
+.
+.nf
+
+gem "rails", :git => "git://github\.com/rails/rails\.git"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+In addition, if you wish to choose a specific branch:
+.
+.IP "" 4
+.
+.nf
+
+gem "rails", :github => "rails/rails", :branch => "branch_name"
+.
+.fi
+.
+.IP "" 0
+.
+.SS "PATH (:path)"
+You can specify that a gem is located in a particular location on the file system\. Relative paths are resolved relative to the directory containing the \fBGemfile\fR\.
+.
+.P
+Similar to the semantics of the \fB:git\fR option, the \fB:path\fR option requires that the directory in question either contains a \fB\.gemspec\fR for the gem, or that you specify an explicit version that bundler should use\.
+.
+.P
+Unlike \fB:git\fR, bundler does not compile C extensions for gems specified as paths\.
+.
+.IP "" 4
+.
+.nf
+
+gem "rails", :path => "vendor/rails"
+.
+.fi
+.
+.IP "" 0
+.
+.SH "BLOCK FORM OF GIT, PATH, GROUP and PLATFORMS"
+The \fB:git\fR, \fB:path\fR, \fB:group\fR, and \fB:platforms\fR options may be applied to a group of gems by using block form\.
+.
+.IP "" 4
+.
+.nf
+
+git "git://github\.com/rails/rails\.git" do
+ gem "activesupport"
+ gem "actionpack"
+end
+
+platforms :ruby do
+ gem "ruby\-debug"
+ gem "sqlite3"
+end
+
+group :development do
+ gem "wirble"
+ gem "faker"
+end
+.
+.fi
+.
+.IP "" 0
+.
+.P
+In the case of the \fBgit\fR block form, the \fB:ref\fR, \fB:branch\fR, \fB:tag\fR, and \fB:submodules\fR options may be passed to the \fBgit\fR method, and all gems in the block will inherit those options\.
+.
+.SH "GEMSPEC (#gemspec)"
+If you wish to use Bundler to help install dependencies for a gem while it is being developed, use the \fBgemspec\fR method to pull in the dependencies listed in the \fB\.gemspec\fR file\.
+.
+.P
+The \fBgemspec\fR method adds any runtime dependencies as gem requirements in the default group\. It also adds development dependencies as gem requirements in the \fBdevelopment\fR group\. Finally, it adds a gem requirement on your project (\fB:path => \'\.\'\fR)\. In conjunction with \fBBundler\.setup\fR, this allows you to require project files in your test code as you would if the project were installed as a gem; you need not manipulate the load path manually or require project files [...]
+.
+.P
+The \fBgemspec\fR method supports optional \fB:path\fR, \fB:name\fR, and \fB:development_group\fR options, which control where bundler looks for the \fB\.gemspec\fR, what named \fB\.gemspec\fR it uses (if more than one is present), and which group development dependencies are included in\.
+.
+.SH "SOURCE PRIORITY"
+When attempting to locate a gem to satisfy a gem requirement, bundler uses the following priority order:
+.
+.IP "1." 4
+The source explicitly attached to the gem (using \fB:path\fR or \fB:git\fR)
+.
+.IP "2." 4
+For implicit gems (dependencies of explicit gems), any git or path repository otherwise declared\. This results in bundler prioritizing the ActiveSupport gem from the Rails git repository over ones from \fBrubygems\.org\fR
+.
+.IP "3." 4
+The sources specified via \fBsource\fR, searching each source in your \fBGemfile\fR from last added to first added\.
+.
+.IP "" 0
+
diff --git a/lib/bundler/man/gemfile.5.txt b/lib/bundler/man/gemfile.5.txt
new file mode 100644
index 0000000..a5d4863
--- /dev/null
+++ b/lib/bundler/man/gemfile.5.txt
@@ -0,0 +1,448 @@
+GEMFILE(5) GEMFILE(5)
+
+
+
+NAME
+ Gemfile - A format for describing gem dependencies for Ruby programs
+
+SYNOPSIS
+ A Gemfile describes the gem dependencies required to execute associated
+ Ruby code.
+
+ Place the Gemfile in the root of the directory containing the associ-
+ ated code. For instance, in a Rails application, place the Gemfile in
+ the same directory as the Rakefile.
+
+SYNTAX
+ A Gemfile is evaluated as Ruby code, in a context which makes available
+ a number of methods used to describe the gem requirements.
+
+SOURCES (#source)
+ At the top of the Gemfile, add one line for each Rubygems source that
+ might contain the gems listed in the Gemfile.
+
+
+
+ source "https://rubygems.org"
+ source "http://gems.github.com"
+
+
+
+ Each of these _source_s MUST be a valid Rubygems repository. Sources
+ are checked for gems following the heuristics described in SOURCE PRI-
+ ORITY.
+
+RUBY (#ruby)
+ If your application requires a specific Ruby version or engine, specify
+ your requirements using the ruby method, with the following arguments.
+ All parameters are OPTIONAL unless otherwise specified.
+
+ VERSION (required)
+ The version of Ruby that your application requires. If your application
+ requires an alternate Ruby engine, such as JRuby or Rubinius, this
+ should be the Ruby version that the engine is compatible with.
+
+
+
+ ruby "1.9.3"
+
+
+
+ ENGINE (:engine)
+ Each application may specify a Ruby engine. If an engine is specified,
+ an engine version must also be specified.
+
+ ENGINE VERSION (:engine_version)
+ Each application may specify a Ruby engine version. If an engine ver-
+ sion is specified, an engine must also be specified. If the engine is
+ "ruby" the engine version specified must match the Ruby version.
+
+
+
+ ruby "1.8.7", :engine => "jruby", :engine_version => "1.6.7"
+
+
+
+ PATCHLEVEL (:patchlevel)
+ Each application may specify a Ruby patchlevel.
+
+
+
+ ruby "2.0.0", :patchlevel => "247"
+
+
+
+GEMS (#gem)
+ Specify gem requirements using the gem method, with the following argu-
+ ments. All parameters are OPTIONAL unless otherwise specified.
+
+ NAME (required)
+ For each gem requirement, list a single gem line.
+
+
+
+ gem "nokogiri"
+
+
+
+ VERSION
+ Each gem MAY have one or more version specifiers.
+
+
+
+ gem "nokogiri", ">= 1.4.2"
+ gem "RedCloth", ">= 4.1.0", "< 4.2.0"
+
+
+
+ REQUIRE AS (:require)
+ Each gem MAY specify files that should be used when autorequiring via
+ Bundler.require. You may pass an array with multiple files or true if
+ file you want required has same name as gem or false to prevent any
+ file from being autorequired.
+
+
+
+ gem "redis", :require => ["redis/connection/hiredis", "redis"]
+ gem "webmock", :require => false
+ gem "debugger", :require => true
+
+
+
+ The argument defaults to the name of the gem. For example, these are
+ identical:
+
+
+
+ gem "nokogiri"
+ gem "nokogiri", :require => "nokogiri"
+ gem "nokogiri", :require => true
+
+
+
+ GROUPS (:group or :groups)
+ Each gem MAY specify membership in one or more groups. Any gem that
+ does not specify membership in any group is placed in the default
+ group.
+
+
+
+ gem "rspec", :group => :test
+ gem "wirble", :groups => [:development, :test]
+
+
+
+ The Bundler runtime allows its two main methods, Bundler.setup and
+ Bundler.require, to limit their impact to particular groups.
+
+
+
+ # setup adds gems to Ruby's load path
+ Bundler.setup # defaults to all groups
+ require "bundler/setup" # same as Bundler.setup
+ Bundler.setup(:default) # only set up the _default_ group
+ Bundler.setup(:test) # only set up the _test_ group (but `not` _default_)
+ Bundler.setup(:default, :test) # set up the _default_ and _test_ groups, but no others
+
+ # require requires all of the gems in the specified groups
+ Bundler.require # defaults to just the _default_ group
+ Bundler.require(:default) # identical
+ Bundler.require(:default, :test) # requires the _default_ and _test_ groups
+ Bundler.require(:test) # requires just the _test_ group
+
+
+
+ The Bundler CLI allows you to specify a list of groups whose gems bun-
+ dle install should not install with the --without option. To specify
+ multiple groups to ignore, specify a list of groups separated by spa-
+ ces.
+
+
+
+ bundle install --without test
+ bundle install --without development test
+
+
+
+ After running bundle install --without test, bundler will remember that
+ you excluded the test group in the last installation. The next time you
+ run bundle install, without any --without option, bundler will recall
+ it.
+
+ Also, calling Bundler.setup with no parameters, or calling require
+ "bundler/setup" will setup all groups except for the ones you excluded
+ via --without (since they are obviously not available).
+
+ Note that on bundle install, bundler downloads and evaluates all gems,
+ in order to create a single canonical list of all of the required gems
+ and their dependencies. This means that you cannot list different ver-
+ sions of the same gems in different groups. For more details, see
+ Understanding Bundler http://bundler.io/rationale.html.
+
+ PLATFORMS (:platforms)
+ If a gem should only be used in a particular platform or set of plat-
+ forms, you can specify them. Platforms are essentially identical to
+ groups, except that you do not need to use the --without install-time
+ flag to exclude groups of gems for other platforms.
+
+ There are a number of Gemfile platforms:
+
+ ruby C Ruby (MRI) or Rubinius, but NOT Windows
+
+ ruby_18
+ ruby AND version 1.8
+
+ ruby_19
+ ruby AND version 1.9
+
+ ruby_20
+ ruby AND version 2.0
+
+ ruby_21
+ ruby AND version 2.1
+
+ mri Same as ruby, but not Rubinius
+
+ mri_18 mri AND version 1.8
+
+ mri_19 mri AND version 1.9
+
+ mri_20 mri AND version 2.0
+
+ mri_21 mri AND version 2.1
+
+ rbx Same as ruby, but only Rubinius (not MRI)
+
+ jruby JRuby
+
+ mswin Windows
+
+ mingw Windows 32 bit 'mingw32' platform (aka RubyInstaller)
+
+ mingw_18
+ mingw AND version 1.8
+
+ mingw_19
+ mingw AND version 1.9
+
+ mingw_20
+ mingw AND version 2.0
+
+ mingw_21
+ mingw AND version 2.1
+
+ x64_mingw
+ Windows 64 bit 'mingw32' platform (aka RubyInstaller x64)
+
+ x64_mingw_20
+ x64_mingw AND version 2.0
+
+ x64_mingw_21
+ x64_mingw AND version 2.1
+
+ As with groups, you can specify one or more platforms:
+
+
+
+ gem "weakling", :platforms => :jruby
+ gem "ruby-debug", :platforms => :mri_18
+ gem "nokogiri", :platforms => [:mri_18, :jruby]
+
+
+
+ All operations involving groups (bundle install, Bundler.setup,
+ Bundler.require) behave exactly the same as if any groups not matching
+ the current platform were explicitly excluded.
+
+ GIT (:git)
+ If necessary, you can specify that a gem is located at a particular git
+ repository. The repository can be public
+ (http://github.com/rails/rails.git) or private
+ (git at github.com:rails/rails.git). If the repository is private, the
+ user that you use to run bundle install MUST have the appropriate keys
+ available in their $HOME/.ssh.
+
+ Git repositories are specified using the :git parameter. The group,
+ platforms, and require options are available and behave exactly the
+ same as they would for a normal gem.
+
+
+
+ gem "rails", :git => "git://github.com/rails/rails.git"
+
+
+
+ A git repository SHOULD have at least one file, at the root of the
+ directory containing the gem, with the extension .gemspec. This file
+ MUST contain a valid gem specification, as expected by the gem build
+ command. It MUST NOT have any dependencies, other than on the files in
+ the git repository itself and any built-in functionality of Ruby or
+ Rubygems.
+
+ If a git repository does not have a .gemspec, bundler will attempt to
+ create one, but it will not contain any dependencies, executables, or C
+ extension compilation instructions. As a result, it may fail to prop-
+ erly integrate into your application.
+
+ If a git repository does have a .gemspec for the gem you attached it
+ to, a version specifier, if provided, means that the git repository is
+ only valid if the .gemspec specifies a version matching the version
+ specifier. If not, bundler will print a warning.
+
+
+
+ gem "rails", "2.3.8", :git => "git://github.com/rails/rails.git"
+ # bundle install will fail, because the .gemspec in the rails
+ # repository's master branch specifies version 3.0.0
+
+
+
+ If a git repository does not have a .gemspec for the gem you attached
+ it to, a version specifier MUST be provided. Bundler will use this ver-
+ sion in the simple .gemspec it creates.
+
+ Git repositories support a number of additional options.
+
+ branch, tag, and ref
+ You MUST only specify at most one of these options. The default
+ is :branch => "master"
+
+ submodules
+ Specify :submodules => true to cause bundler to expand any sub-
+ modules included in the git repository
+
+ If a git repository contains multiple .gemspecs, each .gemspec repre-
+ sents a gem located at the same place in the file system as the .gem-
+ spec.
+
+
+
+ |~rails [git root]
+ | |-rails.gemspec [rails gem located here]
+ |~actionpack
+ | |-actionpack.gemspec [actionpack gem located here]
+ |~activesupport
+ | |-activesupport.gemspec [activesupport gem located here]
+ |...
+
+
+
+ To install a gem located in a git repository, bundler changes to the
+ directory containing the gemspec, runs gem build name.gemspec and then
+ installs the resulting gem. The gem build command, which comes standard
+ with Rubygems, evaluates the .gemspec in the context of the directory
+ in which it is located.
+
+ GITHUB (:github)
+ If the git repository you want to use is hosted on GitHub and is pub-
+ lic, you can use the :github shorthand to specify just the github user-
+ name and repository name (without the trailing ".git"), separated by a
+ slash. If both the username and repository name are the same, you can
+ omit one.
+
+
+
+ gem "rails", :github => "rails/rails"
+ gem "rails", :github => "rails"
+
+
+
+ Are both equivalent to
+
+
+
+ gem "rails", :git => "git://github.com/rails/rails.git"
+
+
+
+ In addition, if you wish to choose a specific branch:
+
+
+
+ gem "rails", :github => "rails/rails", :branch => "branch_name"
+
+
+
+ PATH (:path)
+ You can specify that a gem is located in a particular location on the
+ file system. Relative paths are resolved relative to the directory con-
+ taining the Gemfile.
+
+ Similar to the semantics of the :git option, the :path option requires
+ that the directory in question either contains a .gemspec for the gem,
+ or that you specify an explicit version that bundler should use.
+
+ Unlike :git, bundler does not compile C extensions for gems specified
+ as paths.
+
+
+
+ gem "rails", :path => "vendor/rails"
+
+
+
+BLOCK FORM OF GIT, PATH, GROUP and PLATFORMS
+ The :git, :path, :group, and :platforms options may be applied to a
+ group of gems by using block form.
+
+
+
+ git "git://github.com/rails/rails.git" do
+ gem "activesupport"
+ gem "actionpack"
+ end
+
+ platforms :ruby do
+ gem "ruby-debug"
+ gem "sqlite3"
+ end
+
+ group :development do
+ gem "wirble"
+ gem "faker"
+ end
+
+
+
+ In the case of the git block form, the :ref, :branch, :tag, and :sub-
+ modules options may be passed to the git method, and all gems in the
+ block will inherit those options.
+
+GEMSPEC (#gemspec)
+ If you wish to use Bundler to help install dependencies for a gem while
+ it is being developed, use the gemspec method to pull in the dependen-
+ cies listed in the .gemspec file.
+
+ The gemspec method adds any runtime dependencies as gem requirements in
+ the default group. It also adds development dependencies as gem
+ requirements in the development group. Finally, it adds a gem require-
+ ment on your project (:path => '.'). In conjunction with Bundler.setup,
+ this allows you to require project files in your test code as you would
+ if the project were installed as a gem; you need not manipulate the
+ load path manually or require project files via relative paths.
+
+ The gemspec method supports optional :path, :name, and :develop-
+ ment_group options, which control where bundler looks for the .gemspec,
+ what named .gemspec it uses (if more than one is present), and which
+ group development dependencies are included in.
+
+SOURCE PRIORITY
+ When attempting to locate a gem to satisfy a gem requirement, bundler
+ uses the following priority order:
+
+ 1. The source explicitly attached to the gem (using :path or :git)
+
+ 2. For implicit gems (dependencies of explicit gems), any git or path
+ repository otherwise declared. This results in bundler prioritizing
+ the ActiveSupport gem from the Rails git repository over ones from
+ rubygems.org
+
+ 3. The sources specified via source, searching each source in your
+ Gemfile from last added to first added.
+
+
+
+
+
+
+ November 2013 GEMFILE(5)
diff --git a/lib/bundler/parallel_workers/unix_worker.rb b/lib/bundler/parallel_workers/unix_worker.rb
index ce7b7fe..51c2d0d 100644
--- a/lib/bundler/parallel_workers/unix_worker.rb
+++ b/lib/bundler/parallel_workers/unix_worker.rb
@@ -14,6 +14,12 @@ module Bundler
end
end
+ def initialize(size, job)
+ # Close the persistent connections for the main thread before forking
+ Net::HTTP::Persistent.new('bundler', :ENV).shutdown
+ super
+ end
+
private
# Start forked workers for downloading gems. This version of worker
diff --git a/lib/bundler/remote_specification.rb b/lib/bundler/remote_specification.rb
index 5fe9505..85405c4 100644
--- a/lib/bundler/remote_specification.rb
+++ b/lib/bundler/remote_specification.rb
@@ -10,7 +10,7 @@ module Bundler
include MatchPlatform
attr_reader :name, :version, :platform
- attr_accessor :source
+ attr_accessor :source, :source_uri
def initialize(name, version, platform, spec_fetcher)
@name = name
diff --git a/lib/bundler/retry.rb b/lib/bundler/retry.rb
index 23d95c2..ddcdb2b 100644
--- a/lib/bundler/retry.rb
+++ b/lib/bundler/retry.rb
@@ -8,9 +8,10 @@ module Bundler
attr_accessor :attempts
end
- def initialize(name, attempts = nil)
+ def initialize(name, exceptions = nil, attempts = nil)
@name = name
attempts ||= default_attempts
+ @exceptions = Array(exceptions) || []
@total_runs = attempts.next # will run once, then upto attempts.times
end
@@ -41,9 +42,9 @@ module Bundler
def fail(e)
@failed = true
- raise e if last_attempt?
+ raise e if last_attempt? || @exceptions.any?{|k| k === e }
return true unless name
- Bundler.ui.warn "Retrying #{name} due to error (#{current_run.next}/#{total_runs}): #{e.message}"
+ Bundler.ui.warn "Retrying#{" #{name}" if name} due to error (#{current_run.next}/#{total_runs}): #{e.class} #{e.message}"
end
def keep_trying?
diff --git a/lib/bundler/ruby_version.rb b/lib/bundler/ruby_version.rb
index 73ce6c7..862dd35 100644
--- a/lib/bundler/ruby_version.rb
+++ b/lib/bundler/ruby_version.rb
@@ -111,7 +111,7 @@ module Bundler
end
def patchlevel
- RUBY_PATCHLEVEL
+ RUBY_PATCHLEVEL.to_s
end
end
end
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb
index ac4567a..9f50d96 100644
--- a/lib/bundler/rubygems_ext.rb
+++ b/lib/bundler/rubygems_ext.rb
@@ -13,7 +13,10 @@ module Gem
@loaded_stacks = Hash.new { |h,k| h[k] = [] }
class Specification
- attr_accessor :source, :location, :relative_loaded_from
+ attr_accessor :source_uri, :location, :relative_loaded_from
+
+ remove_method :source if instance_methods(false).include?(:source)
+ attr_accessor :source
alias_method :rg_full_gem_path, :full_gem_path
alias_method :rg_loaded_from, :loaded_from
@@ -31,6 +34,8 @@ module Gem
end
def load_paths
+ return full_require_paths if respond_to?(:full_require_paths)
+
require_paths.map do |require_path|
if require_path.include?(full_gem_path)
require_path
@@ -41,7 +46,7 @@ module Gem
end
# RubyGems 1.8+ used only.
- remove_method :gem_dir if method_defined? :gem_dir
+ remove_method :gem_dir if instance_methods(false).include?(:gem_dir)
def gem_dir
full_gem_path
end
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index 3bbbf1d..cf0d628 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -187,6 +187,7 @@ module Bundler
end
def download_gem(spec, uri, path)
+ uri = Bundler::Source.mirror_for(uri)
Gem::RemoteFetcher.fetcher.download(spec, uri, path)
end
@@ -212,6 +213,8 @@ module Bundler
end
def replace_gem(specs)
+ reverse_rubygems_kernel_mixin
+
executables = specs.map { |s| s.executables }.flatten
::Kernel.send(:define_method, :gem) do |dep, *reqs|
@@ -252,21 +255,9 @@ module Bundler
end
end
- def stub_source_index137(specs)
- # Rubygems versions lower than 1.7 use SourceIndex#from_gems_in
- source_index_class = (class << Gem::SourceIndex ; self ; end)
- source_index_class.send(:remove_method, :from_gems_in)
- source_index_class.send(:define_method, :from_gems_in) do |*args|
- source_index = Gem::SourceIndex.new
- source_index.spec_dirs = *args
- source_index.add_specs(*specs)
- source_index
- end
- end
-
- def stub_source_index170(specs)
+ def stub_source_index(specs)
Gem::SourceIndex.send(:alias_method, :old_initialize, :initialize)
- Gem::SourceIndex.send(:define_method, :initialize) do |*args|
+ redefine_method(Gem::SourceIndex, :initialize) do |*args|
@gems = {}
# You're looking at this thinking: Oh! This is how I make those
# rubygems deprecations go away!
@@ -289,8 +280,7 @@ module Bundler
# +specs+
def replace_bin_path(specs)
gem_class = (class << Gem ; self ; end)
- gem_class.send(:remove_method, :bin_path)
- gem_class.send(:define_method, :bin_path) do |name, *args|
+ redefine_method(gem_class, :bin_path) do |name, *args|
exec_name = args.first
if exec_name == 'bundle'
@@ -317,15 +307,12 @@ module Bundler
# we don't #refresh, so stub it out.
def replace_refresh
gem_class = (class << Gem ; self ; end)
- gem_class.send(:remove_method, :refresh)
- gem_class.send(:define_method, :refresh) { }
+ redefine_method(gem_class, :refresh) { }
end
# Replace or hook into Rubygems to provide a bundlerized view
# of the world.
def replace_entrypoints(specs)
- reverse_rubygems_kernel_mixin
-
replace_gem(specs)
stub_rubygems(specs)
@@ -339,7 +326,7 @@ module Bundler
# This backports the correct segment generation code from Rubygems 1.4+
# by monkeypatching it into the method in Rubygems 1.3.6 and 1.3.7.
def backport_segment_generation
- Gem::Version.send(:define_method, :segments) do
+ redefine_method(Gem::Version, :segments) do
@segments ||= @version.scan(/[0-9]+|[a-z]+/i).map do |s|
/^\d+$/ =~ s ? s.to_i : s
end
@@ -348,7 +335,7 @@ module Bundler
# This backport fixes the marshaling of @segments.
def backport_yaml_initialize
- Gem::Version.send(:define_method, :yaml_initialize) do |tag, map|
+ redefine_method(Gem::Version, :yaml_initialize) do |tag, map|
@version = map['version']
@segments = nil
@hash = nil
@@ -358,32 +345,39 @@ module Bundler
# This backports base_dir which replaces installation path
# Rubygems 1.8+
def backport_base_dir
- Gem::Specification.send(:define_method, :base_dir) do
+ redefine_method(Gem::Specification, :base_dir) do
return Gem.dir unless loaded_from
File.dirname File.dirname loaded_from
end
end
def backport_cache_file
- Gem::Specification.send(:define_method, :cache_dir) do
+ redefine_method(Gem::Specification, :cache_dir) do
@cache_dir ||= File.join base_dir, "cache"
end
- Gem::Specification.send(:define_method, :cache_file) do
+ redefine_method(Gem::Specification, :cache_file) do
@cache_file ||= File.join cache_dir, "#{full_name}.gem"
end
end
def backport_spec_file
- Gem::Specification.send(:define_method, :spec_dir) do
+ redefine_method(Gem::Specification, :spec_dir) do
@spec_dir ||= File.join base_dir, "specifications"
end
- Gem::Specification.send(:define_method, :spec_file) do
+ redefine_method(Gem::Specification, :spec_file) do
@spec_file ||= File.join spec_dir, "#{full_name}.gemspec"
end
end
+ def redefine_method(klass, method, &block)
+ if klass.instance_methods(false).include?(method)
+ klass.send(:remove_method, method)
+ end
+ klass.send(:define_method, method, &block)
+ end
+
# Rubygems 1.4 through 1.6
class Legacy < RubygemsIntegration
def initialize
@@ -395,7 +389,14 @@ module Bundler
end
def stub_rubygems(specs)
- stub_source_index137(specs)
+ # Rubygems versions lower than 1.7 use SourceIndex#from_gems_in
+ source_index_class = (class << Gem::SourceIndex ; self ; end)
+ source_index_class.send(:define_method, :from_gems_in) do |*args|
+ source_index = Gem::SourceIndex.new
+ source_index.spec_dirs = *args
+ source_index.add_specs(*specs)
+ source_index
+ end
end
def all_specs
@@ -418,7 +419,7 @@ module Bundler
# Rubygems 1.7
class Transitional < Legacy
def stub_rubygems(specs)
- stub_source_index170(specs)
+ stub_source_index(specs)
end
end
@@ -431,7 +432,7 @@ module Bundler
Gem::Specification.all = specs
}
- stub_source_index170(specs)
+ stub_source_index(specs)
end
def all_specs
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index 02b6cef..55218d9 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -29,6 +29,7 @@ module Bundler
def all
env_keys = ENV.keys.select { |k| k =~ /BUNDLE_.*/ }
+
keys = @global_config.keys | @local_config.keys | env_keys
keys.map do |key|
@@ -46,6 +47,16 @@ module Bundler
repos
end
+ def gem_mirrors
+ all.inject({}) do |h, k|
+ if k =~ /^mirror\./
+ uri = normalize_uri($')
+ h[uri] = normalize_uri(self[k])
+ end
+ h
+ end
+ end
+
def locations(key)
key = key_for(key)
locations = {}
@@ -149,5 +160,15 @@ module Bundler
end
end
+ # TODO: duplicates Rubygems#normalize_uri
+ # TODO: is this the correct place to validate mirror URIs?
+ def normalize_uri(uri)
+ uri = uri.to_s
+ uri = "#{uri}/" unless uri =~ %r[/\Z]
+ uri = URI(uri)
+ raise ArgumentError, "Gem mirror sources must be absolute URIs (configured: #{mirror_source})" unless uri.absolute?
+ uri
+ end
+
end
end
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb
index c75599f..4ab7a8e 100644
--- a/lib/bundler/source.rb
+++ b/lib/bundler/source.rb
@@ -1,7 +1,18 @@
module Bundler
module Source
autoload :Rubygems, 'bundler/source/rubygems'
- autoload :Path, 'bundler/source/path'
- autoload :Git, 'bundler/source/git'
+ autoload :Path, 'bundler/source/path'
+ autoload :Git, 'bundler/source/git'
+
+ def self.mirror_for(uri)
+ uri = URI(uri.to_s) unless uri.is_a?(URI)
+
+ # Settings keys are all downcased
+ mirrors = Bundler.settings.gem_mirrors
+ normalized_key = URI(uri.to_s.downcase)
+
+ mirrors[normalized_key] || uri
+ end
+
end
end
diff --git a/lib/bundler/source/git/git_proxy.rb b/lib/bundler/source/git/git_proxy.rb
index 919de7b..79c8a33 100644
--- a/lib/bundler/source/git/git_proxy.rb
+++ b/lib/bundler/source/git/git_proxy.rb
@@ -13,7 +13,7 @@ module Bundler
def initialize(command)
msg = "Bundler is trying to run a `git #{command}` at runtime. You probably need to run `bundle install`. However, "
msg << "this error message could probably be more useful. Please submit a ticket at http://github.com/bundler/bundler/issues "
- mag << "with steps to reproduce as well as the following\n\nCALLER: #{caller.join("\n")}"
+ msg << "with steps to reproduce as well as the following\n\nCALLER: #{caller.join("\n")}"
super msg
end
end
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index b7fdbd2..90f5429 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -72,6 +72,14 @@ module Bundler
return ["Using #{spec.name} (#{spec.version})", nil]
end
+ # Download the gem to get the spec, because some specs that are returned
+ # by rubygems.org are broken and wrong.
+ if spec.source_uri
+ path = Fetcher.download_gem_from_uri(spec, spec.source_uri)
+ s = Bundler.rubygems.spec_from_gem(path, Bundler.settings["trust-policy"])
+ spec.__swap__(s)
+ end
+
install_message = "Installing #{spec.name} (#{spec.version})"
path = cached_gem(spec)
if Bundler.requires_sudo?
@@ -221,24 +229,46 @@ module Bundler
index_fetchers = fetchers - api_fetchers
# gather lists from non-api sites
- index_fetchers.each { |f| idx.use f.specs(nil, self) }
+ index_fetchers.each do |f|
+ Bundler.ui.info "Fetching source index from #{f.uri}"
+ idx.use f.specs(nil, self)
+ end
return idx if api_fetchers.empty?
# because ensuring we have all the gems we need involves downloading
# the gemspecs of those gems, if the non-api sites contain more than
# about 100 gems, we just treat all sites as non-api for speed.
- if idx.size < API_REQUEST_LIMIT && dependency_names.size < API_REQUEST_LIMIT
- api_fetchers.each { |f| idx.use f.specs(dependency_names, self) }
-
- # it's possible that gems from one source depend on gems from some
- # other source, so now we download gemspecs and iterate over those
- # dependencies, looking for gems we don't have info on yet.
- unmet = idx.unmet_dependency_names
-
- # if there are any cross-site gems we missed, get them now
- api_fetchers.each { |f| idx.use f.specs(unmet, self) } if unmet.any?
- else
- api_fetchers.each { |f| idx.use f.specs(nil, self) }
+ allow_api = idx.size < API_REQUEST_LIMIT && dependency_names.size < API_REQUEST_LIMIT
+
+ if allow_api
+ api_fetchers.each do |f|
+ Bundler.ui.info "Fetching gem metadata from #{f.uri}", Bundler.ui.debug?
+ idx.use f.specs(dependency_names, self)
+ Bundler.ui.info "" if !Bundler.ui.debug? # new line now that the dots are over
+ end
+
+ if api_fetchers.all?{|f| f.use_api }
+ # it's possible that gems from one source depend on gems from some
+ # other source, so now we download gemspecs and iterate over those
+ # dependencies, looking for gems we don't have info on yet.
+ unmet = idx.unmet_dependency_names
+
+ # if there are any cross-site gems we missed, get them now
+ api_fetchers.each do |f|
+ Bundler.ui.info "Fetching additional metadata from #{f.uri}", Bundler.ui.debug?
+ idx.use f.specs(unmet, self)
+ Bundler.ui.info "" if !Bundler.ui.debug? # new line now that the dots are over
+ end if unmet.any?
+ else
+ allow_api = false
+ end
+ end
+
+ if !allow_api
+ api_fetchers.each do |f|
+ Bundler.ui.info "Fetching source index from #{f.uri}"
+ idx.use f.specs(nil, self)
+ end
end
return idx
diff --git a/lib/bundler/templates/newgem/README.md.tt b/lib/bundler/templates/newgem/README.md.tt
index 98692c5..2e9c758 100644
--- a/lib/bundler/templates/newgem/README.md.tt
+++ b/lib/bundler/templates/newgem/README.md.tt
@@ -22,7 +22,7 @@ TODO: Write usage instructions here
## Contributing
-1. Fork it
+1. Fork it ( http://github.com/<my-github-username>/<%=config[:name]%>/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
diff --git a/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt b/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt
index ad324da..f8ef6e8 100644
--- a/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt
+++ b/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt
@@ -2,10 +2,10 @@ require 'spec_helper'
describe <%= config[:constant_name] %> do
it 'should have a version number' do
- <%= config[:constant_name] %>::VERSION.should_not be_nil
+ expect(<%= config[:constant_name] %>::VERSION).not_to be nil
end
it 'should do something useful' do
- false.should be_true
+ expect(false).to be true
end
end
diff --git a/lib/bundler/version.rb b/lib/bundler/version.rb
index 5da4319..5a57197 100644
--- a/lib/bundler/version.rb
+++ b/lib/bundler/version.rb
@@ -2,5 +2,5 @@ module Bundler
# We're doing this because we might write tests that deal
# with other versions of bundler and we are unsure how to
# handle this better.
- VERSION = "1.4.0.rc.1" unless defined?(::Bundler::VERSION)
+ VERSION = "1.5.0.rc.1" unless defined?(::Bundler::VERSION)
end
diff --git a/man/bundle-config.ronn b/man/bundle-config.ronn
index 37f9fff..08e0268 100644
--- a/man/bundle-config.ronn
+++ b/man/bundle-config.ronn
@@ -138,3 +138,12 @@ accidental locking to a different branch.
Finally, Bundler also ensures that the current revision in the
`Gemfile.lock` exists in the local git repository. By doing this, Bundler
forces you to fetch the latest changes in the remotes.
+
+## MIRRORS OF GEM REPOSITORIES
+
+Bundler supports overriding gem sources with mirrors. This allows you to
+configure rubygems.org as the gem source in your Gemfile while still using your
+mirror to fetch gems.
+
+ bundle config mirror.http://rubygems.org http://rubygems-mirror.org
+
diff --git a/man/bundle-install.ronn b/man/bundle-install.ronn
index 4bbfc8c..2af9c45 100644
--- a/man/bundle-install.ronn
+++ b/man/bundle-install.ronn
@@ -11,6 +11,7 @@ bundle-install(1) -- Install the dependencies specified in your Gemfile
[--standalone[=GROUP1[ GROUP2...]]]
[--trust-policy=POLICY]
[--jobs=SIZE]
+ [--retry=TRIES]
[--no-cache]
[--quiet]
@@ -41,11 +42,11 @@ update process below under [CONSERVATIVE UPDATING][].
to it.
* `--path=<path>`:
- The location to install the gems in the bundle to. This defaults
- to the gem home, which is the location that `gem install` installs
- gems to. This means that, by default, gems installed without a
- `--path` setting will show up in `gem list`. This setting is a
- [remembered option][REMEMBERED OPTIONS].
+ The location to install the gems in the bundle to. This defaults to
+ Rubygems' gem home, which is also the default location where `gem
+ install` installs gems. This means that, by default, gems installed
+ without a `--path` setting will show up in `gem list`. This setting is
+ a [remembered option][REMEMBERED OPTIONS].
* `--system`:
Installs the gems in the bundle to the system location. This
@@ -92,6 +93,9 @@ update process below under [CONSERVATIVE UPDATING][].
* `--jobs=[<size>]`:
Install gems parallely by starting <size> number of parallel workers.
+* `--retry[<tries]`:
+ Retries failed network or git requests <tries> times.
+
* `--no-cache`:
Do not update the cache in `vendor/cache` with the newly bundled gems. This
does not remove any existing cached gems, only stops the newly bundled gems
diff --git a/man/gemfile.5.ronn b/man/gemfile.5.ronn
index 2796e8c..1dec8b9 100644
--- a/man/gemfile.5.ronn
+++ b/man/gemfile.5.ronn
@@ -53,6 +53,12 @@ engine version specified _must_ match the Ruby version.
ruby "1.8.7", :engine => "jruby", :engine_version => "1.6.7"
+### PATCHLEVEL (:patchlevel)
+
+Each application _may_ specify a Ruby patchlevel.
+
+ ruby "2.0.0", :patchlevel => "247"
+
## GEMS (#gem)
Specify gem requirements using the `gem` method, with the following arguments.
diff --git a/metadata.yml b/metadata.yml
new file mode 100644
index 0000000..071c844
--- /dev/null
+++ b/metadata.yml
@@ -0,0 +1,467 @@
+--- !ruby/object:Gem::Specification
+name: bundler
+version: !ruby/object:Gem::Version
+ hash: -3177594936
+ prerelease: 6
+ segments:
+ - 1
+ - 5
+ - 0
+ - rc
+ - 1
+ version: 1.5.0.rc.1
+platform: ruby
+authors:
+- "Andr\xC3\xA9 Arko"
+- Terence Lee
+- Carl Lerche
+- Yehuda Katz
+autorequire:
+bindir: bin
+cert_chain: []
+
+date: 2013-11-10 00:00:00 Z
+dependencies:
+- !ruby/object:Gem::Dependency
+ name: ronn
+ prerelease: false
+ requirement: &id001 !ruby/object:Gem::Requirement
+ none: false
+ requirements:
+ - - ~>
+ - !ruby/object:Gem::Version
+ hash: 5
+ segments:
+ - 0
+ - 7
+ - 3
+ version: 0.7.3
+ type: :development
+ version_requirements: *id001
+- !ruby/object:Gem::Dependency
+ name: rspec
+ prerelease: false
+ requirement: &id002 !ruby/object:Gem::Requirement
+ none: false
+ requirements:
+ - - ~>
+ - !ruby/object:Gem::Version
+ hash: -1680146190
+ segments:
+ - 2
+ - 99
+ - 0
+ - beta
+ - 1
+ version: 2.99.0.beta1
+ type: :development
+ version_requirements: *id002
+description: Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably
+email:
+- andre at arko.net
+executables:
+- bundle
+- bundler
+extensions: []
+
+extra_rdoc_files: []
+
+files:
+- .gitignore
+- .rspec
+- .travis.yml
+- CHANGELOG.md
+- CONTRIBUTING.md
+- DEVELOPMENT.md
+- ISSUES.md
+- LICENSE.md
+- README.md
+- Rakefile
+- UPGRADING.md
+- bin/bundle
+- bin/bundle_ruby
+- bin/bundler
+- bundler.gemspec
+- lib/bundler.rb
+- lib/bundler/capistrano.rb
+- lib/bundler/cli.rb
+- lib/bundler/constants.rb
+- lib/bundler/current_ruby.rb
+- lib/bundler/definition.rb
+- lib/bundler/dep_proxy.rb
+- lib/bundler/dependency.rb
+- lib/bundler/deployment.rb
+- lib/bundler/deprecate.rb
+- lib/bundler/dsl.rb
+- lib/bundler/endpoint_specification.rb
+- lib/bundler/env.rb
+- lib/bundler/environment.rb
+- lib/bundler/fetcher.rb
+- lib/bundler/friendly_errors.rb
+- lib/bundler/gem_helper.rb
+- lib/bundler/gem_helpers.rb
+- lib/bundler/gem_installer.rb
+- lib/bundler/gem_path_manipulation.rb
+- lib/bundler/gem_tasks.rb
+- lib/bundler/graph.rb
+- lib/bundler/index.rb
+- lib/bundler/injector.rb
+- lib/bundler/installer.rb
+- lib/bundler/lazy_specification.rb
+- lib/bundler/lockfile_parser.rb
+- lib/bundler/match_platform.rb
+- lib/bundler/parallel_workers.rb
+- lib/bundler/parallel_workers/thread_worker.rb
+- lib/bundler/parallel_workers/unix_worker.rb
+- lib/bundler/parallel_workers/worker.rb
+- lib/bundler/psyched_yaml.rb
+- lib/bundler/remote_specification.rb
+- lib/bundler/resolver.rb
+- lib/bundler/retry.rb
+- lib/bundler/ruby_dsl.rb
+- lib/bundler/ruby_version.rb
+- lib/bundler/rubygems_ext.rb
+- lib/bundler/rubygems_integration.rb
+- lib/bundler/runtime.rb
+- lib/bundler/safe_catch.rb
+- lib/bundler/settings.rb
+- lib/bundler/setup.rb
+- lib/bundler/shared_helpers.rb
+- lib/bundler/similarity_detector.rb
+- lib/bundler/source.rb
+- lib/bundler/source/git.rb
+- lib/bundler/source/git/git_proxy.rb
+- lib/bundler/source/path.rb
+- lib/bundler/source/path/installer.rb
+- lib/bundler/source/rubygems.rb
+- lib/bundler/spec_set.rb
+- lib/bundler/ssl_certs/.document
+- lib/bundler/ssl_certs/AddTrustExternalCARoot.pem
+- lib/bundler/ssl_certs/Entrust_net-Secure-Server-Certification-Authority.pem
+- lib/bundler/ssl_certs/GeoTrust_Global_CA.pem
+- lib/bundler/ssl_certs/VerisignClass3PublicPrimaryCertificationAuthority-G2.pem
+- lib/bundler/templates/Executable
+- lib/bundler/templates/Executable.standalone
+- lib/bundler/templates/Gemfile
+- lib/bundler/templates/newgem/.travis.yml.tt
+- lib/bundler/templates/newgem/Gemfile.tt
+- lib/bundler/templates/newgem/LICENSE.txt.tt
+- lib/bundler/templates/newgem/README.md.tt
+- lib/bundler/templates/newgem/Rakefile.tt
+- lib/bundler/templates/newgem/bin/newgem.tt
+- lib/bundler/templates/newgem/gitignore.tt
+- lib/bundler/templates/newgem/lib/newgem.rb.tt
+- lib/bundler/templates/newgem/lib/newgem/version.rb.tt
+- lib/bundler/templates/newgem/newgem.gemspec.tt
+- lib/bundler/templates/newgem/rspec.tt
+- lib/bundler/templates/newgem/spec/newgem_spec.rb.tt
+- lib/bundler/templates/newgem/spec/spec_helper.rb.tt
+- lib/bundler/templates/newgem/test/minitest_helper.rb.tt
+- lib/bundler/templates/newgem/test/test_newgem.rb.tt
+- lib/bundler/ui.rb
+- lib/bundler/vendor/.document
+- lib/bundler/vendor/net/http/faster.rb
+- lib/bundler/vendor/net/http/persistent.rb
+- lib/bundler/vendor/net/http/persistent/ssl_reuse.rb
+- lib/bundler/vendor/thor.rb
+- lib/bundler/vendor/thor/actions.rb
+- lib/bundler/vendor/thor/actions/create_file.rb
+- lib/bundler/vendor/thor/actions/create_link.rb
+- lib/bundler/vendor/thor/actions/directory.rb
+- lib/bundler/vendor/thor/actions/empty_directory.rb
+- lib/bundler/vendor/thor/actions/file_manipulation.rb
+- lib/bundler/vendor/thor/actions/inject_into_file.rb
+- lib/bundler/vendor/thor/base.rb
+- lib/bundler/vendor/thor/command.rb
+- lib/bundler/vendor/thor/core_ext/hash_with_indifferent_access.rb
+- lib/bundler/vendor/thor/core_ext/io_binary_read.rb
+- lib/bundler/vendor/thor/core_ext/ordered_hash.rb
+- lib/bundler/vendor/thor/error.rb
+- lib/bundler/vendor/thor/group.rb
+- lib/bundler/vendor/thor/invocation.rb
+- lib/bundler/vendor/thor/parser.rb
+- lib/bundler/vendor/thor/parser/argument.rb
+- lib/bundler/vendor/thor/parser/arguments.rb
+- lib/bundler/vendor/thor/parser/option.rb
+- lib/bundler/vendor/thor/parser/options.rb
+- lib/bundler/vendor/thor/rake_compat.rb
+- lib/bundler/vendor/thor/runner.rb
+- lib/bundler/vendor/thor/shell.rb
+- lib/bundler/vendor/thor/shell/basic.rb
+- lib/bundler/vendor/thor/shell/color.rb
+- lib/bundler/vendor/thor/shell/html.rb
+- lib/bundler/vendor/thor/util.rb
+- lib/bundler/vendor/thor/version.rb
+- lib/bundler/vendored_persistent.rb
+- lib/bundler/vendored_thor.rb
+- lib/bundler/version.rb
+- lib/bundler/vlad.rb
+- man/bundle-config.ronn
+- man/bundle-exec.ronn
+- man/bundle-install.ronn
+- man/bundle-package.ronn
+- man/bundle-platform.ronn
+- man/bundle-update.ronn
+- man/bundle.ronn
+- man/gemfile.5.ronn
+- man/index.txt
+- spec/bundler/bundler_spec.rb
+- spec/bundler/cli_rspec.rb
+- spec/bundler/definition_spec.rb
+- spec/bundler/dsl_spec.rb
+- spec/bundler/friendly_errors_spec.rb
+- spec/bundler/gem_helper_spec.rb
+- spec/bundler/psyched_yaml_spec.rb
+- spec/bundler/retry_spec.rb
+- spec/bundler/safe_catch_spec.rb
+- spec/bundler/source_spec.rb
+- spec/cache/gems_spec.rb
+- spec/cache/git_spec.rb
+- spec/cache/path_spec.rb
+- spec/cache/platform_spec.rb
+- spec/commands/binstubs_spec.rb
+- spec/commands/check_spec.rb
+- spec/commands/clean_spec.rb
+- spec/commands/config_spec.rb
+- spec/commands/console_spec.rb
+- spec/commands/exec_spec.rb
+- spec/commands/help_spec.rb
+- spec/commands/init_spec.rb
+- spec/commands/inject_spec.rb
+- spec/commands/licenses_spec.rb
+- spec/commands/newgem_spec.rb
+- spec/commands/open_spec.rb
+- spec/commands/outdated_spec.rb
+- spec/commands/show_spec.rb
+- spec/install/binstubs_spec.rb
+- spec/install/bundler_spec.rb
+- spec/install/deploy_spec.rb
+- spec/install/gemfile/gemspec_spec.rb
+- spec/install/gemfile/git_spec.rb
+- spec/install/gemfile/path_spec.rb
+- spec/install/gemfile_spec.rb
+- spec/install/gems/c_ext_spec.rb
+- spec/install/gems/dependency_api_spec.rb
+- spec/install/gems/env_spec.rb
+- spec/install/gems/flex_spec.rb
+- spec/install/gems/groups_spec.rb
+- spec/install/gems/mirror_spec.rb
+- spec/install/gems/packed_spec.rb
+- spec/install/gems/platform_spec.rb
+- spec/install/gems/post_install_spec.rb
+- spec/install/gems/resolving_spec.rb
+- spec/install/gems/simple_case_spec.rb
+- spec/install/gems/standalone_spec.rb
+- spec/install/gems/sudo_spec.rb
+- spec/install/gems/win32_spec.rb
+- spec/install/gemspecs_spec.rb
+- spec/install/path_spec.rb
+- spec/install/post_bundle_message_spec.rb
+- spec/install/prereleases_spec.rb
+- spec/install/security_policy_spec.rb
+- spec/install/upgrade_spec.rb
+- spec/lock/git_spec.rb
+- spec/lock/lockfile_spec.rb
+- spec/other/bundle_ruby_spec.rb
+- spec/other/cli_dispatch_spec.rb
+- spec/other/ext_spec.rb
+- spec/other/platform_spec.rb
+- spec/quality_spec.rb
+- spec/realworld/dependency_api_spec.rb
+- spec/realworld/edgecases_spec.rb
+- spec/realworld/parallel_install_spec.rb
+- spec/realworld/parallel_update_spec.rb
+- spec/resolver/basic_spec.rb
+- spec/resolver/platform_spec.rb
+- spec/runtime/executable_spec.rb
+- spec/runtime/load_spec.rb
+- spec/runtime/platform_spec.rb
+- spec/runtime/require_spec.rb
+- spec/runtime/setup_spec.rb
+- spec/runtime/with_clean_env_spec.rb
+- spec/spec_helper.rb
+- spec/support/artifice/endopint_marshal_fail_basic_authentication.rb
+- spec/support/artifice/endpoint.rb
+- spec/support/artifice/endpoint_500.rb
+- spec/support/artifice/endpoint_api_missing.rb
+- spec/support/artifice/endpoint_basic_authentication.rb
+- spec/support/artifice/endpoint_creds_diff_host.rb
+- spec/support/artifice/endpoint_extra.rb
+- spec/support/artifice/endpoint_extra_missing.rb
+- spec/support/artifice/endpoint_fallback.rb
+- spec/support/artifice/endpoint_marshal_fail.rb
+- spec/support/artifice/endpoint_redirect.rb
+- spec/support/artifice/endpoint_timeout.rb
+- spec/support/builders.rb
+- spec/support/fakeweb/rack-1.0.0.marshal
+- spec/support/fakeweb/windows.rb
+- spec/support/hax.rb
+- spec/support/helpers.rb
+- spec/support/indexes.rb
+- spec/support/matchers.rb
+- spec/support/path.rb
+- spec/support/platforms.rb
+- spec/support/ruby_ext.rb
+- spec/support/rubygems_ext.rb
+- spec/support/streams.rb
+- spec/support/sudo.rb
+- spec/update/gems_spec.rb
+- spec/update/git_spec.rb
+- spec/update/source_spec.rb
+- lib/bundler/man/bundle-exec
+- lib/bundler/man/bundle
+- lib/bundler/man/bundle-install
+- lib/bundler/man/gemfile.5
+- lib/bundler/man/bundle-platform
+- lib/bundler/man/bundle-package
+- lib/bundler/man/bundle-update
+- lib/bundler/man/bundle-exec.txt
+- lib/bundler/man/gemfile.5.txt
+- lib/bundler/man/bundle-update.txt
+- lib/bundler/man/bundle-config
+- lib/bundler/man/bundle-platform.txt
+- lib/bundler/man/bundle-config.txt
+- lib/bundler/man/bundle.txt
+- lib/bundler/man/bundle-package.txt
+- lib/bundler/man/bundle-install.txt
+homepage: http://bundler.io
+licenses:
+- MIT
+post_install_message:
+rdoc_options: []
+
+require_paths:
+- lib
+required_ruby_version: !ruby/object:Gem::Requirement
+ none: false
+ requirements:
+ - - ">="
+ - !ruby/object:Gem::Version
+ hash: 57
+ segments:
+ - 1
+ - 8
+ - 7
+ version: 1.8.7
+required_rubygems_version: !ruby/object:Gem::Requirement
+ none: false
+ requirements:
+ - - ">="
+ - !ruby/object:Gem::Version
+ hash: 23
+ segments:
+ - 1
+ - 3
+ - 6
+ version: 1.3.6
+requirements: []
+
+rubyforge_project:
+rubygems_version: 1.8.24
+signing_key:
+specification_version: 3
+summary: The best way to manage your application's dependencies
+test_files:
+- spec/bundler/bundler_spec.rb
+- spec/bundler/cli_rspec.rb
+- spec/bundler/definition_spec.rb
+- spec/bundler/dsl_spec.rb
+- spec/bundler/friendly_errors_spec.rb
+- spec/bundler/gem_helper_spec.rb
+- spec/bundler/psyched_yaml_spec.rb
+- spec/bundler/retry_spec.rb
+- spec/bundler/safe_catch_spec.rb
+- spec/bundler/source_spec.rb
+- spec/cache/gems_spec.rb
+- spec/cache/git_spec.rb
+- spec/cache/path_spec.rb
+- spec/cache/platform_spec.rb
+- spec/commands/binstubs_spec.rb
+- spec/commands/check_spec.rb
+- spec/commands/clean_spec.rb
+- spec/commands/config_spec.rb
+- spec/commands/console_spec.rb
+- spec/commands/exec_spec.rb
+- spec/commands/help_spec.rb
+- spec/commands/init_spec.rb
+- spec/commands/inject_spec.rb
+- spec/commands/licenses_spec.rb
+- spec/commands/newgem_spec.rb
+- spec/commands/open_spec.rb
+- spec/commands/outdated_spec.rb
+- spec/commands/show_spec.rb
+- spec/install/binstubs_spec.rb
+- spec/install/bundler_spec.rb
+- spec/install/deploy_spec.rb
+- spec/install/gemfile/gemspec_spec.rb
+- spec/install/gemfile/git_spec.rb
+- spec/install/gemfile/path_spec.rb
+- spec/install/gemfile_spec.rb
+- spec/install/gems/c_ext_spec.rb
+- spec/install/gems/dependency_api_spec.rb
+- spec/install/gems/env_spec.rb
+- spec/install/gems/flex_spec.rb
+- spec/install/gems/groups_spec.rb
+- spec/install/gems/mirror_spec.rb
+- spec/install/gems/packed_spec.rb
+- spec/install/gems/platform_spec.rb
+- spec/install/gems/post_install_spec.rb
+- spec/install/gems/resolving_spec.rb
+- spec/install/gems/simple_case_spec.rb
+- spec/install/gems/standalone_spec.rb
+- spec/install/gems/sudo_spec.rb
+- spec/install/gems/win32_spec.rb
+- spec/install/gemspecs_spec.rb
+- spec/install/path_spec.rb
+- spec/install/post_bundle_message_spec.rb
+- spec/install/prereleases_spec.rb
+- spec/install/security_policy_spec.rb
+- spec/install/upgrade_spec.rb
+- spec/lock/git_spec.rb
+- spec/lock/lockfile_spec.rb
+- spec/other/bundle_ruby_spec.rb
+- spec/other/cli_dispatch_spec.rb
+- spec/other/ext_spec.rb
+- spec/other/platform_spec.rb
+- spec/quality_spec.rb
+- spec/realworld/dependency_api_spec.rb
+- spec/realworld/edgecases_spec.rb
+- spec/realworld/parallel_install_spec.rb
+- spec/realworld/parallel_update_spec.rb
+- spec/resolver/basic_spec.rb
+- spec/resolver/platform_spec.rb
+- spec/runtime/executable_spec.rb
+- spec/runtime/load_spec.rb
+- spec/runtime/platform_spec.rb
+- spec/runtime/require_spec.rb
+- spec/runtime/setup_spec.rb
+- spec/runtime/with_clean_env_spec.rb
+- spec/spec_helper.rb
+- spec/support/artifice/endopint_marshal_fail_basic_authentication.rb
+- spec/support/artifice/endpoint.rb
+- spec/support/artifice/endpoint_500.rb
+- spec/support/artifice/endpoint_api_missing.rb
+- spec/support/artifice/endpoint_basic_authentication.rb
+- spec/support/artifice/endpoint_creds_diff_host.rb
+- spec/support/artifice/endpoint_extra.rb
+- spec/support/artifice/endpoint_extra_missing.rb
+- spec/support/artifice/endpoint_fallback.rb
+- spec/support/artifice/endpoint_marshal_fail.rb
+- spec/support/artifice/endpoint_redirect.rb
+- spec/support/artifice/endpoint_timeout.rb
+- spec/support/builders.rb
+- spec/support/fakeweb/rack-1.0.0.marshal
+- spec/support/fakeweb/windows.rb
+- spec/support/hax.rb
+- spec/support/helpers.rb
+- spec/support/indexes.rb
+- spec/support/matchers.rb
+- spec/support/path.rb
+- spec/support/platforms.rb
+- spec/support/ruby_ext.rb
+- spec/support/rubygems_ext.rb
+- spec/support/streams.rb
+- spec/support/sudo.rb
+- spec/update/gems_spec.rb
+- spec/update/git_spec.rb
+- spec/update/source_spec.rb
diff --git a/spec/bundler/retry_spec.rb b/spec/bundler/retry_spec.rb
index a50f5da..4dd181d 100644
--- a/spec/bundler/retry_spec.rb
+++ b/spec/bundler/retry_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe "bundle retry" do
it "return successful result if no errors" do
attempts = 0
- result = Bundler::Retry.new(nil, 3).attempt do
+ result = Bundler::Retry.new(nil, nil, 3).attempt do
attempts += 1
:success
end
@@ -11,10 +11,21 @@ describe "bundle retry" do
expect(attempts).to eq(1)
end
+ it "defaults to retrying twice" do
+ attempts = 0
+ expect {
+ Bundler::Retry.new(nil).attempt do
+ attempts += 1
+ raise "nope"
+ end
+ }.to raise_error
+ expect(attempts).to eq(3)
+ end
+
it "returns the first valid result" do
jobs = [Proc.new{ raise "foo" }, Proc.new{ :bar }, Proc.new{ raise "foo" }]
attempts = 0
- result = Bundler::Retry.new(nil, 3).attempt do
+ result = Bundler::Retry.new(nil, nil, 3).attempt do
attempts += 1
job = jobs.shift
job.call
@@ -27,11 +38,23 @@ describe "bundle retry" do
error = Bundler::GemfileNotFound
attempts = 0
expect {
- Bundler::Retry.new(nil, 3).attempt do
+ Bundler::Retry.new(nil, nil, 3).attempt do
attempts += 1
raise error
end
}.to raise_error(error)
expect(attempts).to eq(4)
end
+
+ it "raises exceptions" do
+ error = Bundler::GemfileNotFound
+ attempts = 0
+ expect {
+ Bundler::Retry.new(nil, error).attempt do
+ attempts += 1
+ raise error
+ end
+ }.to raise_error(error)
+ expect(attempts).to eq(1)
+ end
end
diff --git a/spec/commands/config_spec.rb b/spec/commands/config_spec.rb
index 100889b..6c5a2c3 100644
--- a/spec/commands/config_spec.rb
+++ b/spec/commands/config_spec.rb
@@ -178,4 +178,18 @@ describe ".bundle/config" do
expect(out).to eq("false")
end
end
+
+ describe "gem mirrors" do
+ before(:each) { bundle :install }
+
+ it "configures mirrors using keys with `mirror.`" do
+ bundle "config --local mirror.http://gems.example.org http://gem-mirror.example.org"
+ run(<<-E)
+Bundler.settings.gem_mirrors.each do |k, v|
+ puts "\#{k} => \#{v}"
+end
+E
+ expect(out).to eq("http://gems.example.org/ => http://gem-mirror.example.org/")
+ end
+ end
end
diff --git a/spec/integration/inject.rb b/spec/commands/inject_spec.rb
similarity index 100%
rename from spec/integration/inject.rb
rename to spec/commands/inject_spec.rb
diff --git a/spec/commands/newgem_spec.rb b/spec/commands/newgem_spec.rb
index 7694e94..0cb3baf 100644
--- a/spec/commands/newgem_spec.rb
+++ b/spec/commands/newgem_spec.rb
@@ -154,7 +154,7 @@ describe "bundle gem" do
end
it "creates a default test which fails" do
- expect(bundled_app("test_gem/spec/test_gem_spec.rb").read).to match(/false.should be_true/)
+ expect(bundled_app("test_gem/spec/test_gem_spec.rb").read).to match(/expect(false).to be true/)
end
end
@@ -330,7 +330,7 @@ describe "bundle gem" do
end
it "creates a default test which fails" do
- expect(bundled_app("test-gem/spec/test/gem_spec.rb").read).to match(/false.should be_true/)
+ expect(bundled_app("test-gem/spec/test/gem_spec.rb").read).to match(/expect(false).to be true/)
end
it "creates a default rake task to run the specs" do
diff --git a/spec/commands/outdated_spec.rb b/spec/commands/outdated_spec.rb
index 0c8de2a..4e19d5a 100644
--- a/spec/commands/outdated_spec.rb
+++ b/spec/commands/outdated_spec.rb
@@ -12,6 +12,7 @@ describe "bundle outdated" do
gem "zebra", :git => "#{lib_path('zebra')}"
gem "foo", :git => "#{lib_path('foo')}"
gem "activesupport", "2.3.5"
+ gem "weakling", "~> 0.0.1"
G
end
@@ -19,6 +20,7 @@ describe "bundle outdated" do
it "returns a sorted list of outdated gems" do
update_repo2 do
build_gem "activesupport", "3.0"
+ build_gem "weakling", "0.2"
update_git "foo", :path => lib_path("foo")
update_git "zebra", :path => lib_path("zebra")
end
@@ -26,6 +28,7 @@ describe "bundle outdated" do
bundle "outdated"
expect(out).to include("activesupport (3.0 > 2.3.5) Gemfile specifies \"= 2.3.5\"")
+ expect(out).to include("weakling (0.2 > 0.0.3) Gemfile specifies \"~> 0.0.1\"")
expect(out).to include("foo (1.0")
# Gem names are one per-line, between "*" and their parenthesized version.
@@ -114,6 +117,20 @@ describe "bundle outdated" do
end
end
+ describe "with --strict option" do
+ it "only reports gems that have a newer version that matches the specified dependency version requirements" do
+ update_repo2 do
+ build_gem "activesupport", "3.0"
+ build_gem "weakling", "0.0.5"
+ end
+
+ bundle "outdated --strict"
+
+ expect(out).to_not include("activesupport (3.0 > 2.3.5) Gemfile specifies \"= 2.3.5\"")
+ expect(out).to include("weakling (0.0.5 > 0.0.3) Gemfile specifies \"~> 0.0.1\"")
+ end
+ end
+
describe "with invalid gem name" do
it "returns could not find gem name" do
bundle "outdated invalid_gem_name"
diff --git a/spec/install/binstubs_spec.rb b/spec/install/binstubs_spec.rb
new file mode 100644
index 0000000..91f532f
--- /dev/null
+++ b/spec/install/binstubs_spec.rb
@@ -0,0 +1,24 @@
+require 'spec_helper'
+
+describe "bundle install" do
+
+ describe "when system_bindir is set" do
+ # On OS X, Gem.bindir defaults to /usr/bin, so system_bindir is useful if
+ # you want to avoid sudo installs for system gems with OS X's default ruby
+ it "overrides Gem.bindir" do
+ expect(Pathname.new("/usr/bin")).not_to be_writable unless Process::euid == 0
+ gemfile <<-G
+ require 'rubygems'
+ def Gem.bindir; "/usr/bin"; end
+ source "file://#{gem_repo1}"
+ gem "rack"
+ G
+
+ config "BUNDLE_SYSTEM_BINDIR" => system_gem_path('altbin').to_s
+ bundle :install
+ should_be_installed "rack 1.0.0"
+ expect(system_gem_path("altbin/rackup")).to exist
+ end
+ end
+
+end
\ No newline at end of file
diff --git a/spec/install/bundler_spec.rb b/spec/install/bundler_spec.rb
new file mode 100644
index 0000000..09a6b25
--- /dev/null
+++ b/spec/install/bundler_spec.rb
@@ -0,0 +1,146 @@
+require 'spec_helper'
+
+describe "bundle install" do
+
+ describe "with bundler dependencies" do
+ before(:each) do
+ build_repo2 do
+ build_gem "rails", "3.0" do |s|
+ s.add_dependency "bundler", ">= 0.9.0.pre"
+ end
+ build_gem "bundler", "0.9.1"
+ build_gem "bundler", Bundler::VERSION
+ end
+ end
+
+ it "are forced to the current bundler version" do
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "rails", "3.0"
+ G
+
+ should_be_installed "bundler #{Bundler::VERSION}"
+ end
+
+ it "are not added if not already present" do
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "rack"
+ G
+ should_not_be_installed "bundler #{Bundler::VERSION}"
+ end
+
+ it "causes a conflict if explicitly requesting a different version" do
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "rails", "3.0"
+ gem "bundler", "0.9.2"
+ G
+
+ nice_error = <<-E.strip.gsub(/^ {8}/, '')
+ Fetching source index from file:#{gem_repo2}/
+ Resolving dependencies...
+ Bundler could not find compatible versions for gem "bundler":
+ In Gemfile:
+ bundler (= 0.9.2) ruby
+
+ Current Bundler version:
+ bundler (#{Bundler::VERSION})
+ E
+ expect(out).to include(nice_error)
+ end
+
+ it "works for gems with multiple versions in its dependencies" do
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+
+ gem "multiple_versioned_deps"
+ G
+
+
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+
+ gem "multiple_versioned_deps"
+ gem "rack"
+ G
+
+ should_be_installed "multiple_versioned_deps 1.0.0"
+ end
+
+ it "includes bundler in the bundle when it's a child dependency" do
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "rails", "3.0"
+ G
+
+ run "begin; gem 'bundler'; puts 'WIN'; rescue Gem::LoadError; puts 'FAIL'; end"
+ expect(out).to eq("WIN")
+ end
+
+ it "allows gem 'bundler' when Bundler is not in the Gemfile or its dependencies" do
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "rack"
+ G
+
+ run "begin; gem 'bundler'; puts 'WIN'; rescue Gem::LoadError => e; puts e.backtrace; end"
+ expect(out).to eq("WIN")
+ end
+
+ it "causes a conflict if child dependencies conflict" do
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "activemerchant"
+ gem "rails_fail"
+ G
+
+ nice_error = <<-E.strip.gsub(/^ {8}/, '')
+ Fetching source index from file:#{gem_repo2}/
+ Resolving dependencies...
+ Bundler could not find compatible versions for gem "activesupport":
+ In Gemfile:
+ activemerchant (>= 0) ruby depends on
+ activesupport (>= 2.0.0) ruby
+
+ rails_fail (>= 0) ruby depends on
+ activesupport (1.2.3)
+ E
+ expect(out).to eq(nice_error)
+ end
+
+ it "causes a conflict if a child dependency conflicts with the Gemfile" do
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "rails_fail"
+ gem "activesupport", "2.3.5"
+ G
+
+ nice_error = <<-E.strip.gsub(/^ {8}/, '')
+ Fetching source index from file:#{gem_repo2}/
+ Resolving dependencies...
+ Bundler could not find compatible versions for gem "activesupport":
+ In Gemfile:
+ rails_fail (>= 0) ruby depends on
+ activesupport (= 1.2.3) ruby
+
+ activesupport (2.3.5)
+ E
+ expect(out).to eq(nice_error)
+ end
+
+ it "can install dependencies with newer bundler version" do
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "rails", "3.0"
+ G
+
+ simulate_bundler_version "10.0.0"
+ #simulate_new_machine
+
+ bundle "check"
+ expect(out).to eq("The Gemfile's dependencies are satisfied")
+ end
+ end
+
+end
\ No newline at end of file
diff --git a/spec/install/gemspec_spec.rb b/spec/install/gemfile/gemspec_spec.rb
similarity index 100%
rename from spec/install/gemspec_spec.rb
rename to spec/install/gemfile/gemspec_spec.rb
diff --git a/spec/install/git_spec.rb b/spec/install/gemfile/git_spec.rb
similarity index 99%
rename from spec/install/git_spec.rb
rename to spec/install/gemfile/git_spec.rb
index ef36fb5..2beddab 100644
--- a/spec/install/git_spec.rb
+++ b/spec/install/gemfile/git_spec.rb
@@ -27,7 +27,7 @@ describe "bundle install with git sources" do
end
it "caches the git repo" do
- expect(Dir["#{default_bundle_path}/cache/bundler/git/foo-1.0-*"]).to have(1).item
+ expect(Dir["#{default_bundle_path}/cache/bundler/git/foo-1.0-*"].size).to eq(1)
end
it "caches the evaluated gemspec" do
@@ -911,4 +911,4 @@ describe "bundle install with git sources" do
expect(out).to include("You need to install git to be able to use gems from git repositories. For help installing git, please refer to GitHub's tutorial at https://help.github.com/articles/set-up-git")
end
end
-end
\ No newline at end of file
+end
diff --git a/spec/install/path_spec.rb b/spec/install/gemfile/path_spec.rb
similarity index 100%
copy from spec/install/path_spec.rb
copy to spec/install/gemfile/path_spec.rb
diff --git a/spec/install/gemfile_spec.rb b/spec/install/gemfile_spec.rb
new file mode 100644
index 0000000..3b0383f
--- /dev/null
+++ b/spec/install/gemfile_spec.rb
@@ -0,0 +1,44 @@
+require "spec_helper"
+
+describe "bundle install" do
+
+ context "with duplicated gems" do
+ it "will display a warning" do
+ install_gemfile <<-G
+ gem 'rails', '~> 4.0.0'
+ gem 'rails', '~> 4.0.0'
+ G
+ expect(out).to include("more than once")
+ end
+ end
+
+ context "with --gemfile" do
+ it "finds the gemfile" do
+ gemfile bundled_app("NotGemfile"), <<-G
+ source "file://#{gem_repo1}"
+ gem 'rack'
+ G
+
+ bundle :install, :gemfile => bundled_app("NotGemfile")
+
+ ENV['BUNDLE_GEMFILE'] = "NotGemfile"
+ should_be_installed "rack 1.0.0"
+ end
+ end
+
+ context "with deprecated features" do
+ before :each do
+ in_app_root
+ end
+
+ it "reports that lib is an invalid option" do
+ gemfile <<-G
+ gem "rack", :lib => "rack"
+ G
+
+ bundle :install
+ expect(out).to match(/You passed :lib as an option for gem 'rack', but it is invalid/)
+ end
+ end
+
+end
\ No newline at end of file
diff --git a/spec/install/gems/groups_spec.rb b/spec/install/gems/groups_spec.rb
index 70b571c..4321787 100644
--- a/spec/install/gems/groups_spec.rb
+++ b/spec/install/gems/groups_spec.rb
@@ -1,249 +1,308 @@
require "spec_helper"
-describe "bundle install with gem sources" do
- describe "with groups" do
- describe "installing with no options" do
+describe "bundle install with groups" do
+
+ describe "installing with no options" do
+ before :each do
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "rack"
+ group :emo do
+ gem "activesupport", "2.3.5"
+ end
+ gem "thin", :groups => [:emo]
+ G
+ end
+
+ it "installs gems in the default group" do
+ should_be_installed "rack 1.0.0"
+ end
+
+ it "installs gems in a group block into that group" do
+ should_be_installed "activesupport 2.3.5"
+
+ load_error_run <<-R, 'activesupport', :default
+ require 'activesupport'
+ puts ACTIVESUPPORT
+ R
+
+ expect(err).to eq("ZOMG LOAD ERROR")
+ end
+
+ it "installs gems with inline :groups into those groups" do
+ should_be_installed "thin 1.0"
+
+ load_error_run <<-R, 'thin', :default
+ require 'thin'
+ puts THIN
+ R
+
+ expect(err).to eq("ZOMG LOAD ERROR")
+ end
+
+ it "sets up everything if Bundler.setup is used with no groups" do
+ out = run("require 'rack'; puts RACK")
+ expect(out).to eq('1.0.0')
+
+ out = run("require 'activesupport'; puts ACTIVESUPPORT")
+ expect(out).to eq('2.3.5')
+
+ out = run("require 'thin'; puts THIN")
+ expect(out).to eq('1.0')
+ end
+
+ it "removes old groups when new groups are set up" do
+ load_error_run <<-RUBY, 'thin', :emo
+ Bundler.setup(:default)
+ require 'thin'
+ puts THIN
+ RUBY
+
+ expect(err).to eq("ZOMG LOAD ERROR")
+ end
+
+ it "sets up old groups when they have previously been removed" do
+ out = run <<-RUBY, :emo
+ Bundler.setup(:default)
+ Bundler.setup(:default, :emo)
+ require 'thin'; puts THIN
+ RUBY
+ expect(out).to eq('1.0')
+ end
+ end
+
+ describe "installing --without" do
+ describe "with gems assigned to a single group" do
before :each do
- install_gemfile <<-G
+ gemfile <<-G
source "file://#{gem_repo1}"
gem "rack"
group :emo do
gem "activesupport", "2.3.5"
end
- gem "thin", :groups => [:emo]
G
end
it "installs gems in the default group" do
- should_be_installed "rack 1.0.0"
+ bundle :install, :without => "emo"
+ should_be_installed "rack 1.0.0", :groups => [:default]
end
- it "installs gems in a group block into that group" do
- should_be_installed "activesupport 2.3.5"
+ it "does not install gems from the excluded group" do
+ bundle :install, :without => "emo"
+ should_not_be_installed "activesupport 2.3.5", :groups => [:default]
+ end
- load_error_run <<-R, 'activesupport', :default
- require 'activesupport'
- puts ACTIVESUPPORT
- R
+ it "does not install gems from the previously excluded group" do
+ bundle :install, :without => "emo"
+ should_not_be_installed "activesupport 2.3.5"
+ bundle :install
+ should_not_be_installed "activesupport 2.3.5"
+ end
- expect(err).to eq("ZOMG LOAD ERROR")
+ it "does not say it installed gems from the excluded group" do
+ bundle :install, :without => "emo"
+ expect(out).not_to include("activesupport")
end
- it "installs gems with inline :groups into those groups" do
- should_be_installed "thin 1.0"
+ it "allows Bundler.setup for specific groups" do
+ bundle :install, :without => "emo"
+ run("require 'rack'; puts RACK", :default)
+ expect(out).to eq('1.0.0')
+ end
- load_error_run <<-R, 'thin', :default
- require 'thin'
- puts THIN
- R
+ it "does not effect the resolve" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "activesupport"
+ group :emo do
+ gem "rails", "2.3.2"
+ end
+ G
- expect(err).to eq("ZOMG LOAD ERROR")
+ bundle :install, :without => "emo"
+ should_be_installed "activesupport 2.3.2", :groups => [:default]
end
- it "sets up everything if Bundler.setup is used with no groups" do
- out = run("require 'rack'; puts RACK")
- expect(out).to eq('1.0.0')
+ it "still works on a different machine and excludes gems" do
+ bundle :install, :without => "emo"
- out = run("require 'activesupport'; puts ACTIVESUPPORT")
- expect(out).to eq('2.3.5')
+ simulate_new_machine
+ bundle :install, :without => "emo"
- out = run("require 'thin'; puts THIN")
- expect(out).to eq('1.0')
+ should_be_installed "rack 1.0.0", :groups => [:default]
+ should_not_be_installed "activesupport 2.3.5", :groups => [:default]
end
- it "removes old groups when new groups are set up" do
- load_error_run <<-RUBY, 'thin', :emo
- Bundler.setup(:default)
- require 'thin'
- puts THIN
- RUBY
+ it "still works when BUNDLE_WITHOUT is set" do
+ ENV["BUNDLE_WITHOUT"] = "emo"
- expect(err).to eq("ZOMG LOAD ERROR")
+ bundle :install
+ expect(out).not_to include("activesupport")
+
+ should_be_installed "rack 1.0.0", :groups => [:default]
+ should_not_be_installed "activesupport 2.3.5", :groups => [:default]
+
+ ENV["BUNDLE_WITHOUT"] = nil
end
- it "sets up old groups when they have previously been removed" do
- out = run <<-RUBY, :emo
- Bundler.setup(:default)
- Bundler.setup(:default, :emo)
- require 'thin'; puts THIN
- RUBY
- expect(out).to eq('1.0')
+ it "clears without when passed an empty list" do
+ bundle :install, :without => "emo"
+
+ bundle 'install --without ""'
+ should_be_installed "activesupport 2.3.5"
+ end
+
+ it "doesn't clear without when nothing is passed" do
+ bundle :install, :without => "emo"
+
+ bundle :install
+ should_not_be_installed "activesupport 2.3.5"
end
end
- describe "installing --without" do
- describe "with gems assigned to a single group" do
+ describe "with gems assigned to multiple groups" do
+ before :each do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "rack"
+ group :emo, :lolercoaster do
+ gem "activesupport", "2.3.5"
+ end
+ G
+ end
+
+ it "installs gems in the default group" do
+ bundle :install, :without => "emo lolercoaster"
+ should_be_installed "rack 1.0.0"
+ end
+
+ it "installs the gem if any of its groups are installed" do
+ bundle "install --without emo"
+ should_be_installed "rack 1.0.0", "activesupport 2.3.5"
+ end
+
+ describe "with a gem defined multiple times in different groups" do
before :each do
gemfile <<-G
source "file://#{gem_repo1}"
gem "rack"
+
group :emo do
gem "activesupport", "2.3.5"
end
- G
- end
-
- it "installs gems in the default group" do
- bundle :install, :without => "emo"
- should_be_installed "rack 1.0.0", :groups => [:default]
- end
-
- it "does not install gems from the excluded group" do
- bundle :install, :without => "emo"
- should_not_be_installed "activesupport 2.3.5", :groups => [:default]
- end
-
- it "does not install gems from the previously excluded group" do
- bundle :install, :without => "emo"
- should_not_be_installed "activesupport 2.3.5"
- bundle :install
- should_not_be_installed "activesupport 2.3.5"
- end
-
- it "does not say it installed gems from the excluded group" do
- bundle :install, :without => "emo"
- expect(out).not_to include("activesupport")
- end
- it "allows Bundler.setup for specific groups" do
- bundle :install, :without => "emo"
- run("require 'rack'; puts RACK", :default)
- expect(out).to eq('1.0.0')
- end
-
- it "does not effect the resolve" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- gem "activesupport"
- group :emo do
- gem "rails", "2.3.2"
+ group :lolercoaster do
+ gem "activesupport", "2.3.5"
end
G
-
- bundle :install, :without => "emo"
- should_be_installed "activesupport 2.3.2", :groups => [:default]
end
- it "still works on a different machine and excludes gems" do
- bundle :install, :without => "emo"
-
- simulate_new_machine
- bundle :install, :without => "emo"
-
- should_be_installed "rack 1.0.0", :groups => [:default]
- should_not_be_installed "activesupport 2.3.5", :groups => [:default]
- end
-
- it "still works when BUNDLE_WITHOUT is set" do
- ENV["BUNDLE_WITHOUT"] = "emo"
-
- bundle :install
- expect(out).not_to include("activesupport")
-
- should_be_installed "rack 1.0.0", :groups => [:default]
- should_not_be_installed "activesupport 2.3.5", :groups => [:default]
-
- ENV["BUNDLE_WITHOUT"] = nil
+ it "installs the gem w/ option --without emo" do
+ bundle "install --without emo"
+ should_be_installed "activesupport 2.3.5"
end
- it "clears without when passed an empty list" do
- bundle :install, :without => "emo"
-
- bundle 'install --without ""'
+ it "installs the gem w/ option --without lolercoaster" do
+ bundle "install --without lolercoaster"
should_be_installed "activesupport 2.3.5"
end
- it "doesn't clear without when nothing is passed" do
- bundle :install, :without => "emo"
+ it "does not install the gem w/ option --without emo lolercoaster" do
+ bundle "install --without emo lolercoaster"
+ should_not_be_installed "activesupport 2.3.5"
+ end
- bundle :install
+ it "does not install the gem w/ option --without 'emo lolercoaster'" do
+ bundle "install --without 'emo lolercoaster'"
should_not_be_installed "activesupport 2.3.5"
end
end
+ end
- describe "with gems assigned to multiple groups" do
- before :each do
- gemfile <<-G
- source "file://#{gem_repo1}"
- gem "rack"
- group :emo, :lolercoaster do
+ describe "nesting groups" do
+ before :each do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "rack"
+ group :emo do
+ group :lolercoaster do
gem "activesupport", "2.3.5"
end
- G
- end
-
- it "installs gems in the default group" do
- bundle :install, :without => "emo lolercoaster"
- should_be_installed "rack 1.0.0"
- end
+ end
+ G
+ end
- it "installs the gem if any of its groups are installed" do
- bundle "install --without emo"
- should_be_installed "rack 1.0.0", "activesupport 2.3.5"
- end
+ it "installs gems in the default group" do
+ bundle :install, :without => "emo lolercoaster"
+ should_be_installed "rack 1.0.0"
+ end
- describe "with a gem defined multiple times in different groups" do
- before :each do
- gemfile <<-G
- source "file://#{gem_repo1}"
- gem "rack"
+ it "installs the gem if any of its groups are installed" do
+ bundle "install --without emo"
+ should_be_installed "rack 1.0.0", "activesupport 2.3.5"
+ end
- group :emo do
- gem "activesupport", "2.3.5"
- end
+ end
+ end
- group :lolercoaster do
- gem "activesupport", "2.3.5"
- end
- G
- end
+ describe "when loading only the default group" do
+ it "should not load all groups" do
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "rack"
+ gem "activesupport", :groups => :development
+ G
+
+ ruby <<-R
+ require "bundler"
+ Bundler.setup :default
+ Bundler.require :default
+ puts RACK
+ begin
+ require "activesupport"
+ rescue LoadError
+ puts "no activesupport"
+ end
+ R
- it "installs the gem w/ option --without emo" do
- bundle "install --without emo"
- should_be_installed "activesupport 2.3.5"
- end
+ expect(out).to include("1.0")
+ expect(out).to include("no activesupport")
+ end
+ end
- it "installs the gem w/ option --without lolercoaster" do
- bundle "install --without lolercoaster"
- should_be_installed "activesupport 2.3.5"
- end
- it "does not install the gem w/ option --without emo lolercoaster" do
- bundle "install --without emo lolercoaster"
- should_not_be_installed "activesupport 2.3.5"
- end
+ describe "when locked and installed with --without" do
+ before(:each) do
+ build_repo2
+ system_gems "rack-0.9.1" do
+ install_gemfile <<-G, :without => :rack
+ source "file://#{gem_repo2}"
+ gem "rack"
- it "does not install the gem w/ option --without 'emo lolercoaster'" do
- bundle "install --without 'emo lolercoaster'"
- should_not_be_installed "activesupport 2.3.5"
+ group :rack do
+ gem "rack_middleware"
end
- end
+ G
end
+ end
- describe "nesting groups" do
- before :each do
- gemfile <<-G
- source "file://#{gem_repo1}"
- gem "rack"
- group :emo do
- group :lolercoaster do
- gem "activesupport", "2.3.5"
- end
- end
- G
- end
+ it "uses the correct versions even if --without was used on the original" do
+ should_be_installed "rack 0.9.1"
+ should_not_be_installed "rack_middleware 1.0"
+ simulate_new_machine
- it "installs gems in the default group" do
- bundle :install, :without => "emo lolercoaster"
- should_be_installed "rack 1.0.0"
- end
+ bundle :install
- it "installs the gem if any of its groups are installed" do
- bundle "install --without emo"
- should_be_installed "rack 1.0.0", "activesupport 2.3.5"
- end
+ should_be_installed "rack 0.9.1"
+ should_be_installed "rack_middleware 1.0"
+ end
- end
+ it "does not hit the remote a second time" do
+ FileUtils.rm_rf gem_repo2
+ bundle "install --without rack"
+ expect(err).to be_empty
end
end
-end
+
+end
\ No newline at end of file
diff --git a/spec/install/gems/mirror_spec.rb b/spec/install/gems/mirror_spec.rb
new file mode 100644
index 0000000..48b97de
--- /dev/null
+++ b/spec/install/gems/mirror_spec.rb
@@ -0,0 +1,39 @@
+require "spec_helper"
+
+describe "bundle install with a mirror configured" do
+ describe "when the mirror does not match the gem source" do
+ before :each do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ gem "rack"
+ G
+ bundle "config --local mirror.http://gems.example.org http://gem-mirror.example.org"
+ end
+
+ it "installs from the normal location" do
+ bundle :install
+ expect(out).to include("Fetching source index from file:#{gem_repo1}")
+ should_be_installed "rack 1.0"
+ end
+ end
+
+ describe "when the gem source matches a configured mirror" do
+ before :each do
+ gemfile <<-G
+ # This source is bogus and doesn't have the gem we're looking for
+ source "file://#{gem_repo2}"
+
+ gem "rack"
+ G
+ bundle "config --local mirror.file://#{gem_repo2} file://#{gem_repo1}"
+ end
+
+ it "installs the gem from the mirror" do
+ bundle :install
+ expect(out).to include("Fetching source index from file:#{gem_repo1}")
+ expect(out).not_to include("Fetching source index from file:#{gem_repo2}")
+ should_be_installed "rack 1.0"
+ end
+ end
+end
diff --git a/spec/install/gems/platform_spec.rb b/spec/install/gems/platform_spec.rb
index 1138488..042332a 100644
--- a/spec/install/gems/platform_spec.rb
+++ b/spec/install/gems/platform_spec.rb
@@ -96,22 +96,10 @@ describe "bundle install across platforms" do
bundle "install --path vendor/bundle"
- expect(vendored_gems("gems/rack-1.0.0")).to exist
- end
-
- it "works after switching Rubies" do
- gemfile <<-G
- source "file://#{gem_repo1}"
-
- gem "rack", "1.0.0"
- G
-
- bundle "install --path vendor/bundle"
-
new_version = Gem::ConfigMap[:ruby_version] == "1.8" ? "1.9.1" : "1.8"
FileUtils.mv(vendored_gems, bundled_app("vendor/bundle", Gem.ruby_engine, new_version))
- bundle "install --path ./vendor/bundle"
+ bundle "install --path vendor/bundle"
expect(vendored_gems("gems/rack-1.0.0")).to exist
end
end
@@ -191,7 +179,7 @@ describe "bundle install with platform conditionals" do
end
-describe "when a gem has an architecture in its platform" do
+describe "when a gem has no architecture" do
it "still installs correctly" do
simulate_platform mswin
diff --git a/spec/install/gems/simple_case_spec.rb b/spec/install/gems/simple_case_spec.rb
index 630ea08..250681f 100644
--- a/spec/install/gems/simple_case_spec.rb
+++ b/spec/install/gems/simple_case_spec.rb
@@ -298,7 +298,7 @@ describe "bundle install with gem sources" do
install_gemfile <<-G
G
- expect(File.exists?(bundled_app("Gemfile.lock"))).to be_true
+ expect(File.exists?(bundled_app("Gemfile.lock"))).to be true
end
it "gracefully handles error when rubygems server is unavailable" do
@@ -362,136 +362,6 @@ describe "bundle install with gem sources" do
end
end
- describe "when prerelease gems are available" do
- it "finds prereleases" do
- install_gemfile <<-G
- source "file://#{gem_repo1}"
- gem "not_released"
- G
- should_be_installed "not_released 1.0.pre"
- end
-
- it "uses regular releases if available" do
- install_gemfile <<-G
- source "file://#{gem_repo1}"
- gem "has_prerelease"
- G
- should_be_installed "has_prerelease 1.0"
- end
-
- it "uses prereleases if requested" do
- install_gemfile <<-G
- source "file://#{gem_repo1}"
- gem "has_prerelease", "1.1.pre"
- G
- should_be_installed "has_prerelease 1.1.pre"
- end
- end
-
- describe "when prerelease gems are not available" do
- it "still works" do
- build_repo3
- install_gemfile <<-G
- source "file://#{gem_repo3}"
- gem "rack"
- G
-
- should_be_installed "rack 1.0"
- end
- end
-
- describe "when BUNDLE_PATH or the global path config is set" do
- before :each do
- build_lib "rack", "1.0.0", :to_system => true do |s|
- s.write "lib/rack.rb", "raise 'FAIL'"
- end
-
- gemfile <<-G
- source "file://#{gem_repo1}"
- gem "rack"
- G
- end
-
- def set_bundle_path(type, location)
- if type == :env
- ENV["BUNDLE_PATH"] = location
- elsif type == :global
- bundle "config path #{location}", "no-color" => nil
- end
- end
-
- [:env, :global].each do |type|
- it "installs gems to a path if one is specified" do
- set_bundle_path(type, bundled_app("vendor2").to_s)
- bundle "install --path vendor/bundle"
-
- expect(vendored_gems("gems/rack-1.0.0")).to be_directory
- expect(bundled_app("vendor2")).not_to be_directory
- should_be_installed "rack 1.0.0"
- end
-
- it "installs gems to BUNDLE_PATH with #{type}" do
- set_bundle_path(type, bundled_app("vendor").to_s)
-
- bundle :install
-
- expect(bundled_app('vendor/gems/rack-1.0.0')).to be_directory
- should_be_installed "rack 1.0.0"
- end
-
- it "installs gems to BUNDLE_PATH relative to root when relative" do
- set_bundle_path(type, "vendor")
-
- FileUtils.mkdir_p bundled_app('lol')
- Dir.chdir(bundled_app('lol')) do
- bundle :install
- end
-
- expect(bundled_app('vendor/gems/rack-1.0.0')).to be_directory
- should_be_installed "rack 1.0.0"
- end
- end
-
- it "installs gems to BUNDLE_PATH from .bundle/config" do
- config "BUNDLE_PATH" => bundled_app("vendor/bundle").to_s
-
- bundle :install
-
- expect(vendored_gems('gems/rack-1.0.0')).to be_directory
- should_be_installed "rack 1.0.0"
- end
-
- it "sets BUNDLE_PATH as the first argument to bundle install" do
- bundle "install --path ./vendor/bundle"
-
- expect(vendored_gems('gems/rack-1.0.0')).to be_directory
- should_be_installed "rack 1.0.0"
- end
-
- it "disables system gems when passing a path to install" do
- # This is so that vendored gems can be distributed to others
- build_gem "rack", "1.1.0", :to_system => true
- bundle "install --path ./vendor/bundle"
-
- expect(vendored_gems('gems/rack-1.0.0')).to be_directory
- should_be_installed "rack 1.0.0"
- end
- end
-
- describe "when passing in a Gemfile via --gemfile" do
- it "finds the gemfile" do
- gemfile bundled_app("NotGemfile"), <<-G
- source "file://#{gem_repo1}"
- gem 'rack'
- G
-
- bundle :install, :gemfile => bundled_app("NotGemfile")
-
- ENV['BUNDLE_GEMFILE'] = "NotGemfile"
- should_be_installed "rack 1.0.0"
- end
- end
-
describe "when requesting a quiet install via --quiet" do
it "should be quiet if there are no warnings" do
gemfile <<-G
@@ -513,323 +383,4 @@ describe "bundle install with gem sources" do
end
end
- describe "when disabling system gems" do
- before :each do
- build_gem "rack", "1.0.0", :to_system => true do |s|
- s.write "lib/rack.rb", "puts 'FAIL'"
- end
-
- gemfile <<-G
- source "file://#{gem_repo1}"
- gem "rack"
- G
- end
-
- it "behaves like bundle install vendor/bundle with --deployment" do
- bundle "install"
- bundle "install --deployment"
- expect(out).to include("It was installed into ./vendor/bundle")
- should_be_installed "rack 1.0.0"
- expect(bundled_app("vendor/bundle")).to exist
- end
-
- it "does not use available system gems with bundle --path vendor/bundle" do
- bundle "install --path vendor/bundle"
- should_be_installed "rack 1.0.0"
- end
-
- it "handles paths with regex characters in them" do
- dir = bundled_app("bun++dle")
- dir.mkpath
-
- Dir.chdir(dir) do
- bundle "install --path vendor/bundle"
- expect(out).to include("installed into ./vendor/bundle")
- end
-
- dir.rmtree
- end
-
- it "prints a warning to let the user know what has happened with bundle --path vendor/bundle" do
- bundle "install --path vendor/bundle"
- expect(out).to include("It was installed into ./vendor")
- end
-
- it "disallows --path vendor/bundle --system" do
- bundle "install --path vendor/bundle --system"
- expect(out).to include("Please choose.")
- end
-
- it "remembers to disable system gems after the first time with bundle --path vendor/bundle" do
- bundle "install --path vendor/bundle"
- FileUtils.rm_rf bundled_app('vendor')
- bundle "install"
-
- expect(vendored_gems('gems/rack-1.0.0')).to be_directory
- should_be_installed "rack 1.0.0"
- end
- end
-
- describe "when loading only the default group" do
- it "should not load all groups" do
- install_gemfile <<-G
- source "file://#{gem_repo1}"
- gem "rack"
- gem "activesupport", :groups => :development
- G
-
- ruby <<-R
- require "bundler"
- Bundler.setup :default
- Bundler.require :default
- puts RACK
- begin
- require "activesupport"
- rescue LoadError
- puts "no activesupport"
- end
- R
-
- expect(out).to include("1.0")
- expect(out).to include("no activesupport")
- end
- end
-
- describe "when a gem has a YAML gemspec" do
- before :each do
- build_repo2 do
- build_gem "yaml_spec", :gemspec => :yaml
- end
- end
-
- it "still installs correctly" do
- gemfile <<-G
- source "file://#{gem_repo2}"
- gem "yaml_spec"
- G
- bundle :install
- expect(err).to 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
- expect(err).to eq("")
- end
- end
-
- describe "bundler dependencies" do
- before(:each) do
- build_repo2 do
- build_gem "rails", "3.0" do |s|
- s.add_dependency "bundler", ">= 0.9.0.pre"
- end
- build_gem "bundler", "0.9.1"
- build_gem "bundler", Bundler::VERSION
- end
- end
-
- it "are forced to the current bundler version" do
- install_gemfile <<-G
- source "file://#{gem_repo2}"
- gem "rails", "3.0"
- G
-
- should_be_installed "bundler #{Bundler::VERSION}"
- end
-
- it "are not added if not already present" do
- install_gemfile <<-G
- source "file://#{gem_repo1}"
- gem "rack"
- G
- should_not_be_installed "bundler #{Bundler::VERSION}"
- end
-
- it "causes a conflict if explicitly requesting a different version" do
- install_gemfile <<-G
- source "file://#{gem_repo2}"
- gem "rails", "3.0"
- gem "bundler", "0.9.2"
- G
-
- nice_error = <<-E.strip.gsub(/^ {8}/, '')
- Fetching source index from file:#{gem_repo2}/
- Resolving dependencies...
- Bundler could not find compatible versions for gem "bundler":
- In Gemfile:
- bundler (= 0.9.2) ruby
-
- Current Bundler version:
- bundler (#{Bundler::VERSION})
- E
- expect(out).to include(nice_error)
- end
-
- it "works for gems with multiple versions in its dependencies" do
- install_gemfile <<-G
- source "file://#{gem_repo2}"
-
- gem "multiple_versioned_deps"
- G
-
-
- install_gemfile <<-G
- source "file://#{gem_repo2}"
-
- gem "multiple_versioned_deps"
- gem "rack"
- G
-
- should_be_installed "multiple_versioned_deps 1.0.0"
- end
-
- it "includes bundler in the bundle when it's a child dependency" do
- install_gemfile <<-G
- source "file://#{gem_repo2}"
- gem "rails", "3.0"
- G
-
- run "begin; gem 'bundler'; puts 'WIN'; rescue Gem::LoadError; puts 'FAIL'; end"
- expect(out).to eq("WIN")
- end
-
- it "allows gem 'bundler' when Bundler is not in the Gemfile or its dependencies" do
- install_gemfile <<-G
- source "file://#{gem_repo2}"
- gem "rack"
- G
-
- run "begin; gem 'bundler'; puts 'WIN'; rescue Gem::LoadError => e; puts e.backtrace; end"
- expect(out).to eq("WIN")
- end
-
- it "causes a conflict if child dependencies conflict" do
- install_gemfile <<-G
- source "file://#{gem_repo2}"
- gem "activemerchant"
- gem "rails_fail"
- G
-
- nice_error = <<-E.strip.gsub(/^ {8}/, '')
- Fetching source index from file:#{gem_repo2}/
- Resolving dependencies...
- Bundler could not find compatible versions for gem "activesupport":
- In Gemfile:
- activemerchant (>= 0) ruby depends on
- activesupport (>= 2.0.0) ruby
-
- rails_fail (>= 0) ruby depends on
- activesupport (1.2.3)
- E
- expect(out).to eq(nice_error)
- end
-
- it "causes a conflict if a child dependency conflicts with the Gemfile" do
- install_gemfile <<-G
- source "file://#{gem_repo2}"
- gem "rails_fail"
- gem "activesupport", "2.3.5"
- G
-
- nice_error = <<-E.strip.gsub(/^ {8}/, '')
- Fetching source index from file:#{gem_repo2}/
- Resolving dependencies...
- Bundler could not find compatible versions for gem "activesupport":
- In Gemfile:
- rails_fail (>= 0) ruby depends on
- activesupport (= 1.2.3) ruby
-
- activesupport (2.3.5)
- E
- expect(out).to eq(nice_error)
- end
-
- it "can install dependencies even if " do
- install_gemfile <<-G
- source "file://#{gem_repo2}"
- gem "rails", "3.0"
- G
-
- simulate_bundler_version "10.0.0"
- #simulate_new_machine
-
- bundle "check"
- expect(out).to eq("The Gemfile's dependencies are satisfied")
- end
- end
-
- describe "when locked and installed with --without" do
- before(:each) do
- build_repo2
- system_gems "rack-0.9.1" do
- install_gemfile <<-G, :without => :rack
- source "file://#{gem_repo2}"
- gem "rack"
-
- group :rack do
- gem "rack_middleware"
- end
- G
- end
- end
-
- it "uses the correct versions even if --without was used on the original" do
- should_be_installed "rack 0.9.1"
- should_not_be_installed "rack_middleware 1.0"
- simulate_new_machine
-
- bundle :install
-
- should_be_installed "rack 0.9.1"
- should_be_installed "rack_middleware 1.0"
- end
-
- it "does not hit the remote a second time" do
- FileUtils.rm_rf gem_repo2
- bundle "install --without rack"
- expect(err).to be_empty
- end
- end
-
- describe "when system_bindir is set" do
- # On OS X, Gem.bindir defaults to /usr/bin, so system_bindir is useful if
- # you want to avoid sudo installs for system gems with OS X's default ruby
- it "overrides Gem.bindir" do
- expect(Pathname.new("/usr/bin")).not_to be_writable unless Process::euid == 0
- gemfile <<-G
- require 'rubygems'
- def Gem.bindir; "/usr/bin"; end
- source "file://#{gem_repo1}"
- gem "rack"
- G
-
- config "BUNDLE_SYSTEM_BINDIR" => system_gem_path('altbin').to_s
- bundle :install
- should_be_installed "rack 1.0.0"
- expect(system_gem_path("altbin/rackup")).to exist
- end
- end
-
- it "should use gemspecs in the system cache when available" do
- gemfile <<-G
- source "http://localtestserver.gem"
- gem 'rack'
- G
-
- FileUtils.mkdir_p "#{tmp}/gems/system/specifications"
- File.open("#{tmp}/gems/system/specifications/rack-1.0.0.gemspec", 'w+') do |f|
- spec = Gem::Specification.new do |s|
- s.name = 'rack'
- s.version = '1.0.0'
- s.add_runtime_dependency 'activesupport', '2.3.2'
- end
- f.write spec.to_ruby
- end
- bundle :install, :artifice => 'endpoint_marshal_fail' # force gemspec load
- should_be_installed "activesupport 2.3.2"
- end
end
diff --git a/spec/install/gemspecs_spec.rb b/spec/install/gemspecs_spec.rb
new file mode 100644
index 0000000..c3ac0fc
--- /dev/null
+++ b/spec/install/gemspecs_spec.rb
@@ -0,0 +1,50 @@
+require 'spec_helper'
+
+describe "bundle install" do
+
+ describe "when a gem has a YAML gemspec" do
+ before :each do
+ build_repo2 do
+ build_gem "yaml_spec", :gemspec => :yaml
+ end
+ end
+
+ it "still installs correctly" do
+ gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "yaml_spec"
+ G
+ bundle :install
+ expect(err).to 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
+ expect(err).to eq("")
+ end
+ end
+
+ it "should use gemspecs in the system cache when available" do
+ gemfile <<-G
+ source "http://localtestserver.gem"
+ gem 'rack'
+ G
+
+ FileUtils.mkdir_p "#{tmp}/gems/system/specifications"
+ File.open("#{tmp}/gems/system/specifications/rack-1.0.0.gemspec", 'w+') do |f|
+ spec = Gem::Specification.new do |s|
+ s.name = 'rack'
+ s.version = '1.0.0'
+ s.add_runtime_dependency 'activesupport', '2.3.2'
+ end
+ f.write spec.to_ruby
+ end
+ bundle :install, :artifice => 'endpoint_marshal_fail' # force gemspec load
+ should_be_installed "activesupport 2.3.2"
+ end
+
+end
\ No newline at end of file
diff --git a/spec/install/invalid_spec.rb b/spec/install/invalid_spec.rb
deleted file mode 100644
index 3dd8a4f..0000000
--- a/spec/install/invalid_spec.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-require "spec_helper"
-
-describe "bundle install with deprecated features" do
- before :each do
- in_app_root
- end
-
- it "reports that lib is an invalid option" do
- gemfile <<-G
- gem "rack", :lib => "rack"
- G
-
- bundle :install
- expect(out).to match(/You passed :lib as an option for gem 'rack', but it is invalid/)
- end
-
-end
-
-describe "bundle install to a dead symlink" do
- before do
- in_app_root do
- `ln -s /tmp/idontexist bundle`
- end
- end
-
- it "reports the symlink is dead" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- gem "rack"
- G
-
- bundle "install --path bundle"
- expect(out).to match(/invalid symlink/)
- end
-end
-
-describe "invalid or inaccessible gem source" do
- it "can be retried" do
- gemfile <<-G
- source "file://#{gem_repo_missing}"
- gem "rack"
- gem "signed_gem"
- G
- bundle "install", :retry => 2
- exp = Regexp.escape("Retrying source fetch due to error (2/3)")
- expect(out).to match(exp)
- exp = Regexp.escape("Retrying source fetch due to error (3/3)")
- expect(out).to match(exp)
- end
-end
\ No newline at end of file
diff --git a/spec/install/path_spec.rb b/spec/install/path_spec.rb
index a347e5b..c5c7e0d 100644
--- a/spec/install/path_spec.rb
+++ b/spec/install/path_spec.rb
@@ -1,468 +1,150 @@
require "spec_helper"
-describe "bundle install with explicit source paths" do
- it "fetches gems" do
- build_lib "foo"
+describe "bundle install" do
- install_gemfile <<-G
- path "#{lib_path('foo-1.0')}"
- gem 'foo'
- G
-
- should_be_installed("foo 1.0")
- end
-
- it "supports pinned paths" do
- build_lib "foo"
-
- install_gemfile <<-G
- gem 'foo', :path => "#{lib_path('foo-1.0')}"
- G
-
- should_be_installed("foo 1.0")
- end
-
- it "supports relative paths" do
- build_lib "foo"
-
- relative_path = lib_path('foo-1.0').relative_path_from(Pathname.new(Dir.pwd))
-
- install_gemfile <<-G
- gem 'foo', :path => "#{relative_path}"
- G
-
- should_be_installed("foo 1.0")
- end
-
- it "expands paths" do
- build_lib "foo"
-
- relative_path = lib_path('foo-1.0').relative_path_from(Pathname.new('~').expand_path)
-
- install_gemfile <<-G
- gem 'foo', :path => "~/#{relative_path}"
- G
-
- should_be_installed("foo 1.0")
- end
-
- it "expands paths relative to Bundler.root" do
- build_lib "foo", :path => bundled_app("foo-1.0")
-
- install_gemfile <<-G
- gem 'foo', :path => "./foo-1.0"
- G
-
- bundled_app("subdir").mkpath
- Dir.chdir(bundled_app("subdir")) do
- should_be_installed("foo 1.0")
- end
- end
-
- it "expands paths when comparing locked paths to Gemfile paths" do
- build_lib "foo", :path => bundled_app("foo-1.0")
-
- install_gemfile <<-G
- gem 'foo', :path => File.expand_path("../foo-1.0", __FILE__)
- G
-
- bundle "install --frozen", :exitstatus => true
- expect(exitstatus).to eq(0)
- end
-
- it "installs dependencies from the path even if a newer gem is available elsewhere" do
- system_gems "rack-1.0.0"
+ describe "with --path" do
+ before :each do
+ build_gem "rack", "1.0.0", :to_system => true do |s|
+ s.write "lib/rack.rb", "puts 'FAIL'"
+ end
- build_lib "rack", "1.0", :path => lib_path('nested/bar') do |s|
- s.write "lib/rack.rb", "puts 'WIN OVERRIDE'"
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "rack"
+ G
end
- build_lib "foo", :path => lib_path('nested') do |s|
- s.add_dependency "rack", "= 1.0"
+ it "does not use available system gems with bundle --path vendor/bundle" do
+ bundle "install --path vendor/bundle"
+ should_be_installed "rack 1.0.0"
end
- install_gemfile <<-G
- source "file://#{gem_repo1}"
- gem "foo", :path => "#{lib_path('nested')}"
- G
+ it "handles paths with regex characters in them" do
+ dir = bundled_app("bun++dle")
+ dir.mkpath
- run "require 'rack'"
- expect(out).to eq('WIN OVERRIDE')
- end
+ Dir.chdir(dir) do
+ bundle "install --path vendor/bundle"
+ expect(out).to include("installed into ./vendor/bundle")
+ end
- it "works" do
- build_gem "foo", "1.0.0", :to_system => true do |s|
- s.write "lib/foo.rb", "puts 'FAIL'"
+ dir.rmtree
end
- build_lib "omg", "1.0", :path => lib_path("omg") do |s|
- s.add_dependency "foo"
+ it "prints a warning to let the user know what has happened with bundle --path vendor/bundle" do
+ bundle "install --path vendor/bundle"
+ expect(out).to include("It was installed into ./vendor")
end
- build_lib "foo", "1.0.0", :path => lib_path("omg/foo")
-
- install_gemfile <<-G
- gem "omg", :path => "#{lib_path('omg')}"
- G
-
- should_be_installed "foo 1.0"
- end
-
- it "supports gemspec syntax" do
- build_lib "foo", "1.0", :path => lib_path("foo") do |s|
- s.add_dependency "rack", "1.0"
+ it "disallows --path vendor/bundle --system" do
+ bundle "install --path vendor/bundle --system"
+ expect(out).to include("Please choose.")
end
- gemfile = <<-G
- source "file://#{gem_repo1}"
- gemspec
- G
-
- File.open(lib_path("foo/Gemfile"), "w") {|f| f.puts gemfile }
-
- Dir.chdir(lib_path("foo")) do
+ it "remembers to disable system gems after the first time with bundle --path vendor/bundle" do
+ bundle "install --path vendor/bundle"
+ FileUtils.rm_rf bundled_app('vendor')
bundle "install"
- should_be_installed "foo 1.0"
- should_be_installed "rack 1.0"
- end
- end
-
- it "supports gemspec syntax with an alternative path" do
- build_lib "foo", "1.0", :path => lib_path("foo") do |s|
- s.add_dependency "rack", "1.0"
- end
-
- install_gemfile <<-G
- source "file://#{gem_repo1}"
- gemspec :path => "#{lib_path("foo")}"
- G
-
- should_be_installed "foo 1.0"
- should_be_installed "rack 1.0"
- end
-
- it "doesn't automatically unlock dependencies when using the gemspec syntax" do
- build_lib "foo", "1.0", :path => lib_path("foo") do |s|
- s.add_dependency "rack", ">= 1.0"
- end
-
- Dir.chdir lib_path("foo")
-
- install_gemfile lib_path("foo/Gemfile"), <<-G
- source "file://#{gem_repo1}"
- gemspec
- G
-
- build_gem "rack", "1.0.1", :to_system => true
-
- bundle "install"
-
- should_be_installed "foo 1.0"
- should_be_installed "rack 1.0"
- end
-
- it "doesn't automatically unlock dependencies when using the gemspec syntax and the gem has development dependencies" do
- build_lib "foo", "1.0", :path => lib_path("foo") do |s|
- s.add_dependency "rack", ">= 1.0"
- s.add_development_dependency "activesupport"
- end
-
- Dir.chdir lib_path("foo")
-
- install_gemfile lib_path("foo/Gemfile"), <<-G
- source "file://#{gem_repo1}"
- gemspec
- G
-
- build_gem "rack", "1.0.1", :to_system => true
-
- bundle "install"
-
- should_be_installed "foo 1.0"
- should_be_installed "rack 1.0"
- end
-
- it "raises if there are multiple gemspecs" do
- build_lib "foo", "1.0", :path => lib_path("foo") do |s|
- s.write "bar.gemspec"
- end
-
- install_gemfile <<-G, :exitstatus => true
- gemspec :path => "#{lib_path("foo")}"
- G
-
- expect(exitstatus).to eq(15)
- expect(out).to match(/There are multiple gemspecs/)
- end
-
- it "allows :name to be specified to resolve ambiguity" do
- build_lib "foo", "1.0", :path => lib_path("foo") do |s|
- s.write "bar.gemspec"
- end
-
- install_gemfile <<-G, :exitstatus => true
- gemspec :path => "#{lib_path("foo")}", :name => "foo"
- G
-
- should_be_installed "foo 1.0"
- end
-
- it "sets up executables" do
- pending_jruby_shebang_fix
-
- build_lib "foo" do |s|
- s.executables = "foobar"
- end
-
- install_gemfile <<-G
- path "#{lib_path('foo-1.0')}"
- gem 'foo'
- G
-
- bundle "exec foobar"
- expect(out).to eq("1.0")
- end
- it "handles directories in bin/" do
- build_lib "foo"
- lib_path("foo-1.0").join("foo.gemspec").rmtree
- lib_path("foo-1.0").join("bin/performance").mkpath
-
- install_gemfile <<-G
- gem 'foo', '1.0', :path => "#{lib_path('foo-1.0')}"
- G
- expect(err).to eq("")
- end
-
- it "removes the .gem file after installing" do
- build_lib "foo"
-
- install_gemfile <<-G
- gem 'foo', :path => "#{lib_path('foo-1.0')}"
- G
-
- expect(lib_path('foo-1.0').join('foo-1.0.gem')).not_to exist
- end
-
- describe "block syntax" do
- it "pulls all gems from a path block" do
- build_lib "omg"
- build_lib "hi2u"
-
- install_gemfile <<-G
- path "#{lib_path}" do
- gem "omg"
- gem "hi2u"
- end
- G
-
- should_be_installed "omg 1.0", "hi2u 1.0"
- end
- end
-
- it "keeps source pinning" do
- build_lib "foo", "1.0", :path => lib_path('foo')
- build_lib "omg", "1.0", :path => lib_path('omg')
- build_lib "foo", "1.0", :path => lib_path('omg/foo') do |s|
- s.write "lib/foo.rb", "puts 'FAIL'"
- end
-
- install_gemfile <<-G
- gem "foo", :path => "#{lib_path('foo')}"
- gem "omg", :path => "#{lib_path('omg')}"
- G
-
- should_be_installed "foo 1.0"
- end
-
- it "works when the path does not have a gemspec" do
- build_lib "foo", :gemspec => false
-
- gemfile <<-G
- gem "foo", "1.0", :path => "#{lib_path('foo-1.0')}"
- G
-
- should_be_installed "foo 1.0"
-
- should_be_installed "foo 1.0"
- end
-
- it "installs executable stubs" do
- build_lib "foo" do |s|
- s.executables = ['foo']
+ expect(vendored_gems('gems/rack-1.0.0')).to be_directory
+ should_be_installed "rack 1.0.0"
end
-
- install_gemfile <<-G
- gem "foo", :path => "#{lib_path('foo-1.0')}"
- G
-
- bundle "exec foo"
- expect(out).to eq("1.0")
end
- describe "when the gem version in the path is updated" do
+ describe "when BUNDLE_PATH or the global path config is set" do
before :each do
- build_lib "foo", "1.0", :path => lib_path("foo") do |s|
- s.add_dependency "bar"
+ build_lib "rack", "1.0.0", :to_system => true do |s|
+ s.write "lib/rack.rb", "raise 'FAIL'"
end
- build_lib "bar", "1.0", :path => lib_path("foo/bar")
- install_gemfile <<-G
- gem "foo", :path => "#{lib_path('foo')}"
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "rack"
G
end
- it "unlocks all gems when the top level gem is updated" do
- build_lib "foo", "2.0", :path => lib_path("foo") do |s|
- s.add_dependency "bar"
+ def set_bundle_path(type, location)
+ if type == :env
+ ENV["BUNDLE_PATH"] = location
+ elsif type == :global
+ bundle "config path #{location}", "no-color" => nil
end
-
- bundle "install"
-
- should_be_installed "foo 2.0", "bar 1.0"
end
- it "unlocks all gems when a child dependency gem is updated" do
- build_lib "bar", "2.0", :path => lib_path("foo/bar")
-
- bundle "install"
-
- should_be_installed "foo 1.0", "bar 2.0"
- end
- end
-
- describe "when dependencies in the path are updated" do
- before :each do
- build_lib "foo", "1.0", :path => lib_path("foo")
-
- install_gemfile <<-G
- source "file://#{gem_repo1}"
- gem "foo", :path => "#{lib_path('foo')}"
- G
- end
+ [:env, :global].each do |type|
+ it "installs gems to a path if one is specified" do
+ set_bundle_path(type, bundled_app("vendor2").to_s)
+ bundle "install --path vendor/bundle"
- it "gets dependencies that are updated in the path" do
- build_lib "foo", "1.0", :path => lib_path("foo") do |s|
- s.add_dependency "rack"
+ expect(vendored_gems("gems/rack-1.0.0")).to be_directory
+ expect(bundled_app("vendor2")).not_to be_directory
+ should_be_installed "rack 1.0.0"
end
- bundle "install"
+ it "installs gems to BUNDLE_PATH with #{type}" do
+ set_bundle_path(type, bundled_app("vendor").to_s)
- should_be_installed "rack 1.0.0"
- end
- end
+ bundle :install
- describe "switching sources" do
- it "doesn't switch pinned git sources to rubygems when pinning the parent gem to a path source" do
- build_gem "foo", "1.0", :to_system => true do |s|
- s.write "lib/foo.rb", "raise 'fail'"
- end
- build_lib "foo", "1.0", :path => lib_path('bar/foo')
- build_git "bar", "1.0", :path => lib_path('bar') do |s|
- s.add_dependency 'foo'
+ expect(bundled_app('vendor/gems/rack-1.0.0')).to be_directory
+ should_be_installed "rack 1.0.0"
end
- install_gemfile <<-G
- source "file://#{gem_repo1}"
- gem "bar", :git => "#{lib_path('bar')}"
- G
+ it "installs gems to BUNDLE_PATH relative to root when relative" do
+ set_bundle_path(type, "vendor")
- install_gemfile <<-G
- source "file://#{gem_repo1}"
- gem "bar", :path => "#{lib_path('bar')}"
- G
+ FileUtils.mkdir_p bundled_app('lol')
+ Dir.chdir(bundled_app('lol')) do
+ bundle :install
+ end
- should_be_installed "foo 1.0", "bar 1.0"
+ expect(bundled_app('vendor/gems/rack-1.0.0')).to be_directory
+ should_be_installed "rack 1.0.0"
+ end
end
- it "switches the source when the gem existed in rubygems and the path was already being used for another gem" do
- build_lib "foo", "1.0", :path => lib_path("foo")
- build_gem "bar", "1.0", :to_system => true do |s|
- s.write "lib/bar.rb", "raise 'fail'"
- end
+ it "installs gems to BUNDLE_PATH from .bundle/config" do
+ config "BUNDLE_PATH" => bundled_app("vendor/bundle").to_s
- install_gemfile <<-G
- source "file://#{gem_repo1}"
- gem "bar"
- path "#{lib_path('foo')}" do
- gem "foo"
- end
- G
+ bundle :install
- build_lib "bar", "1.0", :path => lib_path("foo/bar")
+ expect(vendored_gems('gems/rack-1.0.0')).to be_directory
+ should_be_installed "rack 1.0.0"
+ end
- install_gemfile <<-G
- source "file://#{gem_repo1}"
- path "#{lib_path('foo')}" do
- gem "foo"
- gem "bar"
- end
- G
+ it "sets BUNDLE_PATH as the first argument to bundle install" do
+ bundle "install --path ./vendor/bundle"
- should_be_installed "bar 1.0"
+ expect(vendored_gems('gems/rack-1.0.0')).to be_directory
+ should_be_installed "rack 1.0.0"
end
- end
- describe "gem install hooks" do
- it "runs pre-install hooks" do
- build_git "foo"
- gemfile <<-G
- gem "foo", :git => "#{lib_path('foo-1.0')}"
- G
-
- File.open(lib_path("install_hooks.rb"), "w") do |h|
- h.write <<-H
- require 'rubygems'
- Gem.pre_install_hooks << lambda do |inst|
- STDERR.puts "Ran pre-install hook: \#{inst.spec.full_name}"
- end
- H
- end
+ it "disables system gems when passing a path to install" do
+ # This is so that vendored gems can be distributed to others
+ build_gem "rack", "1.1.0", :to_system => true
+ bundle "install --path ./vendor/bundle"
- bundle :install, :expect_err => true,
- :requires => [lib_path('install_hooks.rb')]
- expect(err).to eq("Ran pre-install hook: foo-1.0")
+ expect(vendored_gems('gems/rack-1.0.0')).to be_directory
+ should_be_installed "rack 1.0.0"
end
+ end
- it "runs post-install hooks" do
- build_git "foo"
- gemfile <<-G
- gem "foo", :git => "#{lib_path('foo-1.0')}"
- G
-
- File.open(lib_path("install_hooks.rb"), "w") do |h|
- h.write <<-H
- require 'rubygems'
- Gem.post_install_hooks << lambda do |inst|
- STDERR.puts "Ran post-install hook: \#{inst.spec.full_name}"
- end
- H
+ describe "to a dead symlink" do
+ before do
+ in_app_root do
+ `ln -s /tmp/idontexist bundle`
end
-
- bundle :install, :expect_err => true,
- :requires => [lib_path('install_hooks.rb')]
- expect(err).to eq("Ran post-install hook: foo-1.0")
end
- it "complains if the install hook fails" do
- build_git "foo"
+ it "reports the symlink is dead" do
gemfile <<-G
- gem "foo", :git => "#{lib_path('foo-1.0')}"
+ source "file://#{gem_repo1}"
+ gem "rack"
G
- File.open(lib_path("install_hooks.rb"), "w") do |h|
- h.write <<-H
- require 'rubygems'
- Gem.pre_install_hooks << lambda do |inst|
- false
- end
- H
- end
-
- bundle :install, :expect_err => true,
- :requires => [lib_path('install_hooks.rb')]
- expect(out).to include("failed for foo-1.0")
+ bundle "install --path bundle"
+ expect(out).to match(/invalid symlink/)
end
end
-end
+end
\ No newline at end of file
diff --git a/spec/install/prereleases_spec.rb b/spec/install/prereleases_spec.rb
new file mode 100644
index 0000000..3c911a5
--- /dev/null
+++ b/spec/install/prereleases_spec.rb
@@ -0,0 +1,43 @@
+require 'spec_helper'
+
+describe "bundle install" do
+
+ describe "when prerelease gems are available" do
+ it "finds prereleases" do
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "not_released"
+ G
+ should_be_installed "not_released 1.0.pre"
+ end
+
+ it "uses regular releases if available" do
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "has_prerelease"
+ G
+ should_be_installed "has_prerelease 1.0"
+ end
+
+ it "uses prereleases if requested" do
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "has_prerelease", "1.1.pre"
+ G
+ should_be_installed "has_prerelease 1.1.pre"
+ end
+ end
+
+ describe "when prerelease gems are not available" do
+ it "still works" do
+ build_repo3
+ install_gemfile <<-G
+ source "file://#{gem_repo3}"
+ gem "rack"
+ G
+
+ should_be_installed "rack 1.0"
+ end
+ end
+
+end
\ No newline at end of file
diff --git a/spec/other/bundle_ruby_spec.rb b/spec/other/bundle_ruby_spec.rb
index 7d41a00..08d24ee 100644
--- a/spec/other/bundle_ruby_spec.rb
+++ b/spec/other/bundle_ruby_spec.rb
@@ -116,7 +116,7 @@ describe "bundle_ruby" do
it "returns the ruby version" do
gemfile <<-G
source "file://#{gem_repo1}"
- ruby "1.9.3", :patchlevel => 429, :engine => 'ruby', :engine_version => '1.9.3'
+ ruby "1.9.3", :patchlevel => '429', :engine => 'ruby', :engine_version => '1.9.3'
gem "foo"
G
@@ -129,7 +129,7 @@ describe "bundle_ruby" do
it "handles an engine" do
gemfile <<-G
source "file://#{gem_repo1}"
- ruby "1.9.3", :patchlevel => 392, :engine => 'jruby', :engine_version => '1.7.4'
+ ruby "1.9.3", :patchlevel => '392', :engine => 'jruby', :engine_version => '1.7.4'
gem "foo"
G
diff --git a/spec/other/ext_spec.rb b/spec/other/ext_spec.rb
index 8ef5927..14c432b 100644
--- a/spec/other/ext_spec.rb
+++ b/spec/other/ext_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe "Gem::Specification#match_platform" do
it "does not match platforms other than the gem platform" do
darwin = gem "lol", "1.0", "platform_specific-1.0-x86-darwin-10"
- expect(darwin.match_platform(pl('java'))).to be_false
+ expect(darwin.match_platform(pl('java'))).to be false
end
end
diff --git a/spec/other/platform_spec.rb b/spec/other/platform_spec.rb
index a483218..619b5c7 100644
--- a/spec/other/platform_spec.rb
+++ b/spec/other/platform_spec.rb
@@ -198,11 +198,12 @@ G
let(:ruby_version_correct) { "ruby \"#{RUBY_VERSION}\", :engine => \"#{local_ruby_engine}\", :engine_version => \"#{local_engine_version}\"" }
let(:ruby_version_correct_engineless) { "ruby \"#{RUBY_VERSION}\"" }
- let(:ruby_version_correct_patchlevel) { "#{ruby_version_correct}, :patchlevel => #{RUBY_PATCHLEVEL}" }
+ let(:ruby_version_correct_patchlevel) { "#{ruby_version_correct}, :patchlevel => '#{RUBY_PATCHLEVEL}'" }
let(:ruby_version_incorrect) { "ruby \"#{not_local_ruby_version}\", :engine => \"#{local_ruby_engine}\", :engine_version => \"#{not_local_ruby_version}\"" }
let(:engine_incorrect) { "ruby \"#{RUBY_VERSION}\", :engine => \"#{not_local_tag}\", :engine_version => \"#{RUBY_VERSION}\"" }
let(:engine_version_incorrect) { "ruby \"#{RUBY_VERSION}\", :engine => \"#{local_ruby_engine}\", :engine_version => \"#{not_local_engine_version}\"" }
- let(:patchlevel_incorrect) { "#{ruby_version_correct}, :patchlevel => #{not_local_patchlevel}" }
+ let(:patchlevel_incorrect) { "#{ruby_version_correct}, :patchlevel => '#{not_local_patchlevel}'" }
+ let(:patchlevel_fixnum) { "#{ruby_version_correct}, :patchlevel => #{RUBY_PATCHLEVEL}1" }
def should_be_ruby_version_incorrect(opts = {:exitstatus => true})
expect(exitstatus).to eq(18) if opts[:exitstatus]
@@ -225,6 +226,12 @@ G
expect(out).to be_include("Your Ruby patchlevel is #{RUBY_PATCHLEVEL}, but your Gemfile specified #{not_local_patchlevel}")
end
+ def should_be_patchlevel_fixnum(opts = {:exitstatus => true})
+ expect(exitstatus).to eq(18) if opts[:exitstatus]
+
+ expect(out).to be_include("The Ruby patchlevel in your Gemfile must be a string")
+ end
+
context "bundle install" do
it "installs fine when the ruby version matches" do
install_gemfile <<-G
@@ -1254,5 +1261,25 @@ G
should_be_patchlevel_incorrect
end
end
+
+ it "fails when the patchlevel is a fixnum" do
+ simulate_ruby_engine "jruby" do
+ update_repo2 do
+ build_gem "activesupport", "3.0"
+ update_git "foo", :path => lib_path("foo")
+ end
+
+ gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "activesupport", "2.3.5"
+ gem "foo", :git => "#{lib_path('foo')}"
+
+ #{patchlevel_fixnum}
+ G
+
+ bundle "outdated", :exitstatus => true
+ should_be_patchlevel_fixnum
+ end
+ end
end
end
diff --git a/spec/realworld/parallel_install_spec.rb b/spec/realworld/parallel_install_spec.rb
index c79febf..d70eb32 100644
--- a/spec/realworld/parallel_install_spec.rb
+++ b/spec/realworld/parallel_install_spec.rb
@@ -8,7 +8,8 @@ describe "installing dependencies parallely", :realworld => true do
gem 'faker', '~> 1.1.2'
G
- bundle :install, :jobs => 4
+ bundle :install, :jobs => 4, :env => {"DEBUG" => "1"}
+ (0..3).each {|i| expect(out).to include("#{i}: ") }
bundle "show activesupport"
expect(out).to match(/activesupport/)
diff --git a/spec/realworld/parallel_update_spec.rb b/spec/realworld/parallel_update_spec.rb
new file mode 100644
index 0000000..3f7f103
--- /dev/null
+++ b/spec/realworld/parallel_update_spec.rb
@@ -0,0 +1,31 @@
+require 'spec_helper'
+
+describe "updating dependencies parallely", :realworld => true do
+ before :each do
+ install_gemfile <<-G
+ source "https://rubygems.org"
+ gem 'activesupport', '~> 3.2.12'
+ gem 'faker', '~> 1.1.2'
+ G
+ end
+
+ it "installs gems parallely" do
+ gemfile <<-G
+ source "https://rubygems.org"
+ gem 'activesupport', '3.2.13'
+ gem 'faker', '~> 1.1.2'
+ G
+
+ bundle :update, :jobs => 4, :env => {"DEBUG" => "1"}
+ (0..3).each {|i| expect(out).to include("#{i}: ") }
+
+ bundle "show activesupport"
+ expect(out).to match(/activesupport-3\.2\.13/)
+
+ bundle "show faker"
+ expect(out).to match(/faker/)
+
+ bundle "config jobs"
+ expect(out).to match(/: "4"/)
+ end
+end
diff --git a/spec/runtime/platform_spec.rb b/spec/runtime/platform_spec.rb
index 1f9e2ec..cbc12ef 100644
--- a/spec/runtime/platform_spec.rb
+++ b/spec/runtime/platform_spec.rb
@@ -75,10 +75,10 @@ describe "Bundler.setup with multi platform stuff" do
nokogiri
G
- system_gems "nokogiri-1.4.2", "platform_specific-1.0-x86-darwin-100"
-
simulate_platform "x86-darwin-100"
+ system_gems "nokogiri-1.4.2", "platform_specific-1.0-x86-darwin-100"
+
gemfile <<-G
source "file://#{gem_repo1}"
gem "nokogiri"
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index b1a572f..ec678f2 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -28,7 +28,7 @@ $show_err = true
Spec::Rubygems.setup
FileUtils.rm_rf(Spec::Path.gem_repo1)
-ENV['RUBYOPT'] = "#{ENV['RUBYOPT']} -r#{Spec::Path.root}/spec/support/rubygems_hax/platform.rb"
+ENV['RUBYOPT'] = "#{ENV['RUBYOPT']} -r#{Spec::Path.root}/spec/support/hax.rb"
ENV['BUNDLE_SPEC_RUN'] = "true"
# Don't wrap output in tests
@@ -88,7 +88,7 @@ RSpec.configure do |config|
in_app_root
end
- config.after :each do
+ config.after :each do |example|
puts @out if example.exception
Dir.chdir(original_wd)
diff --git a/spec/support/rubygems_hax/platform.rb b/spec/support/hax.rb
similarity index 100%
rename from spec/support/rubygems_hax/platform.rb
rename to spec/support/hax.rb
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/bundler.git
More information about the Pkg-ruby-extras-commits
mailing list