instiki/vendor/plugins/bundler/doc/bundler-1.0.0/rdoc/Bundler/CLI.html
Jacques Distler 4bf2e0d944 Bundler
Remove the vendored sqlite3-ruby.
Instead, add support for Bundler
(which is vendored).

Before running the new Instiki,
do a 

   ruby bundle

which will install all of the needed gems
locally. (If you need to, tweak the contents
of Gemfile.)
2010-09-24 22:36:30 -05:00

1374 lines
77 KiB
HTML

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Class: Bundler::CLI</title>
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
<script src="../js/jquery.js" type="text/javascript"
charset="utf-8"></script>
<script src="../js/thickbox-compressed.js" type="text/javascript"
charset="utf-8"></script>
<script src="../js/quicksearch.js" type="text/javascript"
charset="utf-8"></script>
<script src="../js/darkfish.js" type="text/javascript"
charset="utf-8"></script>
</head>
<body class="class">
<div id="metadata">
<div id="home-metadata">
<div id="home-section" class="section">
<h3 class="section-header">
<a href="../index.html">Home</a>
<a href="../index.html#classes">Classes</a>
<a href="../index.html#methods">Methods</a>
</h3>
</div>
</div>
<div id="file-metadata">
<div id="file-list-section" class="section">
<h3 class="section-header">In Files</h3>
<div class="section-body">
<ul>
<li><a href="../lib/bundler/cli_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
class="thickbox" title="lib/bundler/cli.rb">lib/bundler/cli.rb</a></li>
</ul>
</div>
</div>
</div>
<div id="class-metadata">
<!-- Parent Class -->
<div id="parent-class-section" class="section">
<h3 class="section-header">Parent</h3>
<p class="link"><a href="../Thor.html">Thor</a></p>
</div>
<!-- Namespace Contents -->
<!-- Method Quickref -->
<div id="method-list-section" class="section">
<h3 class="section-header">Methods</h3>
<ul class="link-list">
<li><a href="#method-c-new">::new</a></li>
<li><a href="#method-c-source_root">::source_root</a></li>
<li><a href="#method-i-cache">#cache</a></li>
<li><a href="#method-i-check">#check</a></li>
<li><a href="#method-i-config">#config</a></li>
<li><a href="#method-i-console">#console</a></li>
<li><a href="#method-i-exec">#exec</a></li>
<li><a href="#method-i-gem">#gem</a></li>
<li><a href="#method-i-have_groff%3F">#have_groff?</a></li>
<li><a href="#method-i-help">#help</a></li>
<li><a href="#method-i-init">#init</a></li>
<li><a href="#method-i-install">#install</a></li>
<li><a href="#method-i-locate_gem">#locate_gem</a></li>
<li><a href="#method-i-lock">#lock</a></li>
<li><a href="#method-i-open">#open</a></li>
<li><a href="#method-i-package">#package</a></li>
<li><a href="#method-i-show">#show</a></li>
<li><a href="#method-i-unlock">#unlock</a></li>
<li><a href="#method-i-update">#update</a></li>
<li><a href="#method-i-version">#version</a></li>
<li><a href="#method-i-viz">#viz</a></li>
</ul>
</div>
<!-- Included Modules -->
<div id="includes-section" class="section">
<h3 class="section-header">Included Modules</h3>
<ul class="link-list">
<li><a class="include" href="../Thor/Actions.html">Thor::Actions</a></li>
</ul>
</div>
</div>
<div id="project-metadata">
<div id="fileindex-section" class="section project-section">
<h3 class="section-header">Files</h3>
<ul>
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
<li class="file"><a href="../lib/bundler/man/bundle-config.html">bundle-config</a></li>
<li class="file"><a href="../lib/bundler/man/bundle-config_txt.html">bundle-config.txt</a></li>
<li class="file"><a href="../lib/bundler/man/bundle-exec.html">bundle-exec</a></li>
<li class="file"><a href="../lib/bundler/man/bundle-exec_txt.html">bundle-exec.txt</a></li>
<li class="file"><a href="../lib/bundler/man/bundle-install.html">bundle-install</a></li>
<li class="file"><a href="../lib/bundler/man/bundle-install_txt.html">bundle-install.txt</a></li>
<li class="file"><a href="../lib/bundler/man/bundle-package.html">bundle-package</a></li>
<li class="file"><a href="../lib/bundler/man/bundle-package_txt.html">bundle-package.txt</a></li>
<li class="file"><a href="../lib/bundler/man/bundle-update.html">bundle-update</a></li>
<li class="file"><a href="../lib/bundler/man/bundle-update_txt.html">bundle-update.txt</a></li>
<li class="file"><a href="../lib/bundler/man/bundle_txt.html">bundle.txt</a></li>
<li class="file"><a href="../lib/bundler/man/gemfile_5_txt.html">gemfile.5.txt</a></li>
<li class="file"><a href="../lib/bundler/templates/Gemfile.html">Gemfile</a></li>
</ul>
</div>
<div id="classindex-section" class="section project-section">
<h3 class="section-header">Class Index
<span class="search-toggle"><img src="../images/find.png"
height="16" width="16" alt="[+]"
title="show/hide quicksearch" /></span></h3>
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
<fieldset>
<legend>Quicksearch</legend>
<input type="text" name="quicksearch" value=""
class="quicksearch-field" />
</fieldset>
</form>
<ul class="link-list">
<li><a href="../Bundler.html">Bundler</a></li>
<li><a href="../Bundler/BundlerError.html">Bundler::BundlerError</a></li>
<li><a href="../Bundler/CLI.html">Bundler::CLI</a></li>
<li><a href="../Bundler/Definition.html">Bundler::Definition</a></li>
<li><a href="../Bundler/DepProxy.html">Bundler::DepProxy</a></li>
<li><a href="../Bundler/Dependency.html">Bundler::Dependency</a></li>
<li><a href="../Bundler/DeprecatedError.html">Bundler::DeprecatedError</a></li>
<li><a href="../Bundler/Dsl.html">Bundler::Dsl</a></li>
<li><a href="../Bundler/DslError.html">Bundler::DslError</a></li>
<li><a href="../Bundler/Environment.html">Bundler::Environment</a></li>
<li><a href="../Bundler/GemHelper.html">Bundler::GemHelper</a></li>
<li><a href="../Bundler/GemHelpers.html">Bundler::GemHelpers</a></li>
<li><a href="../Bundler/GemNotFound.html">Bundler::GemNotFound</a></li>
<li><a href="../Bundler/GemfileError.html">Bundler::GemfileError</a></li>
<li><a href="../Bundler/GemfileNotFound.html">Bundler::GemfileNotFound</a></li>
<li><a href="../Bundler/GemspecError.html">Bundler::GemspecError</a></li>
<li><a href="../Bundler/GitError.html">Bundler::GitError</a></li>
<li><a href="../Bundler/Graph.html">Bundler::Graph</a></li>
<li><a href="../Bundler/GraphNode.html">Bundler::GraphNode</a></li>
<li><a href="../Bundler/Index.html">Bundler::Index</a></li>
<li><a href="../Bundler/Installer.html">Bundler::Installer</a></li>
<li><a href="../Bundler/InvalidOption.html">Bundler::InvalidOption</a></li>
<li><a href="../Bundler/InvalidSpecSet.html">Bundler::InvalidSpecSet</a></li>
<li><a href="../Bundler/LazySpecification.html">Bundler::LazySpecification</a></li>
<li><a href="../Bundler/LockfileParser.html">Bundler::LockfileParser</a></li>
<li><a href="../Bundler/MatchPlatform.html">Bundler::MatchPlatform</a></li>
<li><a href="../Bundler/PathError.html">Bundler::PathError</a></li>
<li><a href="../Bundler/ProductionError.html">Bundler::ProductionError</a></li>
<li><a href="../Bundler/RemoteSpecification.html">Bundler::RemoteSpecification</a></li>
<li><a href="../Bundler/Resolver.html">Bundler::Resolver</a></li>
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
<li><a href="../Bundler/Runtime.html">Bundler::Runtime</a></li>
<li><a href="../Bundler/Settings.html">Bundler::Settings</a></li>
<li><a href="../Bundler/SharedHelpers.html">Bundler::SharedHelpers</a></li>
<li><a href="../Bundler/SharedHelpers/Gem.html">Bundler::SharedHelpers::Gem</a></li>
<li><a href="../Bundler/SharedHelpers/Gem/SourceIndex.html">Bundler::SharedHelpers::Gem::SourceIndex</a></li>
<li><a href="../Bundler/Source.html">Bundler::Source</a></li>
<li><a href="../Bundler/Source/Git.html">Bundler::Source::Git</a></li>
<li><a href="../Bundler/Source/Path.html">Bundler::Source::Path</a></li>
<li><a href="../Bundler/Source/Path/Installer.html">Bundler::Source::Path::Installer</a></li>
<li><a href="../Bundler/Source/Rubygems.html">Bundler::Source::Rubygems</a></li>
<li><a href="../Bundler/SpecSet.html">Bundler::SpecSet</a></li>
<li><a href="../Bundler/UI.html">Bundler::UI</a></li>
<li><a href="../Bundler/UI/RGProxy.html">Bundler::UI::RGProxy</a></li>
<li><a href="../Bundler/UI/Shell.html">Bundler::UI::Shell</a></li>
<li><a href="../Bundler/VersionConflict.html">Bundler::VersionConflict</a></li>
<li><a href="../Thor.html">Thor</a></li>
<li><a href="../Thor/Actions.html">Thor::Actions</a></li>
<li><a href="../Thor/Actions/ClassMethods.html">Thor::Actions::ClassMethods</a></li>
<li><a href="../Thor/Base.html">Thor::Base</a></li>
<li><a href="../Thor/Base/ClassMethods.html">Thor::Base::ClassMethods</a></li>
<li><a href="../Thor/DynamicTask.html">Thor::DynamicTask</a></li>
<li><a href="../Thor/Error.html">Thor::Error</a></li>
<li><a href="../Thor/HiddenTask.html">Thor::HiddenTask</a></li>
<li><a href="../Thor/Invocation.html">Thor::Invocation</a></li>
<li><a href="../Thor/Invocation/ClassMethods.html">Thor::Invocation::ClassMethods</a></li>
<li><a href="../Thor/InvocationError.html">Thor::InvocationError</a></li>
<li><a href="../Thor/MalformattedArgumentError.html">Thor::MalformattedArgumentError</a></li>
<li><a href="../Thor/RequiredArgumentMissingError.html">Thor::RequiredArgumentMissingError</a></li>
<li><a href="../Thor/Shell.html">Thor::Shell</a></li>
<li><a href="../Thor/Shell/Basic.html">Thor::Shell::Basic</a></li>
<li><a href="../Thor/Shell/Color.html">Thor::Shell::Color</a></li>
<li><a href="../Thor/Shell/HTML.html">Thor::Shell::HTML</a></li>
<li><a href="../Thor/Task.html">Thor::Task</a></li>
<li><a href="../Thor/UndefinedTaskError.html">Thor::UndefinedTaskError</a></li>
<li><a href="../Thor/UnknownArgumentError.html">Thor::UnknownArgumentError</a></li>
<li><a href="../Thor/Util.html">Thor::Util</a></li>
<li><a href="../Gem.html">Gem</a></li>
<li><a href="../Gem/Dependency.html">Gem::Dependency</a></li>
<li><a href="../Gem/Platform.html">Gem::Platform</a></li>
<li><a href="../Gem/Specification.html">Gem::Specification</a></li>
</ul>
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
</div>
</div>
</div>
<div id="documentation">
<h1 class="class">Bundler::CLI</h1>
<div id="description">
</div>
<!-- Constants -->
<!-- Attributes -->
<!-- Methods -->
<div id="public-class-method-details" class="method-section section">
<h3 class="section-header">Public Class Methods</h3>
<div id="new-method" class="method-detail ">
<a name="method-c-new"></a>
<div class="method-heading">
<span class="method-name">new</span><span
class="method-args">(*)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code"
id="new-source">
<pre>
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 13</span>
13: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(*)
14: <span class="ruby-keyword kw">super</span>
15: <span class="ruby-identifier">use_shell</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value str">&quot;no-color&quot;</span>] <span class="ruby-operator">?</span> <span class="ruby-constant">Thor</span><span class="ruby-operator">::</span><span class="ruby-constant">Shell</span><span class="ruby-operator">::</span><span class="ruby-constant">Basic</span>.<span class="ruby-identifier">new</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">shell</span>
16:
17: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span> = <span class="ruby-constant">UI</span><span class="ruby-operator">::</span><span class="ruby-constant">Shell</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">use_shell</span>)
18: <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">DefaultUserInteraction</span>.<span class="ruby-identifier">ui</span> = <span class="ruby-constant">UI</span><span class="ruby-operator">::</span><span class="ruby-constant">RGProxy</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>)
19: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div id="source-root-method" class="method-detail ">
<a name="method-c-source_root"></a>
<div class="method-heading">
<span class="method-name">source_root</span><span
class="method-args">()</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code"
id="source-root-source">
<pre>
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 478</span>
478: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">source_root</span>
479: <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>), <span class="ruby-value str">'templates'</span>))
480: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
</div>
<div id="public-instance-method-details" class="method-section section">
<h3 class="section-header">Public Instance Methods</h3>
<div id="cache-method" class="method-detail ">
<a name="method-i-cache"></a>
<div class="method-heading">
<span class="method-name">cache</span><span
class="method-args">()</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code"
id="cache-source">
<pre>
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 289</span>
289: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache</span>
290: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">definition</span>.<span class="ruby-identifier">resolve_with_cache!</span>
291: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load</span>.<span class="ruby-identifier">cache</span>
292: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:no_prune</span>] = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:no_prune</span>]
293: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load</span>.<span class="ruby-identifier">lock</span>
294: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">GemNotFound</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
295: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span>(<span class="ruby-identifier">e</span>.<span class="ruby-identifier">message</span>)
296: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">&quot;Run `bundle install` to install missing gems.&quot;</span>
297: <span class="ruby-identifier">exit</span> <span class="ruby-value">128</span>
298: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div id="check-method" class="method-detail ">
<a name="method-i-check"></a>
<div class="method-heading">
<span class="method-name">check</span><span
class="method-args">()</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code"
id="check-source">
<pre>
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 98</span>
98: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">check</span>
99: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'BUNDLE_GEMFILE'</span>] = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">options</span>[<span class="ruby-value">:gemfile</span>]) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:gemfile</span>]
100: <span class="ruby-keyword kw">begin</span>
101: <span class="ruby-identifier">not_installed</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">definition</span>.<span class="ruby-identifier">missing_specs</span>
102: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">GemNotFound</span>, <span class="ruby-constant">VersionConflict</span>
103: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">&quot;Your Gemfile's dependencies could not be satisfied&quot;</span>
104: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">&quot;Install missing gems with `bundle install`&quot;</span>
105: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
106: <span class="ruby-keyword kw">end</span>
107:
108: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">not_installed</span>.<span class="ruby-identifier">any?</span>
109: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">&quot;The following gems are missing&quot;</span>
110: <span class="ruby-identifier">not_installed</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">&quot; * #{s.name} (#{s.version})&quot;</span> }
111: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">&quot;Install missing gems with `bundle install`&quot;</span>
112: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
113: <span class="ruby-keyword kw">else</span>
114: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load</span>.<span class="ruby-identifier">lock</span>
115: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">&quot;The Gemfile's dependencies are satisfied&quot;</span>
116: <span class="ruby-keyword kw">end</span>
117: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div id="config-method" class="method-detail ">
<a name="method-i-config"></a>
<div class="method-heading">
<span class="method-name">config</span><span
class="method-args">(name = nil, *args)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code"
id="config-source">
<pre>
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 351</span>
351: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">config</span>(<span class="ruby-identifier">name</span> = <span class="ruby-keyword kw">nil</span>, *<span class="ruby-identifier">args</span>)
352: <span class="ruby-identifier">values</span> = <span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">dup</span>
353: <span class="ruby-identifier">values</span>.<span class="ruby-identifier">shift</span> <span class="ruby-comment cmt"># remove config</span>
354: <span class="ruby-identifier">values</span>.<span class="ruby-identifier">shift</span> <span class="ruby-comment cmt"># remove the name</span>
355:
356: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">name</span>
357: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-value str">&quot;Settings are listed in order of priority. The top value will be used.\n&quot;</span>
358:
359: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">all</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">setting</span><span class="ruby-operator">|</span>
360: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-node">&quot;#{setting}&quot;</span>
361: <span class="ruby-identifier">with_padding</span> <span class="ruby-keyword kw">do</span>
362: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">pretty_values_for</span>(<span class="ruby-identifier">setting</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
363: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-identifier">line</span>
364: <span class="ruby-keyword kw">end</span>
365: <span class="ruby-keyword kw">end</span>
366: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-value str">&quot;&quot;</span>
367: <span class="ruby-keyword kw">end</span>
368: <span class="ruby-keyword kw">return</span>
369: <span class="ruby-keyword kw">end</span>
370:
371: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">values</span>.<span class="ruby-identifier">empty?</span>
372: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-node">&quot;Settings for `#{name}` in order of priority. The top value will be used&quot;</span>
373: <span class="ruby-identifier">with_padding</span> <span class="ruby-keyword kw">do</span>
374: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">pretty_values_for</span>(<span class="ruby-identifier">name</span>).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-identifier">line</span> }
375: <span class="ruby-keyword kw">end</span>
376: <span class="ruby-keyword kw">else</span>
377: <span class="ruby-identifier">locations</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">locations</span>(<span class="ruby-identifier">name</span>)
378:
379: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">local</span> = <span class="ruby-identifier">locations</span>[<span class="ruby-value">:local</span>]
380: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;Your application has set #{name} to #{local.inspect}. This will override the &quot;</span> <span class="ruby-value str">&quot;system value you are currently setting&quot;</span>
381: <span class="ruby-keyword kw">end</span>
382:
383: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">global</span> = <span class="ruby-identifier">locations</span>[<span class="ruby-value">:global</span>]
384: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;You are replacing the current system value of #{name}, which is currently #{global}&quot;</span>
385: <span class="ruby-keyword kw">end</span>
386:
387: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">env</span> = <span class="ruby-identifier">locations</span>[<span class="ruby-value">:env</span>]
388: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;You have set a bundler environment variable for #{env}. This will take precedence &quot;</span> <span class="ruby-value str">&quot;over the system value you are setting&quot;</span>
389: <span class="ruby-keyword kw">end</span>
390:
391: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">set_global</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">values</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot; &quot;</span>))
392: <span class="ruby-keyword kw">end</span>
393: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div id="console-method" class="method-detail ">
<a name="method-i-console"></a>
<div class="method-heading">
<span class="method-name">console</span><span
class="method-args">(group = nil)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code"
id="console-source">
<pre>
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 410</span>
410: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">console</span>(<span class="ruby-identifier">group</span> = <span class="ruby-keyword kw">nil</span>)
411: <span class="ruby-identifier">require</span> <span class="ruby-value str">'bundler/setup'</span>
412: <span class="ruby-identifier">group</span> <span class="ruby-operator">?</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">require</span>(<span class="ruby-value">:default</span>, <span class="ruby-identifier">group</span>) <span class="ruby-operator">:</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">require</span>
413: <span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">clear</span>
414:
415: <span class="ruby-identifier">require</span> <span class="ruby-value str">'irb'</span>
416: <span class="ruby-constant">IRB</span>.<span class="ruby-identifier">start</span>
417: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div id="exec-method" class="method-detail ">
<a name="method-i-exec"></a>
<div class="method-heading">
<span class="method-name">exec</span><span
class="method-args">(*)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code"
id="exec-source">
<pre>
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 321</span>
321: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">exec</span>(*)
322: <span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">&quot;exec&quot;</span>)
323:
324: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">setup</span>
325:
326: <span class="ruby-keyword kw">begin</span>
327: <span class="ruby-comment cmt"># Run</span>
328: <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">exec</span>(*<span class="ruby-constant">ARGV</span>)
329: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">EACCES</span>
330: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">&quot;bundler: not executable: #{ARGV.first}&quot;</span>
331: <span class="ruby-identifier">exit</span> <span class="ruby-value">126</span>
332: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOENT</span>
333: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">&quot;bundler: command not found: #{ARGV.first}&quot;</span>
334: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">&quot;Install missing gem binaries with `bundle install`&quot;</span>
335: <span class="ruby-identifier">exit</span> <span class="ruby-value">127</span>
336: <span class="ruby-keyword kw">end</span>
337: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div id="gem-method" class="method-detail ">
<a name="method-i-gem"></a>
<div class="method-heading">
<span class="method-name">gem</span><span
class="method-args">(name)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code"
id="gem-source">
<pre>
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 456</span>
456: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gem</span>(<span class="ruby-identifier">name</span>)
457: <span class="ruby-identifier">target</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">Dir</span>.<span class="ruby-identifier">pwd</span>, <span class="ruby-identifier">name</span>)
458: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">name</span>)
459: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">&quot;File already exists at #{File.join(Dir.pwd, name)}&quot;</span>
460: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
461: <span class="ruby-keyword kw">end</span>
462:
463: <span class="ruby-identifier">constant_name</span> = <span class="ruby-identifier">name</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'_'</span>).<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span> <span class="ruby-identifier">p</span>.<span class="ruby-identifier">capitalize</span>}.<span class="ruby-identifier">join</span>
464: <span class="ruby-identifier">constant_name</span> = <span class="ruby-identifier">constant_name</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'-'</span>).<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">q</span><span class="ruby-operator">|</span> <span class="ruby-identifier">q</span>.<span class="ruby-identifier">capitalize</span>}.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'::'</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">constant_name</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/-/</span>
465: <span class="ruby-identifier">constant_array</span> = <span class="ruby-identifier">constant_name</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'::'</span>)
466: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">target</span>, <span class="ruby-value str">'lib'</span>, <span class="ruby-identifier">name</span>))
467: <span class="ruby-identifier">opts</span> = {<span class="ruby-value">:name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">name</span>, <span class="ruby-value">:constant_name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">constant_name</span>, <span class="ruby-value">:constant_array</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">constant_array</span>}
468: <span class="ruby-identifier">template</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'newgem'</span>, <span class="ruby-value str">'Gemfile.tt'</span>), <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">target</span>, <span class="ruby-value str">'Gemfile'</span>), <span class="ruby-identifier">opts</span>)
469: <span class="ruby-identifier">template</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'newgem'</span>, <span class="ruby-value str">'Rakefile.tt'</span>), <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">target</span>, <span class="ruby-value str">'Rakefile'</span>), <span class="ruby-identifier">opts</span>)
470: <span class="ruby-identifier">template</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'newgem'</span>, <span class="ruby-value str">'gitignore.tt'</span>), <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">target</span>, <span class="ruby-value str">'.gitignore'</span>), <span class="ruby-identifier">opts</span>)
471: <span class="ruby-identifier">template</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'newgem'</span>, <span class="ruby-value str">'newgem.gemspec.tt'</span>), <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">target</span>, <span class="ruby-node">&quot;#{name}.gemspec&quot;</span>), <span class="ruby-identifier">opts</span>)
472: <span class="ruby-identifier">template</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'newgem'</span>, <span class="ruby-value str">'lib'</span>, <span class="ruby-value str">'newgem.rb.tt'</span>), <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">target</span>, <span class="ruby-value str">'lib'</span>, <span class="ruby-node">&quot;#{name}.rb&quot;</span>), <span class="ruby-identifier">opts</span>)
473: <span class="ruby-identifier">template</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'newgem'</span>, <span class="ruby-value str">'lib'</span>, <span class="ruby-value str">'newgem'</span>, <span class="ruby-value str">'version.rb.tt'</span>), <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">target</span>, <span class="ruby-value str">'lib'</span>, <span class="ruby-identifier">name</span>, <span class="ruby-value str">'version.rb'</span>), <span class="ruby-identifier">opts</span>)
474: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;Initializating git repo in #{target}&quot;</span>
475: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">target</span>) { <span class="ruby-value">`git init`</span>; <span class="ruby-value">`git add .`</span> }
476: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div id="help-method" class="method-detail ">
<a name="method-i-help"></a>
<div class="method-heading">
<span class="method-name">help</span><span
class="method-args">(cli = nil)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code"
id="help-source">
<pre>
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 26</span>
26: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">help</span>(<span class="ruby-identifier">cli</span> = <span class="ruby-keyword kw">nil</span>)
27: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">cli</span>
28: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;gemfile&quot;</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">command</span> = <span class="ruby-value str">&quot;gemfile.5&quot;</span>
29: <span class="ruby-keyword kw">when</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">command</span> = <span class="ruby-value str">&quot;bundle&quot;</span>
30: <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">command</span> = <span class="ruby-node">&quot;bundle-#{cli}&quot;</span>
31: <span class="ruby-keyword kw">end</span>
32:
33: <span class="ruby-identifier">manpages</span> = <span class="ruby-node">%(
34: bundle
35: bundle-config
36: bundle-exec
37: bundle-install
38: bundle-package
39: bundle-update
40: gemfile.5)</span>
41:
42: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">manpages</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">command</span>)
43: <span class="ruby-identifier">root</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-value str">&quot;../man&quot;</span>, <span class="ruby-keyword kw">__FILE__</span>)
44:
45: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">have_groff?</span>
46: <span class="ruby-identifier">groff</span> = <span class="ruby-value str">&quot;groff -Wall -mtty-char -mandoc -Tascii&quot;</span>
47: <span class="ruby-identifier">pager</span> = <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'MANPAGER'</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'PAGER'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'more'</span>
48:
49: <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">exec</span> <span class="ruby-node">&quot;#{groff} #{root}/#{command} | #{pager}&quot;</span>
50: <span class="ruby-keyword kw">else</span>
51: <span class="ruby-identifier">puts</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-node">&quot;#{root}/#{command}.txt&quot;</span>)
52: <span class="ruby-keyword kw">end</span>
53: <span class="ruby-keyword kw">else</span>
54: <span class="ruby-keyword kw">super</span>
55: <span class="ruby-keyword kw">end</span>
56: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div id="init-method" class="method-detail ">
<a name="method-i-init"></a>
<div class="method-heading">
<span class="method-name">init</span><span
class="method-args">()</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code"
id="init-source">
<pre>
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 65</span>
65: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init</span>
66: <span class="ruby-identifier">opts</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">dup</span>
67: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-value str">&quot;Gemfile&quot;</span>)
68: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">&quot;Gemfile already exists at #{Dir.pwd}/Gemfile&quot;</span>
69: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
70: <span class="ruby-keyword kw">end</span>
71:
72: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:gemspec</span>]
73: <span class="ruby-identifier">gemspec</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">opts</span>[<span class="ruby-value">:gemspec</span>])
74: <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">gemspec</span>)
75: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">&quot;Gem specification #{gemspec} doesn't exist&quot;</span>
76: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
77: <span class="ruby-keyword kw">end</span>
78: <span class="ruby-identifier">spec</span> = <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Specification</span>.<span class="ruby-identifier">load</span>(<span class="ruby-identifier">gemspec</span>)
79: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Writing new Gemfile to #{Dir.pwd}/Gemfile&quot;</span>
80: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-value str">'Gemfile'</span>, <span class="ruby-value str">'wb'</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
81: <span class="ruby-identifier">file</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;# Generated from #{gemspec}\n&quot;</span>
82: <span class="ruby-identifier">file</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">to_gemfile</span>
83: <span class="ruby-keyword kw">end</span>
84: <span class="ruby-keyword kw">else</span>
85: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Writing new Gemfile to #{Dir.pwd}/Gemfile&quot;</span>
86: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">cp</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-value str">'../templates/Gemfile'</span>, <span class="ruby-keyword kw">__FILE__</span>), <span class="ruby-value str">'Gemfile'</span>)
87: <span class="ruby-keyword kw">end</span>
88: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div id="install-method" class="method-detail ">
<a name="method-i-install"></a>
<div class="method-heading">
<span class="method-name">install</span><span
class="method-args">(path = nil)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code"
id="install-source">
<pre>
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 156</span>
156: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install</span>(<span class="ruby-identifier">path</span> = <span class="ruby-keyword kw">nil</span>)
157: <span class="ruby-identifier">opts</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">dup</span>
158: <span class="ruby-identifier">opts</span>[<span class="ruby-value">:without</span>] <span class="ruby-operator">||=</span> []
159: <span class="ruby-identifier">opts</span>[<span class="ruby-value">:without</span>].<span class="ruby-identifier">map!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">g</span><span class="ruby-operator">|</span> <span class="ruby-identifier">g</span>.<span class="ruby-identifier">to_sym</span> }
160:
161:
162: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'BUNDLE_GEMFILE'</span>] = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">opts</span>[<span class="ruby-value">:gemfile</span>]) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:gemfile</span>]
163:
164: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:production</span>]
165: <span class="ruby-identifier">opts</span>[<span class="ruby-value">:deployment</span>] = <span class="ruby-keyword kw">true</span>
166: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">&quot;The --production option is deprecated, and will be removed in &quot;</span> <span class="ruby-value str">&quot;the final release of Bundler 1.0. Please use --deployment instead.&quot;</span>
167: <span class="ruby-keyword kw">end</span>
168:
169: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">path</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:path</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:deployment</span>]) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:system</span>]
170: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">&quot;You have specified both a path to install your gems to, \n&quot;</span> <span class="ruby-value str">&quot;as well as --system. Please choose.&quot;</span>
171: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
172: <span class="ruby-keyword kw">end</span>
173:
174: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">path</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:path</span>]
175: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">&quot;You have specified a path via `bundle install #{path}` as well as\n&quot;</span> <span class="ruby-node">&quot;by `bundle install --path #{options[:path]}`. These options are\n&quot;</span> <span class="ruby-value str">&quot;equivalent, so please use one or the other.&quot;</span>
176: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
177: <span class="ruby-keyword kw">end</span>
178:
179: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value str">&quot;disable-shared-gems&quot;</span>]
180: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">&quot;The disable-shared-gem option is no longer available.\n\n&quot;</span> <span class="ruby-value str">&quot;Instead, use `bundle install` to install to your system,\n&quot;</span> <span class="ruby-value str">&quot;or `bundle install --path path/to/gems` to install to an isolated\n&quot;</span> <span class="ruby-value str">&quot;location. Bundler will resolve relative paths relative to\n&quot;</span> <span class="ruby-value str">&quot;your `Gemfile`.&quot;</span>
181: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
182: <span class="ruby-keyword kw">end</span>
183:
184: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:deployment</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:frozen</span>]
185: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:frozen</span>] = <span class="ruby-value str">'1'</span>
186:
187: <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">default_lockfile</span>.<span class="ruby-identifier">exist?</span>
188: <span class="ruby-identifier">flag</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-value">:deployment</span>] <span class="ruby-operator">?</span> <span class="ruby-value str">'--deployment'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'--frozen'</span>
189: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ProductionError</span>, <span class="ruby-node">&quot;The #{flag} flag requires a Gemfile.lock. Please make &quot;</span> <span class="ruby-value str">&quot;sure you have checked your Gemfile.lock into version control &quot;</span> <span class="ruby-value str">&quot;before deploying.&quot;</span>
190: <span class="ruby-keyword kw">end</span>
191:
192: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;vendor/cache&quot;</span>).<span class="ruby-identifier">exist?</span>
193: <span class="ruby-identifier">opts</span>[<span class="ruby-value">:local</span>] = <span class="ruby-keyword kw">true</span>
194: <span class="ruby-keyword kw">end</span>
195: <span class="ruby-keyword kw">end</span>
196:
197: <span class="ruby-comment cmt"># Can't use Bundler.settings for this because settings needs gemfile.dirname</span>
198: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:path</span>] = <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:system</span>]
199: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:path</span>] = <span class="ruby-value str">&quot;vendor/bundle&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:deployment</span>]
200: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:path</span>] = <span class="ruby-identifier">path</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">path</span>
201: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:path</span>] = <span class="ruby-identifier">opts</span>[<span class="ruby-value">:path</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:path</span>]
202: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:bin</span>] = <span class="ruby-identifier">opts</span>[<span class="ruby-value str">&quot;binstubs&quot;</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:binstubs</span>]
203: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:disable_shared_gems</span>] = <span class="ruby-value str">'1'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:path</span>]
204: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">without</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-value">:without</span>]
205: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">be_quiet!</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:quiet</span>]
206:
207: <span class="ruby-constant">Installer</span>.<span class="ruby-identifier">install</span>(<span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">root</span>, <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">definition</span>, <span class="ruby-identifier">opts</span>)
208: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load</span>.<span class="ruby-identifier">cache</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;vendor/cache&quot;</span>).<span class="ruby-identifier">exist?</span>
209: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-value str">&quot;Your bundle is complete! &quot;</span> <span class="ruby-operator">+</span>
210: <span class="ruby-value str">&quot;Use `bundle show [gemname]` to see where a bundled gem is installed.&quot;</span>
211:
212: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-node">&quot;\nYour bundle was installed to `#{Bundler.settings[:path]}`&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:path</span>]
213:
214: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">path</span>
215: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">&quot;\nIf you meant to install it to your system, please remove the\n&quot;</span> <span class="ruby-node">&quot;`#{path}` directory and run `bundle install --system`&quot;</span>
216: <span class="ruby-keyword kw">end</span>
217: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">GemNotFound</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
218: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">definition</span>.<span class="ruby-identifier">no_sources?</span>
219: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">&quot;Your Gemfile doesn't have any sources. You can add one with a line like 'source :gemcutter'&quot;</span>
220: <span class="ruby-keyword kw">end</span>
221: <span class="ruby-identifier">raise</span> <span class="ruby-identifier">e</span>
222: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div id="lock-method" class="method-detail ">
<a name="method-i-lock"></a>
<div class="method-heading">
<span class="method-name">lock</span><span
class="method-args">()</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code"
id="lock-source">
<pre>
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 259</span>
259: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">lock</span>
260: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">&quot;Lock is deprecated. Your bundle is now locked whenever you run `bundle install`.&quot;</span>
261: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div id="open-method" class="method-detail ">
<a name="method-i-open"></a>
<div class="method-heading">
<span class="method-name">open</span><span
class="method-args">(name)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code"
id="open-source">
<pre>
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 398</span>
398: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">open</span>(<span class="ruby-identifier">name</span>)
399: <span class="ruby-identifier">editor</span> = [<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'BUNDLER_EDITOR'</span>], <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'VISUAL'</span>], <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'EDITOR'</span>]].<span class="ruby-identifier">find</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-operator">!</span><span class="ruby-identifier">e</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">e</span>.<span class="ruby-identifier">empty?</span> }
400: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">editor</span>
401: <span class="ruby-identifier">command</span> = <span class="ruby-node">&quot;#{editor} #{locate_gem(name)}&quot;</span>
402: <span class="ruby-identifier">success</span> = <span class="ruby-identifier">system</span>(<span class="ruby-identifier">command</span>)
403: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;Could not run '#{command}'&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">success</span>
404: <span class="ruby-keyword kw">else</span>
405: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">&quot;To open a bundled gem, set $EDITOR or $BUNDLER_EDITOR&quot;</span>)
406: <span class="ruby-keyword kw">end</span>
407: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div id="package-method" class="method-detail ">
<a name="method-i-package"></a>
<div class="method-heading">
<span class="method-name">package</span><span
class="method-args">()</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code"
id="package-source">
<pre>
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 308</span>
308: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">package</span>
309: <span class="ruby-identifier">install</span>
310: <span class="ruby-comment cmt"># TODO: move cache contents here now that all bundles are locked</span>
311: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load</span>.<span class="ruby-identifier">cache</span>
312: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div id="show-method" class="method-detail ">
<a name="method-i-show"></a>
<div class="method-heading">
<span class="method-name">show</span><span
class="method-args">(gem_name = nil)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code"
id="show-source">
<pre>
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 273</span>
273: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show</span>(<span class="ruby-identifier">gem_name</span> = <span class="ruby-keyword kw">nil</span>)
274: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load</span>.<span class="ruby-identifier">lock</span>
275:
276: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">gem_name</span>
277: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-identifier">locate_gem</span>(<span class="ruby-identifier">gem_name</span>)
278: <span class="ruby-keyword kw">else</span>
279: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">&quot;Gems included by the bundle:&quot;</span>
280: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load</span>.<span class="ruby-identifier">specs</span>.<span class="ruby-identifier">sort_by</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">name</span> }.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
281: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot; * #{s.name} (#{s.version}#{s.git_version})&quot;</span>
282: <span class="ruby-keyword kw">end</span>
283: <span class="ruby-keyword kw">end</span>
284: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div id="unlock-method" class="method-detail ">
<a name="method-i-unlock"></a>
<div class="method-heading">
<span class="method-name">unlock</span><span
class="method-args">()</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code"
id="unlock-source">
<pre>
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 264</span>
264: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unlock</span>
265: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">&quot;Unlock is deprecated. To update to newer gem versions, use `bundle update`.&quot;</span>
266: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div id="update-method" class="method-detail ">
<a name="method-i-update"></a>
<div class="method-heading">
<span class="method-name">update</span><span
class="method-args">(*gems)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code"
id="update-source">
<pre>
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 242</span>
242: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update</span>(*<span class="ruby-identifier">gems</span>)
243: <span class="ruby-identifier">sources</span> = <span class="ruby-constant">Array</span>(<span class="ruby-identifier">options</span>[<span class="ruby-value">:source</span>])
244:
245: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">gems</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">sources</span>.<span class="ruby-identifier">empty?</span>
246: <span class="ruby-comment cmt"># We're doing a full update</span>
247: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">definition</span>(<span class="ruby-keyword kw">true</span>)
248: <span class="ruby-keyword kw">else</span>
249: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">definition</span>(<span class="ruby-value">:gems</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">gems</span>, <span class="ruby-value">:sources</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">sources</span>)
250: <span class="ruby-keyword kw">end</span>
251:
252: <span class="ruby-constant">Installer</span>.<span class="ruby-identifier">install</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">root</span>, <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">definition</span>, <span class="ruby-value str">&quot;update&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>
253: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load</span>.<span class="ruby-identifier">cache</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;vendor/cache&quot;</span>).<span class="ruby-identifier">exist?</span>
254: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-value str">&quot;Your bundle is updated! &quot;</span> <span class="ruby-operator">+</span>
255: <span class="ruby-value str">&quot;Use `bundle show [gemname]` to see where a bundled gem is installed.&quot;</span>
256: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div id="version-method" class="method-detail ">
<a name="method-i-version"></a>
<div class="method-heading">
<span class="method-name">version</span><span
class="method-args">()</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code"
id="version-source">
<pre>
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 420</span>
420: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">version</span>
421: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;Bundler version #{Bundler::VERSION}&quot;</span>
422: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div id="viz-method" class="method-detail ">
<a name="method-i-viz"></a>
<div class="method-heading">
<span class="method-name">viz</span><span
class="method-args">()</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code"
id="viz-source">
<pre>
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 434</span>
434: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">viz</span>
435: <span class="ruby-identifier">output_file</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">options</span>[<span class="ruby-value">:file</span>])
436: <span class="ruby-identifier">graph</span> = <span class="ruby-constant">Graph</span>.<span class="ruby-identifier">new</span>( <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load</span> )
437:
438: <span class="ruby-keyword kw">begin</span>
439: <span class="ruby-identifier">graph</span>.<span class="ruby-identifier">viz</span>(<span class="ruby-identifier">output_file</span>, <span class="ruby-identifier">options</span>[<span class="ruby-value">:version</span>], <span class="ruby-identifier">options</span>[<span class="ruby-value">:requirements</span>])
440: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-identifier">output_file</span>
441: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">LoadError</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
442: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">inspect</span>
443: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">&quot;Make sure you have the graphviz ruby gem. You can install it with:&quot;</span>
444: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">&quot;`gem install ruby-graphviz`&quot;</span>
445: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">StandardError</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
446: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">message</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/GraphViz not installed or dot not in PATH/</span>
447: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">message</span>
448: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">&quot;The ruby graphviz gem requires GraphViz to be installed&quot;</span>
449: <span class="ruby-keyword kw">else</span>
450: <span class="ruby-identifier">raise</span>
451: <span class="ruby-keyword kw">end</span>
452: <span class="ruby-keyword kw">end</span>
453: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
</div>
<div id="private-instance-method-details" class="method-section section">
<h3 class="section-header">Private Instance Methods</h3>
<div id="have-groff--method" class="method-detail ">
<a name="method-i-have_groff%3F"></a>
<div class="method-heading">
<span class="method-name">have_groff?</span><span
class="method-args">()</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code"
id="have-groff--source">
<pre>
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 484</span>
484: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">have_groff?</span>
485: <span class="ruby-node">`which groff 2&gt;#{NULL}`</span>
486: <span class="ruby-identifier">$?</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
487: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div id="locate-gem-method" class="method-detail ">
<a name="method-i-locate_gem"></a>
<div class="method-heading">
<span class="method-name">locate_gem</span><span
class="method-args">(name)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code"
id="locate-gem-source">
<pre>
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 489</span>
489: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">locate_gem</span>(<span class="ruby-identifier">name</span>)
490: <span class="ruby-identifier">spec</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load</span>.<span class="ruby-identifier">specs</span>.<span class="ruby-identifier">find</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">name</span> }
491: <span class="ruby-identifier">raise</span> <span class="ruby-constant">GemNotFound</span>, <span class="ruby-node">&quot;Could not find gem '#{name}' in the current bundle.&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">spec</span>
492: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'bundler'</span>
493: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-value str">'../../../'</span>, <span class="ruby-keyword kw">__FILE__</span>)
494: <span class="ruby-keyword kw">end</span>
495: <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">full_gem_path</span>
496: <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
</div>
</div>
<div id="rdoc-debugging-section-dump" class="debugging-section">
<p>Disabled; run with --debug to generate this.</p>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
Rdoc Generator</a> 1.1.6</small>.</p>
</div>
</body>
</html>