instiki/vendor/plugins/bundler/doc/bundler-1.0.7/rdoc/Bundler/CLI.html
2010-12-06 21:11:19 -06:00

1397 lines
81 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/Deployment.html">Bundler::Deployment</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/Requirement.html">Gem::Requirement</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">the_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: <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">the_shell</span>)
17: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">debug!</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value str">&quot;verbose&quot;</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 499</span>
499: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">source_root</span>
500: <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>))
501: <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 308</span>
308: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache</span>
309: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">definition</span>.<span class="ruby-identifier">resolve_with_cache!</span>
310: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load</span>.<span class="ruby-identifier">cache</span>
311: <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>]
312: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load</span>.<span class="ruby-identifier">lock</span>
313: <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>
314: <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>)
315: <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>
316: <span class="ruby-identifier">exit</span> <span class="ruby-value">128</span>
317: <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 99</span>
99: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">check</span>
100: <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>]
101: <span class="ruby-keyword kw">begin</span>
102: <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>
103: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">GemNotFound</span>, <span class="ruby-constant">VersionConflict</span>
104: <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>
105: <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>
106: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
107: <span class="ruby-keyword kw">end</span>
108:
109: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">not_installed</span>.<span class="ruby-identifier">any?</span>
110: <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>
111: <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> }
112: <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>
113: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
114: <span class="ruby-keyword kw">else</span>
115: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load</span>.<span class="ruby-identifier">lock</span>
116: <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>
117: <span class="ruby-keyword kw">end</span>
118: <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 370</span>
370: <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>)
371: <span class="ruby-identifier">values</span> = <span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">dup</span>
372: <span class="ruby-identifier">values</span>.<span class="ruby-identifier">shift</span> <span class="ruby-comment cmt"># remove config</span>
373: <span class="ruby-identifier">values</span>.<span class="ruby-identifier">shift</span> <span class="ruby-comment cmt"># remove the name</span>
374:
375: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">name</span>
376: <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>
377:
378: <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>
379: <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>
380: <span class="ruby-identifier">with_padding</span> <span class="ruby-keyword kw">do</span>
381: <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>
382: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-identifier">line</span>
383: <span class="ruby-keyword kw">end</span>
384: <span class="ruby-keyword kw">end</span>
385: <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>
386: <span class="ruby-keyword kw">end</span>
387: <span class="ruby-keyword kw">return</span>
388: <span class="ruby-keyword kw">end</span>
389:
390: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">values</span>.<span class="ruby-identifier">empty?</span>
391: <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>
392: <span class="ruby-identifier">with_padding</span> <span class="ruby-keyword kw">do</span>
393: <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> }
394: <span class="ruby-keyword kw">end</span>
395: <span class="ruby-keyword kw">else</span>
396: <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>)
397:
398: <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>]
399: <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>
400: <span class="ruby-keyword kw">end</span>
401:
402: <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>]
403: <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>
404: <span class="ruby-keyword kw">end</span>
405:
406: <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>]
407: <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>
408: <span class="ruby-keyword kw">end</span>
409:
410: <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>))
411: <span class="ruby-keyword kw">end</span>
412: <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 432</span>
432: <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>)
433: <span class="ruby-identifier">require</span> <span class="ruby-value str">'bundler/setup'</span>
434: <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>
435: <span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">clear</span>
436:
437: <span class="ruby-identifier">require</span> <span class="ruby-value str">'irb'</span>
438: <span class="ruby-constant">IRB</span>.<span class="ruby-identifier">start</span>
439: <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 340</span>
340: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">exec</span>(*)
341: <span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">&quot;exec&quot;</span>)
342:
343: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">setup</span>
344:
345: <span class="ruby-keyword kw">begin</span>
346: <span class="ruby-comment cmt"># Run</span>
347: <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">exec</span>(*<span class="ruby-constant">ARGV</span>)
348: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">EACCES</span>
349: <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>
350: <span class="ruby-identifier">exit</span> <span class="ruby-value">126</span>
351: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOENT</span>
352: <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>
353: <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>
354: <span class="ruby-identifier">exit</span> <span class="ruby-value">127</span>
355: <span class="ruby-keyword kw">end</span>
356: <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 479</span>
479: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gem</span>(<span class="ruby-identifier">name</span>)
480: <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>)
481: <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>
482: <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>
483: <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>)
484: <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>))
485: <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>}
486: <span class="ruby-identifier">template</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;newgem/Gemfile.tt&quot;</span>), <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">target</span>, <span class="ruby-value str">&quot;Gemfile&quot;</span>), <span class="ruby-identifier">opts</span>)
487: <span class="ruby-identifier">template</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;newgem/Rakefile.tt&quot;</span>), <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">target</span>, <span class="ruby-value str">&quot;Rakefile&quot;</span>), <span class="ruby-identifier">opts</span>)
488: <span class="ruby-identifier">template</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;newgem/gitignore.tt&quot;</span>), <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">target</span>, <span class="ruby-value str">&quot;.gitignore&quot;</span>), <span class="ruby-identifier">opts</span>)
489: <span class="ruby-identifier">template</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;newgem/newgem.gemspec.tt&quot;</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>)
490: <span class="ruby-identifier">template</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;newgem/lib/newgem.rb.tt&quot;</span>), <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">target</span>, <span class="ruby-node">&quot;lib/#{name}.rb&quot;</span>), <span class="ruby-identifier">opts</span>)
491: <span class="ruby-identifier">template</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;newgem/lib/newgem/version.rb.tt&quot;</span>), <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">target</span>, <span class="ruby-node">&quot;lib/#{name}/version.rb&quot;</span>), <span class="ruby-identifier">opts</span>)
492: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:bin</span>]
493: <span class="ruby-identifier">template</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;newgem/bin/newgem.tt&quot;</span>), <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">target</span>, <span class="ruby-value str">'bin'</span>, <span class="ruby-identifier">name</span>), <span class="ruby-identifier">opts</span>)
494: <span class="ruby-keyword kw">end</span>
495: <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>
496: <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> }
497: <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 27</span>
27: <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>)
28: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">cli</span>
29: <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>
30: <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>
31: <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">command</span> = <span class="ruby-node">&quot;bundle-#{cli}&quot;</span>
32: <span class="ruby-keyword kw">end</span>
33:
34: <span class="ruby-identifier">manpages</span> = <span class="ruby-node">%(
35: bundle
36: bundle-config
37: bundle-exec
38: bundle-install
39: bundle-package
40: bundle-update
41: gemfile.5)</span>
42:
43: <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>)
44: <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>)
45:
46: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">have_groff?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">root</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">%{^file:/.+!/META-INF/jruby.home/.+}</span>
47: <span class="ruby-identifier">groff</span> = <span class="ruby-value str">&quot;groff -Wall -mtty-char -mandoc -Tascii&quot;</span>
48: <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>
49:
50: <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">exec</span> <span class="ruby-node">&quot;#{groff} #{root}/#{command} | #{pager}&quot;</span>
51: <span class="ruby-keyword kw">else</span>
52: <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>)
53: <span class="ruby-keyword kw">end</span>
54: <span class="ruby-keyword kw">else</span>
55: <span class="ruby-keyword kw">super</span>
56: <span class="ruby-keyword kw">end</span>
57: <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 66</span>
66: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init</span>
67: <span class="ruby-identifier">opts</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">dup</span>
68: <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>)
69: <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>
70: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
71: <span class="ruby-keyword kw">end</span>
72:
73: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:gemspec</span>]
74: <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>])
75: <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>)
76: <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>
77: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
78: <span class="ruby-keyword kw">end</span>
79: <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>)
80: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Writing new Gemfile to #{Dir.pwd}/Gemfile&quot;</span>
81: <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>
82: <span class="ruby-identifier">file</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;# Generated from #{gemspec}\n&quot;</span>
83: <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>
84: <span class="ruby-keyword kw">end</span>
85: <span class="ruby-keyword kw">else</span>
86: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Writing new Gemfile to #{Dir.pwd}/Gemfile&quot;</span>
87: <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>)
88: <span class="ruby-keyword kw">end</span>
89: <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 157</span>
157: <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>)
158: <span class="ruby-identifier">opts</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">dup</span>
159: <span class="ruby-identifier">opts</span>[<span class="ruby-value">:without</span>] <span class="ruby-operator">||=</span> []
160: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:without</span>].<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
161: <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">split</span>(<span class="ruby-value str">&quot; &quot;</span>) }
162: <span class="ruby-identifier">opts</span>[<span class="ruby-value">:without</span>].<span class="ruby-identifier">flatten!</span>
163: <span class="ruby-keyword kw">end</span>
164: <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> }
165:
166: <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>]
167: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'RB_USER_INSTALL'</span>] = <span class="ruby-value str">'1'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">FREEBSD</span>
168:
169: <span class="ruby-comment cmt"># Just disable color in deployment mode</span>
170: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">shell</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-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:deployment</span>]
171:
172: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:production</span>]
173: <span class="ruby-identifier">opts</span>[<span class="ruby-value">:deployment</span>] = <span class="ruby-keyword kw">true</span>
174: <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>
175: <span class="ruby-keyword kw">end</span>
176:
177: <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>]
178: <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>
179: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
180: <span class="ruby-keyword kw">end</span>
181:
182: <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>]
183: <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>
184: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
185: <span class="ruby-keyword kw">end</span>
186:
187: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value str">&quot;disable-shared-gems&quot;</span>]
188: <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>
189: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
190: <span class="ruby-keyword kw">end</span>
191:
192: <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>]
193: <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>
194: <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>
195: <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>
196: <span class="ruby-keyword kw">end</span>
197:
198: <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>
199: <span class="ruby-identifier">opts</span>[<span class="ruby-value">:local</span>] = <span class="ruby-keyword kw">true</span>
200: <span class="ruby-keyword kw">end</span>
201:
202: <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>
203: <span class="ruby-keyword kw">end</span>
204:
205: <span class="ruby-comment cmt"># Can't use Bundler.settings for this because settings needs gemfile.dirname</span>
206: <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>]
207: <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>]
208: <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>
209: <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>]
210: <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>]
211: <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>]
212: <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>] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:without</span>].<span class="ruby-identifier">empty?</span>
213: <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>]
214:
215: <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>)
216: <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>
217:
218: <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>]
219: <span class="ruby-identifier">relative_path</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:path</span>]
220: <span class="ruby-identifier">relative_path</span> = <span class="ruby-value str">&quot;./&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">relative_path</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">relative_path</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-value">//</span>
221: <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>
222: <span class="ruby-node">&quot;It was installed into #{relative_path}&quot;</span>
223: <span class="ruby-keyword kw">else</span>
224: <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>
225: <span class="ruby-value str">&quot;Use `bundle show [gemname]` to see where a bundled gem is installed.&quot;</span>
226: <span class="ruby-keyword kw">end</span>
227:
228: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">path</span>
229: <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 path argument to `bundle install` is deprecated. &quot;</span> <span class="ruby-operator">+</span>
230: <span class="ruby-value str">&quot;It will be removed in version 1.1. &quot;</span> <span class="ruby-operator">+</span>
231: <span class="ruby-node">&quot;Please use `bundle install --path #{path}` instead.&quot;</span>
232: <span class="ruby-keyword kw">end</span>
233: <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>
234: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:local</span>]
235: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">&quot;Some gems seem to be missing from your vendor/cache directory.&quot;</span>
236: <span class="ruby-keyword kw">end</span>
237:
238: <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>
239: <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 :rubygems'&quot;</span>
240: <span class="ruby-keyword kw">end</span>
241: <span class="ruby-identifier">raise</span> <span class="ruby-identifier">e</span>
242: <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 278</span>
278: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">lock</span>
279: <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>
280: <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 417</span>
417: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">open</span>(<span class="ruby-identifier">name</span>)
418: <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> }
419: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">editor</span>
420: <span class="ruby-identifier">gem_path</span> = <span class="ruby-identifier">locate_gem</span>(<span class="ruby-identifier">name</span>)
421: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">gem_path</span>) <span class="ruby-keyword kw">do</span>
422: <span class="ruby-identifier">command</span> = <span class="ruby-node">&quot;#{editor} #{gem_path}&quot;</span>
423: <span class="ruby-identifier">success</span> = <span class="ruby-identifier">system</span>(<span class="ruby-identifier">command</span>)
424: <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>
425: <span class="ruby-keyword kw">end</span>
426: <span class="ruby-keyword kw">else</span>
427: <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>)
428: <span class="ruby-keyword kw">end</span>
429: <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 327</span>
327: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">package</span>
328: <span class="ruby-identifier">install</span>
329: <span class="ruby-comment cmt"># TODO: move cache contents here now that all bundles are locked</span>
330: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load</span>.<span class="ruby-identifier">cache</span>
331: <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 292</span>
292: <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>)
293: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load</span>.<span class="ruby-identifier">lock</span>
294:
295: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">gem_name</span>
296: <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>)
297: <span class="ruby-keyword kw">else</span>
298: <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>
299: <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>
300: <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>
301: <span class="ruby-keyword kw">end</span>
302: <span class="ruby-keyword kw">end</span>
303: <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 283</span>
283: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unlock</span>
284: <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>
285: <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 261</span>
261: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update</span>(*<span class="ruby-identifier">gems</span>)
262: <span class="ruby-identifier">sources</span> = <span class="ruby-constant">Array</span>(<span class="ruby-identifier">options</span>[<span class="ruby-value">:source</span>])
263:
264: <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>
265: <span class="ruby-comment cmt"># We're doing a full update</span>
266: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">definition</span>(<span class="ruby-keyword kw">true</span>)
267: <span class="ruby-keyword kw">else</span>
268: <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>)
269: <span class="ruby-keyword kw">end</span>
270:
271: <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>
272: <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>
273: <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>
274: <span class="ruby-value str">&quot;Use `bundle show [gemname]` to see where a bundled gem is installed.&quot;</span>
275: <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 442</span>
442: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">version</span>
443: <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>
444: <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 456</span>
456: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">viz</span>
457: <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>])
458: <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> )
459:
460: <span class="ruby-keyword kw">begin</span>
461: <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>])
462: <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>
463: <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>
464: <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>
465: <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>
466: <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>
467: <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>
468: <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>
469: <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>
470: <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>
471: <span class="ruby-keyword kw">else</span>
472: <span class="ruby-identifier">raise</span>
473: <span class="ruby-keyword kw">end</span>
474: <span class="ruby-keyword kw">end</span>
475: <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 505</span>
505: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">have_groff?</span>
506: <span class="ruby-operator">!</span>(<span class="ruby-value">`which groff`</span> <span class="ruby-keyword kw">rescue</span> <span class="ruby-value str">''</span>).<span class="ruby-identifier">empty?</span>
507: <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 509</span>
509: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">locate_gem</span>(<span class="ruby-identifier">name</span>)
510: <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> }
511: <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>
512: <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>
513: <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>)
514: <span class="ruby-keyword kw">end</span>
515: <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">full_gem_path</span>
516: <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>