Compare commits
97 Commits
Author | SHA1 | Date |
---|---|---|
Jacques Distler | 47e76794cd | |
Jacques Distler | 40fd643680 | |
Jacques Distler | def8e9ae0f | |
Jacques Distler | b52a66c207 | |
Jacques Distler | 4a3d7e0b78 | |
Jacques Distler | 57d52b0d15 | |
Jacques Distler | 1ce128348c | |
Jacques Distler | 987140ed83 | |
Jacques Distler | 072e2e1e92 | |
Jacques Distler | b48a56028a | |
Jacques Distler | 8cf98a4711 | |
Jacques Distler | 66b8f3454d | |
Jacques Distler | f331becb64 | |
Jacques Distler | 2d9cc8bf4d | |
Jacques Distler | f1e47a7ec5 | |
Jacques Distler | e749ee1e4b | |
Jacques Distler | c102e10315 | |
Jacques Distler | 22a27c8391 | |
Jacques Distler | 7e4c7c447e | |
Jacques Distler | f6d350302c | |
Jacques Distler | 88dd41e75f | |
Jacques Distler | e4b00f0bff | |
Jacques Distler | 0f4a76d895 | |
Jacques Distler | 4b09e0322f | |
Jacques Distler | 07aca55e6e | |
Jacques Distler | b6c0ffa0d5 | |
Jacques Distler | ddcf022264 | |
Jacques Distler | d30bd11ff7 | |
Jacques Distler | 1f8a4fe282 | |
Jacques Distler | eff8c87d39 | |
Jacques Distler | 60a595de17 | |
Jacques Distler | c603aca852 | |
Jacques Distler | 8c74de6670 | |
Jacques Distler | ee05118e8f | |
Jacques Distler | c7b46cbde3 | |
Jacques Distler | 7bf832e8c7 | |
Jacques Distler | f5c892c717 | |
Jacques Distler | 364de9dbab | |
Jacques Distler | 1efa08dcc7 | |
Jacques Distler | ddf1846fe1 | |
Jacques Distler | 04ca7e8a38 | |
Jacques Distler | f9e60828c7 | |
Jacques Distler | 9e25ada5c8 | |
Jacques Distler | 66f62bac1f | |
Jacques Distler | e00b2a0ac0 | |
Jacques Distler | 2801421969 | |
Jacques Distler | b1d1f74b7d | |
Jacques Distler | a088201062 | |
Jacques Distler | c5a2e325c0 | |
Jacques Distler | 26ed59485a | |
Jacques Distler | 2d303d54a0 | |
Jacques Distler | 453693a868 | |
Jacques Distler | 27ad6ff2a8 | |
Jacques Distler | e26c12229e | |
Jacques Distler | 903c4b6bdd | |
Jacques Distler | 09b2d24a18 | |
Jacques Distler | e387d095ec | |
Jacques Distler | 2d21eabee8 | |
Jacques Distler | 6f18c90a50 | |
Jacques Distler | 03fc0324db | |
Jacques Distler | 6b86177620 | |
Jacques Distler | 3a54d7ee72 | |
Jacques Distler | 477bd91567 | |
Jacques Distler | 1df2483663 | |
Jacques Distler | f463a3b1c8 | |
Jacques Distler | a739a52f54 | |
Jacques Distler | 1e352e28a1 | |
Jacques Distler | 85cada931d | |
Jacques Distler | 4b2448b09a | |
Jacques Distler | c1826775d2 | |
Jacques Distler | 3c650f2cf6 | |
Jacques Distler | ecaf67dca9 | |
Jacques Distler | f7bce2c773 | |
Jacques Distler | 89f6b69245 | |
Jacques Distler | 5c51f930b0 | |
Jacques Distler | ce97abe6ac | |
Jacques Distler | 070f689f9c | |
Jacques Distler | 5fd725e3a8 | |
Jacques Distler | 13a522525c | |
Jacques Distler | 6005297cfe | |
Jacques Distler | 46da1f3aaf | |
Jacques Distler | a72d35bd4e | |
Jacques Distler | 201c25ce83 | |
Jacques Distler | c9312367c9 | |
Jacques Distler | 47996ea1d3 | |
Jacques Distler | f23e1487df | |
Jacques Distler | 14592f57f9 | |
Jacques Distler | 7d2275d0a1 | |
Jacques Distler | 52da76ff38 | |
Jacques Distler | 8d7f33f99b | |
Jacques Distler | 2967b207b2 | |
Jacques Distler | dfad5a3a37 | |
Jacques Distler | 8b008f8418 | |
Jacques Distler | fc8be60634 | |
Jacques Distler | 9e909d5be3 | |
Jacques Distler | 088b535d52 | |
Jacques Distler | ec443685a6 |
25
CHANGELOG
25
CHANGELOG
|
@ -1,10 +1,33 @@
|
|||
N.B.: You *must* run
|
||||
|
||||
ruby bundle
|
||||
rake upgrade_instiki
|
||||
ruby bundle exec rake upgrade_instiki
|
||||
|
||||
after installing the new software, to enjoy the benefits of this new version.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
* 0.19.3
|
||||
|
||||
New Features:
|
||||
* Source view for Revisions
|
||||
* Rails updated to 2.3.14 (Security)
|
||||
* itextomml updated to 1.4.6
|
||||
* Replace REXML with Nokogiri in Maruku and
|
||||
in xhtml_safe_sanitize().
|
||||
(Huge speedup in rendering long pages)
|
||||
* MathJax updated to 1.1a final
|
||||
|
||||
Bugs Fixed:
|
||||
* Bundler upgraded to 1.0.18
|
||||
* Fix null search bug
|
||||
* Better text/html serialization (thank you, Nokogiri)
|
||||
* Fix Maruku footnote backlink (reported by Shamaoke)
|
||||
* Fix Maruku link bug
|
||||
* Fix Maruku image title bug
|
||||
* Fix Maruku hrule, email address and header bugs
|
||||
* Fix Maruku bold-in-italics bug
|
||||
* Fix Maruku empty list-item bug
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
* 0.19.2
|
||||
|
||||
|
|
5
Gemfile
5
Gemfile
|
@ -1,11 +1,12 @@
|
|||
source "http://rubygems.org"
|
||||
gem "sqlite3-ruby", :require => "sqlite3"
|
||||
gem "itextomml", ">=1.4.5"
|
||||
gem "itextomml", ">=1.4.7"
|
||||
gem "rack", ">=1.1.0"
|
||||
gem "mongrel", ">=1.2.0.pre2"
|
||||
gem "rubyzip"
|
||||
gem "RedCloth", ">=4.0.0"
|
||||
gem "erubis"
|
||||
gem "nokogiri"
|
||||
gem "rake", "~>0.8.7"
|
||||
gem "rake"
|
||||
gem "rdoc"
|
||||
gem "json"
|
||||
|
|
|
@ -11,7 +11,7 @@ At a minimum, you need to backup your database.
|
|||
After installing the new software and restoring your database, you need to run
|
||||
|
||||
ruby bundle
|
||||
rake upgrade_instiki
|
||||
ruby bundle exec rake upgrade_instiki
|
||||
|
||||
from the commandline, to complete the upgrade. Doing a
|
||||
|
||||
|
|
|
@ -277,7 +277,7 @@ module Instiki
|
|||
module VERSION #:nodoc:
|
||||
MAJOR = 0
|
||||
MINOR = 19
|
||||
TINY = 2
|
||||
TINY = 3
|
||||
SUFFIX = '(MML+)'
|
||||
PRERELEASE = false
|
||||
if PRERELEASE
|
||||
|
|
|
@ -8,11 +8,11 @@ module CacheSweepingHelper
|
|||
end
|
||||
|
||||
def expire_cached_summary_pages(web)
|
||||
categories = WikiReference.all(:conditions => "link_type = 'C'")
|
||||
categories = WikiReference.list_categories(web)
|
||||
%w(recently_revised list).each do |action|
|
||||
expire_action :controller => 'wiki', :web => web.address, :action => action
|
||||
categories.each do |category|
|
||||
expire_action :controller => 'wiki', :web => web.address, :action => action, :category => category.referenced_name
|
||||
expire_action :controller => 'wiki', :web => web.address, :action => action, :category => category
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -32,6 +32,8 @@ module CacheSweepingHelper
|
|||
:action => 'revision', :id => page.name, :rev => revno
|
||||
expire_action :controller => 'wiki', :web => page.web.address,
|
||||
:action => 'revision', :id => page.name, :rev => revno, :mode => 'diff'
|
||||
expire_action :controller => 'wiki', :web => page.web.address,
|
||||
:action => 'source', :id => page.name, :rev => revno
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -18,6 +18,9 @@ class FileController < ApplicationController
|
|||
new_file = @web.wiki_files.create(params['file'])
|
||||
if new_file.valid?
|
||||
flash[:info] = "File '#{@file_name}' successfully uploaded"
|
||||
WikiReference.pages_that_link_to_file(@web, @file_name).each do |page|
|
||||
RevisionSweeper.expire_page(@web, page)
|
||||
end
|
||||
redirect_to(params['referring_page'])
|
||||
else
|
||||
# pass the file with errors back into the form
|
||||
|
|
|
@ -18,18 +18,30 @@ class RevisionSweeper < ActionController::Caching::Sweeper
|
|||
expire_caches(record.page)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def after_create(record)
|
||||
if record.is_a?(Page)
|
||||
WikiReference.pages_that_reference(record.web, record.name).each do |page_name|
|
||||
expire_cached_page(record.web, page_name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def after_delete(record)
|
||||
if record.is_a?(Page)
|
||||
expire_caches(record)
|
||||
end
|
||||
end
|
||||
|
||||
def self.expire_page(web, page_name)
|
||||
new.expire_cached_page(web, page_name)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def expire_caches(page)
|
||||
expire_cached_summary_pages(page.web)
|
||||
pages_to_expire = ([page.name] + WikiReference.pages_that_reference(page.web, page.name) +
|
||||
pages_to_expire = ([page.name] +
|
||||
WikiReference.pages_redirected_to(page.web, page.name) +
|
||||
WikiReference.pages_that_include(page.web, page.name)).uniq
|
||||
pages_to_expire.each { |page_name| expire_cached_page(page.web, page_name) }
|
||||
|
|
|
@ -211,7 +211,7 @@ EOL
|
|||
|
||||
|
||||
def search
|
||||
@query = params['query'].purify
|
||||
@query = params['query'] ? params['query'].purify : ''
|
||||
@title_results = @web.select { |page| page.name =~ /#{@query}/i }.sort
|
||||
@results = @web.select { |page| page.content =~ /#{@query}/i }.sort
|
||||
all_pages_found = (@results + @title_results).uniq
|
||||
|
@ -401,7 +401,7 @@ EOL
|
|||
end
|
||||
|
||||
def source
|
||||
#to template
|
||||
@revision = @page.revisions[params['rev'].to_i - 1] if params['rev']
|
||||
end
|
||||
|
||||
def tex
|
||||
|
|
|
@ -96,7 +96,7 @@ require 'instiki_stringsupport'
|
|||
|
||||
# Performs HTML escaping on text, but keeps linefeeds intact (by replacing them with <br/>)
|
||||
def escape_preserving_linefeeds(text)
|
||||
h(text).gsub(/\n/, '<br/>').as_utf8
|
||||
h(text).gsub(/\n/, '<br/>').as_utf8.html_safe
|
||||
end
|
||||
|
||||
def format_date(date, include_time = true)
|
||||
|
|
|
@ -12,10 +12,9 @@ class WikiFile < ActiveRecord::Base
|
|||
first(:conditions => ['file_name = ?', file_name])
|
||||
end
|
||||
|
||||
SANE_FILE_NAME = /^[a-zA-Z0-9\-_\. ]*$/
|
||||
def validate
|
||||
if file_name
|
||||
if file_name !~ SANE_FILE_NAME
|
||||
if ! WikiFile.is_valid?(file_name)
|
||||
errors.add("file_name", "is invalid. Only latin characters, digits, dots, underscores, " +
|
||||
"dashes and spaces are accepted")
|
||||
elsif file_name == '.' or file_name == '..'
|
||||
|
@ -58,7 +57,10 @@ class WikiFile < ActiveRecord::Base
|
|||
require 'fileutils'
|
||||
FileUtils.rm_f(content_path) if File.exists?(content_path)
|
||||
end
|
||||
|
||||
|
||||
|
||||
SANE_FILE_NAME = /^[a-zA-Z0-9\-_\. ]*$/
|
||||
def self.is_valid?(name)
|
||||
name =~ SANE_FILE_NAME
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -46,7 +46,7 @@ class WikiReference < ActiveRecord::Base
|
|||
query = 'SELECT name FROM pages JOIN wiki_references ' +
|
||||
'ON pages.id = wiki_references.page_id ' +
|
||||
'WHERE wiki_references.referenced_name = ? ' +
|
||||
"AND wiki_references.link_type in ('#{FILE}') " +
|
||||
"AND wiki_references.link_type in ('#{FILE}','#{WANTED_FILE}') " +
|
||||
"AND pages.web_id = '#{web.id}'"
|
||||
names = connection.select_all(sanitize_sql([query, file_name])).map { |row| row['name'] }
|
||||
end
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<%= Rails.root.join('public', 'stylesheets', 'instiki.css').read if @inline_style %>
|
||||
<%= Rails.root.join('public', 'stylesheets', 'syntax.css').read if @inline_style %>
|
||||
</style>
|
||||
<%= "<style type='text/css'>#{@style_additions}</style>" if @style_additions %>
|
||||
<%= "<style type='text/css'>#{@style_additions}</style>".html_safe if @style_additions %>
|
||||
<style type="text/css"><!--/*--><![CDATA[/*><!--*/
|
||||
<%= @web && @web.additional_style ? @web.additional_style.html_safe : '' %>
|
||||
/*]]>*/--></style>
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
\usepackage{color}
|
||||
\usepackage{ucs}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{xparse}
|
||||
\usepackage{hyperref}
|
||||
|
||||
%----Macros----------
|
||||
|
@ -146,6 +147,15 @@
|
|||
{\ooalign{\box\tw@ \cr \box\z@}}}
|
||||
\makeatother
|
||||
|
||||
% \mathraisebox{voffset}[height][depth]{something}
|
||||
\makeatletter
|
||||
\NewDocumentCommand\mathraisebox{moom}{%
|
||||
\IfNoValueTF{#2}{\def\@temp##1##2{\raisebox{#1}{$\m@th##1##2$}}}{%
|
||||
\IfNoValueTF{#3}{\def\@temp##1##2{\raisebox{#1}[#2]{$\m@th##1##2$}}%
|
||||
}{\def\@temp##1##2{\raisebox{#1}[#2][#3]{$\m@th##1##2$}}}}%
|
||||
\mathpalette\@temp{#4}}
|
||||
\makeatletter
|
||||
|
||||
% udots (taken from yhmath)
|
||||
\makeatletter
|
||||
\def\udots{\mathinner{\mkern2mu\raise\p@\hbox{.}
|
||||
|
@ -155,6 +165,8 @@
|
|||
|
||||
%% Fix array
|
||||
\newcommand{\itexarray}[1]{\begin{matrix}#1\end{matrix}}
|
||||
%% \itexnum is a noop
|
||||
\newcommand{\itexnum}[1]{#1}
|
||||
|
||||
%% Renaming existing commands
|
||||
\newcommand{\underoverset}[3]{\underset{#1}{\overset{#2}{#3}}}
|
||||
|
|
|
@ -22,5 +22,10 @@
|
|||
|
||||
<div class="navigation navfoot">
|
||||
<%= raw navigation_menu_for_revision.join(' | ') %>
|
||||
<span class="views">
|
||||
| View:
|
||||
<%= link_to 'Source', {:web => @web.address, :action => 'source', :id => @page.name, :rev => @revision_number},
|
||||
{:id => 'view_source', :rel => 'nofollow' } %>
|
||||
</span>
|
||||
<%= render :partial => 'inbound_links' %>
|
||||
</div>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<%- end -%>
|
||||
|
||||
<%- if (@results + @title_results).empty? -%>
|
||||
<h2>No pages contain "<%= h @query %>" </h2>
|
||||
<h2>No pages contain "<%= h(@query).html_safe %>" </h2>
|
||||
<p>
|
||||
Perhaps you should try expanding your query. Remember that Instiki searches for entire
|
||||
phrases, so if you search for "all that jazz" it will not match pages that contain these
|
||||
|
@ -36,6 +36,6 @@
|
|||
"[a-z]*Leet?RegExpSkill(s|z)"
|
||||
</p>
|
||||
<p>
|
||||
<b>Create a new page, named:</b> "<span class='newWikiWord'><%= link_to h(@query), :web => @web.address, :action => 'new', :id => @query %></span>"
|
||||
<b>Create a new page, named:</b> "<span class='newWikiWord'><%= link_to h(@query).html_safe, :web => @web.address, :action => 'new', :id => @query %></span>"
|
||||
</p>
|
||||
<%- end -%>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<%= Rails.root.join('public', 'stylesheets', 'instiki.css').read if @inline_style %>
|
||||
</style>
|
||||
<%= stylesheet_link_tag 'instiki', :media => 'all' unless @inline_style %>
|
||||
<%= "<style type='text/css'>#{@style_additions}</style>" if @style_additions %>
|
||||
<%= "<style type='text/css'>#{@style_additions}</style>".html_safe if @style_additions %>
|
||||
<style type="text/css"><!--/*--><![CDATA[/*><!--*/
|
||||
<%= @web ? @web.additional_style : '' %>
|
||||
/*]]>*/--></style>
|
||||
|
@ -57,7 +57,7 @@ window.onload = function (){
|
|||
<body>
|
||||
|
||||
<div id="Container">
|
||||
<textarea id='content' readonly=' readonly' rows='24' cols='60' ><%= h(@page.content.purify) %></textarea>
|
||||
<textarea id='content' readonly=' readonly' rows='24' cols='60' ><%= (@revision ? @revision.content : @page.content).purify %></textarea>
|
||||
</div> <!-- Container -->
|
||||
|
||||
</body>
|
||||
|
|
|
@ -32,6 +32,7 @@ ActionController::Routing::Routes.draw do |map|
|
|||
connect_to_web map, ':web/revision/diff/:id/:rev', :controller => 'wiki', :action => 'revision', :mode => 'diff',
|
||||
:requirements => { :rev => /\d+/, :id => id_regexp}
|
||||
connect_to_web map, ':web/revision/:id/:rev', :controller => 'wiki', :action => 'revision', :requirements => { :rev => /\d+/, :id => id_regexp}
|
||||
connect_to_web map, ':web/source/:id/:rev', :controller => 'wiki', :action => 'source', :requirements => { :rev => /\d+/, :id => id_regexp}
|
||||
connect_to_web map, ':web/list/:category', :controller => 'wiki', :action => 'list', :requirements => { :category => /.*/}, :category => nil
|
||||
connect_to_web map, ':web/recently_revised/:category', :controller => 'wiki', :action => 'recently_revised', :requirements => { :category => /.*/}, :category => nil
|
||||
connect_to_web map, ':web/:action/:id', :controller => 'wiki', :requirements => {:id => id_regexp}
|
||||
|
|
|
@ -45,14 +45,16 @@ module Chunk
|
|||
|
||||
# Find all the chunks of the given type in content
|
||||
# Each time the pattern is matched, create a new
|
||||
# chunk for it, and replace the occurance of the chunk
|
||||
# chunk for it, and replace the occurrence of the chunk
|
||||
# in this content with its mask.
|
||||
def self.apply_to(content)
|
||||
content.gsub!( self.pattern ) do |match|
|
||||
text = content.to_str
|
||||
text.gsub!( self.pattern ) do |match|
|
||||
new_chunk = self.new($~, content)
|
||||
content.add_chunk(new_chunk)
|
||||
new_chunk.mask
|
||||
end
|
||||
end
|
||||
content.replace text
|
||||
end
|
||||
|
||||
# should contain only [a-z0-9]
|
||||
|
@ -61,7 +63,7 @@ module Chunk
|
|||
end
|
||||
|
||||
def unmask
|
||||
@content.sub!(mask){|s| s.replace @unmask_text}
|
||||
@content.replace @content.sub(mask){|s| s.replace @unmask_text}
|
||||
end
|
||||
|
||||
def rendered?
|
||||
|
@ -73,7 +75,7 @@ module Chunk
|
|||
end
|
||||
|
||||
def revert
|
||||
@content.sub!(mask){|s| s.replace @text}
|
||||
@content.replace @content.sub(mask){|s| s.replace @text}
|
||||
# unregister
|
||||
@content.delete_chunk(self)
|
||||
end
|
||||
|
|
|
@ -41,16 +41,16 @@ module Engines
|
|||
|
||||
class Markdown < AbstractEngine
|
||||
def mask
|
||||
@content.as_utf8
|
||||
text = @content.as_utf8.to_str.delete("\r").to_utf8
|
||||
# If the request is for S5, call Maruku accordingly (without math)
|
||||
if @content.options[:mode] == :s5
|
||||
my_content = Maruku.new(@content.delete("\r").to_utf8,
|
||||
my_content = Maruku.new(text,
|
||||
{:math_enabled => false, :content_only => true,
|
||||
:author => @content.options[:engine_opts][:author],
|
||||
:title => @content.options[:engine_opts][:title]})
|
||||
@content.options[:renderer].s5_theme = my_content.s5_theme
|
||||
else
|
||||
html = Maruku.new(@content.delete("\r").to_utf8, {:math_enabled => false}).to_html
|
||||
html = Maruku.new(text, {:math_enabled => false}).to_html
|
||||
html.gsub(/\A<div class="maruku_wrapper_div">\n?(.*?)\n?<\/div>\Z/m, '\1')
|
||||
end
|
||||
|
||||
|
@ -59,10 +59,10 @@ module Engines
|
|||
|
||||
class MarkdownMML < AbstractEngine
|
||||
def mask
|
||||
@content.as_utf8
|
||||
text = @content.as_utf8.to_str.delete("\r").to_utf8
|
||||
# If the request is for S5, call Maruku accordingly
|
||||
if @content.options[:mode] == :s5
|
||||
my_content = Maruku.new(@content.delete("\r").to_utf8,
|
||||
my_content = Maruku.new(text,
|
||||
{:math_enabled => true,
|
||||
:math_numbered => ['\\[','\\begin{equation}'],
|
||||
:content_only => true,
|
||||
|
@ -71,9 +71,11 @@ module Engines
|
|||
@content.options[:renderer].s5_theme = my_content.s5_theme
|
||||
my_content.to_s5
|
||||
else
|
||||
html = Maruku.new(@content.delete("\r").to_utf8,
|
||||
(t = Time.now; nil)
|
||||
html = Maruku.new(text,
|
||||
{:math_enabled => true,
|
||||
:math_numbered => ['\\[','\\begin{equation}']}).to_html
|
||||
(ApplicationController.logger.info("Maruku took " + (Time.now-t).to_s + " seconds."); nil)
|
||||
html.gsub(/\A<div class="maruku_wrapper_div">\n?(.*?)\n?<\/div>\Z/m, '\1')
|
||||
end
|
||||
end
|
||||
|
@ -81,10 +83,10 @@ module Engines
|
|||
|
||||
class MarkdownPNG < AbstractEngine
|
||||
def mask
|
||||
@content.as_utf8
|
||||
text = @content.as_utf8.to_str.delete("\r").to_utf8
|
||||
# If the request is for S5, call Maruku accordingly
|
||||
if @content.options[:mode] == :s5
|
||||
my_content = Maruku.new(@content.delete("\r").to_utf8,
|
||||
my_content = Maruku.new(text,
|
||||
{:math_enabled => true,
|
||||
:math_numbered => ['\\[','\\begin{equation}'],
|
||||
:html_math_output_mathml => false,
|
||||
|
@ -98,7 +100,7 @@ module Engines
|
|||
@content.options[:renderer].s5_theme = my_content.s5_theme
|
||||
my_content.to_s5
|
||||
else
|
||||
html = Maruku.new(@content.delete("\r").to_utf8,
|
||||
html = Maruku.new(text,
|
||||
{:math_enabled => true,
|
||||
:math_numbered => ['\\[','\\begin{equation}'],
|
||||
:html_math_output_mathml => false,
|
||||
|
@ -114,7 +116,7 @@ module Engines
|
|||
class Mixed < AbstractEngine
|
||||
def mask
|
||||
@content.as_utf8
|
||||
redcloth = OldRedCloth.new(@content, @content.options[:engine_opts])
|
||||
redcloth = OldRedCloth.new(@content.to_str, @content.options[:engine_opts])
|
||||
redcloth.filter_html = false
|
||||
redcloth.no_span_caps = false
|
||||
html = redcloth.to_html
|
||||
|
@ -123,8 +125,7 @@ module Engines
|
|||
|
||||
class RDoc < AbstractEngine
|
||||
def mask
|
||||
@content.as_utf8
|
||||
html = RDocSupport::RDocFormatter.new(@content).to_html
|
||||
html = RDocSupport::RDocFormatter.new(@content.as_utf8.to_str).to_html
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ module Literal
|
|||
# A literal chunk that protects 'code' and 'pre' tags from wiki rendering.
|
||||
class Pre < AbstractLiteral
|
||||
PRE_BLOCKS = "a|pre|code|math"
|
||||
PRE_PATTERN = Regexp.new('<('+PRE_BLOCKS+')\b[^>]*?>.*?</\1>', Regexp::MULTILINE)
|
||||
PRE_PATTERN = Regexp.new('<('+PRE_BLOCKS+')\b[^>]*?(>.*?</\1>|/>)', Regexp::MULTILINE)
|
||||
def self.pattern() PRE_PATTERN end
|
||||
end
|
||||
|
||||
|
@ -30,9 +30,9 @@ module Literal
|
|||
|
||||
# A literal chunk that protects equations from wiki rendering.
|
||||
class Math < AbstractLiteral
|
||||
MATH_START = '(\${1,2}|' + Regexp.escape('\[') + '|\\begin\{equation\})'
|
||||
MATH_END = '(\${1,2}|' + Regexp.escape('\]') + '|\\end\{equation\})'
|
||||
MATH_PATTERN = Regexp.new(MATH_START + '([^$]|\\\$)+?' + MATH_END, Regexp::MULTILINE)
|
||||
MATH_START = "(?:\\\\\\[|\\${1,2}|\\\\begin\\{equation\\})"
|
||||
MATH_END = "(?:\\\\\\]|\\${1,2}|\\\\end\\{equation\\})"
|
||||
MATH_PATTERN = Regexp.new( '(' + MATH_START + "(?:\\\\\\$|(?!\\$|\\\\\\]|\\\\end\\{equation\\}).)+?" + MATH_END + ')', Regexp::MULTILINE)
|
||||
def self.pattern() MATH_PATTERN end
|
||||
end
|
||||
|
||||
|
|
|
@ -34,7 +34,8 @@ module WikiChunk
|
|||
end
|
||||
|
||||
def self.apply_to(content)
|
||||
content.as_utf8.gsub!( self.pattern ) do |matched_text|
|
||||
text = content.as_utf8.to_str
|
||||
text.gsub!( self.pattern ) do |matched_text|
|
||||
chunk = self.new($~, content)
|
||||
if chunk.textile_url?
|
||||
# do not substitute
|
||||
|
@ -44,6 +45,7 @@ module WikiChunk
|
|||
chunk.mask
|
||||
end
|
||||
end
|
||||
content.replace text
|
||||
end
|
||||
|
||||
def textile_url?
|
||||
|
|
|
@ -39,7 +39,7 @@ class RDocMarkup < SM::SimpleMarkup
|
|||
end
|
||||
|
||||
def convert(text, handler)
|
||||
super.sub(/^<p>\n/, '').sub(/<\/p>$/, '')
|
||||
super.sub(/^\n{0,1}<p>\n{0,1}/, '').sub(/\n{0,1}<\/p>\n{0,1}$/, '')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ module Sanitizer
|
|||
require 'node'
|
||||
require 'instiki_stringsupport'
|
||||
require 'set'
|
||||
require 'nokogiri'
|
||||
|
||||
acceptable_elements = Set.new %w[a abbr acronym address area article aside
|
||||
audio b big blockquote br button canvas caption center cite code
|
||||
|
@ -47,7 +48,7 @@ module Sanitizer
|
|||
frame height linethickness lspace mathbackground mathcolor mathvariant
|
||||
maxsize minsize notation open other rowalign
|
||||
rowlines rowspacing rowspan rspace scriptlevel selection separator
|
||||
separators stretchy width xlink:href xlink:show xlink:type xmlns
|
||||
separators stretchy width voffset xlink:href xlink:show xlink:type xmlns
|
||||
xmlns:xlink]
|
||||
|
||||
svg_attributes = Set.new %w[accent-height accumulate additive alphabetic
|
||||
|
@ -227,9 +228,9 @@ module Sanitizer
|
|||
# (REXML trees are always utf-8 encoded.)
|
||||
def safe_xhtml_sanitize(html, options = {})
|
||||
sanitized = xhtml_sanitize(html.purify)
|
||||
doc = REXML::Document.new("<div xmlns='http://www.w3.org/1999/xhtml'>#{sanitized}</div>")
|
||||
sanitized = doc.to_s.gsub(/\A<div xmlns='http:\/\/www.w3.org\/1999\/xhtml'>(.*)<\/div>\Z/m, '\1')
|
||||
rescue REXML::ParseException
|
||||
doc = Nokogiri::XML::Document.parse("<div xmlns='http://www.w3.org/1999/xhtml'>#{sanitized}</div>", nil, (options[:encoding] || 'UTF-8'), 0)
|
||||
sanitized = doc.root.children.to_xml(:indent => (options[:indent] || 2), :save_with => 2 )
|
||||
rescue Nokogiri::XML::SyntaxError
|
||||
sanitized = sanitized.escapeHTML
|
||||
end
|
||||
|
||||
|
|
|
@ -31,4 +31,4 @@ class InstikiUpgrade
|
|||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -64,6 +64,7 @@ class UrlGenerator < AbstractUrlGenerator
|
|||
private
|
||||
|
||||
def file_link(mode, name, text, web_address, known_file, description)
|
||||
return bad_filename(name) unless WikiFile.is_valid?(name)
|
||||
case mode
|
||||
when :export
|
||||
if known_file
|
||||
|
@ -116,6 +117,7 @@ class UrlGenerator < AbstractUrlGenerator
|
|||
end
|
||||
|
||||
def pic_link(mode, name, text, web_address, known_pic)
|
||||
return bad_filename(name) unless WikiFile.is_valid?(name)
|
||||
href = @controller.url_for :controller => 'file', :web => web_address, :action => 'file',
|
||||
:id => name, :only_path => true
|
||||
case mode
|
||||
|
@ -141,6 +143,7 @@ class UrlGenerator < AbstractUrlGenerator
|
|||
end
|
||||
|
||||
def media_link(mode, name, text, web_address, known_media, media_type)
|
||||
return bad_filename(name) unless WikiFile.is_valid?(name)
|
||||
href = @controller.url_for :controller => 'file', :web => web_address, :action => 'file',
|
||||
:id => name, :only_path => true
|
||||
case mode
|
||||
|
@ -177,6 +180,10 @@ class UrlGenerator < AbstractUrlGenerator
|
|||
|
||||
private
|
||||
|
||||
def bad_filename(name)
|
||||
"<span class='badWikiWord'>[[invalid filename: #{name}]]</span>"
|
||||
end
|
||||
|
||||
def wikilink_for(mode, name, text, web_address)
|
||||
web = Web.find_by_address(web_address)
|
||||
action = web.published? && (web != @web || [:publish, :s5].include?(mode) ) ? 'published' : 'show'
|
||||
|
|
|
@ -8,6 +8,7 @@ require_dependency 'chunks/literal'
|
|||
require 'chunks/nowiki'
|
||||
require 'sanitizer'
|
||||
require 'instiki_stringsupport'
|
||||
require 'set'
|
||||
|
||||
|
||||
# Wiki content is just a string that can process itself with a chain of
|
||||
|
@ -53,10 +54,10 @@ module ChunkManager
|
|||
def init_chunk_manager
|
||||
@chunks_by_type = Hash.new
|
||||
Chunk::Abstract::derivatives.each{|chunk_type|
|
||||
@chunks_by_type[chunk_type] = Array.new
|
||||
@chunks_by_type[chunk_type] = Set.new
|
||||
}
|
||||
@chunks_by_id = Hash.new
|
||||
@chunks = []
|
||||
@chunks = Set.new
|
||||
@chunk_id = 0
|
||||
end
|
||||
|
||||
|
@ -208,7 +209,8 @@ class WikiContent < ActiveSupport::SafeBuffer
|
|||
@options[:engine].apply_to(self)
|
||||
as_utf8
|
||||
# unmask in one go. $~[1] is the chunk id
|
||||
gsub!(MASK_RE[ACTIVE_CHUNKS]) do
|
||||
text = self.to_str
|
||||
text.gsub!(MASK_RE[ACTIVE_CHUNKS]) do
|
||||
chunk = @chunks_by_id[$~[1].to_i]
|
||||
if chunk.nil?
|
||||
# if we match a chunkmask that existed in the original content string
|
||||
|
@ -218,7 +220,7 @@ class WikiContent < ActiveSupport::SafeBuffer
|
|||
chunk.unmask_text
|
||||
end
|
||||
end
|
||||
self.replace xhtml_sanitize(self)
|
||||
self.replace xhtml_sanitize(text)
|
||||
self.html_safe
|
||||
end
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -12,5 +12,5 @@
|
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
MathJax.Extension.mml2jax={version:"1.1.2",config:{preview:"alttext"},MMLnamespace:"http://www.w3.org/1998/Math/MathML",PreProcess:function(e){if(!this.configured){this.config=MathJax.Hub.CombineConfig("mml2jax",this.config);if(this.config.Augment){MathJax.Hub.Insert(this,this.config.Augment)}this.InitBrowser();this.configured=true}if(typeof(e)==="string"){e=document.getElementById(e)}if(!e){e=document.body}this.ProcessMathArray(e.getElementsByTagName("math"));if(e.getElementsByTagNameNS){this.ProcessMathArray(e.getElementsByTagNameNS(this.MMLnamespace,"math"))}var d=document.getElementsByTagName("html")[0];if(d){for(var c=0,b=d.attributes.length;c<b;c++){var a=d.attributes[c];if(a.nodeName.substr(0,6)==="xmlns:"&&a.nodeValue===this.MMLnamespace){this.ProcessMathArray(e.getElementsByTagName(a.nodeName.substr(6)+":math"))}}}},ProcessMathArray:function(b){var a;if(b.length){if(this.MathTagBug){for(a=b.length-1;a>=0;a--){if(b[a].nodeName==="MATH"){this.ProcessMathFlattened(b[a])}else{this.ProcessMath(b[a])}}}else{for(a=b.length-1;a>=0;a--){this.ProcessMath(b[a])}}}},ProcessMath:function(e){var d=e.parentNode;var a=document.createElement("script");a.type="math/mml";d.insertBefore(a,e);if(this.AttributeBug){var b=this.OuterHTML(e);if(this.CleanupHTML){b=b.replace(/<\?import .*?>/i,"").replace(/<\?xml:namespace .*?\/>/i,"");b=b.replace(/ /g," ")}MathJax.HTML.setScript(a,b);d.removeChild(e)}else{var c=MathJax.HTML.Element("span");c.appendChild(e);MathJax.HTML.setScript(a,c.innerHTML)}if(this.config.preview!=="none"){this.createPreview(e,a)}},ProcessMathFlattened:function(f){var d=f.parentNode;var b=document.createElement("script");b.type="math/mml";d.insertBefore(b,f);var c="",e,a=f;while(f&&f.nodeName!=="/MATH"){e=f;f=f.nextSibling;c+=this.NodeHTML(e);e.parentNode.removeChild(e)}if(f&&f.nodeName==="/MATH"){f.parentNode.removeChild(f)}b.text=c+"</math>";if(this.config.preview!=="none"){this.createPreview(a,b)}},NodeHTML:function(e){var d,c,a;if(e.nodeName==="#text"){d=this.quoteHTML(e.nodeValue)}else{if(e.nodeName==="#comment"){d="<!--"+e.nodeValue+"-->"}else{d="<"+e.nodeName.toLowerCase();var b=e.attributes;for(c=0,a=b.length;c<a;c++){if(b[c].specified){d+=" "+b[c].nodeName.toLowerCase().replace(/xmlns:xmlns/,"xmlns")+"=";d+='"'+this.quoteHTML(b[c].nodeValue)+'"'}}d+=">";if(e.outerHTML!=null&&e.outerHTML.match(/(.<\/[A-Z]+>|\/>)$/)){for(c=0,a=e.childNodes.length;c<a;c++){d+=this.OuterHTML(e.childNodes[c])}d+="</"+e.nodeName.toLowerCase()+">"}}}return d},OuterHTML:function(d){if(d.nodeName.charAt(0)==="#"){return this.NodeHTML(d)}if(!this.AttributeBug){return d.outerHTML}var c=this.NodeHTML(d);for(var b=0,a=d.childNodes.length;b<a;b++){c+=this.OuterHTML(d.childNodes[b])}c+="</"+d.nodeName.toLowerCase()+">";return c},quoteHTML:function(a){return a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},createPreview:function(b,a){var c;if(this.config.preview==="alttext"){var d=b.getAttribute("alttext");if(d!=null){c=[this.filterText(d)]}}else{if(this.config.preview instanceof Array){c=this.config.preview}}if(c){c=MathJax.HTML.Element("span",{className:MathJax.Hub.config.preRemoveClass},c);a.parentNode.insertBefore(c,a)}},filterText:function(a){return a},InitBrowser:function(){var b=MathJax.HTML.Element("span",{id:"<",className:"mathjax",innerHTML:"<math><mi>x</mi><mspace /></math>"});var a=b.outerHTML||"";this.AttributeBug=a!==""&&!(a.match(/id="<"/)&&a.match(/class="mathjax"/)&&a.match(/<\/math>/));this.MathTagBug=b.childNodes.length>1;this.CleanupHTML=MathJax.Hub.Browser.isMSIE}};MathJax.Hub.Register.PreProcessor(["PreProcess",MathJax.Extension.mml2jax]);MathJax.Ajax.loadComplete("[MathJax]/extensions/mml2jax.js");
|
||||
MathJax.Extension.mml2jax={version:"1.1.2",config:{preview:"alttext"},MMLnamespace:"http://www.w3.org/1998/Math/MathML",PreProcess:function(e){if(!this.configured){this.config=MathJax.Hub.CombineConfig("mml2jax",this.config);if(this.config.Augment){MathJax.Hub.Insert(this,this.config.Augment)}this.InitBrowser();this.configured=true}if(typeof(e)==="string"){e=document.getElementById(e)}if(!e){e=document.body}this.ProcessMathArray(e.getElementsByTagName("math"));if(e.getElementsByTagNameNS){this.ProcessMathArray(e.getElementsByTagNameNS(this.MMLnamespace,"math"))}var d=document.getElementsByTagName("html")[0];if(d){for(var c=0,b=d.attributes.length;c<b;c++){var a=d.attributes[c];if(a.nodeName.substr(0,6)==="xmlns:"&&a.nodeValue===this.MMLnamespace){this.ProcessMathArray(e.getElementsByTagName(a.nodeName.substr(6)+":math"))}}}},ProcessMathArray:function(b){var a;if(b.length){if(this.MathTagBug){for(a=b.length-1;a>=0;a--){if(b[a].nodeName==="MATH"){this.ProcessMathFlattened(b[a])}else{this.ProcessMath(b[a])}}}else{for(a=b.length-1;a>=0;a--){this.ProcessMath(b[a])}}}},ProcessMath:function(e){var d=e.parentNode;var a=document.createElement("script");a.type="math/mml";d.insertBefore(a,e);if(this.AttributeBug){var b=this.OuterHTML(e);if(this.CleanupHTML){b=b.replace(/<\?import .*?>/i,"").replace(/<\?xml:namespace .*?\/>/i,"");b=b.replace(/ /g," ")}MathJax.HTML.setScript(a,b);d.removeChild(e)}else{var c=MathJax.HTML.Element("span");c.appendChild(e);MathJax.HTML.setScript(a,c.innerHTML)}if(this.config.preview!=="none"){this.createPreview(e,a)}},ProcessMathFlattened:function(f){var d=f.parentNode;var b=document.createElement("script");b.type="math/mml";d.insertBefore(b,f);var c="",e,a=f;while(f&&f.nodeName!=="/MATH"){e=f;f=f.nextSibling;c+=this.NodeHTML(e);e.parentNode.removeChild(e)}if(f&&f.nodeName==="/MATH"){f.parentNode.removeChild(f)}b.text=c+"</math>";if(this.config.preview!=="none"){this.createPreview(a,b)}},NodeHTML:function(e){var c,b,a;if(e.nodeName==="#text"){c=this.quoteHTML(e.nodeValue)}else{if(e.nodeName==="#comment"){c="<!--"+e.nodeValue+"-->"}else{c="<"+e.nodeName.toLowerCase();for(b=0,a=e.attributes.length;b<a;b++){var d=e.attributes[b];if(d.specified){c+=" "+d.nodeName.toLowerCase().replace(/xmlns:xmlns/,"xmlns")+"=";var f=d.nodeValue;if(f==null&&d.nodeName==="style"&&e.style){f=e.style.cssText}c+='"'+this.quoteHTML(f)+'"'}}c+=">";if(e.outerHTML!=null&&e.outerHTML.match(/(.<\/[A-Z]+>|\/>)$/)){for(b=0,a=e.childNodes.length;b<a;b++){c+=this.OuterHTML(e.childNodes[b])}c+="</"+e.nodeName.toLowerCase()+">"}}}return c},OuterHTML:function(d){if(d.nodeName.charAt(0)==="#"){return this.NodeHTML(d)}if(!this.AttributeBug){return d.outerHTML}var c=this.NodeHTML(d);for(var b=0,a=d.childNodes.length;b<a;b++){c+=this.OuterHTML(d.childNodes[b])}c+="</"+d.nodeName.toLowerCase()+">";return c},quoteHTML:function(a){if(a==null){a=""}return a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},createPreview:function(b,a){var c;if(this.config.preview==="alttext"){var d=b.getAttribute("alttext");if(d!=null){c=[this.filterText(d)]}}else{if(this.config.preview instanceof Array){c=this.config.preview}}if(c){c=MathJax.HTML.Element("span",{className:MathJax.Hub.config.preRemoveClass},c);a.parentNode.insertBefore(c,a)}},filterText:function(a){return a},InitBrowser:function(){var b=MathJax.HTML.Element("span",{id:"<",className:"mathjax",innerHTML:"<math><mi>x</mi><mspace /></math>"});var a=b.outerHTML||"";this.AttributeBug=a!==""&&!(a.match(/id="<"/)&&a.match(/class="mathjax"/)&&a.match(/<\/math>/));this.MathTagBug=b.childNodes.length>1;this.CleanupHTML=MathJax.Hub.Browser.isMSIE}};MathJax.Hub.Register.PreProcessor(["PreProcess",MathJax.Extension.mml2jax]);MathJax.Ajax.loadComplete("[MathJax]/extensions/mml2jax.js");
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -23,21 +23,34 @@ function fixRunIn() {
|
|||
// work around lack of gecko support for display:run-in
|
||||
var re = /^num_|\s+num_|^un_|\s+un_|proof/;
|
||||
$$('div > h6').each(function(element) {
|
||||
if(re.test($(element.parentNode).className)) {
|
||||
next_p = element.next('p');
|
||||
if(re.test($(element.parentNode).className)) {
|
||||
var new_span = new Element('span').update(element.textContent);
|
||||
new_span.addClassName('theorem_label');
|
||||
var next_el = element.next().firstChild;
|
||||
next_el.parentNode.insertBefore(new_span, next_el);
|
||||
var period = new Element('span').update('. ');
|
||||
next_el.parentNode.insertBefore(period, next_el);
|
||||
element.remove();
|
||||
}
|
||||
if (next_p) {
|
||||
var next_el = next_p.firstChild;
|
||||
next_p.insertBefore(new_span, next_el);
|
||||
next_p.insertBefore(period, next_el);
|
||||
element.remove();
|
||||
} else {
|
||||
var p = new Element('p').update(new_span);
|
||||
p.appendChild(period);
|
||||
element.replace(p);
|
||||
}
|
||||
}
|
||||
});
|
||||
// add tombstone to proof, since gecko doesn't support :last-child properly
|
||||
$$('div.proof').each(function(element) {
|
||||
var l = element.childElements().length -1;
|
||||
var el = element.childElements()[element.childElements().length-1];
|
||||
var span = new Element('span').update('\u00a0\u00a0\u25ae');
|
||||
element.childElements()[l].insert(span);
|
||||
if (el.match('p')) {
|
||||
el.insert(span);
|
||||
} else {
|
||||
var par = new Element('p').update(span);
|
||||
par.addClassName('tombstone');
|
||||
element.appendChild(par);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -100,6 +100,12 @@ border: 3px solid blue;
|
|||
padding: 2px;
|
||||
}
|
||||
|
||||
.badWikiWord {
|
||||
background-color:#FCC;
|
||||
border: 1px solid blue;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.deleteWikiWord:hover, .deleteWikiWord a:hover {
|
||||
background-color:#F88;
|
||||
}
|
||||
|
@ -476,6 +482,7 @@ span.theorem_label {font-style:normal; font-weight:bold;}
|
|||
content: " " counter(remark); counter-increment: remark;}
|
||||
.num_note .theorem_label:after {
|
||||
content: " " counter(note); counter-increment: note;}
|
||||
.tombstone {text-align:right;}
|
||||
|
||||
/* Hack for Mozilla bug 449396 */
|
||||
[mathvariant="bold"] * {
|
||||
|
|
|
@ -1,202 +1,19 @@
|
|||
Copyright (c) 2009-2011 by SVG-edit authors (see AUTHORS file)
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
|
|
@ -91,7 +91,7 @@ var svgWhiteList_ = {
|
|||
"mn": [],
|
||||
"mo": ["fence", "lspace", "maxsize", "minsize", "rspace", "stretchy"],
|
||||
"mover": [],
|
||||
"mpadded": ["lspace", "width"],
|
||||
"mpadded": ["lspace", "width", "height", "depth", "voffset"],
|
||||
"mphantom": [],
|
||||
"mprescripts": [],
|
||||
"mroot": [],
|
||||
|
|
|
@ -1,7 +1,17 @@
|
|||
body {
|
||||
body {
|
||||
background: #D0D0D0;
|
||||
}
|
||||
|
||||
html, body, div{
|
||||
-webkit-user-select: text;
|
||||
-khtml-user-select: text;
|
||||
-moz-user-select: text;
|
||||
-o-user-select: none;
|
||||
user-select: text;
|
||||
/* this will work for QtWebKit in future */
|
||||
-webkit-user-drag: text;
|
||||
}
|
||||
|
||||
#browser-not-supported {
|
||||
font-size: 0.8em;
|
||||
font-family: Verdana, Helvetica, Arial;
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
opacity: 1
|
||||
},
|
||||
initStroke: {
|
||||
width: 5,
|
||||
width: 2,
|
||||
color: '000000', // solid black
|
||||
opacity: 1
|
||||
},
|
||||
|
@ -915,11 +915,14 @@
|
|||
|
||||
var timer;
|
||||
|
||||
var pos = $(show_sel).position();
|
||||
$(hold_sel).css({'left': pos.left+34, 'top': pos.top+77});
|
||||
|
||||
// Clicking the "show" icon should set the current mode
|
||||
shower.mousedown(function(evt) {
|
||||
if(shower.hasClass('disabled')) return false;
|
||||
var holder = $(show_sel.replace('_show',''));
|
||||
var l = holder[0].style.left;
|
||||
var holder = $(hold_sel);
|
||||
var l = pos.left+34;
|
||||
var w = holder.width()*-1;
|
||||
var time = holder.data('shown_popop')?200:0;
|
||||
timer = setTimeout(function() {
|
||||
|
@ -948,9 +951,6 @@
|
|||
});
|
||||
|
||||
// $('#tools_rect').mouseleave(function(){$('#tools_rect').fadeOut();});
|
||||
|
||||
var pos = $(show_sel).position();
|
||||
$(hold_sel).css({'left': pos.left+34, 'top': pos.top+77});
|
||||
});
|
||||
|
||||
setFlyoutTitles();
|
||||
|
@ -2137,7 +2137,9 @@
|
|||
// Made public for UI customization.
|
||||
// TODO: Group UI functions into a public svgEditor.ui interface.
|
||||
Editor.addDropDown = function(elem, callback, dropUp) {
|
||||
if ($(elem).length == 0) return; // Quit if called on non-existant element
|
||||
var button = $(elem).find('button');
|
||||
|
||||
var list = $(elem).find('ul').attr('id', $(elem)[0].id + '-list');
|
||||
|
||||
if(!dropUp) {
|
||||
|
@ -3277,8 +3279,13 @@
|
|||
|
||||
(function() {
|
||||
workarea.scroll(function() {
|
||||
$('#ruler_x')[0].scrollLeft = workarea[0].scrollLeft;
|
||||
$('#ruler_y')[0].scrollTop = workarea[0].scrollTop;
|
||||
// TODO: jQuery's scrollLeft/Top() wouldn't require a null check
|
||||
if ($('#ruler_x').length != 0) {
|
||||
$('#ruler_x')[0].scrollLeft = workarea[0].scrollLeft;
|
||||
}
|
||||
if ($('#ruler_y').length != 0) {
|
||||
$('#ruler_y')[0].scrollTop = workarea[0].scrollTop;
|
||||
}
|
||||
});
|
||||
|
||||
}());
|
||||
|
@ -3994,7 +4001,7 @@
|
|||
{sel:'#tool_source_cancel,#svg_source_overlay,#tool_docprops_cancel,#tool_prefs_cancel', fn: cancelOverlays, evt: 'click', key: ['esc', false, false], hidekey: true},
|
||||
{sel:'#tool_source_save', fn: saveSourceEditor, evt: 'click'},
|
||||
{sel:'#tool_docprops_save', fn: saveDocProperties, evt: 'click'},
|
||||
{sel:'#tool_docprops', fn: showDocProperties, evt: 'mouseup', key: ['D', true]},
|
||||
{sel:'#tool_docprops', fn: showDocProperties, evt: 'mouseup'},
|
||||
{sel:'#tool_prefs_save', fn: savePreferences, evt: 'click'},
|
||||
{sel:'#tool_prefs_option', fn: function() {showPreferences();return false}, evt: 'mouseup'},
|
||||
{sel:'#tool_delete,#tool_delete_multi', fn: deleteSelected, evt: 'click', key: ['del/backspace', true]},
|
||||
|
@ -4227,8 +4234,11 @@
|
|||
}
|
||||
|
||||
$('#rulers').toggle(!!curConfig.showRulers);
|
||||
$('#show_rulers')[0].checked = curConfig.showRulers;
|
||||
|
||||
if (curConfig.showRulers) {
|
||||
$('#show_rulers')[0].checked = true;
|
||||
}
|
||||
|
||||
if(curConfig.gridSnapping) {
|
||||
$('#grid_snapping_on')[0].checked = true;
|
||||
}
|
||||
|
@ -4637,7 +4647,7 @@
|
|||
updateCanvas(true);
|
||||
// });
|
||||
|
||||
// var revnums = "svg-editor.js ($Rev: 2028 $) ";
|
||||
// var revnums = "svg-editor.js ($Rev: 2042 $) ";
|
||||
// revnums += svgCanvas.getVersion();
|
||||
// $('#copyright')[0].setAttribute("title", revnums);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* svgcanvas.js
|
||||
*
|
||||
* Licensed under the Apache License, Version 2
|
||||
|
@ -4309,8 +4309,8 @@ var pathActions = canvas.pathActions = function() {
|
|||
last_x += (last_x - last.x2);
|
||||
last_y += (last_y - last.y2);
|
||||
} else if(firstCtrl) {
|
||||
last_x = firstCtrl[0];
|
||||
last_y = firstCtrl[1];
|
||||
last_x = firstCtrl[0]/current_zoom;
|
||||
last_y = firstCtrl[1]/current_zoom;
|
||||
}
|
||||
svgedit.path.replacePathSeg(6, index, [pt_x, pt_y, last_x, last_y, alt_x, alt_y], drawn_path);
|
||||
}
|
||||
|
@ -6424,7 +6424,7 @@ this.getZoom = function(){return current_zoom;};
|
|||
// Function: getVersion
|
||||
// Returns a string which describes the revision number of SvgCanvas.
|
||||
this.getVersion = function() {
|
||||
return "svgcanvas.js ($Rev: 2028 $)";
|
||||
return "svgcanvas.js ($Rev: 2047 $)";
|
||||
};
|
||||
|
||||
// Function: setUiStrings
|
||||
|
@ -8602,6 +8602,14 @@ this.updateCanvas = function(w, h) {
|
|||
x: x,
|
||||
y: y
|
||||
});
|
||||
|
||||
var bg_img = getElem('background_image');
|
||||
if (bg_img) {
|
||||
assignAttributes(bg_img, {
|
||||
'width': '100%',
|
||||
'height': '100%'
|
||||
});
|
||||
}
|
||||
|
||||
selectorManager.selectorParentGroup.setAttribute("transform","translate(" + x + "," + y + ")");
|
||||
|
||||
|
|
13
rakefile.rb
13
rakefile.rb
|
@ -1,10 +1,17 @@
|
|||
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
||||
# for example lib/tasks/switchtower.rake, and they will automatically be available to Rake.
|
||||
|
||||
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
|
||||
require File.join(File.dirname(__FILE__), 'config', 'boot')
|
||||
|
||||
require 'rake'
|
||||
class Rails::Application
|
||||
include Rake::DSL if defined?(Rake::DSL)
|
||||
end
|
||||
require 'rake/testtask'
|
||||
require 'rake/rdoctask'
|
||||
begin
|
||||
require 'rdoc/task'
|
||||
rescue LoadError
|
||||
require 'rake/rdoctask'
|
||||
end
|
||||
|
||||
require 'tasks/rails'
|
||||
require 'tasks/rails'
|
||||
|
|
|
@ -123,7 +123,7 @@ class WikiControllerTest < ActionController::TestCase
|
|||
|
||||
r = process 'edit', 'web' => 'wiki1', 'id' => 'With : Special /> symbols'
|
||||
assert_response(:success)
|
||||
xml = REXML::Document.new(r.body)
|
||||
xml = REXML::Document.new(r.body.to_str)
|
||||
form = REXML::XPath.first(xml, '//form')
|
||||
assert_equal '/wiki1/save/With+%3A+Special+%2F%3E+symbols', form.attributes['action']
|
||||
end
|
||||
|
@ -341,6 +341,13 @@ class WikiControllerTest < ActionController::TestCase
|
|||
%{hat SmartEngineGUI})), r.body
|
||||
end
|
||||
|
||||
def test_source_with_revision
|
||||
r = process('source', 'web' => 'wiki1', 'id' => 'HomePage', 'rev' => '1')
|
||||
|
||||
assert_response(:success)
|
||||
assert_match Regexp.new(Regexp.escape(%{First revision of the HomePage})), r.body
|
||||
end
|
||||
|
||||
def test_published
|
||||
set_web_property :published, true
|
||||
|
||||
|
@ -1058,6 +1065,7 @@ class WikiControllerTest < ActionController::TestCase
|
|||
\usepackage{color}
|
||||
\usepackage{ucs}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{xparse}
|
||||
\usepackage{hyperref}
|
||||
|
||||
%----Macros----------
|
||||
|
@ -1192,6 +1200,15 @@ class WikiControllerTest < ActionController::TestCase
|
|||
{\ooalign{\box\tw@ \cr \box\z@}}}
|
||||
\makeatother
|
||||
|
||||
% \mathraisebox{voffset}[height][depth]{something}
|
||||
\makeatletter
|
||||
\NewDocumentCommand\mathraisebox{moom}{%
|
||||
\IfNoValueTF{#2}{\def\@temp##1##2{\raisebox{#1}{$\m@th##1##2$}}}{%
|
||||
\IfNoValueTF{#3}{\def\@temp##1##2{\raisebox{#1}[#2]{$\m@th##1##2$}}%
|
||||
}{\def\@temp##1##2{\raisebox{#1}[#2][#3]{$\m@th##1##2$}}}}%
|
||||
\mathpalette\@temp{#4}}
|
||||
\makeatletter
|
||||
|
||||
% udots (taken from yhmath)
|
||||
\makeatletter
|
||||
\def\udots{\mathinner{\mkern2mu\raise\p@\hbox{.}
|
||||
|
@ -1201,6 +1218,8 @@ class WikiControllerTest < ActionController::TestCase
|
|||
|
||||
%% Fix array
|
||||
\newcommand{\itexarray}[1]{\begin{matrix}#1\end{matrix}}
|
||||
%% \itexnum is a noop
|
||||
\newcommand{\itexnum}[1]{#1}
|
||||
|
||||
%% Renaming existing commands
|
||||
\newcommand{\underoverset}[3]{\underset{#1}{\overset{#2}{#3}}}
|
||||
|
|
|
@ -100,10 +100,12 @@ module ChunkMatch
|
|||
|
||||
# Test if requested parts are correct.
|
||||
expected_chunk_state.each_pair do |a_method, expected_value|
|
||||
assert content.chunks.last.kind_of?(chunk_type)
|
||||
assert_respond_to(content.chunks.last, a_method)
|
||||
assert_equal(expected_value, content.chunks.last.send(a_method.to_sym),
|
||||
content.chunks.each do |c|
|
||||
assert c.kind_of?(chunk_type)
|
||||
assert_respond_to(c, a_method)
|
||||
assert_equal(expected_value, c.send(a_method.to_sym),
|
||||
"Wrong #{a_method} value")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -26,19 +26,27 @@ class NoWikiTest < Test::Unit::TestCase
|
|||
|
||||
def test_sanitize_nowiki
|
||||
match(NoWiki, 'This sentence contains <nowiki>[[test]]&<a href="a&b">shebang</a> <script>alert("xss!");</script> *foo*</nowiki>. Do not touch!',
|
||||
:plain_text => "[[test]]&<a href='a&b'>shebang</a> <script>alert("xss!");</script> *foo*"
|
||||
:plain_text => "[[test]]&<a href=\"a&b\">shebang</a> <script>alert(\"xss!\");</script> *foo*"
|
||||
)
|
||||
end
|
||||
|
||||
# Here, the input is not namespace-well-formed, but the output is.
|
||||
# I think that's OK.
|
||||
def test_sanitize_nowiki_ill_formed
|
||||
match(NoWiki, "<nowiki><animateColor xlink:href='#foo'/></nowiki>",
|
||||
:plain_text => "<animateColor xlink:href='#foo'/>"
|
||||
:plain_text => '<animateColor href="#foo"/>'
|
||||
)
|
||||
end
|
||||
|
||||
def test_sanitize_nowiki_ill_formed_II
|
||||
match(NoWiki, "<nowiki><animateColor xlink:href='#foo'/>\000</nowiki>",
|
||||
:plain_text => %(<animateColor xlink:href='#foo'/>)
|
||||
:plain_text => '<animateColor href="#foo"/>'
|
||||
)
|
||||
end
|
||||
|
||||
def test_sanitize_nowiki_ill_formed_III
|
||||
match(NoWiki, "<nowiki><animateColor xlink:href='#foo' xmlns:xlink='http://www.w3.org/1999/xlink'/>\000</nowiki>",
|
||||
:plain_text => '<animateColor xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#foo"/>'
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -48,4 +56,16 @@ class NoWikiTest < Test::Unit::TestCase
|
|||
)
|
||||
end
|
||||
|
||||
def test_sanitize_empty_nowiki
|
||||
match(NoWiki, "<nowiki></nowiki>",
|
||||
:plain_text => ''
|
||||
)
|
||||
end
|
||||
|
||||
def test_sanitize_blank_nowiki
|
||||
match(NoWiki, "<nowiki>\n</nowiki>",
|
||||
:plain_text => "\n"
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -130,11 +130,12 @@ class WikiTest < Test::Unit::TestCase
|
|||
def assert_link_parsed_as(expected_page_name, expected_link_text, expected_link_type, link)
|
||||
link_to_file = ContentStub.new(link)
|
||||
WikiChunk::Link.apply_to(link_to_file)
|
||||
chunk = link_to_file.chunks.last
|
||||
assert chunk
|
||||
assert_equal expected_page_name, chunk.page_name
|
||||
assert_equal expected_link_text, chunk.link_text
|
||||
assert_equal expected_link_type, chunk.link_type
|
||||
link_to_file.chunks.each do |chunk|
|
||||
assert chunk
|
||||
assert_equal expected_page_name, chunk.page_name
|
||||
assert_equal expected_link_text, chunk.link_text
|
||||
assert_equal expected_link_type, chunk.link_type
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -44,12 +44,18 @@ class PageRendererTest < ActiveSupport::TestCase
|
|||
assert_equal %w( HisWay SmartEngineGUI ), x_test_renderer(@revision).unexisting_pages.sort
|
||||
end
|
||||
|
||||
def test_wiki_links_after_empty
|
||||
assert_markup_parsed_as(%{<code></code>\n<p>This is a <span class='newWikiWord'>wikilink<a href=} +
|
||||
%{'../show/wikilink'>?</a></span>.</p>},
|
||||
"<code></code>\n\nThis is a [[wikilink]].")
|
||||
end
|
||||
|
||||
def test_content_with_wiki_links
|
||||
assert_equal "<p><span class='newWikiWord'>His Way<a href='../show/HisWay'>?</a></span> " +
|
||||
"would be <a class='existingWikiWord' href='../show/MyWay'>My Way</a> " +
|
||||
"<math class='maruku-mathml' display='inline' xmlns='http://www.w3.org/1998/Math/MathML'>" +
|
||||
"<mi>sin</mi><mo stretchy='false'>(</mo><mi>x</mi><mo stretchy='false'>)</mo><semantics>" +
|
||||
"<annotation-xml encoding='SVG1.1'><svg/></annotation-xml></semantics></math> in kinda " +
|
||||
"<annotation-xml encoding='SVG1.1'><svg></svg></annotation-xml></semantics></math> in kinda " +
|
||||
"<a class='existingWikiWord' href='../show/ThatWay'>That Way</a> in " +
|
||||
"<span class='newWikiWord'>His Way<a href='../show/HisWay'>?</a></span> " +
|
||||
%{though <a class='existingWikiWord' href='../show/MyWay'>My Way</a> OverThere \342\200\223 see } +
|
||||
|
@ -158,7 +164,7 @@ END_THM
|
|||
%{<div class='maruku-equation'><math class='maruku-mathml' display='block' } +
|
||||
%{xmlns='http://www.w3.org/1998/Math/MathML'><mi>sin</mi><mo stretchy='false'>} +
|
||||
%{(</mo><mi>x</mi><mo stretchy='false'>)</mo><semantics><annotation-xml encoding='SVG1.1'>} +
|
||||
%{<svg/></annotation-xml></semantics></math><span class='maruku-eq-tex'><code style='display: none;'>} +
|
||||
%{<svg></svg></annotation-xml></semantics></math><span class='maruku-eq-tex'><code style='display: none;'>} +
|
||||
%{\\sin(x) \\begin{svg}<svg/>\\end{svg}</code></span></div>},
|
||||
"$$\\sin(x) \\begin{svg}<svg/>\\end{svg}$$")
|
||||
|
||||
|
@ -216,6 +222,21 @@ END_THM
|
|||
|
||||
end
|
||||
|
||||
def test_footnotes
|
||||
assert_markup_parsed_as("<p>Ruby on Rails is a web-framework<sup id='fnref:1'><a href='#fn" +
|
||||
":1' rel='footnote'>1</a></sup>. It uses the MVC<sup id='fnref:2'><a href='#fn:2' rel='foo" +
|
||||
"tnote'>2</a></sup> architecture pattern. It has its good points<sup id='fnref:3'><a href=" +
|
||||
"'#fn:3' rel='footnote'>3</a></sup>.</p>\n<div class='footnotes'><hr/><ol><li id='fn:1'>\n" +
|
||||
"<p>a reusable set of libraries <a href='#fnref:1' rev='footnote'>\342\206\251</a></p>\n</li><li" +
|
||||
" id='fn:2'>\n<p>Model View Controller <a href='#fnref:2' rev='footnote'>\342\206\251</a></p>\n<" +
|
||||
"/li><li id='fn:3'>\n<p>Here are its good points</p>\n\n<ol>\n<li>Ease of use</li>\n\n<li>" +
|
||||
"Rapid development</li>\n</ol>\n<a href='#fnref:3' rev='footnote'>\342\206\251</a></li></ol></div>",
|
||||
"Ruby on Rails is a web-framework[^framework]. It uses the MVC[^MVC] architecture pattern." +
|
||||
" It has its good points[^points].\n\n[^framework]: a reusable set of libraries\n\n[^MVC]:" +
|
||||
" Model View Controller\n\n[^points]: Here are its good points\n1. Ease of use\n2. Rapid d" +
|
||||
"evelopment")
|
||||
end
|
||||
|
||||
def test_ial_in_lists
|
||||
|
||||
assert_markup_parsed_as(
|
||||
|
@ -254,6 +275,24 @@ END_THM
|
|||
|
||||
def test_have_latest_itex2mml
|
||||
|
||||
assert_markup_parsed_as(
|
||||
%{<p>equation <math class='maruku-mathml' displa} +
|
||||
%{y='inline' xmlns='http://www.w3.org/1998/Math/} +
|
||||
%{MathML'><mi>x</mi><menclose notation='box'><mp} +
|
||||
%{added depth='2ex' height='3ex' voffset='5ex'><} +
|
||||
%{mi>x</mi></mpadded></menclose></math></p>},
|
||||
"equation $x\\boxed{\\mathraisebox{5ex}[3ex][2ex]{x}}$")
|
||||
|
||||
assert_markup_parsed_as(
|
||||
%{<p>equation <math class='maruku-mathml' displa} +
|
||||
%{y='inline' xmlns='http://www.w3.org/1998/Math/} +
|
||||
%{MathML'><mrow href='http://ex.com' xlink:href=} +
|
||||
%{'http://ex.com' xlink:type='simple' xmlns:xlin} +
|
||||
%{k='http://www.w3.org/1999/xlink'><mn>47.3</mn>} +
|
||||
%{</mrow><mn>47</mn><mo>,</mo><mn>3</mn><mn>47,3} +
|
||||
%{</mn></math></p>},
|
||||
"equation $\\href{http://ex.com}{47.3} 47,3 \\itexnum{47,3}$")
|
||||
|
||||
assert_markup_parsed_as(
|
||||
%{<p>equation <math class='maruku-mathml' displa} +
|
||||
%{y='inline' xmlns='http://www.w3.org/1998/Math/} +
|
||||
|
@ -414,7 +453,7 @@ END_THM
|
|||
:author => Author.new('DavidHeinemeierHansson'))
|
||||
|
||||
assert_equal "<tt>hello</tt> that <span class='newWikiWord'>Smart Engine GUI" +
|
||||
"<a href='../show/SmartEngineGUI'>?</a></span>\n\n",
|
||||
"<a href='../show/SmartEngineGUI'>?</a></span>",
|
||||
x_test_renderer(@revision).display_content
|
||||
end
|
||||
|
||||
|
@ -441,7 +480,13 @@ END_THM
|
|||
'</span></em></p>',
|
||||
'_should we go ThatWay or ThisWay _')
|
||||
end
|
||||
|
||||
|
||||
def test_content_with_utf8_in_strong
|
||||
assert_markup_parsed_as(
|
||||
"<p>Can we handle <strong>\u221E-gerbe</strong></p>",
|
||||
"Can we handle **\u221E-gerbe**")
|
||||
end
|
||||
|
||||
def test_content_with_redirected_link
|
||||
assert_markup_parsed_as(
|
||||
"<p>This is a redirected link: <a class='existingWikiWord' href='../show/liquor'>" +
|
||||
|
@ -530,6 +575,13 @@ END_THM
|
|||
"<p>A <code>class SmartEngine</code> would not mark up</p>\n<pre>CodeBlocks</pre>\n<p>would it?</p>",
|
||||
"A <code>class SmartEngine</code> would not mark up\n\n<pre>CodeBlocks</pre>\n\nwould it?")
|
||||
end
|
||||
|
||||
def test_inline_html
|
||||
set_web_property :markup, :markdownMML
|
||||
assert_markup_parsed_as(
|
||||
"<p>We discuss the general abstract <a href='http://nlab.mathforge.org/nlab/show/cohesive+(infinity%2C1)-topos#Structures'>structures in a cohesive (\u221E,1)-topos</a> realized.</p>",
|
||||
"We discuss the general abstract\n<a href=\"http://nlab.mathforge.org/nlab/show/cohesive+(infinity%2C1)-topos#Structures\">structures in a cohesive (\u221E,1)-topos</a> realized.")
|
||||
end
|
||||
|
||||
# def test_content_with_autolink_in_parentheses
|
||||
# assert_markup_parsed_as(
|
||||
|
@ -557,7 +609,7 @@ END_THM
|
|||
|
||||
# currently, upper case HTML elements are not allowed
|
||||
assert_markup_parsed_as(
|
||||
"<p>This <IMG SRC='http://hobix.com/sample.jpg' alt=''/> is an inline image link.</p>",
|
||||
"<p>This <IMG SRC='http://hobix.com/sample.jpg' alt=''></IMG> is an inline image link.</p>",
|
||||
'This <IMG SRC="http://hobix.com/sample.jpg" alt="" /> is an inline image link.')
|
||||
end
|
||||
|
||||
|
@ -615,7 +667,7 @@ END_THM
|
|||
"<a class='existingWikiWord' href='MyWay.html'>My Way</a> " +
|
||||
"<math class='maruku-mathml' display='inline' xmlns='http://www.w3.org/1998/Math/MathML'>" +
|
||||
"<mi>sin</mi><mo stretchy='false'>(</mo><mi>x</mi><mo stretchy='false'>)</mo><semantics>" +
|
||||
"<annotation-xml encoding='SVG1.1'><svg/></annotation-xml></semantics></math> in kinda " +
|
||||
"<annotation-xml encoding='SVG1.1'><svg></svg></annotation-xml></semantics></math> in kinda " +
|
||||
"<a class='existingWikiWord' href='ThatWay.html'>That Way</a> in " +
|
||||
"<span class='newWikiWord'>His Way</span> though " +
|
||||
%{<a class='existingWikiWord' href='MyWay.html'>My Way</a> OverThere \342\200\223 see } +
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env ruby
|
||||
#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
|
||||
#
|
||||
# This file was generated by RubyGems.
|
||||
#
|
||||
|
@ -7,8 +7,6 @@
|
|||
#
|
||||
|
||||
require 'rubygems'
|
||||
Gem.use_paths File.join(File.dirname(File.dirname(__FILE__))), Gem.path
|
||||
Gem.refresh
|
||||
|
||||
version = ">= 0"
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -83,6 +83,9 @@
|
|||
<li><a href="./lib/bundler/rubygems_ext_rb.html?TB_iframe=true&height=550&width=785"
|
||||
class="thickbox" title="lib/bundler/rubygems_ext.rb">lib/bundler/rubygems_ext.rb</a></li>
|
||||
|
||||
<li><a href="./lib/bundler/rubygems_integration_rb.html?TB_iframe=true&height=550&width=785"
|
||||
class="thickbox" title="lib/bundler/rubygems_integration.rb">lib/bundler/rubygems_integration.rb</a></li>
|
||||
|
||||
<li><a href="./lib/bundler/runtime_rb.html?TB_iframe=true&height=550&width=785"
|
||||
class="thickbox" title="lib/bundler/runtime.rb">lib/bundler/runtime.rb</a></li>
|
||||
|
||||
|
@ -189,6 +192,8 @@
|
|||
|
||||
<li><span class="type">CLASS</span> <a href="Bundler/Resolver.html">Bundler::Resolver</a></li>
|
||||
|
||||
<li><span class="type">CLASS</span> <a href="Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><span class="type">CLASS</span> <a href="Bundler/Runtime.html">Bundler::Runtime</a></li>
|
||||
|
||||
<li><span class="type">CLASS</span> <a href="Bundler/Settings.html">Bundler::Settings</a></li>
|
||||
|
@ -286,6 +291,10 @@
|
|||
|
||||
<li class="file"><a href="./lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="./lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="./lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -395,16 +404,28 @@
|
|||
|
||||
<li><a href="./Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="./Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="./Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="./Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="./Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="./Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="./Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="./Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="./Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
||||
|
@ -536,6 +557,21 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<h3 class="section-header">Attributes</h3>
|
||||
|
||||
|
||||
<div id="rubygems-attribute-method" class="method-detail">
|
||||
<a name="rubygems"></a>
|
||||
|
||||
<div class="method-heading attribute-method-heading">
|
||||
<span class="method-name">rubygems</span><span
|
||||
class="attribute-access-type">[R]</span>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="ui-attribute-method" class="method-detail">
|
||||
<a name="ui"></a>
|
||||
|
||||
|
@ -599,10 +635,10 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="app-cache-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 166</span>
|
||||
166: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">app_cache</span>
|
||||
167: <span class="ruby-identifier">root</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"vendor/cache"</span>)
|
||||
168: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 174</span>
|
||||
174: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">app_cache</span>
|
||||
175: <span class="ruby-identifier">root</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"vendor/cache"</span>)
|
||||
176: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -633,12 +669,12 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="app-config-path-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 160</span>
|
||||
160: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">app_config_path</span>
|
||||
161: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'BUNDLE_APP_CONFIG'</span>] <span class="ruby-operator">?</span>
|
||||
162: <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'BUNDLE_APP_CONFIG'</span>]).<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">root</span>) <span class="ruby-operator">:</span>
|
||||
163: <span class="ruby-identifier">root</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'.bundle'</span>)
|
||||
164: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 168</span>
|
||||
168: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">app_config_path</span>
|
||||
169: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'BUNDLE_APP_CONFIG'</span>] <span class="ruby-operator">?</span>
|
||||
170: <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'BUNDLE_APP_CONFIG'</span>]).<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">root</span>) <span class="ruby-operator">:</span>
|
||||
171: <span class="ruby-identifier">root</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'.bundle'</span>)
|
||||
172: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -669,15 +705,15 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="bin-path-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 86</span>
|
||||
86: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bin_path</span>
|
||||
87: <span class="ruby-ivar">@bin_path</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">begin</span>
|
||||
88: <span class="ruby-identifier">path</span> = <span class="ruby-identifier">settings</span>[<span class="ruby-value">:bin</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">"bin"</span>
|
||||
89: <span class="ruby-identifier">path</span> = <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">path</span>).<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">root</span>)
|
||||
90: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">path</span>)
|
||||
91: <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">path</span>).<span class="ruby-identifier">expand_path</span>
|
||||
92: <span class="ruby-keyword kw">end</span>
|
||||
93: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 92</span>
|
||||
92: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bin_path</span>
|
||||
93: <span class="ruby-ivar">@bin_path</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">begin</span>
|
||||
94: <span class="ruby-identifier">path</span> = <span class="ruby-identifier">settings</span>[<span class="ruby-value">:bin</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">"bin"</span>
|
||||
95: <span class="ruby-identifier">path</span> = <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">path</span>).<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">root</span>)
|
||||
96: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">path</span>)
|
||||
97: <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">path</span>).<span class="ruby-identifier">expand_path</span>
|
||||
98: <span class="ruby-keyword kw">end</span>
|
||||
99: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -708,11 +744,10 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="bundle-path-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 81</span>
|
||||
81: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bundle_path</span>
|
||||
82: <span class="ruby-comment cmt"># STDERR.puts settings.path</span>
|
||||
83: <span class="ruby-ivar">@bundle_path</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">path</span>).<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">root</span>)
|
||||
84: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 88</span>
|
||||
88: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bundle_path</span>
|
||||
89: <span class="ruby-ivar">@bundle_path</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">path</span>).<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">root</span>)
|
||||
90: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -743,10 +778,10 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="cache-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 152</span>
|
||||
152: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache</span>
|
||||
153: <span class="ruby-identifier">bundle_path</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"cache/bundler"</span>)
|
||||
154: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 160</span>
|
||||
160: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache</span>
|
||||
161: <span class="ruby-identifier">bundle_path</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"cache/bundler"</span>)
|
||||
162: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -777,13 +812,13 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="configure-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 70</span>
|
||||
70: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure</span>
|
||||
71: <span class="ruby-ivar">@configured</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">begin</span>
|
||||
72: <span class="ruby-identifier">configure_gem_home_and_path</span>
|
||||
73: <span class="ruby-keyword kw">true</span>
|
||||
74: <span class="ruby-keyword kw">end</span>
|
||||
75: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 77</span>
|
||||
77: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure</span>
|
||||
78: <span class="ruby-ivar">@configured</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">begin</span>
|
||||
79: <span class="ruby-identifier">configure_gem_home_and_path</span>
|
||||
80: <span class="ruby-keyword kw">true</span>
|
||||
81: <span class="ruby-keyword kw">end</span>
|
||||
82: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -814,10 +849,10 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="default-gemfile-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 186</span>
|
||||
186: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">default_gemfile</span>
|
||||
187: <span class="ruby-constant">SharedHelpers</span>.<span class="ruby-identifier">default_gemfile</span>
|
||||
188: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 194</span>
|
||||
194: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">default_gemfile</span>
|
||||
195: <span class="ruby-constant">SharedHelpers</span>.<span class="ruby-identifier">default_gemfile</span>
|
||||
196: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -848,10 +883,10 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="default-lockfile-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 190</span>
|
||||
190: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">default_lockfile</span>
|
||||
191: <span class="ruby-constant">SharedHelpers</span>.<span class="ruby-identifier">default_lockfile</span>
|
||||
192: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 198</span>
|
||||
198: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">default_lockfile</span>
|
||||
199: <span class="ruby-constant">SharedHelpers</span>.<span class="ruby-identifier">default_lockfile</span>
|
||||
200: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -882,15 +917,15 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="definition-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 123</span>
|
||||
123: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">definition</span>(<span class="ruby-identifier">unlock</span> = <span class="ruby-keyword kw">nil</span>)
|
||||
124: <span class="ruby-ivar">@definition</span> = <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">unlock</span>
|
||||
125: <span class="ruby-ivar">@definition</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">begin</span>
|
||||
126: <span class="ruby-identifier">configure</span>
|
||||
127: <span class="ruby-identifier">upgrade_lockfile</span>
|
||||
128: <span class="ruby-constant">Definition</span>.<span class="ruby-identifier">build</span>(<span class="ruby-identifier">default_gemfile</span>, <span class="ruby-identifier">default_lockfile</span>, <span class="ruby-identifier">unlock</span>)
|
||||
129: <span class="ruby-keyword kw">end</span>
|
||||
130: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 131</span>
|
||||
131: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">definition</span>(<span class="ruby-identifier">unlock</span> = <span class="ruby-keyword kw">nil</span>)
|
||||
132: <span class="ruby-ivar">@definition</span> = <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">unlock</span>
|
||||
133: <span class="ruby-ivar">@definition</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">begin</span>
|
||||
134: <span class="ruby-identifier">configure</span>
|
||||
135: <span class="ruby-identifier">upgrade_lockfile</span>
|
||||
136: <span class="ruby-constant">Definition</span>.<span class="ruby-identifier">build</span>(<span class="ruby-identifier">default_gemfile</span>, <span class="ruby-identifier">default_lockfile</span>, <span class="ruby-identifier">unlock</span>)
|
||||
137: <span class="ruby-keyword kw">end</span>
|
||||
138: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -921,10 +956,10 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="environment-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 119</span>
|
||||
119: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">environment</span>
|
||||
120: <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Environment</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">root</span>, <span class="ruby-identifier">definition</span>)
|
||||
121: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 127</span>
|
||||
127: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">environment</span>
|
||||
128: <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Environment</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">root</span>, <span class="ruby-identifier">definition</span>)
|
||||
129: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -955,10 +990,10 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="home-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 140</span>
|
||||
140: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">home</span>
|
||||
141: <span class="ruby-identifier">bundle_path</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"bundler"</span>)
|
||||
142: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 148</span>
|
||||
148: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">home</span>
|
||||
149: <span class="ruby-identifier">bundle_path</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"bundler"</span>)
|
||||
150: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -989,10 +1024,10 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="install-path-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 144</span>
|
||||
144: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install_path</span>
|
||||
145: <span class="ruby-identifier">home</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"gems"</span>)
|
||||
146: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 152</span>
|
||||
152: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install_path</span>
|
||||
153: <span class="ruby-identifier">home</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"gems"</span>)
|
||||
154: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1023,10 +1058,10 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="load-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 115</span>
|
||||
115: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load</span>
|
||||
116: <span class="ruby-ivar">@load</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Runtime</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">root</span>, <span class="ruby-identifier">definition</span>)
|
||||
117: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 123</span>
|
||||
123: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load</span>
|
||||
124: <span class="ruby-ivar">@load</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Runtime</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">root</span>, <span class="ruby-identifier">definition</span>)
|
||||
125: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1057,32 +1092,33 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="load-gemspec-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 221</span>
|
||||
221: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_gemspec</span>(<span class="ruby-identifier">file</span>)
|
||||
222: <span class="ruby-identifier">path</span> = <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">file</span>)
|
||||
223: <span class="ruby-comment cmt"># Eval the gemspec from its parent directory</span>
|
||||
224: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">path</span>.<span class="ruby-identifier">dirname</span>) <span class="ruby-keyword kw">do</span>
|
||||
225: <span class="ruby-keyword kw">begin</span>
|
||||
226: <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Specification</span>.<span class="ruby-identifier">from_yaml</span>(<span class="ruby-identifier">path</span>.<span class="ruby-identifier">basename</span>)
|
||||
227: <span class="ruby-comment cmt"># Raises ArgumentError if the file is not valid YAML</span>
|
||||
228: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-constant">SyntaxError</span>, <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">EndOfYAMLException</span>, <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Exception</span>
|
||||
229: <span class="ruby-keyword kw">begin</span>
|
||||
230: <span class="ruby-identifier">eval</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">path</span>.<span class="ruby-identifier">basename</span>), <span class="ruby-constant">TOPLEVEL_BINDING</span>, <span class="ruby-identifier">path</span>.<span class="ruby-identifier">expand_path</span>.<span class="ruby-identifier">to_s</span>)
|
||||
231: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">LoadError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
||||
232: <span class="ruby-identifier">original_line</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">backtrace</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">path</span>.<span class="ruby-identifier">to_s</span>) }
|
||||
233: <span class="ruby-identifier">msg</span> = <span class="ruby-node">"There was a LoadError while evaluating #{path.basename}:\n #{e.message}"</span>
|
||||
234: <span class="ruby-identifier">msg</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" from\n #{original_line}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">original_line</span>
|
||||
235: <span class="ruby-identifier">msg</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n"</span>
|
||||
236:
|
||||
237: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_VERSION</span> <span class="ruby-operator">>=</span> <span class="ruby-value str">"1.9.0"</span>
|
||||
238: <span class="ruby-identifier">msg</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\nDoes it try to require a relative path? That doesn't work in Ruby 1.9."</span>
|
||||
239: <span class="ruby-keyword kw">end</span>
|
||||
240:
|
||||
241: <span class="ruby-identifier">raise</span> <span class="ruby-constant">GemspecError</span>, <span class="ruby-identifier">msg</span>
|
||||
242: <span class="ruby-keyword kw">end</span>
|
||||
243: <span class="ruby-keyword kw">end</span>
|
||||
244: <span class="ruby-keyword kw">end</span>
|
||||
245: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 229</span>
|
||||
229: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_gemspec</span>(<span class="ruby-identifier">file</span>)
|
||||
230: <span class="ruby-identifier">path</span> = <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">file</span>)
|
||||
231: <span class="ruby-comment cmt"># Eval the gemspec from its parent directory</span>
|
||||
232: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">path</span>.<span class="ruby-identifier">dirname</span>.<span class="ruby-identifier">to_s</span>) <span class="ruby-keyword kw">do</span>
|
||||
233: <span class="ruby-identifier">contents</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">path</span>.<span class="ruby-identifier">basename</span>.<span class="ruby-identifier">to_s</span>)
|
||||
234: <span class="ruby-keyword kw">begin</span>
|
||||
235: <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Specification</span>.<span class="ruby-identifier">from_yaml</span>(<span class="ruby-identifier">contents</span>)
|
||||
236: <span class="ruby-comment cmt"># Raises ArgumentError if the file is not valid YAML</span>
|
||||
237: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-constant">SyntaxError</span>, <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">EndOfYAMLException</span>, <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Exception</span>
|
||||
238: <span class="ruby-keyword kw">begin</span>
|
||||
239: <span class="ruby-identifier">eval</span>(<span class="ruby-identifier">contents</span>, <span class="ruby-constant">TOPLEVEL_BINDING</span>, <span class="ruby-identifier">path</span>.<span class="ruby-identifier">expand_path</span>.<span class="ruby-identifier">to_s</span>)
|
||||
240: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">LoadError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
||||
241: <span class="ruby-identifier">original_line</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">backtrace</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">path</span>.<span class="ruby-identifier">to_s</span>) }
|
||||
242: <span class="ruby-identifier">msg</span> = <span class="ruby-node">"There was a LoadError while evaluating #{path.basename}:\n #{e.message}"</span>
|
||||
243: <span class="ruby-identifier">msg</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" from\n #{original_line}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">original_line</span>
|
||||
244: <span class="ruby-identifier">msg</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n"</span>
|
||||
245:
|
||||
246: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_VERSION</span> <span class="ruby-operator">>=</span> <span class="ruby-value str">"1.9.0"</span>
|
||||
247: <span class="ruby-identifier">msg</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\nDoes it try to require a relative path? That doesn't work in Ruby 1.9."</span>
|
||||
248: <span class="ruby-keyword kw">end</span>
|
||||
249:
|
||||
250: <span class="ruby-identifier">raise</span> <span class="ruby-constant">GemspecError</span>, <span class="ruby-identifier">msg</span>
|
||||
251: <span class="ruby-keyword kw">end</span>
|
||||
252: <span class="ruby-keyword kw">end</span>
|
||||
253: <span class="ruby-keyword kw">end</span>
|
||||
254: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1113,14 +1149,14 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="mkdir-p-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 205</span>
|
||||
205: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">path</span>)
|
||||
206: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">requires_sudo?</span>
|
||||
207: <span class="ruby-identifier">sudo</span> <span class="ruby-node">"mkdir -p '#{path}'"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">path</span>)
|
||||
208: <span class="ruby-keyword kw">else</span>
|
||||
209: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">path</span>)
|
||||
210: <span class="ruby-keyword kw">end</span>
|
||||
211: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 213</span>
|
||||
213: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">path</span>)
|
||||
214: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">requires_sudo?</span>
|
||||
215: <span class="ruby-identifier">sudo</span> <span class="ruby-node">"mkdir -p '#{path}'"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">path</span>)
|
||||
216: <span class="ruby-keyword kw">else</span>
|
||||
217: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">path</span>)
|
||||
218: <span class="ruby-keyword kw">end</span>
|
||||
219: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1151,10 +1187,10 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="read-file-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 217</span>
|
||||
217: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_file</span>(<span class="ruby-identifier">file</span>)
|
||||
218: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">file</span>, <span class="ruby-value str">"rb"</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">read</span> }
|
||||
219: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 225</span>
|
||||
225: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_file</span>(<span class="ruby-identifier">file</span>)
|
||||
226: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">file</span>, <span class="ruby-value str">"rb"</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">read</span> }
|
||||
227: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1185,10 +1221,10 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="require-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 111</span>
|
||||
111: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">require</span>(*<span class="ruby-identifier">groups</span>)
|
||||
112: <span class="ruby-identifier">setup</span>(*<span class="ruby-identifier">groups</span>).<span class="ruby-identifier">require</span>(*<span class="ruby-identifier">groups</span>)
|
||||
113: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 119</span>
|
||||
119: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">require</span>(*<span class="ruby-identifier">groups</span>)
|
||||
120: <span class="ruby-identifier">setup</span>(*<span class="ruby-identifier">groups</span>).<span class="ruby-identifier">require</span>(*<span class="ruby-identifier">groups</span>)
|
||||
121: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1219,17 +1255,17 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="requires-sudo--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 194</span>
|
||||
194: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">requires_sudo?</span>
|
||||
195: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@requires_sudo</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@checked_for_sudo</span>
|
||||
196:
|
||||
197: <span class="ruby-identifier">path</span> = <span class="ruby-identifier">bundle_path</span>
|
||||
198: <span class="ruby-identifier">path</span> = <span class="ruby-identifier">path</span>.<span class="ruby-identifier">parent</span> <span class="ruby-keyword kw">until</span> <span class="ruby-identifier">path</span>.<span class="ruby-identifier">exist?</span>
|
||||
199: <span class="ruby-identifier">sudo_present</span> = <span class="ruby-operator">!</span>(<span class="ruby-value">`which sudo`</span> <span class="ruby-keyword kw">rescue</span> <span class="ruby-value str">''</span>).<span class="ruby-identifier">empty?</span>
|
||||
200:
|
||||
201: <span class="ruby-ivar">@checked_for_sudo</span> = <span class="ruby-keyword kw">true</span>
|
||||
202: <span class="ruby-ivar">@requires_sudo</span> = <span class="ruby-identifier">settings</span>.<span class="ruby-identifier">allow_sudo?</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">writable?</span>(<span class="ruby-identifier">path</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">sudo_present</span>
|
||||
203: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 202</span>
|
||||
202: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">requires_sudo?</span>
|
||||
203: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@requires_sudo</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-ivar">@checked_for_sudo</span>) <span class="ruby-operator">&&</span> <span class="ruby-ivar">@checked_for_sudo</span>
|
||||
204:
|
||||
205: <span class="ruby-identifier">path</span> = <span class="ruby-identifier">bundle_path</span>
|
||||
206: <span class="ruby-identifier">path</span> = <span class="ruby-identifier">path</span>.<span class="ruby-identifier">parent</span> <span class="ruby-keyword kw">until</span> <span class="ruby-identifier">path</span>.<span class="ruby-identifier">exist?</span>
|
||||
207: <span class="ruby-identifier">sudo_present</span> = <span class="ruby-operator">!</span>(<span class="ruby-value">`which sudo`</span> <span class="ruby-keyword kw">rescue</span> <span class="ruby-value str">''</span>).<span class="ruby-identifier">empty?</span>
|
||||
208:
|
||||
209: <span class="ruby-ivar">@checked_for_sudo</span> = <span class="ruby-keyword kw">true</span>
|
||||
210: <span class="ruby-ivar">@requires_sudo</span> = <span class="ruby-identifier">settings</span>.<span class="ruby-identifier">allow_sudo?</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">writable?</span>(<span class="ruby-identifier">path</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">sudo_present</span>
|
||||
211: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1260,10 +1296,10 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="root-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 156</span>
|
||||
156: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">root</span>
|
||||
157: <span class="ruby-identifier">default_gemfile</span>.<span class="ruby-identifier">dirname</span>.<span class="ruby-identifier">expand_path</span>
|
||||
158: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 164</span>
|
||||
164: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">root</span>
|
||||
165: <span class="ruby-identifier">default_gemfile</span>.<span class="ruby-identifier">dirname</span>.<span class="ruby-identifier">expand_path</span>
|
||||
166: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1294,10 +1330,10 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="ruby-scope-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 132</span>
|
||||
132: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ruby_scope</span>
|
||||
133: <span class="ruby-node">"#{Gem.ruby_engine}/#{Gem::ConfigMap[:ruby_version]}"</span>
|
||||
134: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 140</span>
|
||||
140: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ruby_scope</span>
|
||||
141: <span class="ruby-node">"#{Bundler.rubygems.ruby_engine}/#{Gem::ConfigMap[:ruby_version]}"</span>
|
||||
142: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1328,10 +1364,10 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="settings-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 174</span>
|
||||
174: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">settings</span>
|
||||
175: <span class="ruby-ivar">@settings</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Settings</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">app_config_path</span>)
|
||||
176: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 182</span>
|
||||
182: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">settings</span>
|
||||
183: <span class="ruby-ivar">@settings</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Settings</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">app_config_path</span>)
|
||||
184: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1362,22 +1398,24 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="setup-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 95</span>
|
||||
95: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span>(*<span class="ruby-identifier">groups</span>)
|
||||
96: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@setup</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-ivar">@setup</span>) <span class="ruby-operator">&&</span> <span class="ruby-ivar">@setup</span>
|
||||
97:
|
||||
98: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">empty?</span>
|
||||
99: <span class="ruby-comment cmt"># Load all groups, but only once</span>
|
||||
100: <span class="ruby-ivar">@setup</span> = <span class="ruby-identifier">load</span>.<span class="ruby-identifier">setup</span>
|
||||
101: <span class="ruby-keyword kw">else</span>
|
||||
102: <span class="ruby-comment cmt"># Figure out which groups haven't been loaded yet</span>
|
||||
103: <span class="ruby-identifier">unloaded</span> = <span class="ruby-identifier">groups</span> <span class="ruby-operator">-</span> (<span class="ruby-ivar">@completed_groups</span> <span class="ruby-operator">||</span> [])
|
||||
104: <span class="ruby-comment cmt"># Record groups that are now loaded</span>
|
||||
105: <span class="ruby-ivar">@completed_groups</span> = <span class="ruby-identifier">groups</span> <span class="ruby-operator">|</span> (<span class="ruby-ivar">@completed_groups</span> <span class="ruby-operator">||</span> [])
|
||||
106: <span class="ruby-comment cmt"># Load any groups that are not yet loaded</span>
|
||||
107: <span class="ruby-identifier">unloaded</span>.<span class="ruby-identifier">any?</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">load</span>.<span class="ruby-identifier">setup</span>(*<span class="ruby-identifier">unloaded</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">load</span>
|
||||
108: <span class="ruby-keyword kw">end</span>
|
||||
109: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 101</span>
|
||||
101: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span>(*<span class="ruby-identifier">groups</span>)
|
||||
102: <span class="ruby-comment cmt"># Just return if all groups are already loaded</span>
|
||||
103: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@setup</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-ivar">@setup</span>)
|
||||
104:
|
||||
105: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">empty?</span>
|
||||
106: <span class="ruby-comment cmt"># Load all groups, but only once</span>
|
||||
107: <span class="ruby-ivar">@setup</span> = <span class="ruby-identifier">load</span>.<span class="ruby-identifier">setup</span>
|
||||
108: <span class="ruby-keyword kw">else</span>
|
||||
109: <span class="ruby-ivar">@completed_groups</span> <span class="ruby-operator">||=</span> []
|
||||
110: <span class="ruby-comment cmt"># Figure out which groups haven't been loaded yet</span>
|
||||
111: <span class="ruby-identifier">unloaded</span> = <span class="ruby-identifier">groups</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@completed_groups</span>
|
||||
112: <span class="ruby-comment cmt"># Record groups that are now loaded</span>
|
||||
113: <span class="ruby-ivar">@completed_groups</span> = <span class="ruby-identifier">groups</span>
|
||||
114: <span class="ruby-comment cmt"># Load any groups that are not yet loaded</span>
|
||||
115: <span class="ruby-identifier">unloaded</span>.<span class="ruby-identifier">any?</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">load</span>.<span class="ruby-identifier">setup</span>(*<span class="ruby-identifier">unloaded</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">load</span>
|
||||
116: <span class="ruby-keyword kw">end</span>
|
||||
117: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1408,10 +1446,10 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="specs-path-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 148</span>
|
||||
148: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">specs_path</span>
|
||||
149: <span class="ruby-identifier">bundle_path</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"specifications"</span>)
|
||||
150: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 156</span>
|
||||
156: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">specs_path</span>
|
||||
157: <span class="ruby-identifier">bundle_path</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"specifications"</span>)
|
||||
158: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1442,10 +1480,10 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="sudo-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 213</span>
|
||||
213: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sudo</span>(<span class="ruby-identifier">str</span>)
|
||||
214: <span class="ruby-node">`sudo -p 'Enter your password to install the bundled RubyGems to your system: ' #{str}`</span>
|
||||
215: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 221</span>
|
||||
221: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sudo</span>(<span class="ruby-identifier">str</span>)
|
||||
222: <span class="ruby-node">`sudo -p 'Enter your password to install the bundled RubyGems to your system: ' #{str}`</span>
|
||||
223: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1476,10 +1514,10 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="tmp-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 170</span>
|
||||
170: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tmp</span>
|
||||
171: <span class="ruby-identifier">user_bundle_path</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"tmp"</span>, <span class="ruby-constant">Process</span>.<span class="ruby-identifier">pid</span>.<span class="ruby-identifier">to_s</span>)
|
||||
172: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 178</span>
|
||||
178: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tmp</span>
|
||||
179: <span class="ruby-identifier">user_bundle_path</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"tmp"</span>, <span class="ruby-constant">Process</span>.<span class="ruby-identifier">pid</span>.<span class="ruby-identifier">to_s</span>)
|
||||
180: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1510,10 +1548,10 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="ui-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 77</span>
|
||||
77: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ui</span>
|
||||
78: <span class="ruby-ivar">@ui</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">UI</span>.<span class="ruby-identifier">new</span>
|
||||
79: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 84</span>
|
||||
84: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ui</span>
|
||||
85: <span class="ruby-ivar">@ui</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">UI</span>.<span class="ruby-identifier">new</span>
|
||||
86: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1544,10 +1582,10 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="user-bundle-path-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 136</span>
|
||||
136: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">user_bundle_path</span>
|
||||
137: <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Gem</span>.<span class="ruby-identifier">user_home</span>).<span class="ruby-identifier">join</span>(<span class="ruby-value str">".bundler"</span>)
|
||||
138: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 144</span>
|
||||
144: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">user_bundle_path</span>
|
||||
145: <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">user_home</span>).<span class="ruby-identifier">join</span>(<span class="ruby-value str">".bundler"</span>)
|
||||
146: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1578,14 +1616,14 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="with-clean-env-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 178</span>
|
||||
178: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with_clean_env</span>
|
||||
179: <span class="ruby-identifier">bundled_env</span> = <span class="ruby-constant">ENV</span>.<span class="ruby-identifier">to_hash</span>
|
||||
180: <span class="ruby-constant">ENV</span>.<span class="ruby-identifier">replace</span>(<span class="ruby-constant">ORIGINAL_ENV</span>)
|
||||
181: <span class="ruby-keyword kw">yield</span>
|
||||
182: <span class="ruby-keyword kw">ensure</span>
|
||||
183: <span class="ruby-constant">ENV</span>.<span class="ruby-identifier">replace</span>(<span class="ruby-identifier">bundled_env</span>.<span class="ruby-identifier">to_hash</span>)
|
||||
184: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 186</span>
|
||||
186: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with_clean_env</span>
|
||||
187: <span class="ruby-identifier">bundled_env</span> = <span class="ruby-constant">ENV</span>.<span class="ruby-identifier">to_hash</span>
|
||||
188: <span class="ruby-constant">ENV</span>.<span class="ruby-identifier">replace</span>(<span class="ruby-constant">ORIGINAL_ENV</span>)
|
||||
189: <span class="ruby-keyword kw">yield</span>
|
||||
190: <span class="ruby-keyword kw">ensure</span>
|
||||
191: <span class="ruby-constant">ENV</span>.<span class="ruby-identifier">replace</span>(<span class="ruby-identifier">bundled_env</span>.<span class="ruby-identifier">to_hash</span>)
|
||||
192: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1622,20 +1660,23 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="configure-gem-home-and-path-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 249</span>
|
||||
249: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure_gem_home_and_path</span>
|
||||
250: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">settings</span>[<span class="ruby-value">:disable_shared_gems</span>]
|
||||
251: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'GEM_PATH'</span>] = <span class="ruby-value str">''</span>
|
||||
252: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'GEM_HOME'</span>] = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">bundle_path</span>, <span class="ruby-identifier">root</span>)
|
||||
253: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">dir</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">bundle_path</span>.<span class="ruby-identifier">to_s</span>
|
||||
254: <span class="ruby-identifier">paths</span> = [<span class="ruby-constant">Gem</span>.<span class="ruby-identifier">dir</span>, <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">path</span>].<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">uniq</span>.<span class="ruby-identifier">reject</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">empty?</span> }
|
||||
255: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"GEM_PATH"</span>] = <span class="ruby-identifier">paths</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">PATH_SEPARATOR</span>)
|
||||
256: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"GEM_HOME"</span>] = <span class="ruby-identifier">bundle_path</span>.<span class="ruby-identifier">to_s</span>
|
||||
257: <span class="ruby-keyword kw">end</span>
|
||||
258:
|
||||
259: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span> <span class="ruby-identifier">bundle_path</span>.<span class="ruby-identifier">to_s</span>
|
||||
260: <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">clear_paths</span>
|
||||
261: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 258</span>
|
||||
258: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure_gem_home_and_path</span>
|
||||
259: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">settings</span>[<span class="ruby-value">:disable_shared_gems</span>]
|
||||
260: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'GEM_PATH'</span>] = <span class="ruby-value str">''</span>
|
||||
261: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'GEM_HOME'</span>] = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">bundle_path</span>, <span class="ruby-identifier">root</span>)
|
||||
262: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">gem_dir</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">bundle_path</span>.<span class="ruby-identifier">to_s</span>
|
||||
263: <span class="ruby-identifier">possibles</span> = [<span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">gem_dir</span>, <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">gem_path</span>]
|
||||
264: <span class="ruby-identifier">paths</span> = <span class="ruby-identifier">possibles</span>.<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">uniq</span>.<span class="ruby-identifier">reject</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">empty?</span> }
|
||||
265: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"GEM_PATH"</span>] = <span class="ruby-identifier">paths</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">PATH_SEPARATOR</span>)
|
||||
266: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"GEM_HOME"</span>] = <span class="ruby-identifier">bundle_path</span>.<span class="ruby-identifier">to_s</span>
|
||||
267: <span class="ruby-keyword kw">end</span>
|
||||
268:
|
||||
269: <span class="ruby-comment cmt"># TODO: This mkdir_p is only needed for JRuby <= 1.5 and should go away (GH #602)</span>
|
||||
270: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span> <span class="ruby-identifier">bundle_path</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
|
||||
271:
|
||||
272: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">clear_paths</span>
|
||||
273: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1666,14 +1707,14 @@ versions of bundler and we are unsure how to handle this better.
|
|||
<div class="method-source-code"
|
||||
id="upgrade-lockfile-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 263</span>
|
||||
263: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">upgrade_lockfile</span>
|
||||
264: <span class="ruby-identifier">lockfile</span> = <span class="ruby-identifier">default_lockfile</span>
|
||||
265: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lockfile</span>.<span class="ruby-identifier">exist?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">lockfile</span>.<span class="ruby-identifier">read</span>(<span class="ruby-value">3</span>) <span class="ruby-operator">==</span> <span class="ruby-value str">"---"</span>
|
||||
266: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">"Detected Gemfile.lock generated by 0.9, deleting..."</span>
|
||||
267: <span class="ruby-identifier">lockfile</span>.<span class="ruby-identifier">rmtree</span>
|
||||
268: <span class="ruby-keyword kw">end</span>
|
||||
269: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 275</span>
|
||||
275: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">upgrade_lockfile</span>
|
||||
276: <span class="ruby-identifier">lockfile</span> = <span class="ruby-identifier">default_lockfile</span>
|
||||
277: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lockfile</span>.<span class="ruby-identifier">exist?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">lockfile</span>.<span class="ruby-identifier">read</span>(<span class="ruby-value">3</span>) <span class="ruby-operator">==</span> <span class="ruby-value str">"---"</span>
|
||||
278: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">"Detected Gemfile.lock generated by 0.9, deleting..."</span>
|
||||
279: <span class="ruby-identifier">lockfile</span>.<span class="ruby-identifier">rmtree</span>
|
||||
280: <span class="ruby-keyword kw">end</span>
|
||||
281: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -88,6 +88,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -197,16 +201,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
||||
|
@ -326,10 +342,10 @@
|
|||
<div class="method-source-code"
|
||||
id="status-code-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 32</span>
|
||||
32: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">status_code</span>(<span class="ruby-identifier">code</span> = <span class="ruby-keyword kw">nil</span>)
|
||||
33: <span class="ruby-identifier">define_method</span>(<span class="ruby-value">:status_code</span>) { <span class="ruby-identifier">code</span> }
|
||||
34: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler.rb, line 39</span>
|
||||
39: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">status_code</span>(<span class="ruby-identifier">code</span> = <span class="ruby-keyword kw">nil</span>)
|
||||
40: <span class="ruby-identifier">define_method</span>(<span class="ruby-value">:status_code</span>) { <span class="ruby-identifier">code</span> }
|
||||
41: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -139,6 +139,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -248,16 +252,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
||||
|
@ -377,14 +393,14 @@
|
|||
<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">"no-color"</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">"verbose"</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>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 11</span>
|
||||
11: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(*)
|
||||
12: <span class="ruby-keyword kw">super</span>
|
||||
13: <span class="ruby-identifier">the_shell</span> = (<span class="ruby-identifier">options</span>[<span class="ruby-value str">"no-color"</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>)
|
||||
14: <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>)
|
||||
15: <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">"verbose"</span>]
|
||||
16: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</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>)
|
||||
17: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -415,10 +431,10 @@
|
|||
<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>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 501</span>
|
||||
501: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">source_root</span>
|
||||
502: <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>))
|
||||
503: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -455,17 +471,17 @@
|
|||
<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">></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">"Run `bundle install` to install missing gems."</span>
|
||||
316: <span class="ruby-identifier">exit</span> <span class="ruby-value">128</span>
|
||||
317: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 307</span>
|
||||
307: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache</span>
|
||||
308: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">definition</span>.<span class="ruby-identifier">resolve_with_cache!</span>
|
||||
309: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load</span>.<span class="ruby-identifier">cache</span>
|
||||
310: <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 str">"no-prune"</span>]
|
||||
311: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load</span>.<span class="ruby-identifier">lock</span>
|
||||
312: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">GemNotFound</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
||||
313: <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>)
|
||||
314: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">"Run `bundle install` to install missing gems."</span>
|
||||
315: <span class="ruby-identifier">exit</span> <span class="ruby-value">128</span>
|
||||
316: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -496,27 +512,27 @@
|
|||
<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">"Your Gemfile's dependencies could not be satisfied"</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">"Install missing gems with `bundle install`"</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">"The following gems are missing"</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">" * #{s.name} (#{s.version})"</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">"Install missing gems with `bundle install`"</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">"The Gemfile's dependencies are satisfied"</span>
|
||||
117: <span class="ruby-keyword kw">end</span>
|
||||
118: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 97</span>
|
||||
97: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">check</span>
|
||||
98: <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>]
|
||||
99: <span class="ruby-keyword kw">begin</span>
|
||||
100: <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>
|
||||
101: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">GemNotFound</span>, <span class="ruby-constant">VersionConflict</span>
|
||||
102: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"Your Gemfile's dependencies could not be satisfied"</span>
|
||||
103: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">"Install missing gems with `bundle install`"</span>
|
||||
104: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
|
||||
105: <span class="ruby-keyword kw">end</span>
|
||||
106:
|
||||
107: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">not_installed</span>.<span class="ruby-identifier">any?</span>
|
||||
108: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span> <span class="ruby-value str">"The following gems are missing"</span>
|
||||
109: <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">" * #{s.name} (#{s.version})"</span> }
|
||||
110: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">"Install missing gems with `bundle install`"</span>
|
||||
111: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
|
||||
112: <span class="ruby-keyword kw">else</span>
|
||||
113: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load</span>.<span class="ruby-identifier">lock</span>
|
||||
114: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">"The Gemfile's dependencies are satisfied"</span>
|
||||
115: <span class="ruby-keyword kw">end</span>
|
||||
116: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -547,50 +563,50 @@
|
|||
<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">"Settings are listed in order of priority. The top value will be used.\n"</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">"#{setting}"</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">""</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">"Settings for `#{name}` in order of priority. The top value will be used"</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">"Your application has set #{name} to #{local.inspect}. This will override the "</span> <span class="ruby-value str">"system value you are currently setting"</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">"You are replacing the current system value of #{name}, which is currently #{global}"</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">"You have set a bundler environment variable for #{env}. This will take precedence "</span> <span class="ruby-value str">"over the system value you are setting"</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">" "</span>))
|
||||
411: <span class="ruby-keyword kw">end</span>
|
||||
412: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 369</span>
|
||||
369: <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>)
|
||||
370: <span class="ruby-identifier">values</span> = <span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">dup</span>
|
||||
371: <span class="ruby-identifier">values</span>.<span class="ruby-identifier">shift</span> <span class="ruby-comment cmt"># remove config</span>
|
||||
372: <span class="ruby-identifier">values</span>.<span class="ruby-identifier">shift</span> <span class="ruby-comment cmt"># remove the name</span>
|
||||
373:
|
||||
374: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">name</span>
|
||||
375: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-value str">"Settings are listed in order of priority. The top value will be used.\n"</span>
|
||||
376:
|
||||
377: <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>
|
||||
378: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-node">"#{setting}"</span>
|
||||
379: <span class="ruby-identifier">with_padding</span> <span class="ruby-keyword kw">do</span>
|
||||
380: <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>
|
||||
381: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-identifier">line</span>
|
||||
382: <span class="ruby-keyword kw">end</span>
|
||||
383: <span class="ruby-keyword kw">end</span>
|
||||
384: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-value str">""</span>
|
||||
385: <span class="ruby-keyword kw">end</span>
|
||||
386: <span class="ruby-keyword kw">return</span>
|
||||
387: <span class="ruby-keyword kw">end</span>
|
||||
388:
|
||||
389: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">values</span>.<span class="ruby-identifier">empty?</span>
|
||||
390: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-node">"Settings for `#{name}` in order of priority. The top value will be used"</span>
|
||||
391: <span class="ruby-identifier">with_padding</span> <span class="ruby-keyword kw">do</span>
|
||||
392: <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> }
|
||||
393: <span class="ruby-keyword kw">end</span>
|
||||
394: <span class="ruby-keyword kw">else</span>
|
||||
395: <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>)
|
||||
396:
|
||||
397: <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>]
|
||||
398: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Your application has set #{name} to #{local.inspect}. This will override the "</span> <span class="ruby-value str">"system value you are currently setting"</span>
|
||||
399: <span class="ruby-keyword kw">end</span>
|
||||
400:
|
||||
401: <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>]
|
||||
402: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"You are replacing the current system value of #{name}, which is currently #{global}"</span>
|
||||
403: <span class="ruby-keyword kw">end</span>
|
||||
404:
|
||||
405: <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>]
|
||||
406: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"You have set a bundler environment variable for #{env}. This will take precedence "</span> <span class="ruby-value str">"over the system value you are setting"</span>
|
||||
407: <span class="ruby-keyword kw">end</span>
|
||||
408:
|
||||
409: <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">" "</span>))
|
||||
410: <span class="ruby-keyword kw">end</span>
|
||||
411: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -621,15 +637,14 @@
|
|||
<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>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 431</span>
|
||||
431: <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>)
|
||||
432: <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-identifier">split</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> })) <span class="ruby-operator">:</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">require</span>
|
||||
433: <span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">clear</span>
|
||||
434:
|
||||
435: <span class="ruby-identifier">require</span> <span class="ruby-value str">'irb'</span>
|
||||
436: <span class="ruby-constant">IRB</span>.<span class="ruby-identifier">start</span>
|
||||
437: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -660,24 +675,24 @@
|
|||
<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">"exec"</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">"bundler: not executable: #{ARGV.first}"</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">"bundler: command not found: #{ARGV.first}"</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">"Install missing gem binaries with `bundle install`"</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>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 339</span>
|
||||
339: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">exec</span>(*)
|
||||
340: <span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">"exec"</span>)
|
||||
341:
|
||||
342: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">setup</span>
|
||||
343:
|
||||
344: <span class="ruby-keyword kw">begin</span>
|
||||
345: <span class="ruby-comment cmt"># Run</span>
|
||||
346: <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">exec</span>(*<span class="ruby-constant">ARGV</span>)
|
||||
347: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">EACCES</span>
|
||||
348: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">"bundler: not executable: #{ARGV.first}"</span>
|
||||
349: <span class="ruby-identifier">exit</span> <span class="ruby-value">126</span>
|
||||
350: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOENT</span>
|
||||
351: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">"bundler: command not found: #{ARGV.first}"</span>
|
||||
352: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">"Install missing gem binaries with `bundle install`"</span>
|
||||
353: <span class="ruby-identifier">exit</span> <span class="ruby-value">127</span>
|
||||
354: <span class="ruby-keyword kw">end</span>
|
||||
355: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -708,26 +723,30 @@
|
|||
<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">></span> <span class="ruby-identifier">name</span>, <span class="ruby-value">:constant_name</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">constant_name</span>, <span class="ruby-value">:constant_array</span> =<span class="ruby-operator">></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">"newgem/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>)
|
||||
487: <span class="ruby-identifier">template</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"newgem/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>)
|
||||
488: <span class="ruby-identifier">template</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"newgem/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>)
|
||||
489: <span class="ruby-identifier">template</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"newgem/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">"#{name}.gemspec"</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">"newgem/lib/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-node">"lib/#{name}.rb"</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">"newgem/lib/newgem/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-node">"lib/#{name}/version.rb"</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">"newgem/bin/newgem.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">'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">"Initializating git repo in #{target}"</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>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 477</span>
|
||||
477: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gem</span>(<span class="ruby-identifier">name</span>)
|
||||
478: <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>)
|
||||
479: <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>
|
||||
480: <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>
|
||||
481: <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>)
|
||||
482: <span class="ruby-identifier">git_author_name</span> = <span class="ruby-value">`git config user.name`</span>.<span class="ruby-identifier">chomp</span>
|
||||
483: <span class="ruby-identifier">git_author_email</span> = <span class="ruby-value">`git config user.email`</span>.<span class="ruby-identifier">chomp</span>
|
||||
484: <span class="ruby-identifier">author_name</span> = <span class="ruby-identifier">git_author_name</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">?</span> <span class="ruby-value str">"TODO: Write your name"</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">git_author_name</span>
|
||||
485: <span class="ruby-identifier">author_email</span> = <span class="ruby-identifier">git_author_email</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">?</span> <span class="ruby-value str">"TODO: Write your email address"</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">git_author_email</span>
|
||||
486: <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>))
|
||||
487: <span class="ruby-identifier">opts</span> = {<span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">name</span>, <span class="ruby-value">:constant_name</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">constant_name</span>, <span class="ruby-value">:constant_array</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">constant_array</span>, <span class="ruby-value">:author_name</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">author_name</span>, <span class="ruby-value">:author_email</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">author_email</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">"newgem/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>)
|
||||
489: <span class="ruby-identifier">template</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"newgem/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>)
|
||||
490: <span class="ruby-identifier">template</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"newgem/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>)
|
||||
491: <span class="ruby-identifier">template</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"newgem/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">"#{name}.gemspec"</span>), <span class="ruby-identifier">opts</span>)
|
||||
492: <span class="ruby-identifier">template</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"newgem/lib/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-node">"lib/#{name}.rb"</span>), <span class="ruby-identifier">opts</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">"newgem/lib/newgem/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-node">"lib/#{name}/version.rb"</span>), <span class="ruby-identifier">opts</span>)
|
||||
494: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:bin</span>]
|
||||
495: <span class="ruby-identifier">template</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"newgem/bin/newgem.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">'bin'</span>, <span class="ruby-identifier">name</span>), <span class="ruby-identifier">opts</span>)
|
||||
496: <span class="ruby-keyword kw">end</span>
|
||||
497: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Initializating git repo in #{target}"</span>
|
||||
498: <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> }
|
||||
499: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -758,38 +777,38 @@
|
|||
<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">"gemfile"</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">command</span> = <span class="ruby-value str">"gemfile.5"</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">"bundle"</span>
|
||||
31: <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">command</span> = <span class="ruby-node">"bundle-#{cli}"</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">"../man"</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">&&</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">"groff -Wall -mtty-char -mandoc -Tascii"</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">"#{groff} #{root}/#{command} | #{pager}"</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">"#{root}/#{command}.txt"</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>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 25</span>
|
||||
25: <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>)
|
||||
26: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">cli</span>
|
||||
27: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"gemfile"</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">command</span> = <span class="ruby-value str">"gemfile.5"</span>
|
||||
28: <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">"bundle"</span>
|
||||
29: <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">command</span> = <span class="ruby-node">"bundle-#{cli}"</span>
|
||||
30: <span class="ruby-keyword kw">end</span>
|
||||
31:
|
||||
32: <span class="ruby-identifier">manpages</span> = <span class="ruby-node">%(
|
||||
33: bundle
|
||||
34: bundle-config
|
||||
35: bundle-exec
|
||||
36: bundle-install
|
||||
37: bundle-package
|
||||
38: bundle-update
|
||||
39: gemfile.5)</span>
|
||||
40:
|
||||
41: <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>)
|
||||
42: <span class="ruby-identifier">root</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-value str">"../man"</span>, <span class="ruby-keyword kw">__FILE__</span>)
|
||||
43:
|
||||
44: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">have_groff?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">root</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">%{^file:/.+!/META-INF/jruby.home/.+}</span>
|
||||
45: <span class="ruby-identifier">groff</span> = <span class="ruby-value str">"groff -Wall -mtty-char -mandoc -Tascii"</span>
|
||||
46: <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">'less -R'</span>
|
||||
47:
|
||||
48: <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">exec</span> <span class="ruby-node">"#{groff} #{root}/#{command} | #{pager}"</span>
|
||||
49: <span class="ruby-keyword kw">else</span>
|
||||
50: <span class="ruby-identifier">puts</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-node">"#{root}/#{command}.txt"</span>)
|
||||
51: <span class="ruby-keyword kw">end</span>
|
||||
52: <span class="ruby-keyword kw">else</span>
|
||||
53: <span class="ruby-keyword kw">super</span>
|
||||
54: <span class="ruby-keyword kw">end</span>
|
||||
55: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -820,31 +839,31 @@
|
|||
<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">"Gemfile"</span>)
|
||||
69: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">"Gemfile already exists at #{Dir.pwd}/Gemfile"</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">"Gem specification #{gemspec} doesn't exist"</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">"Writing new Gemfile to #{Dir.pwd}/Gemfile"</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"><<</span> <span class="ruby-node">"# Generated from #{gemspec}\n"</span>
|
||||
83: <span class="ruby-identifier">file</span> <span class="ruby-operator"><<</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">"Writing new Gemfile to #{Dir.pwd}/Gemfile"</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>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 64</span>
|
||||
64: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init</span>
|
||||
65: <span class="ruby-identifier">opts</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">dup</span>
|
||||
66: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-value str">"Gemfile"</span>)
|
||||
67: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">"Gemfile already exists at #{Dir.pwd}/Gemfile"</span>
|
||||
68: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
|
||||
69: <span class="ruby-keyword kw">end</span>
|
||||
70:
|
||||
71: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:gemspec</span>]
|
||||
72: <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>])
|
||||
73: <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>)
|
||||
74: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">"Gem specification #{gemspec} doesn't exist"</span>
|
||||
75: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
|
||||
76: <span class="ruby-keyword kw">end</span>
|
||||
77: <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>)
|
||||
78: <span class="ruby-identifier">puts</span> <span class="ruby-node">"Writing new Gemfile to #{Dir.pwd}/Gemfile"</span>
|
||||
79: <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>
|
||||
80: <span class="ruby-identifier">file</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"# Generated from #{gemspec}\n"</span>
|
||||
81: <span class="ruby-identifier">file</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">to_gemfile</span>
|
||||
82: <span class="ruby-keyword kw">end</span>
|
||||
83: <span class="ruby-keyword kw">else</span>
|
||||
84: <span class="ruby-identifier">puts</span> <span class="ruby-node">"Writing new Gemfile to #{Dir.pwd}/Gemfile"</span>
|
||||
85: <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>)
|
||||
86: <span class="ruby-keyword kw">end</span>
|
||||
87: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -875,93 +894,94 @@
|
|||
<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">" "</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> }
|
||||
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 153</span>
|
||||
153: <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>)
|
||||
154: <span class="ruby-identifier">opts</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">dup</span>
|
||||
155: <span class="ruby-identifier">opts</span>[<span class="ruby-value">:without</span>] <span class="ruby-operator">||=</span> []
|
||||
156: <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>
|
||||
157: <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">" "</span>) }
|
||||
158: <span class="ruby-identifier">opts</span>[<span class="ruby-value">:without</span>].<span class="ruby-identifier">flatten!</span>
|
||||
159: <span class="ruby-keyword kw">end</span>
|
||||
160: <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> }
|
||||
161:
|
||||
162: <span class="ruby-comment cmt"># Can't use Bundler.settings for this because settings needs gemfile.dirname</span>
|
||||
163: <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>]
|
||||
164: <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>
|
||||
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>
|
||||
166: <span class="ruby-comment cmt"># Just disable color in deployment mode</span>
|
||||
167: <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>]
|
||||
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">"The --production option is deprecated, and will be removed in "</span> <span class="ruby-value str">"the final release of Bundler 1.0. Please use --deployment instead."</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">&&</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">"You have specified both a path to install your gems to, \n"</span> <span class="ruby-value str">"as well as --system. Please choose."</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">&&</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">"You have specified a path via `bundle install #{path}` as well as\n"</span> <span class="ruby-node">"by `bundle install --path #{options[:path]}`. These options are\n"</span> <span class="ruby-value str">"equivalent, so please use one or the other."</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">"disable-shared-gems"</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">"The disable-shared-gem option is no longer available.\n\n"</span> <span class="ruby-value str">"Instead, use `bundle install` to install to your system,\n"</span> <span class="ruby-value str">"or `bundle install --path path/to/gems` to install to an isolated\n"</span> <span class="ruby-value str">"location. Bundler will resolve relative paths relative to\n"</span> <span class="ruby-value str">"your `Gemfile`."</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">"The #{flag} flag requires a Gemfile.lock. Please make "</span> <span class="ruby-value str">"sure you have checked your Gemfile.lock into version control "</span> <span class="ruby-value str">"before deploying."</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">"vendor/cache"</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">"vendor/bundle"</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">"binstubs"</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">"vendor/cache"</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">"./"</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>
|
||||
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">&&</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">"You have specified both a path to install your gems to, \n"</span> <span class="ruby-value str">"as well as --system. Please choose."</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">&&</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">"You have specified a path via `bundle install #{path}` as well as\n"</span> <span class="ruby-node">"by `bundle install --path #{options[:path]}`. These options are\n"</span> <span class="ruby-value str">"equivalent, so please use one or the other."</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">"disable-shared-gems"</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">"The disable-shared-gem option is no longer available.\n\n"</span> <span class="ruby-value str">"Instead, use `bundle install` to install to your system,\n"</span> <span class="ruby-value str">"or `bundle install --path path/to/gems` to install to an isolated\n"</span> <span class="ruby-value str">"location. Bundler will resolve relative paths relative to\n"</span> <span class="ruby-value str">"your `Gemfile`."</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-keyword kw">unless</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">default_lockfile</span>.<span class="ruby-identifier">exist?</span>
|
||||
186: <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>
|
||||
187: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ProductionError</span>, <span class="ruby-node">"The #{flag} flag requires a Gemfile.lock. Please make "</span> <span class="ruby-value str">"sure you have checked your Gemfile.lock into version control "</span> <span class="ruby-value str">"before deploying."</span>
|
||||
188: <span class="ruby-keyword kw">end</span>
|
||||
189:
|
||||
190: <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">"vendor/cache"</span>).<span class="ruby-identifier">exist?</span>
|
||||
191: <span class="ruby-identifier">opts</span>[<span class="ruby-value">:local</span>] = <span class="ruby-keyword kw">true</span>
|
||||
192: <span class="ruby-keyword kw">end</span>
|
||||
193:
|
||||
194: <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>
|
||||
195: <span class="ruby-keyword kw">end</span>
|
||||
196:
|
||||
197: <span class="ruby-comment cmt"># When install is called with --no-deployment, disable deployment mode</span>
|
||||
198: <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-keyword kw">false</span>
|
||||
199: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:frozen</span>)
|
||||
200: <span class="ruby-identifier">opts</span>[<span class="ruby-value">:system</span>] = <span class="ruby-keyword kw">true</span>
|
||||
201: <span class="ruby-keyword kw">end</span>
|
||||
202:
|
||||
203: <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>]
|
||||
204: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:path</span>] = <span class="ruby-value str">"vendor/bundle"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:deployment</span>]
|
||||
205: <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>
|
||||
206: <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>]
|
||||
207: <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">"binstubs"</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:binstubs</span>]
|
||||
208: <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">opts</span>[<span class="ruby-value str">"no-prune"</span>]
|
||||
209: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:disable_shared_gems</span>] = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:path</span>] <span class="ruby-operator">?</span> <span class="ruby-value str">'1'</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>
|
||||
210: <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>
|
||||
211: <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>]
|
||||
212:
|
||||
213: <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>)
|
||||
214: <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">"vendor/cache"</span>).<span class="ruby-identifier">exist?</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">options</span>[<span class="ruby-value str">"no-cache"</span>]
|
||||
215:
|
||||
216: <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>]
|
||||
217: <span class="ruby-identifier">relative_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:path</span>]).<span class="ruby-identifier">sub</span>(<span class="ruby-node">/^#{File.expand_path('.')}/</span>, <span class="ruby-value str">'.'</span>)
|
||||
218: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-value str">"Your bundle is complete! "</span> <span class="ruby-operator">+</span>
|
||||
219: <span class="ruby-node">"It was installed into #{relative_path}"</span>
|
||||
220: <span class="ruby-keyword kw">else</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">"Your bundle is complete! "</span> <span class="ruby-operator">+</span>
|
||||
222: <span class="ruby-node">"It was installed into #{relative_path}"</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">"Your bundle is complete! "</span> <span class="ruby-operator">+</span>
|
||||
225: <span class="ruby-value str">"Use `bundle show [gemname]` to see where a bundled gem is installed."</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">"The path argument to `bundle install` is deprecated. "</span> <span class="ruby-operator">+</span>
|
||||
230: <span class="ruby-value str">"It will be removed in version 1.1. "</span> <span class="ruby-operator">+</span>
|
||||
231: <span class="ruby-node">"Please use `bundle install --path #{path}` instead."</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">></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">"Some gems seem to be missing from your vendor/cache directory."</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">"Your Gemfile doesn't have any sources. You can add one with a line like 'source :rubygems'"</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>
|
||||
222: <span class="ruby-value str">"Use `bundle show [gemname]` to see where a bundled gem is installed."</span>
|
||||
223: <span class="ruby-keyword kw">end</span>
|
||||
224:
|
||||
225: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">path</span>
|
||||
226: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">"The path argument to `bundle install` is deprecated. "</span> <span class="ruby-operator">+</span>
|
||||
227: <span class="ruby-value str">"It will be removed in version 1.1. "</span> <span class="ruby-operator">+</span>
|
||||
228: <span class="ruby-node">"Please use `bundle install --path #{path}` instead."</span>
|
||||
229: <span class="ruby-keyword kw">end</span>
|
||||
230: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">GemNotFound</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
||||
231: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:local</span>] <span class="ruby-operator">&&</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">app_cache</span>.<span class="ruby-identifier">exist?</span>
|
||||
232: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">"Some gems seem to be missing from your vendor/cache directory."</span>
|
||||
233: <span class="ruby-keyword kw">end</span>
|
||||
234:
|
||||
235: <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>
|
||||
236: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">"Your Gemfile doesn't have any sources. You can add one with a line like 'source :rubygems'"</span>
|
||||
237: <span class="ruby-keyword kw">end</span>
|
||||
238: <span class="ruby-identifier">raise</span> <span class="ruby-identifier">e</span>
|
||||
239: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -992,10 +1012,10 @@
|
|||
<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">"Lock is deprecated. Your bundle is now locked whenever you run `bundle install`."</span>
|
||||
280: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 277</span>
|
||||
277: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">lock</span>
|
||||
278: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">"Lock is deprecated. Your bundle is now locked whenever you run `bundle install`."</span>
|
||||
279: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1026,20 +1046,20 @@
|
|||
<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">&&</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">"#{editor} #{gem_path}"</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">"Could not run '#{command}'"</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">"To open a bundled gem, set $EDITOR or $BUNDLER_EDITOR"</span>)
|
||||
428: <span class="ruby-keyword kw">end</span>
|
||||
429: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 416</span>
|
||||
416: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">open</span>(<span class="ruby-identifier">name</span>)
|
||||
417: <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">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">e</span>.<span class="ruby-identifier">empty?</span> }
|
||||
418: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">editor</span>
|
||||
419: <span class="ruby-identifier">gem_path</span> = <span class="ruby-identifier">locate_gem</span>(<span class="ruby-identifier">name</span>)
|
||||
420: <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>
|
||||
421: <span class="ruby-identifier">command</span> = <span class="ruby-node">"#{editor} #{gem_path}"</span>
|
||||
422: <span class="ruby-identifier">success</span> = <span class="ruby-identifier">system</span>(<span class="ruby-identifier">command</span>)
|
||||
423: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Could not run '#{command}'"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">success</span>
|
||||
424: <span class="ruby-keyword kw">end</span>
|
||||
425: <span class="ruby-keyword kw">else</span>
|
||||
426: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span>(<span class="ruby-value str">"To open a bundled gem, set $EDITOR or $BUNDLER_EDITOR"</span>)
|
||||
427: <span class="ruby-keyword kw">end</span>
|
||||
428: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1070,12 +1090,12 @@
|
|||
<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>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 326</span>
|
||||
326: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">package</span>
|
||||
327: <span class="ruby-identifier">install</span>
|
||||
328: <span class="ruby-comment cmt"># TODO: move cache contents here now that all bundles are locked</span>
|
||||
329: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load</span>.<span class="ruby-identifier">cache</span>
|
||||
330: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1106,19 +1126,19 @@
|
|||
<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">"Gems included by the bundle:"</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">" * #{s.name} (#{s.version}#{s.git_version})"</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>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 291</span>
|
||||
291: <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>)
|
||||
292: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load</span>.<span class="ruby-identifier">lock</span>
|
||||
293:
|
||||
294: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">gem_name</span>
|
||||
295: <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>)
|
||||
296: <span class="ruby-keyword kw">else</span>
|
||||
297: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">"Gems included by the bundle:"</span>
|
||||
298: <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>
|
||||
299: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">" * #{s.name} (#{s.version}#{s.git_version})"</span>
|
||||
300: <span class="ruby-keyword kw">end</span>
|
||||
301: <span class="ruby-keyword kw">end</span>
|
||||
302: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1149,10 +1169,10 @@
|
|||
<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">"Unlock is deprecated. To update to newer gem versions, use `bundle update`."</span>
|
||||
285: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 282</span>
|
||||
282: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unlock</span>
|
||||
283: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">"Unlock is deprecated. To update to newer gem versions, use `bundle update`."</span>
|
||||
284: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1183,22 +1203,23 @@
|
|||
<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">&&</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">></span> <span class="ruby-identifier">gems</span>, <span class="ruby-value">:sources</span> =<span class="ruby-operator">></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">"update"</span> =<span class="ruby-operator">></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">"vendor/cache"</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">"Your bundle is updated! "</span> <span class="ruby-operator">+</span>
|
||||
274: <span class="ruby-value str">"Use `bundle show [gemname]` to see where a bundled gem is installed."</span>
|
||||
275: <span class="ruby-keyword kw">end</span></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">update</span>(*<span class="ruby-identifier">gems</span>)
|
||||
260: <span class="ruby-identifier">sources</span> = <span class="ruby-constant">Array</span>(<span class="ruby-identifier">options</span>[<span class="ruby-value">:source</span>])
|
||||
261:
|
||||
262: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">gems</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">sources</span>.<span class="ruby-identifier">empty?</span>
|
||||
263: <span class="ruby-comment cmt"># We're doing a full update</span>
|
||||
264: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">definition</span>(<span class="ruby-keyword kw">true</span>)
|
||||
265: <span class="ruby-keyword kw">else</span>
|
||||
266: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">definition</span>(<span class="ruby-value">:gems</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">gems</span>, <span class="ruby-value">:sources</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">sources</span>)
|
||||
267: <span class="ruby-keyword kw">end</span>
|
||||
268:
|
||||
269: <span class="ruby-identifier">opts</span> = {<span class="ruby-value str">"update"</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span>, <span class="ruby-value str">"local"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:local</span>]}
|
||||
270: <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>
|
||||
271: <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">"vendor/cache"</span>).<span class="ruby-identifier">exist?</span>
|
||||
272: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-value str">"Your bundle is updated! "</span> <span class="ruby-operator">+</span>
|
||||
273: <span class="ruby-value str">"Use `bundle show [gemname]` to see where a bundled gem is installed."</span>
|
||||
274: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1229,10 +1250,10 @@
|
|||
<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">"Bundler version #{Bundler::VERSION}"</span>
|
||||
444: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 440</span>
|
||||
440: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">version</span>
|
||||
441: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Bundler version #{Bundler::VERSION}"</span>
|
||||
442: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1263,27 +1284,27 @@
|
|||
<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">></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">"Make sure you have the graphviz ruby gem. You can install it with:"</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">"`gem install ruby-graphviz`"</span>
|
||||
467: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">StandardError</span> =<span class="ruby-operator">></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">"The ruby graphviz gem requires GraphViz to be installed"</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>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 454</span>
|
||||
454: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">viz</span>
|
||||
455: <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>])
|
||||
456: <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> )
|
||||
457:
|
||||
458: <span class="ruby-keyword kw">begin</span>
|
||||
459: <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>])
|
||||
460: <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>
|
||||
461: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">LoadError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
||||
462: <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>
|
||||
463: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">"Make sure you have the graphviz ruby gem. You can install it with:"</span>
|
||||
464: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">"`gem install ruby-graphviz`"</span>
|
||||
465: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">StandardError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
||||
466: <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>
|
||||
467: <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>
|
||||
468: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">"The ruby graphviz gem requires GraphViz to be installed"</span>
|
||||
469: <span class="ruby-keyword kw">else</span>
|
||||
470: <span class="ruby-identifier">raise</span>
|
||||
471: <span class="ruby-keyword kw">end</span>
|
||||
472: <span class="ruby-keyword kw">end</span>
|
||||
473: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1320,10 +1341,10 @@
|
|||
<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>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 507</span>
|
||||
507: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">have_groff?</span>
|
||||
508: <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>
|
||||
509: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1354,15 +1375,15 @@
|
|||
<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">"Could not find gem '#{name}' in the current bundle."</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>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/cli.rb, line 511</span>
|
||||
511: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">locate_gem</span>(<span class="ruby-identifier">name</span>)
|
||||
512: <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> }
|
||||
513: <span class="ruby-identifier">raise</span> <span class="ruby-constant">GemNotFound</span>, <span class="ruby-node">"Could not find gem '#{name}' in the current bundle."</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">spec</span>
|
||||
514: <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>
|
||||
515: <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>)
|
||||
516: <span class="ruby-keyword kw">end</span>
|
||||
517: <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">full_gem_path</span>
|
||||
518: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -157,6 +157,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -266,16 +270,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
||||
|
@ -520,7 +536,7 @@
|
|||
61: <span class="ruby-ivar">@unlock</span>[<span class="ruby-value">:gems</span>] <span class="ruby-operator">||=</span> []
|
||||
62: <span class="ruby-ivar">@unlock</span>[<span class="ruby-value">:sources</span>] <span class="ruby-operator">||=</span> []
|
||||
63:
|
||||
64: <span class="ruby-identifier">current_platform</span> = <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">platforms</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">generic</span>(<span class="ruby-identifier">p</span>) }.<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">last</span>
|
||||
64: <span class="ruby-identifier">current_platform</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">platforms</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">generic</span>(<span class="ruby-identifier">p</span>) }.<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">last</span>
|
||||
65: <span class="ruby-ivar">@new_platform</span> = <span class="ruby-operator">!</span><span class="ruby-ivar">@platforms</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">current_platform</span>)
|
||||
66: <span class="ruby-ivar">@platforms</span> <span class="ruby-operator">|=</span> [<span class="ruby-identifier">current_platform</span>]
|
||||
67:
|
||||
|
@ -586,7 +602,7 @@
|
|||
<div class="method-heading">
|
||||
|
||||
<span class="method-name">ensure_equivalent_gemfile_and_lockfile</span><span
|
||||
class="method-args">()</span>
|
||||
class="method-args">(explicit_flag = false)</span>
|
||||
<span class="method-click-advice">click to toggle source</span>
|
||||
|
||||
</div>
|
||||
|
@ -601,60 +617,65 @@
|
|||
id="ensure-equivalent-gemfile-and-lockfile-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/definition.rb, line 238</span>
|
||||
238: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ensure_equivalent_gemfile_and_lockfile</span>
|
||||
238: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ensure_equivalent_gemfile_and_lockfile</span>(<span class="ruby-identifier">explicit_flag</span> = <span class="ruby-keyword kw">false</span>)
|
||||
239: <span class="ruby-identifier">changes</span> = <span class="ruby-keyword kw">false</span>
|
||||
240:
|
||||
241: <span class="ruby-identifier">msg</span> = <span class="ruby-value str">"You have modified your Gemfile in development but did not check\n"</span> <span class="ruby-value str">"the resulting snapshot (Gemfile.lock) into version control"</span>
|
||||
241: <span class="ruby-identifier">msg</span> = <span class="ruby-value str">"You are trying to install in deployment mode after changing\n"</span> <span class="ruby-value str">"your Gemfile. Run `bundle install` elsewhere and add the\n"</span> <span class="ruby-value str">"updated Gemfile.lock to version control."</span>
|
||||
242:
|
||||
243: <span class="ruby-identifier">added</span> = []
|
||||
244: <span class="ruby-identifier">deleted</span> = []
|
||||
245: <span class="ruby-identifier">changed</span> = []
|
||||
243: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">explicit_flag</span>
|
||||
244: <span class="ruby-identifier">msg</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"\n\nIf this is a development machine, remove the Gemfile "</span> <span class="ruby-value str">"freeze \nby running `bundle install --no-deployment`."</span>
|
||||
245: <span class="ruby-keyword kw">end</span>
|
||||
246:
|
||||
247: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@locked_sources</span> <span class="ruby-operator">!=</span> <span class="ruby-ivar">@sources</span>
|
||||
248: <span class="ruby-identifier">new_sources</span> = <span class="ruby-ivar">@sources</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@locked_sources</span>
|
||||
249: <span class="ruby-identifier">deleted_sources</span> = <span class="ruby-ivar">@locked_sources</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@sources</span>
|
||||
247: <span class="ruby-identifier">added</span> = []
|
||||
248: <span class="ruby-identifier">deleted</span> = []
|
||||
249: <span class="ruby-identifier">changed</span> = []
|
||||
250:
|
||||
251: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">new_sources</span>.<span class="ruby-identifier">any?</span>
|
||||
252: <span class="ruby-identifier">added</span>.<span class="ruby-identifier">concat</span> <span class="ruby-identifier">new_sources</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">source</span><span class="ruby-operator">|</span> <span class="ruby-node">"* source: #{source}"</span> }
|
||||
253: <span class="ruby-keyword kw">end</span>
|
||||
251: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@locked_sources</span> <span class="ruby-operator">!=</span> <span class="ruby-ivar">@sources</span>
|
||||
252: <span class="ruby-identifier">new_sources</span> = <span class="ruby-ivar">@sources</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@locked_sources</span>
|
||||
253: <span class="ruby-identifier">deleted_sources</span> = <span class="ruby-ivar">@locked_sources</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@sources</span>
|
||||
254:
|
||||
255: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">deleted_sources</span>.<span class="ruby-identifier">any?</span>
|
||||
256: <span class="ruby-identifier">deleted</span>.<span class="ruby-identifier">concat</span> <span class="ruby-identifier">deleted_sources</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">source</span><span class="ruby-operator">|</span> <span class="ruby-node">"* source: #{source}"</span> }
|
||||
255: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">new_sources</span>.<span class="ruby-identifier">any?</span>
|
||||
256: <span class="ruby-identifier">added</span>.<span class="ruby-identifier">concat</span> <span class="ruby-identifier">new_sources</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">source</span><span class="ruby-operator">|</span> <span class="ruby-node">"* source: #{source}"</span> }
|
||||
257: <span class="ruby-keyword kw">end</span>
|
||||
258:
|
||||
259: <span class="ruby-identifier">changes</span> = <span class="ruby-keyword kw">true</span>
|
||||
260: <span class="ruby-keyword kw">end</span>
|
||||
261:
|
||||
262: <span class="ruby-identifier">both_sources</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">h</span>,<span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">k</span>] = [<span class="ruby-value str">"no specified source"</span>, <span class="ruby-value str">"no specified source"</span>] }
|
||||
263: <span class="ruby-ivar">@dependencies</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-identifier">both_sources</span>[<span class="ruby-identifier">d</span>.<span class="ruby-identifier">name</span>][<span class="ruby-value">0</span>] = <span class="ruby-identifier">d</span>.<span class="ruby-identifier">source</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">source</span> }
|
||||
264: <span class="ruby-ivar">@locked_deps</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-identifier">both_sources</span>[<span class="ruby-identifier">d</span>.<span class="ruby-identifier">name</span>][<span class="ruby-value">1</span>] = <span class="ruby-identifier">d</span>.<span class="ruby-identifier">source</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">source</span> }
|
||||
265: <span class="ruby-identifier">both_sources</span>.<span class="ruby-identifier">delete_if</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">v</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">v</span>[<span class="ruby-value">1</span>] }
|
||||
266:
|
||||
267: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@dependencies</span> <span class="ruby-operator">!=</span> <span class="ruby-ivar">@locked_deps</span>
|
||||
268: <span class="ruby-identifier">new_deps</span> = <span class="ruby-ivar">@dependencies</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@locked_deps</span>
|
||||
269: <span class="ruby-identifier">deleted_deps</span> = <span class="ruby-ivar">@locked_deps</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@dependencies</span>
|
||||
259: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">deleted_sources</span>.<span class="ruby-identifier">any?</span>
|
||||
260: <span class="ruby-identifier">deleted</span>.<span class="ruby-identifier">concat</span> <span class="ruby-identifier">deleted_sources</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">source</span><span class="ruby-operator">|</span> <span class="ruby-node">"* source: #{source}"</span> }
|
||||
261: <span class="ruby-keyword kw">end</span>
|
||||
262:
|
||||
263: <span class="ruby-identifier">changes</span> = <span class="ruby-keyword kw">true</span>
|
||||
264: <span class="ruby-keyword kw">end</span>
|
||||
265:
|
||||
266: <span class="ruby-identifier">both_sources</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">h</span>,<span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">k</span>] = [<span class="ruby-value str">"no specified source"</span>, <span class="ruby-value str">"no specified source"</span>] }
|
||||
267: <span class="ruby-ivar">@dependencies</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-identifier">both_sources</span>[<span class="ruby-identifier">d</span>.<span class="ruby-identifier">name</span>][<span class="ruby-value">0</span>] = <span class="ruby-identifier">d</span>.<span class="ruby-identifier">source</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">source</span> }
|
||||
268: <span class="ruby-ivar">@locked_deps</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-identifier">both_sources</span>[<span class="ruby-identifier">d</span>.<span class="ruby-identifier">name</span>][<span class="ruby-value">1</span>] = <span class="ruby-identifier">d</span>.<span class="ruby-identifier">source</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">source</span> }
|
||||
269: <span class="ruby-identifier">both_sources</span>.<span class="ruby-identifier">delete_if</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">v</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">v</span>[<span class="ruby-value">1</span>] }
|
||||
270:
|
||||
271: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">new_deps</span>.<span class="ruby-identifier">any?</span>
|
||||
272: <span class="ruby-identifier">added</span>.<span class="ruby-identifier">concat</span> <span class="ruby-identifier">new_deps</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-node">"* #{pretty_dep(d)}"</span> }
|
||||
273: <span class="ruby-keyword kw">end</span>
|
||||
271: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@dependencies</span> <span class="ruby-operator">!=</span> <span class="ruby-ivar">@locked_deps</span>
|
||||
272: <span class="ruby-identifier">new_deps</span> = <span class="ruby-ivar">@dependencies</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@locked_deps</span>
|
||||
273: <span class="ruby-identifier">deleted_deps</span> = <span class="ruby-ivar">@locked_deps</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@dependencies</span>
|
||||
274:
|
||||
275: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">deleted_deps</span>.<span class="ruby-identifier">any?</span>
|
||||
276: <span class="ruby-identifier">deleted</span>.<span class="ruby-identifier">concat</span> <span class="ruby-identifier">deleted_deps</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-node">"* #{pretty_dep(d)}"</span> }
|
||||
275: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">new_deps</span>.<span class="ruby-identifier">any?</span>
|
||||
276: <span class="ruby-identifier">added</span>.<span class="ruby-identifier">concat</span> <span class="ruby-identifier">new_deps</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-node">"* #{pretty_dep(d)}"</span> }
|
||||
277: <span class="ruby-keyword kw">end</span>
|
||||
278:
|
||||
279: <span class="ruby-identifier">both_sources</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">sources</span><span class="ruby-operator">|</span>
|
||||
280: <span class="ruby-identifier">changed</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"* #{name} from `#{sources[0]}` to `#{sources[1]}`"</span>
|
||||
279: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">deleted_deps</span>.<span class="ruby-identifier">any?</span>
|
||||
280: <span class="ruby-identifier">deleted</span>.<span class="ruby-identifier">concat</span> <span class="ruby-identifier">deleted_deps</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-node">"* #{pretty_dep(d)}"</span> }
|
||||
281: <span class="ruby-keyword kw">end</span>
|
||||
282:
|
||||
283: <span class="ruby-identifier">changes</span> = <span class="ruby-keyword kw">true</span>
|
||||
284: <span class="ruby-keyword kw">end</span>
|
||||
285:
|
||||
286: <span class="ruby-identifier">msg</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n\nYou have added to the Gemfile:\n"</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">added</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"\n"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">added</span>.<span class="ruby-identifier">any?</span>
|
||||
287: <span class="ruby-identifier">msg</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n\nYou have deleted from the Gemfile:\n"</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">deleted</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"\n"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">deleted</span>.<span class="ruby-identifier">any?</span>
|
||||
288: <span class="ruby-identifier">msg</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n\nYou have changed in the Gemfile:\n"</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">changed</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"\n"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">changed</span>.<span class="ruby-identifier">any?</span>
|
||||
283: <span class="ruby-identifier">both_sources</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">sources</span><span class="ruby-operator">|</span>
|
||||
284: <span class="ruby-identifier">changed</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"* #{name} from `#{sources[0]}` to `#{sources[1]}`"</span>
|
||||
285: <span class="ruby-keyword kw">end</span>
|
||||
286:
|
||||
287: <span class="ruby-identifier">changes</span> = <span class="ruby-keyword kw">true</span>
|
||||
288: <span class="ruby-keyword kw">end</span>
|
||||
289:
|
||||
290: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ProductionError</span>, <span class="ruby-identifier">msg</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">added</span>.<span class="ruby-identifier">any?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">deleted</span>.<span class="ruby-identifier">any?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">changed</span>.<span class="ruby-identifier">any?</span>
|
||||
291: <span class="ruby-keyword kw">end</span></pre>
|
||||
290: <span class="ruby-identifier">msg</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n\nYou have added to the Gemfile:\n"</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">added</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"\n"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">added</span>.<span class="ruby-identifier">any?</span>
|
||||
291: <span class="ruby-identifier">msg</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n\nYou have deleted from the Gemfile:\n"</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">deleted</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"\n"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">deleted</span>.<span class="ruby-identifier">any?</span>
|
||||
292: <span class="ruby-identifier">msg</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n\nYou have changed in the Gemfile:\n"</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">changed</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"\n"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">changed</span>.<span class="ruby-identifier">any?</span>
|
||||
293: <span class="ruby-identifier">msg</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n"</span>
|
||||
294:
|
||||
295: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ProductionError</span>, <span class="ruby-identifier">msg</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">added</span>.<span class="ruby-identifier">any?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">deleted</span>.<span class="ruby-identifier">any?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">changed</span>.<span class="ruby-identifier">any?</span>
|
||||
296: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1285,7 +1306,7 @@
|
|||
225:
|
||||
226: <span class="ruby-identifier">handled</span> = []
|
||||
227: <span class="ruby-identifier">dependencies</span>.
|
||||
228: <span class="ruby-identifier">sort_by</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">name</span> }.
|
||||
228: <span class="ruby-identifier">sort_by</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">to_s</span> }.
|
||||
229: <span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dep</span><span class="ruby-operator">|</span>
|
||||
230: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">handled</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">dep</span>.<span class="ruby-identifier">name</span>)
|
||||
231: <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">to_lock</span>
|
||||
|
@ -1330,14 +1351,14 @@
|
|||
<div class="method-source-code"
|
||||
id="converge-dependencies-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/definition.rb, line 320</span>
|
||||
320: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">converge_dependencies</span>
|
||||
321: (<span class="ruby-ivar">@dependencies</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@locked_deps</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dep</span><span class="ruby-operator">|</span>
|
||||
322: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span>
|
||||
323: <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span> = <span class="ruby-ivar">@sources</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">dep</span>.<span class="ruby-identifier">source</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">s</span> }
|
||||
324: <span class="ruby-keyword kw">end</span>
|
||||
325: <span class="ruby-keyword kw">end</span>
|
||||
326: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/definition.rb, line 327</span>
|
||||
327: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">converge_dependencies</span>
|
||||
328: (<span class="ruby-ivar">@dependencies</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@locked_deps</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dep</span><span class="ruby-operator">|</span>
|
||||
329: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span>
|
||||
330: <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span> = <span class="ruby-ivar">@sources</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">dep</span>.<span class="ruby-identifier">source</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">s</span> }
|
||||
331: <span class="ruby-keyword kw">end</span>
|
||||
332: <span class="ruby-keyword kw">end</span>
|
||||
333: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1372,68 +1393,70 @@ generated
|
|||
<div class="method-source-code"
|
||||
id="converge-locked-specs-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/definition.rb, line 331</span>
|
||||
331: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">converge_locked_specs</span>
|
||||
332: <span class="ruby-identifier">deps</span> = []
|
||||
333:
|
||||
334: <span class="ruby-comment cmt"># Build a list of dependencies that are the same in the Gemfile</span>
|
||||
335: <span class="ruby-comment cmt"># and Gemfile.lock. If the Gemfile modified a dependency, but</span>
|
||||
336: <span class="ruby-comment cmt"># the gem in the Gemfile.lock still satisfies it, this is fine</span>
|
||||
337: <span class="ruby-comment cmt"># too.</span>
|
||||
338: <span class="ruby-ivar">@dependencies</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dep</span><span class="ruby-operator">|</span>
|
||||
339: <span class="ruby-identifier">locked_dep</span> = <span class="ruby-ivar">@locked_deps</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-identifier">dep</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">d</span> }
|
||||
<span class="ruby-comment cmt"># File lib/bundler/definition.rb, line 338</span>
|
||||
338: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">converge_locked_specs</span>
|
||||
339: <span class="ruby-identifier">deps</span> = []
|
||||
340:
|
||||
341: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">in_locked_deps?</span>(<span class="ruby-identifier">dep</span>, <span class="ruby-identifier">locked_dep</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">satisfies_locked_spec?</span>(<span class="ruby-identifier">dep</span>)
|
||||
342: <span class="ruby-identifier">deps</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">dep</span>
|
||||
343: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Path</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">current_platform?</span> <span class="ruby-operator">&&</span> (<span class="ruby-operator">!</span><span class="ruby-identifier">locked_dep</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">locked_dep</span>.<span class="ruby-identifier">source</span>)
|
||||
344: <span class="ruby-ivar">@locked_specs</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>
|
||||
345: <span class="ruby-ivar">@unlock</span>[<span class="ruby-value">:gems</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">name</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">source</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span>
|
||||
346: <span class="ruby-keyword kw">end</span>
|
||||
341: <span class="ruby-comment cmt"># Build a list of dependencies that are the same in the Gemfile</span>
|
||||
342: <span class="ruby-comment cmt"># and Gemfile.lock. If the Gemfile modified a dependency, but</span>
|
||||
343: <span class="ruby-comment cmt"># the gem in the Gemfile.lock still satisfies it, this is fine</span>
|
||||
344: <span class="ruby-comment cmt"># too.</span>
|
||||
345: <span class="ruby-ivar">@dependencies</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dep</span><span class="ruby-operator">|</span>
|
||||
346: <span class="ruby-identifier">locked_dep</span> = <span class="ruby-ivar">@locked_deps</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-identifier">dep</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">d</span> }
|
||||
347:
|
||||
348: <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">unlock!</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:unlock!</span>)
|
||||
349: <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">specs</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-ivar">@unlock</span>[<span class="ruby-value">:gems</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">name</span> }
|
||||
350: <span class="ruby-keyword kw">end</span>
|
||||
351: <span class="ruby-keyword kw">end</span>
|
||||
352:
|
||||
353: <span class="ruby-identifier">converged</span> = []
|
||||
354: <span class="ruby-ivar">@locked_specs</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>
|
||||
355: <span class="ruby-identifier">s</span>.<span class="ruby-identifier">source</span> = <span class="ruby-ivar">@sources</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">src</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">source</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">src</span> }
|
||||
356:
|
||||
357: <span class="ruby-comment cmt"># Don't add a spec to the list if its source is expired. For example,</span>
|
||||
358: <span class="ruby-comment cmt"># if you change a Git gem to Rubygems.</span>
|
||||
359: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@unlock</span>[<span class="ruby-value">:sources</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">s</span>.<span class="ruby-identifier">name</span>)
|
||||
360: <span class="ruby-comment cmt"># If the spec is from a path source and it doesn't exist anymore</span>
|
||||
361: <span class="ruby-comment cmt"># then we just unlock it.</span>
|
||||
362:
|
||||
363: <span class="ruby-comment cmt"># Path sources have special logic</span>
|
||||
364: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Path</span>)
|
||||
365: <span class="ruby-identifier">other</span> = <span class="ruby-identifier">s</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">specs</span>[<span class="ruby-identifier">s</span>].<span class="ruby-identifier">first</span>
|
||||
366:
|
||||
367: <span class="ruby-comment cmt"># If the spec is no longer in the path source, unlock it. This</span>
|
||||
368: <span class="ruby-comment cmt"># commonly happens if the version changed in the gemspec</span>
|
||||
369: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">other</span>
|
||||
370: <span class="ruby-comment cmt"># If the dependencies of the path source have changed, unlock it</span>
|
||||
371: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">dependencies</span>.<span class="ruby-identifier">sort</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">dependencies</span>.<span class="ruby-identifier">sort</span>
|
||||
372: <span class="ruby-keyword kw">end</span>
|
||||
348: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">in_locked_deps?</span>(<span class="ruby-identifier">dep</span>, <span class="ruby-identifier">locked_dep</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">satisfies_locked_spec?</span>(<span class="ruby-identifier">dep</span>)
|
||||
349: <span class="ruby-identifier">deps</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">dep</span>
|
||||
350: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Path</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">current_platform?</span> <span class="ruby-operator">&&</span> (<span class="ruby-operator">!</span><span class="ruby-identifier">locked_dep</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">locked_dep</span>.<span class="ruby-identifier">source</span>)
|
||||
351: <span class="ruby-ivar">@locked_specs</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>
|
||||
352: <span class="ruby-ivar">@unlock</span>[<span class="ruby-value">:gems</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">name</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">source</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span>
|
||||
353: <span class="ruby-keyword kw">end</span>
|
||||
354:
|
||||
355: <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">unlock!</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:unlock!</span>)
|
||||
356: <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">specs</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-ivar">@unlock</span>[<span class="ruby-value">:gems</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">name</span> }
|
||||
357: <span class="ruby-keyword kw">end</span>
|
||||
358: <span class="ruby-keyword kw">end</span>
|
||||
359:
|
||||
360: <span class="ruby-identifier">converged</span> = []
|
||||
361: <span class="ruby-ivar">@locked_specs</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>
|
||||
362: <span class="ruby-identifier">s</span>.<span class="ruby-identifier">source</span> = <span class="ruby-ivar">@sources</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">src</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">source</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">src</span> }
|
||||
363:
|
||||
364: <span class="ruby-comment cmt"># Don't add a spec to the list if its source is expired. For example,</span>
|
||||
365: <span class="ruby-comment cmt"># if you change a Git gem to Rubygems.</span>
|
||||
366: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@unlock</span>[<span class="ruby-value">:sources</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">s</span>.<span class="ruby-identifier">name</span>)
|
||||
367: <span class="ruby-comment cmt"># If the spec is from a path source and it doesn't exist anymore</span>
|
||||
368: <span class="ruby-comment cmt"># then we just unlock it.</span>
|
||||
369:
|
||||
370: <span class="ruby-comment cmt"># Path sources have special logic</span>
|
||||
371: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Path</span>)
|
||||
372: <span class="ruby-identifier">other</span> = <span class="ruby-identifier">s</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">specs</span>[<span class="ruby-identifier">s</span>].<span class="ruby-identifier">first</span>
|
||||
373:
|
||||
374: <span class="ruby-identifier">converged</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">s</span>
|
||||
375: <span class="ruby-keyword kw">end</span>
|
||||
376:
|
||||
377: <span class="ruby-identifier">resolve</span> = <span class="ruby-constant">SpecSet</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">converged</span>)
|
||||
378: <span class="ruby-identifier">resolve</span> = <span class="ruby-identifier">resolve</span>.<span class="ruby-identifier">for</span>(<span class="ruby-identifier">expand_dependencies</span>(<span class="ruby-identifier">deps</span>, <span class="ruby-keyword kw">true</span>), <span class="ruby-ivar">@unlock</span>[<span class="ruby-value">:gems</span>])
|
||||
379: <span class="ruby-identifier">diff</span> = <span class="ruby-ivar">@locked_specs</span>.<span class="ruby-identifier">to_a</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">resolve</span>.<span class="ruby-identifier">to_a</span>
|
||||
380:
|
||||
381: <span class="ruby-comment cmt"># Now, we unlock any sources that do not have anymore gems pinned to it</span>
|
||||
382: <span class="ruby-ivar">@sources</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">source</span><span class="ruby-operator">|</span>
|
||||
383: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">source</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:unlock!</span>)
|
||||
384:
|
||||
385: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resolve</span>.<span class="ruby-identifier">any?</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">source</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">source</span> }
|
||||
386: <span class="ruby-identifier">source</span>.<span class="ruby-identifier">unlock!</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">diff</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">diff</span>.<span class="ruby-identifier">any?</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">source</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">source</span> }
|
||||
387: <span class="ruby-keyword kw">end</span>
|
||||
388: <span class="ruby-keyword kw">end</span>
|
||||
374: <span class="ruby-comment cmt"># If the spec is no longer in the path source, unlock it. This</span>
|
||||
375: <span class="ruby-comment cmt"># commonly happens if the version changed in the gemspec</span>
|
||||
376: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">other</span>
|
||||
377:
|
||||
378: <span class="ruby-identifier">deps2</span> = <span class="ruby-identifier">other</span>.<span class="ruby-identifier">dependencies</span>.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">type</span> <span class="ruby-operator">!=</span> <span class="ruby-value">:development</span> }
|
||||
379: <span class="ruby-comment cmt"># If the dependencies of the path source have changed, unlock it</span>
|
||||
380: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">dependencies</span>.<span class="ruby-identifier">sort</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">deps2</span>.<span class="ruby-identifier">sort</span>
|
||||
381: <span class="ruby-keyword kw">end</span>
|
||||
382:
|
||||
383: <span class="ruby-identifier">converged</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">s</span>
|
||||
384: <span class="ruby-keyword kw">end</span>
|
||||
385:
|
||||
386: <span class="ruby-identifier">resolve</span> = <span class="ruby-constant">SpecSet</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">converged</span>)
|
||||
387: <span class="ruby-identifier">resolve</span> = <span class="ruby-identifier">resolve</span>.<span class="ruby-identifier">for</span>(<span class="ruby-identifier">expand_dependencies</span>(<span class="ruby-identifier">deps</span>, <span class="ruby-keyword kw">true</span>), <span class="ruby-ivar">@unlock</span>[<span class="ruby-value">:gems</span>])
|
||||
388: <span class="ruby-identifier">diff</span> = <span class="ruby-ivar">@locked_specs</span>.<span class="ruby-identifier">to_a</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">resolve</span>.<span class="ruby-identifier">to_a</span>
|
||||
389:
|
||||
390: <span class="ruby-identifier">resolve</span>
|
||||
391: <span class="ruby-keyword kw">end</span></pre>
|
||||
390: <span class="ruby-comment cmt"># Now, we unlock any sources that do not have anymore gems pinned to it</span>
|
||||
391: <span class="ruby-ivar">@sources</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">source</span><span class="ruby-operator">|</span>
|
||||
392: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">source</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:unlock!</span>)
|
||||
393:
|
||||
394: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resolve</span>.<span class="ruby-identifier">any?</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">source</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">source</span> }
|
||||
395: <span class="ruby-identifier">source</span>.<span class="ruby-identifier">unlock!</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">diff</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">diff</span>.<span class="ruby-identifier">any?</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">source</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">source</span> }
|
||||
396: <span class="ruby-keyword kw">end</span>
|
||||
397: <span class="ruby-keyword kw">end</span>
|
||||
398:
|
||||
399: <span class="ruby-identifier">resolve</span>
|
||||
400: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1464,23 +1487,23 @@ generated
|
|||
<div class="method-source-code"
|
||||
id="converge-sources-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/definition.rb, line 303</span>
|
||||
303: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">converge_sources</span>
|
||||
304: <span class="ruby-identifier">locked_gem</span> = <span class="ruby-ivar">@locked_sources</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-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Rubygems</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">s</span> }
|
||||
305: <span class="ruby-identifier">actual_gem</span> = <span class="ruby-ivar">@sources</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-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Rubygems</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">s</span> }
|
||||
306:
|
||||
307: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">locked_gem</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">actual_gem</span>
|
||||
308: <span class="ruby-identifier">locked_gem</span>.<span class="ruby-identifier">merge_remotes</span> <span class="ruby-identifier">actual_gem</span>
|
||||
309: <span class="ruby-keyword kw">end</span>
|
||||
310:
|
||||
311: <span class="ruby-ivar">@sources</span>.<span class="ruby-identifier">map!</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">source</span><span class="ruby-operator">|</span>
|
||||
312: <span class="ruby-ivar">@locked_sources</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-operator">==</span> <span class="ruby-identifier">source</span> } <span class="ruby-operator">||</span> <span class="ruby-identifier">source</span>
|
||||
313: <span class="ruby-keyword kw">end</span>
|
||||
314:
|
||||
315: <span class="ruby-ivar">@sources</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">source</span><span class="ruby-operator">|</span>
|
||||
316: <span class="ruby-identifier">source</span>.<span class="ruby-identifier">unlock!</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">source</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:unlock!</span>) <span class="ruby-operator">&&</span> <span class="ruby-ivar">@unlock</span>[<span class="ruby-value">:sources</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">source</span>.<span class="ruby-identifier">name</span>)
|
||||
317: <span class="ruby-keyword kw">end</span>
|
||||
318: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/definition.rb, line 310</span>
|
||||
310: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">converge_sources</span>
|
||||
311: <span class="ruby-identifier">locked_gem</span> = <span class="ruby-ivar">@locked_sources</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-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Rubygems</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">s</span> }
|
||||
312: <span class="ruby-identifier">actual_gem</span> = <span class="ruby-ivar">@sources</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-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Rubygems</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">s</span> }
|
||||
313:
|
||||
314: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">locked_gem</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">actual_gem</span>
|
||||
315: <span class="ruby-identifier">locked_gem</span>.<span class="ruby-identifier">merge_remotes</span> <span class="ruby-identifier">actual_gem</span>
|
||||
316: <span class="ruby-keyword kw">end</span>
|
||||
317:
|
||||
318: <span class="ruby-ivar">@sources</span>.<span class="ruby-identifier">map!</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">source</span><span class="ruby-operator">|</span>
|
||||
319: <span class="ruby-ivar">@locked_sources</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-operator">==</span> <span class="ruby-identifier">source</span> } <span class="ruby-operator">||</span> <span class="ruby-identifier">source</span>
|
||||
320: <span class="ruby-keyword kw">end</span>
|
||||
321:
|
||||
322: <span class="ruby-ivar">@sources</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">source</span><span class="ruby-operator">|</span>
|
||||
323: <span class="ruby-identifier">source</span>.<span class="ruby-identifier">unlock!</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">source</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:unlock!</span>) <span class="ruby-operator">&&</span> <span class="ruby-ivar">@unlock</span>[<span class="ruby-value">:sources</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">source</span>.<span class="ruby-identifier">name</span>)
|
||||
324: <span class="ruby-keyword kw">end</span>
|
||||
325: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1511,17 +1534,17 @@ generated
|
|||
<div class="method-source-code"
|
||||
id="expand-dependencies-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/definition.rb, line 405</span>
|
||||
405: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">expand_dependencies</span>(<span class="ruby-identifier">dependencies</span>, <span class="ruby-identifier">remote</span> = <span class="ruby-keyword kw">false</span>)
|
||||
406: <span class="ruby-identifier">deps</span> = []
|
||||
407: <span class="ruby-identifier">dependencies</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dep</span><span class="ruby-operator">|</span>
|
||||
408: <span class="ruby-identifier">dep</span> = <span class="ruby-constant">Dependency</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">dep</span>, <span class="ruby-value str">">= 0"</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:name</span>)
|
||||
409: <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">gem_platforms</span>(<span class="ruby-ivar">@platforms</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span>
|
||||
410: <span class="ruby-identifier">deps</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">DepProxy</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">dep</span>, <span class="ruby-identifier">p</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">remote</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">p</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">generic</span>(<span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span>.<span class="ruby-identifier">local</span>)
|
||||
411: <span class="ruby-keyword kw">end</span>
|
||||
412: <span class="ruby-keyword kw">end</span>
|
||||
413: <span class="ruby-identifier">deps</span>
|
||||
414: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/definition.rb, line 414</span>
|
||||
414: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">expand_dependencies</span>(<span class="ruby-identifier">dependencies</span>, <span class="ruby-identifier">remote</span> = <span class="ruby-keyword kw">false</span>)
|
||||
415: <span class="ruby-identifier">deps</span> = []
|
||||
416: <span class="ruby-identifier">dependencies</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dep</span><span class="ruby-operator">|</span>
|
||||
417: <span class="ruby-identifier">dep</span> = <span class="ruby-constant">Dependency</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">dep</span>, <span class="ruby-value str">">= 0"</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:name</span>)
|
||||
418: <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">gem_platforms</span>(<span class="ruby-ivar">@platforms</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span>
|
||||
419: <span class="ruby-identifier">deps</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">DepProxy</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">dep</span>, <span class="ruby-identifier">p</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">remote</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">p</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">generic</span>(<span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span>.<span class="ruby-identifier">local</span>)
|
||||
420: <span class="ruby-keyword kw">end</span>
|
||||
421: <span class="ruby-keyword kw">end</span>
|
||||
422: <span class="ruby-identifier">deps</span>
|
||||
423: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1552,10 +1575,10 @@ generated
|
|||
<div class="method-source-code"
|
||||
id="expanded-dependencies-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/definition.rb, line 401</span>
|
||||
401: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">expanded_dependencies</span>
|
||||
402: <span class="ruby-ivar">@expanded_dependencies</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">expand_dependencies</span>(<span class="ruby-identifier">dependencies</span>, <span class="ruby-ivar">@remote</span>)
|
||||
403: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/definition.rb, line 410</span>
|
||||
410: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">expanded_dependencies</span>
|
||||
411: <span class="ruby-ivar">@expanded_dependencies</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">expand_dependencies</span>(<span class="ruby-identifier">dependencies</span>, <span class="ruby-ivar">@remote</span>)
|
||||
412: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1586,10 +1609,10 @@ generated
|
|||
<div class="method-source-code"
|
||||
id="in-locked-deps--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/definition.rb, line 393</span>
|
||||
393: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">in_locked_deps?</span>(<span class="ruby-identifier">dep</span>, <span class="ruby-identifier">d</span>)
|
||||
394: <span class="ruby-identifier">d</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">source</span>
|
||||
395: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/definition.rb, line 402</span>
|
||||
402: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">in_locked_deps?</span>(<span class="ruby-identifier">dep</span>, <span class="ruby-identifier">d</span>)
|
||||
403: <span class="ruby-identifier">d</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">source</span>
|
||||
404: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1620,13 +1643,13 @@ generated
|
|||
<div class="method-source-code"
|
||||
id="pretty-dep-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/definition.rb, line 296</span>
|
||||
296: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pretty_dep</span>(<span class="ruby-identifier">dep</span>, <span class="ruby-identifier">source</span> = <span class="ruby-keyword kw">false</span>)
|
||||
297: <span class="ruby-identifier">msg</span> = <span class="ruby-node">"#{dep.name}"</span>
|
||||
298: <span class="ruby-identifier">msg</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" (#{dep.requirement})"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">requirement</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Requirement</span>.<span class="ruby-identifier">default</span>
|
||||
299: <span class="ruby-identifier">msg</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" from the `#{dep.source}` source"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">source</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span>
|
||||
300: <span class="ruby-identifier">msg</span>
|
||||
301: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/definition.rb, line 303</span>
|
||||
303: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pretty_dep</span>(<span class="ruby-identifier">dep</span>, <span class="ruby-identifier">source</span> = <span class="ruby-keyword kw">false</span>)
|
||||
304: <span class="ruby-identifier">msg</span> = <span class="ruby-node">"#{dep.name}"</span>
|
||||
305: <span class="ruby-identifier">msg</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" (#{dep.requirement})"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">requirement</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Requirement</span>.<span class="ruby-identifier">default</span>
|
||||
306: <span class="ruby-identifier">msg</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" from the `#{dep.source}` source"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">source</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span>
|
||||
307: <span class="ruby-identifier">msg</span>
|
||||
308: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1657,12 +1680,12 @@ generated
|
|||
<div class="method-source-code"
|
||||
id="requested-dependencies-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/definition.rb, line 423</span>
|
||||
423: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">requested_dependencies</span>
|
||||
424: <span class="ruby-identifier">groups</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">groups</span> <span class="ruby-operator">-</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">without</span>
|
||||
425: <span class="ruby-identifier">groups</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> }
|
||||
426: <span class="ruby-identifier">dependencies</span>.<span class="ruby-identifier">reject</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-operator">!</span><span class="ruby-identifier">d</span>.<span class="ruby-identifier">should_include?</span> <span class="ruby-operator">||</span> (<span class="ruby-identifier">d</span>.<span class="ruby-identifier">groups</span> & <span class="ruby-identifier">groups</span>).<span class="ruby-identifier">empty?</span> }
|
||||
427: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/definition.rb, line 432</span>
|
||||
432: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">requested_dependencies</span>
|
||||
433: <span class="ruby-identifier">groups</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">groups</span> <span class="ruby-operator">-</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">without</span>
|
||||
434: <span class="ruby-identifier">groups</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> }
|
||||
435: <span class="ruby-identifier">dependencies</span>.<span class="ruby-identifier">reject</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-operator">!</span><span class="ruby-identifier">d</span>.<span class="ruby-identifier">should_include?</span> <span class="ruby-operator">||</span> (<span class="ruby-identifier">d</span>.<span class="ruby-identifier">groups</span> & <span class="ruby-identifier">groups</span>).<span class="ruby-identifier">empty?</span> }
|
||||
436: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1693,10 +1716,10 @@ generated
|
|||
<div class="method-source-code"
|
||||
id="satisfies-locked-spec--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/definition.rb, line 397</span>
|
||||
397: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">satisfies_locked_spec?</span>(<span class="ruby-identifier">dep</span>)
|
||||
398: <span class="ruby-ivar">@locked_specs</span>.<span class="ruby-identifier">any?</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">satisfies?</span>(<span class="ruby-identifier">dep</span>) <span class="ruby-operator">&&</span> (<span class="ruby-operator">!</span><span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">source</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span>) }
|
||||
399: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/definition.rb, line 406</span>
|
||||
406: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">satisfies_locked_spec?</span>(<span class="ruby-identifier">dep</span>)
|
||||
407: <span class="ruby-ivar">@locked_specs</span>.<span class="ruby-identifier">any?</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">satisfies?</span>(<span class="ruby-identifier">dep</span>) <span class="ruby-operator">&&</span> (<span class="ruby-operator">!</span><span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">source</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span>) }
|
||||
408: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1727,13 +1750,13 @@ generated
|
|||
<div class="method-source-code"
|
||||
id="sorted-sources-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/definition.rb, line 416</span>
|
||||
416: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sorted_sources</span>
|
||||
417: <span class="ruby-ivar">@sources</span>.<span class="ruby-identifier">sort_by</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
|
||||
418: <span class="ruby-comment cmt"># Place GEM at the top</span>
|
||||
419: [ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Rubygems</span>) <span class="ruby-operator">?</span> <span class="ruby-value">1</span> <span class="ruby-operator">:</span> <span class="ruby-value">0</span>, <span class="ruby-identifier">s</span>.<span class="ruby-identifier">to_s</span> ]
|
||||
420: <span class="ruby-keyword kw">end</span>
|
||||
421: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/definition.rb, line 425</span>
|
||||
425: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sorted_sources</span>
|
||||
426: <span class="ruby-ivar">@sources</span>.<span class="ruby-identifier">sort_by</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
|
||||
427: <span class="ruby-comment cmt"># Place GEM at the top</span>
|
||||
428: [ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Rubygems</span>) <span class="ruby-operator">?</span> <span class="ruby-value">1</span> <span class="ruby-operator">:</span> <span class="ruby-value">0</span>, <span class="ruby-identifier">s</span>.<span class="ruby-identifier">to_s</span> ]
|
||||
429: <span class="ruby-keyword kw">end</span>
|
||||
430: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -100,6 +100,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -209,16 +213,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
||||
|
@ -389,10 +405,10 @@
|
|||
<div class="method-source-code"
|
||||
id="new-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_ext.rb, line 153</span>
|
||||
153: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">dep</span>, <span class="ruby-identifier">platform</span>)
|
||||
154: <span class="ruby-ivar">@dep</span>, <span class="ruby-ivar">@__platform</span>, <span class="ruby-ivar">@required_by</span> = <span class="ruby-identifier">dep</span>, <span class="ruby-identifier">platform</span>, []
|
||||
155: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_ext.rb, line 167</span>
|
||||
167: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">dep</span>, <span class="ruby-identifier">platform</span>)
|
||||
168: <span class="ruby-ivar">@dep</span>, <span class="ruby-ivar">@__platform</span>, <span class="ruby-ivar">@required_by</span> = <span class="ruby-identifier">dep</span>, <span class="ruby-identifier">platform</span>, []
|
||||
169: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -429,10 +445,10 @@
|
|||
<div class="method-source-code"
|
||||
id="--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_ext.rb, line 161</span>
|
||||
161: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">o</span>)
|
||||
162: <span class="ruby-identifier">dep</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">dep</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">__platform</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">__platform</span>
|
||||
163: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_ext.rb, line 175</span>
|
||||
175: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">o</span>)
|
||||
176: <span class="ruby-identifier">dep</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">dep</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">__platform</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">__platform</span>
|
||||
177: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -496,10 +512,10 @@
|
|||
<div class="method-source-code"
|
||||
id="hash-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_ext.rb, line 157</span>
|
||||
157: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hash</span>
|
||||
158: <span class="ruby-ivar">@hash</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">hash</span>
|
||||
159: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_ext.rb, line 171</span>
|
||||
171: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hash</span>
|
||||
172: <span class="ruby-ivar">@hash</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">hash</span>
|
||||
173: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -530,10 +546,10 @@
|
|||
<div class="method-source-code"
|
||||
id="to-s-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_ext.rb, line 171</span>
|
||||
171: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
||||
172: <span class="ruby-ivar">@dep</span>.<span class="ruby-identifier">to_s</span>
|
||||
173: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_ext.rb, line 185</span>
|
||||
185: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
||||
186: <span class="ruby-ivar">@dep</span>.<span class="ruby-identifier">to_s</span>
|
||||
187: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -564,10 +580,10 @@
|
|||
<div class="method-source-code"
|
||||
id="type-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_ext.rb, line 167</span>
|
||||
167: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">type</span>
|
||||
168: <span class="ruby-ivar">@dep</span>.<span class="ruby-identifier">type</span>
|
||||
169: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_ext.rb, line 181</span>
|
||||
181: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">type</span>
|
||||
182: <span class="ruby-ivar">@dep</span>.<span class="ruby-identifier">type</span>
|
||||
183: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -604,10 +620,10 @@
|
|||
<div class="method-source-code"
|
||||
id="method-missing-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_ext.rb, line 177</span>
|
||||
177: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(*<span class="ruby-identifier">args</span>)
|
||||
178: <span class="ruby-ivar">@dep</span>.<span class="ruby-identifier">send</span>(*<span class="ruby-identifier">args</span>)
|
||||
179: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_ext.rb, line 191</span>
|
||||
191: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(*<span class="ruby-identifier">args</span>)
|
||||
192: <span class="ruby-ivar">@dep</span>.<span class="ruby-identifier">send</span>(*<span class="ruby-identifier">args</span>)
|
||||
193: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -93,6 +93,8 @@
|
|||
|
||||
<li><a href="#method-i-mswin%3F">#mswin?</a></li>
|
||||
|
||||
<li><a href="#method-i-rbx%3F">#rbx?</a></li>
|
||||
|
||||
<li><a href="#method-i-ruby%3F">#ruby?</a></li>
|
||||
|
||||
<li><a href="#method-i-ruby_18%3F">#ruby_18?</a></li>
|
||||
|
@ -120,6 +122,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -229,16 +235,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
||||
|
@ -421,20 +439,20 @@
|
|||
<div class="method-source-code"
|
||||
id="new-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 25</span>
|
||||
25: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">version</span>, <span class="ruby-identifier">options</span> = {}, &<span class="ruby-identifier">blk</span>)
|
||||
26: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">version</span>)
|
||||
27:
|
||||
28: <span class="ruby-ivar">@autorequire</span> = <span class="ruby-keyword kw">nil</span>
|
||||
29: <span class="ruby-ivar">@groups</span> = <span class="ruby-constant">Array</span>(<span class="ruby-identifier">options</span>[<span class="ruby-value str">"group"</span>] <span class="ruby-operator">||</span> <span class="ruby-value">:default</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> }
|
||||
30: <span class="ruby-ivar">@source</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value str">"source"</span>]
|
||||
31: <span class="ruby-ivar">@platforms</span> = <span class="ruby-constant">Array</span>(<span class="ruby-identifier">options</span>[<span class="ruby-value str">"platforms"</span>])
|
||||
32: <span class="ruby-ivar">@env</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value str">"env"</span>]
|
||||
33:
|
||||
34: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">'require'</span>)
|
||||
35: <span class="ruby-ivar">@autorequire</span> = <span class="ruby-constant">Array</span>(<span class="ruby-identifier">options</span>[<span class="ruby-value str">'require'</span>] <span class="ruby-operator">||</span> [])
|
||||
36: <span class="ruby-keyword kw">end</span>
|
||||
37: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 26</span>
|
||||
26: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">version</span>, <span class="ruby-identifier">options</span> = {}, &<span class="ruby-identifier">blk</span>)
|
||||
27: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">version</span>)
|
||||
28:
|
||||
29: <span class="ruby-ivar">@autorequire</span> = <span class="ruby-keyword kw">nil</span>
|
||||
30: <span class="ruby-ivar">@groups</span> = <span class="ruby-constant">Array</span>(<span class="ruby-identifier">options</span>[<span class="ruby-value str">"group"</span>] <span class="ruby-operator">||</span> <span class="ruby-value">:default</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> }
|
||||
31: <span class="ruby-ivar">@source</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value str">"source"</span>]
|
||||
32: <span class="ruby-ivar">@platforms</span> = <span class="ruby-constant">Array</span>(<span class="ruby-identifier">options</span>[<span class="ruby-value str">"platforms"</span>])
|
||||
33: <span class="ruby-ivar">@env</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value str">"env"</span>]
|
||||
34:
|
||||
35: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">'require'</span>)
|
||||
36: <span class="ruby-ivar">@autorequire</span> = <span class="ruby-constant">Array</span>(<span class="ruby-identifier">options</span>[<span class="ruby-value str">'require'</span>] <span class="ruby-operator">||</span> [])
|
||||
37: <span class="ruby-keyword kw">end</span>
|
||||
38: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -471,17 +489,17 @@
|
|||
<div class="method-source-code"
|
||||
id="current-env--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 55</span>
|
||||
55: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_env?</span>
|
||||
56: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@env</span>
|
||||
57: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Hash</span> <span class="ruby-operator">===</span> <span class="ruby-ivar">@env</span>
|
||||
58: <span class="ruby-ivar">@env</span>.<span class="ruby-identifier">all?</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">val</span><span class="ruby-operator">|</span>
|
||||
59: <span class="ruby-constant">ENV</span>[<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>] <span class="ruby-operator">&&</span> (<span class="ruby-constant">String</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">val</span> <span class="ruby-operator">?</span> <span class="ruby-constant">ENV</span>[<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">val</span> <span class="ruby-operator">:</span> <span class="ruby-constant">ENV</span>[<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>] <span class="ruby-operator">=~</span> <span class="ruby-identifier">val</span>)
|
||||
60: <span class="ruby-keyword kw">end</span>
|
||||
61: <span class="ruby-keyword kw">else</span>
|
||||
62: <span class="ruby-constant">ENV</span>[<span class="ruby-ivar">@env</span>.<span class="ruby-identifier">to_s</span>]
|
||||
63: <span class="ruby-keyword kw">end</span>
|
||||
64: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 56</span>
|
||||
56: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_env?</span>
|
||||
57: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@env</span>
|
||||
58: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Hash</span> <span class="ruby-operator">===</span> <span class="ruby-ivar">@env</span>
|
||||
59: <span class="ruby-ivar">@env</span>.<span class="ruby-identifier">all?</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">val</span><span class="ruby-operator">|</span>
|
||||
60: <span class="ruby-constant">ENV</span>[<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>] <span class="ruby-operator">&&</span> (<span class="ruby-constant">String</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">val</span> <span class="ruby-operator">?</span> <span class="ruby-constant">ENV</span>[<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">val</span> <span class="ruby-operator">:</span> <span class="ruby-constant">ENV</span>[<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>] <span class="ruby-operator">=~</span> <span class="ruby-identifier">val</span>)
|
||||
61: <span class="ruby-keyword kw">end</span>
|
||||
62: <span class="ruby-keyword kw">else</span>
|
||||
63: <span class="ruby-constant">ENV</span>[<span class="ruby-ivar">@env</span>.<span class="ruby-identifier">to_s</span>]
|
||||
64: <span class="ruby-keyword kw">end</span>
|
||||
65: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -512,11 +530,11 @@
|
|||
<div class="method-source-code"
|
||||
id="current-platform--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 66</span>
|
||||
66: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_platform?</span>
|
||||
67: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@platforms</span>.<span class="ruby-identifier">empty?</span>
|
||||
68: <span class="ruby-ivar">@platforms</span>.<span class="ruby-identifier">any?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span> <span class="ruby-identifier">send</span>(<span class="ruby-node">"#{p}?"</span>) }
|
||||
69: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 67</span>
|
||||
67: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_platform?</span>
|
||||
68: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@platforms</span>.<span class="ruby-identifier">empty?</span>
|
||||
69: <span class="ruby-ivar">@platforms</span>.<span class="ruby-identifier">any?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span> <span class="ruby-identifier">send</span>(<span class="ruby-node">"#{p}?"</span>) }
|
||||
70: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -547,18 +565,18 @@
|
|||
<div class="method-source-code"
|
||||
id="gem-platforms-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 39</span>
|
||||
39: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gem_platforms</span>(<span class="ruby-identifier">valid_platforms</span>)
|
||||
40: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">valid_platforms</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@platforms</span>.<span class="ruby-identifier">empty?</span>
|
||||
41:
|
||||
42: <span class="ruby-identifier">platforms</span> = []
|
||||
43: <span class="ruby-ivar">@platforms</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span>
|
||||
44: <span class="ruby-identifier">platform</span> = <span class="ruby-constant">PLATFORM_MAP</span>[<span class="ruby-identifier">p</span>]
|
||||
45: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">valid_platforms</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">platform</span>)
|
||||
46: <span class="ruby-identifier">platforms</span> <span class="ruby-operator">|=</span> [<span class="ruby-identifier">platform</span>]
|
||||
47: <span class="ruby-keyword kw">end</span>
|
||||
48: <span class="ruby-identifier">platforms</span>
|
||||
49: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 40</span>
|
||||
40: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gem_platforms</span>(<span class="ruby-identifier">valid_platforms</span>)
|
||||
41: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">valid_platforms</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@platforms</span>.<span class="ruby-identifier">empty?</span>
|
||||
42:
|
||||
43: <span class="ruby-identifier">platforms</span> = []
|
||||
44: <span class="ruby-ivar">@platforms</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span>
|
||||
45: <span class="ruby-identifier">platform</span> = <span class="ruby-constant">PLATFORM_MAP</span>[<span class="ruby-identifier">p</span>]
|
||||
46: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">valid_platforms</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">platform</span>)
|
||||
47: <span class="ruby-identifier">platforms</span> <span class="ruby-operator">|=</span> [<span class="ruby-identifier">platform</span>]
|
||||
48: <span class="ruby-keyword kw">end</span>
|
||||
49: <span class="ruby-identifier">platforms</span>
|
||||
50: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -589,10 +607,10 @@
|
|||
<div class="method-source-code"
|
||||
id="should-include--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 51</span>
|
||||
51: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">should_include?</span>
|
||||
52: <span class="ruby-identifier">current_env?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">current_platform?</span>
|
||||
53: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 52</span>
|
||||
52: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">should_include?</span>
|
||||
53: <span class="ruby-identifier">current_env?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">current_platform?</span>
|
||||
54: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -623,18 +641,19 @@
|
|||
<div class="method-source-code"
|
||||
id="to-lock-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 71</span>
|
||||
71: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_lock</span>
|
||||
72: <span class="ruby-identifier">out</span> = <span class="ruby-node">" #{name}"</span>
|
||||
73:
|
||||
74: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">requirement</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Requirement</span>.<span class="ruby-identifier">default</span>
|
||||
75: <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" (#{requirement.to_s})"</span>
|
||||
76: <span class="ruby-keyword kw">end</span>
|
||||
77:
|
||||
78: <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'!'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">source</span>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 72</span>
|
||||
72: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_lock</span>
|
||||
73: <span class="ruby-identifier">out</span> = <span class="ruby-node">" #{name}"</span>
|
||||
74:
|
||||
75: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">requirement</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Requirement</span>.<span class="ruby-identifier">default</span>
|
||||
76: <span class="ruby-identifier">reqs</span> = <span class="ruby-identifier">requirement</span>.<span class="ruby-identifier">requirements</span>.<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">o</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-node">"#{o} #{v}"</span> }
|
||||
77: <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" (#{reqs.join(', ')})"</span>
|
||||
78: <span class="ruby-keyword kw">end</span>
|
||||
79:
|
||||
80: <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n"</span>
|
||||
81: <span class="ruby-keyword kw">end</span></pre>
|
||||
80: <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'!'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">source</span>
|
||||
81:
|
||||
82: <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\n"</span>
|
||||
83: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -671,10 +690,10 @@
|
|||
<div class="method-source-code"
|
||||
id="jruby--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 109</span>
|
||||
109: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">jruby?</span>
|
||||
110: <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">RUBY_ENGINE</span>) <span class="ruby-operator">&&</span> <span class="ruby-constant">RUBY_ENGINE</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"jruby"</span>
|
||||
111: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 115</span>
|
||||
115: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">jruby?</span>
|
||||
116: <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">RUBY_ENGINE</span>) <span class="ruby-operator">&&</span> <span class="ruby-constant">RUBY_ENGINE</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"jruby"</span>
|
||||
117: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -705,10 +724,10 @@
|
|||
<div class="method-source-code"
|
||||
id="mingw--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 117</span>
|
||||
117: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mingw?</span>
|
||||
118: <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">WINDOWS</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span>.<span class="ruby-identifier">local</span>.<span class="ruby-identifier">os</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"mingw32"</span>
|
||||
119: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 123</span>
|
||||
123: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mingw?</span>
|
||||
124: <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">WINDOWS</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span>.<span class="ruby-identifier">local</span>.<span class="ruby-identifier">os</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"mingw32"</span>
|
||||
125: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -739,10 +758,10 @@
|
|||
<div class="method-source-code"
|
||||
id="mingw--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 121</span>
|
||||
121: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mingw_18?</span>
|
||||
122: <span class="ruby-identifier">mingw?</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">RUBY_VERSION</span> <span class="ruby-operator"><</span> <span class="ruby-value str">"1.9"</span>
|
||||
123: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 127</span>
|
||||
127: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mingw_18?</span>
|
||||
128: <span class="ruby-identifier">mingw?</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">RUBY_VERSION</span> <span class="ruby-operator"><</span> <span class="ruby-value str">"1.9"</span>
|
||||
129: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -773,10 +792,10 @@
|
|||
<div class="method-source-code"
|
||||
id="mingw--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 125</span>
|
||||
125: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mingw_19?</span>
|
||||
126: <span class="ruby-identifier">mingw?</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">RUBY_VERSION</span> <span class="ruby-operator">>=</span> <span class="ruby-value str">"1.9"</span>
|
||||
127: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 131</span>
|
||||
131: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mingw_19?</span>
|
||||
132: <span class="ruby-identifier">mingw?</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">RUBY_VERSION</span> <span class="ruby-operator">>=</span> <span class="ruby-value str">"1.9"</span>
|
||||
133: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -807,10 +826,10 @@
|
|||
<div class="method-source-code"
|
||||
id="mri--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 97</span>
|
||||
97: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mri?</span>
|
||||
98: <span class="ruby-operator">!</span><span class="ruby-identifier">mswin?</span> <span class="ruby-operator">&&</span> (<span class="ruby-operator">!</span><span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">RUBY_ENGINE</span>) <span class="ruby-operator">||</span> <span class="ruby-constant">RUBY_ENGINE</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"ruby"</span>)
|
||||
99: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 99</span>
|
||||
99: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mri?</span>
|
||||
100: <span class="ruby-operator">!</span><span class="ruby-identifier">mswin?</span> <span class="ruby-operator">&&</span> (<span class="ruby-operator">!</span><span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">RUBY_ENGINE</span>) <span class="ruby-operator">||</span> <span class="ruby-constant">RUBY_ENGINE</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"ruby"</span>)
|
||||
101: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -841,10 +860,10 @@
|
|||
<div class="method-source-code"
|
||||
id="mri--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 101</span>
|
||||
101: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mri_18?</span>
|
||||
102: <span class="ruby-identifier">mri?</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">RUBY_VERSION</span> <span class="ruby-operator"><</span> <span class="ruby-value str">"1.9"</span>
|
||||
103: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 103</span>
|
||||
103: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mri_18?</span>
|
||||
104: <span class="ruby-identifier">mri?</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">RUBY_VERSION</span> <span class="ruby-operator"><</span> <span class="ruby-value str">"1.9"</span>
|
||||
105: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -875,10 +894,10 @@
|
|||
<div class="method-source-code"
|
||||
id="mri--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 105</span>
|
||||
105: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mri_19?</span>
|
||||
106: <span class="ruby-identifier">mri?</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">RUBY_VERSION</span> <span class="ruby-operator">>=</span> <span class="ruby-value str">"1.9"</span>
|
||||
107: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 107</span>
|
||||
107: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mri_19?</span>
|
||||
108: <span class="ruby-identifier">mri?</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">RUBY_VERSION</span> <span class="ruby-operator">>=</span> <span class="ruby-value str">"1.9"</span>
|
||||
109: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -909,10 +928,44 @@
|
|||
<div class="method-source-code"
|
||||
id="mswin--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 113</span>
|
||||
113: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mswin?</span>
|
||||
114: <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">WINDOWS</span>
|
||||
115: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 119</span>
|
||||
119: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mswin?</span>
|
||||
120: <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">WINDOWS</span>
|
||||
121: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="rbx--method" class="method-detail ">
|
||||
<a name="method-i-rbx%3F"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
|
||||
<span class="method-name">rbx?</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="rbx--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 111</span>
|
||||
111: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rbx?</span>
|
||||
112: <span class="ruby-identifier">ruby?</span> <span class="ruby-operator">&&</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">RUBY_ENGINE</span>) <span class="ruby-operator">&&</span> <span class="ruby-constant">RUBY_ENGINE</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"rbx"</span>
|
||||
113: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -943,10 +996,10 @@
|
|||
<div class="method-source-code"
|
||||
id="ruby--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 85</span>
|
||||
85: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ruby?</span>
|
||||
86: <span class="ruby-operator">!</span><span class="ruby-identifier">mswin?</span> <span class="ruby-operator">&&</span> (<span class="ruby-operator">!</span><span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">RUBY_ENGINE</span>) <span class="ruby-operator">||</span> <span class="ruby-constant">RUBY_ENGINE</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"ruby"</span> <span class="ruby-operator">||</span> <span class="ruby-constant">RUBY_ENGINE</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"rbx"</span>)
|
||||
87: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 87</span>
|
||||
87: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ruby?</span>
|
||||
88: <span class="ruby-operator">!</span><span class="ruby-identifier">mswin?</span> <span class="ruby-operator">&&</span> (<span class="ruby-operator">!</span><span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">RUBY_ENGINE</span>) <span class="ruby-operator">||</span> <span class="ruby-constant">RUBY_ENGINE</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"ruby"</span> <span class="ruby-operator">||</span> <span class="ruby-constant">RUBY_ENGINE</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"rbx"</span>)
|
||||
89: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -977,10 +1030,10 @@
|
|||
<div class="method-source-code"
|
||||
id="ruby--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 89</span>
|
||||
89: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ruby_18?</span>
|
||||
90: <span class="ruby-identifier">ruby?</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">RUBY_VERSION</span> <span class="ruby-operator"><</span> <span class="ruby-value str">"1.9"</span>
|
||||
91: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 91</span>
|
||||
91: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ruby_18?</span>
|
||||
92: <span class="ruby-identifier">ruby?</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">RUBY_VERSION</span> <span class="ruby-operator"><</span> <span class="ruby-value str">"1.9"</span>
|
||||
93: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1011,10 +1064,10 @@
|
|||
<div class="method-source-code"
|
||||
id="ruby--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 93</span>
|
||||
93: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ruby_19?</span>
|
||||
94: <span class="ruby-identifier">ruby?</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">RUBY_VERSION</span> <span class="ruby-operator">>=</span> <span class="ruby-value str">"1.9"</span>
|
||||
95: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dependency.rb, line 95</span>
|
||||
95: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ruby_19?</span>
|
||||
96: <span class="ruby-identifier">ruby?</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">RUBY_VERSION</span> <span class="ruby-operator">>=</span> <span class="ruby-value str">"1.9"</span>
|
||||
97: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -88,6 +88,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -197,16 +201,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
||||
|
@ -328,7 +344,7 @@
|
|||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/deployment.rb, line 3</span>
|
||||
3: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">define_task</span>(<span class="ruby-identifier">context</span>, <span class="ruby-identifier">task_method</span> = <span class="ruby-value">:task</span>, <span class="ruby-identifier">opts</span> = {})
|
||||
4: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">context</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Capistrano</span><span class="ruby-operator">::</span><span class="ruby-constant">Configuration</span>)
|
||||
4: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">Capistrano</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">context</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Capistrano</span><span class="ruby-operator">::</span><span class="ruby-constant">Configuration</span>)
|
||||
5: <span class="ruby-identifier">context_name</span> = <span class="ruby-value str">"capistrano"</span>
|
||||
6: <span class="ruby-identifier">role_default</span> = <span class="ruby-value str">"{:except => {:no_release => true}}"</span>
|
||||
7: <span class="ruby-keyword kw">else</span>
|
||||
|
@ -336,7 +352,7 @@
|
|||
9: <span class="ruby-identifier">role_default</span> = <span class="ruby-value str">"[:app]"</span>
|
||||
10: <span class="ruby-keyword kw">end</span>
|
||||
11:
|
||||
12: <span class="ruby-identifier">roles</span> = <span class="ruby-identifier">context</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-value">:bundle_roles</span>, <span class="ruby-keyword kw">nil</span>)
|
||||
12: <span class="ruby-identifier">roles</span> = <span class="ruby-identifier">context</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-value">:bundle_roles</span>, <span class="ruby-keyword kw">false</span>)
|
||||
13: <span class="ruby-identifier">opts</span>[<span class="ruby-value">:roles</span>] = <span class="ruby-identifier">roles</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">roles</span>
|
||||
14:
|
||||
15: <span class="ruby-identifier">context</span>.<span class="ruby-identifier">send</span> <span class="ruby-value">:namespace</span>, <span class="ruby-value">:bundle</span> <span class="ruby-keyword kw">do</span>
|
||||
|
@ -353,7 +369,7 @@
|
|||
26: <span class="ruby-identifier">args</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">bundle_flags</span>.<span class="ruby-identifier">to_s</span>
|
||||
27: <span class="ruby-identifier">args</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"--without #{bundle_without.join(" ")}"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">bundle_without</span>.<span class="ruby-identifier">empty?</span>
|
||||
28:
|
||||
29: <span class="ruby-identifier">run</span> <span class="ruby-node">"#{bundle_cmd} install #{args.join(' ')}"</span>
|
||||
29: <span class="ruby-identifier">run</span> <span class="ruby-node">"cd #{context.fetch(:current_release)} && #{bundle_cmd} install #{args.join(' ')}"</span>
|
||||
30: <span class="ruby-keyword kw">end</span>
|
||||
31: <span class="ruby-keyword kw">end</span>
|
||||
32: <span class="ruby-keyword kw">end</span></pre>
|
|
@ -79,6 +79,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -188,16 +192,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
|
@ -120,6 +120,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -229,16 +233,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
||||
|
@ -372,19 +388,19 @@ Deprecated methods
|
|||
<div class="method-source-code"
|
||||
id="deprecate-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 147</span>
|
||||
147: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">deprecate</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">replacement</span> = <span class="ruby-keyword kw">nil</span>)
|
||||
148: <span class="ruby-identifier">define_method</span>(<span class="ruby-identifier">name</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span>*<span class="ruby-operator">|</span>
|
||||
149: <span class="ruby-identifier">message</span> = <span class="ruby-node">"'#{name}' has been removed from the Gemfile DSL, "</span>
|
||||
150: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">replacement</span>
|
||||
151: <span class="ruby-identifier">message</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"and has been replaced with '#{replacement}'."</span>
|
||||
152: <span class="ruby-keyword kw">else</span>
|
||||
153: <span class="ruby-identifier">message</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"and is no longer supported."</span>
|
||||
154: <span class="ruby-keyword kw">end</span>
|
||||
155: <span class="ruby-identifier">message</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\nSee the README for more information on upgrading from Bundler 0.8."</span>
|
||||
156: <span class="ruby-identifier">raise</span> <span class="ruby-constant">DeprecatedError</span>, <span class="ruby-identifier">message</span>
|
||||
157: <span class="ruby-keyword kw">end</span>
|
||||
158: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 144</span>
|
||||
144: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">deprecate</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">replacement</span> = <span class="ruby-keyword kw">nil</span>)
|
||||
145: <span class="ruby-identifier">define_method</span>(<span class="ruby-identifier">name</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span>*<span class="ruby-operator">|</span>
|
||||
146: <span class="ruby-identifier">message</span> = <span class="ruby-node">"'#{name}' has been removed from the Gemfile DSL, "</span>
|
||||
147: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">replacement</span>
|
||||
148: <span class="ruby-identifier">message</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"and has been replaced with '#{replacement}'."</span>
|
||||
149: <span class="ruby-keyword kw">else</span>
|
||||
150: <span class="ruby-identifier">message</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"and is no longer supported."</span>
|
||||
151: <span class="ruby-keyword kw">end</span>
|
||||
152: <span class="ruby-identifier">message</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"\nSee the README for more information on upgrading from Bundler 0.8."</span>
|
||||
153: <span class="ruby-identifier">raise</span> <span class="ruby-constant">DeprecatedError</span>, <span class="ruby-identifier">message</span>
|
||||
154: <span class="ruby-keyword kw">end</span>
|
||||
155: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -497,13 +513,13 @@ Deprecated methods
|
|||
<div class="method-source-code"
|
||||
id="env-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 138</span>
|
||||
138: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">env</span>(<span class="ruby-identifier">name</span>)
|
||||
139: <span class="ruby-ivar">@env</span>, <span class="ruby-identifier">old</span> = <span class="ruby-identifier">name</span>, <span class="ruby-ivar">@env</span>
|
||||
140: <span class="ruby-keyword kw">yield</span>
|
||||
141: <span class="ruby-keyword kw">ensure</span>
|
||||
142: <span class="ruby-ivar">@env</span> = <span class="ruby-identifier">old</span>
|
||||
143: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 135</span>
|
||||
135: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">env</span>(<span class="ruby-identifier">name</span>)
|
||||
136: <span class="ruby-ivar">@env</span>, <span class="ruby-identifier">old</span> = <span class="ruby-identifier">name</span>, <span class="ruby-ivar">@env</span>
|
||||
137: <span class="ruby-keyword kw">yield</span>
|
||||
138: <span class="ruby-keyword kw">ensure</span>
|
||||
139: <span class="ruby-ivar">@env</span> = <span class="ruby-identifier">old</span>
|
||||
140: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -534,31 +550,31 @@ Deprecated methods
|
|||
<div class="method-source-code"
|
||||
id="gem-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 50</span>
|
||||
50: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gem</span>(<span class="ruby-identifier">name</span>, *<span class="ruby-identifier">args</span>)
|
||||
51: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Symbol</span>)
|
||||
52: <span class="ruby-identifier">raise</span> <span class="ruby-constant">GemfileError</span>, <span class="ruby-node">%{You need to specify gem names as Strings. Use 'gem "#{name.to_s}"' instead.}</span>
|
||||
53: <span class="ruby-keyword kw">end</span>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 47</span>
|
||||
47: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gem</span>(<span class="ruby-identifier">name</span>, *<span class="ruby-identifier">args</span>)
|
||||
48: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Symbol</span>)
|
||||
49: <span class="ruby-identifier">raise</span> <span class="ruby-constant">GemfileError</span>, <span class="ruby-node">%{You need to specify gem names as Strings. Use 'gem "#{name.to_s}"' instead.}</span>
|
||||
50: <span class="ruby-keyword kw">end</span>
|
||||
51:
|
||||
52: <span class="ruby-identifier">options</span> = <span class="ruby-constant">Hash</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">pop</span> <span class="ruby-operator">:</span> {}
|
||||
53: <span class="ruby-identifier">version</span> = <span class="ruby-identifier">args</span> <span class="ruby-operator">||</span> [<span class="ruby-value str">">= 0"</span>]
|
||||
54:
|
||||
55: <span class="ruby-identifier">options</span> = <span class="ruby-constant">Hash</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">pop</span> <span class="ruby-operator">:</span> {}
|
||||
56: <span class="ruby-identifier">version</span> = <span class="ruby-identifier">args</span> <span class="ruby-operator">||</span> [<span class="ruby-value str">">= 0"</span>]
|
||||
55: <span class="ruby-identifier">_deprecated_options</span>(<span class="ruby-identifier">options</span>)
|
||||
56: <span class="ruby-identifier">_normalize_options</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">version</span>, <span class="ruby-identifier">options</span>)
|
||||
57:
|
||||
58: <span class="ruby-identifier">_deprecated_options</span>(<span class="ruby-identifier">options</span>)
|
||||
59: <span class="ruby-identifier">_normalize_options</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">version</span>, <span class="ruby-identifier">options</span>)
|
||||
60:
|
||||
61: <span class="ruby-identifier">dep</span> = <span class="ruby-constant">Dependency</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">version</span>, <span class="ruby-identifier">options</span>)
|
||||
62:
|
||||
63: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">current</span> = <span class="ruby-ivar">@dependencies</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">name</span> }
|
||||
64: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">current</span>.<span class="ruby-identifier">requirement</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">requirement</span>
|
||||
65: <span class="ruby-identifier">raise</span> <span class="ruby-constant">DslError</span>, <span class="ruby-value str">"You cannot specify the same gem twice with different version requirements. "</span> <span class="ruby-node">"You specified: #{current.name} (#{current.requirement}) and "</span> <span class="ruby-node">"#{dep.name} (#{dep.requirement})"</span>
|
||||
66: <span class="ruby-keyword kw">end</span>
|
||||
67:
|
||||
68: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">current</span>.<span class="ruby-identifier">source</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span>
|
||||
69: <span class="ruby-identifier">raise</span> <span class="ruby-constant">DslError</span>, <span class="ruby-value str">"You cannot specify the same gem twice coming from different sources. You "</span> <span class="ruby-node">"specified that #{dep.name} (#{dep.requirement}) should come from "</span> <span class="ruby-node">"#{current.source || 'an unspecfied source'} and #{dep.source}"</span>
|
||||
70: <span class="ruby-keyword kw">end</span>
|
||||
71: <span class="ruby-keyword kw">end</span>
|
||||
72: <span class="ruby-ivar">@dependencies</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Dependency</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">version</span>, <span class="ruby-identifier">options</span>)
|
||||
73: <span class="ruby-keyword kw">end</span></pre>
|
||||
58: <span class="ruby-identifier">dep</span> = <span class="ruby-constant">Dependency</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">version</span>, <span class="ruby-identifier">options</span>)
|
||||
59:
|
||||
60: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">current</span> = <span class="ruby-ivar">@dependencies</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">name</span> }
|
||||
61: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">current</span>.<span class="ruby-identifier">requirement</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">requirement</span>
|
||||
62: <span class="ruby-identifier">raise</span> <span class="ruby-constant">DslError</span>, <span class="ruby-value str">"You cannot specify the same gem twice with different version requirements. "</span> <span class="ruby-node">"You specified: #{current.name} (#{current.requirement}) and "</span> <span class="ruby-node">"#{dep.name} (#{dep.requirement})"</span>
|
||||
63: <span class="ruby-keyword kw">end</span>
|
||||
64:
|
||||
65: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">current</span>.<span class="ruby-identifier">source</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">source</span>
|
||||
66: <span class="ruby-identifier">raise</span> <span class="ruby-constant">DslError</span>, <span class="ruby-value str">"You cannot specify the same gem twice coming from different sources. You "</span> <span class="ruby-node">"specified that #{dep.name} (#{dep.requirement}) should come from "</span> <span class="ruby-node">"#{current.source || 'an unspecfied source'} and #{dep.source}"</span>
|
||||
67: <span class="ruby-keyword kw">end</span>
|
||||
68: <span class="ruby-keyword kw">end</span>
|
||||
69: <span class="ruby-ivar">@dependencies</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Dependency</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">version</span>, <span class="ruby-identifier">options</span>)
|
||||
70: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -599,23 +615,20 @@ Deprecated methods
|
|||
29:
|
||||
30: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">gemspecs</span>.<span class="ruby-identifier">size</span>
|
||||
31: <span class="ruby-keyword kw">when</span> <span class="ruby-value">1</span>
|
||||
32: <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">gemspecs</span>.<span class="ruby-identifier">first</span>)
|
||||
32: <span class="ruby-identifier">spec</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load_gemspec</span>(<span class="ruby-identifier">gemspecs</span>.<span class="ruby-identifier">first</span>)
|
||||
33: <span class="ruby-identifier">raise</span> <span class="ruby-constant">InvalidOption</span>, <span class="ruby-node">"There was an error loading the gemspec at #{gemspecs.first}."</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">spec</span>
|
||||
34: <span class="ruby-identifier">gem</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">name</span>, <span class="ruby-value">:path</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">path</span>
|
||||
35: <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">runtime_dependencies</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dep</span><span class="ruby-operator">|</span>
|
||||
36: <span class="ruby-identifier">gem</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">name</span>, *<span class="ruby-identifier">dep</span>.<span class="ruby-identifier">requirement</span>.<span class="ruby-identifier">as_list</span>
|
||||
37: <span class="ruby-keyword kw">end</span>
|
||||
38: <span class="ruby-identifier">group</span>(<span class="ruby-identifier">development_group</span>) <span class="ruby-keyword kw">do</span>
|
||||
39: <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">development_dependencies</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dep</span><span class="ruby-operator">|</span>
|
||||
40: <span class="ruby-identifier">gem</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">name</span>, *<span class="ruby-identifier">dep</span>.<span class="ruby-identifier">requirement</span>.<span class="ruby-identifier">as_list</span>
|
||||
41: <span class="ruby-keyword kw">end</span>
|
||||
42: <span class="ruby-keyword kw">end</span>
|
||||
43: <span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span>
|
||||
44: <span class="ruby-identifier">raise</span> <span class="ruby-constant">InvalidOption</span>, <span class="ruby-node">"There are no gemspecs at #{path}."</span>
|
||||
45: <span class="ruby-keyword kw">else</span>
|
||||
46: <span class="ruby-identifier">raise</span> <span class="ruby-constant">InvalidOption</span>, <span class="ruby-node">"There are multiple gemspecs at #{path}. Please use the :name option to specify which one."</span>
|
||||
47: <span class="ruby-keyword kw">end</span>
|
||||
48: <span class="ruby-keyword kw">end</span></pre>
|
||||
35: <span class="ruby-identifier">group</span>(<span class="ruby-identifier">development_group</span>) <span class="ruby-keyword kw">do</span>
|
||||
36: <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">development_dependencies</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dep</span><span class="ruby-operator">|</span>
|
||||
37: <span class="ruby-identifier">gem</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">name</span>, *<span class="ruby-identifier">dep</span>.<span class="ruby-identifier">requirement</span>.<span class="ruby-identifier">as_list</span>
|
||||
38: <span class="ruby-keyword kw">end</span>
|
||||
39: <span class="ruby-keyword kw">end</span>
|
||||
40: <span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span>
|
||||
41: <span class="ruby-identifier">raise</span> <span class="ruby-constant">InvalidOption</span>, <span class="ruby-node">"There are no gemspecs at #{path}."</span>
|
||||
42: <span class="ruby-keyword kw">else</span>
|
||||
43: <span class="ruby-identifier">raise</span> <span class="ruby-constant">InvalidOption</span>, <span class="ruby-node">"There are multiple gemspecs at #{path}. Please use the :name option to specify which one."</span>
|
||||
44: <span class="ruby-keyword kw">end</span>
|
||||
45: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -646,15 +659,15 @@ Deprecated methods
|
|||
<div class="method-source-code"
|
||||
id="git-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 102</span>
|
||||
102: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">git</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">source_options</span> = {}, &<span class="ruby-identifier">blk</span>)
|
||||
103: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">block_given?</span>
|
||||
104: <span class="ruby-identifier">msg</span> = <span class="ruby-value str">"You can no longer specify a git source by itself. Instead, \n"</span> <span class="ruby-value str">"either use the :git option on a gem, or specify the gems that \n"</span> <span class="ruby-value str">"bundler should find in the git source by passing a block to \n"</span> <span class="ruby-value str">"the git method, like: \n\n"</span> <span class="ruby-value str">" git 'git://github.com/rails/rails.git' do\n"</span> <span class="ruby-value str">" gem 'rails'\n"</span> <span class="ruby-value str">" end"</span>
|
||||
105: <span class="ruby-identifier">raise</span> <span class="ruby-constant">DeprecatedError</span>, <span class="ruby-identifier">msg</span>
|
||||
106: <span class="ruby-keyword kw">end</span>
|
||||
107:
|
||||
108: <span class="ruby-identifier">source</span> <span class="ruby-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Git</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">_normalize_hash</span>(<span class="ruby-identifier">options</span>).<span class="ruby-identifier">merge</span>(<span class="ruby-value str">"uri"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">uri</span>)), <span class="ruby-identifier">source_options</span>, &<span class="ruby-identifier">blk</span>
|
||||
109: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 99</span>
|
||||
99: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">git</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">source_options</span> = {}, &<span class="ruby-identifier">blk</span>)
|
||||
100: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">block_given?</span>
|
||||
101: <span class="ruby-identifier">msg</span> = <span class="ruby-value str">"You can no longer specify a git source by itself. Instead, \n"</span> <span class="ruby-value str">"either use the :git option on a gem, or specify the gems that \n"</span> <span class="ruby-value str">"bundler should find in the git source by passing a block to \n"</span> <span class="ruby-value str">"the git method, like: \n\n"</span> <span class="ruby-value str">" git 'git://github.com/rails/rails.git' do\n"</span> <span class="ruby-value str">" gem 'rails'\n"</span> <span class="ruby-value str">" end"</span>
|
||||
102: <span class="ruby-identifier">raise</span> <span class="ruby-constant">DeprecatedError</span>, <span class="ruby-identifier">msg</span>
|
||||
103: <span class="ruby-keyword kw">end</span>
|
||||
104:
|
||||
105: <span class="ruby-identifier">source</span> <span class="ruby-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Git</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">_normalize_hash</span>(<span class="ruby-identifier">options</span>).<span class="ruby-identifier">merge</span>(<span class="ruby-value str">"uri"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">uri</span>)), <span class="ruby-identifier">source_options</span>, &<span class="ruby-identifier">blk</span>
|
||||
106: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -685,13 +698,13 @@ Deprecated methods
|
|||
<div class="method-source-code"
|
||||
id="group-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 123</span>
|
||||
123: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">group</span>(*<span class="ruby-identifier">args</span>, &<span class="ruby-identifier">blk</span>)
|
||||
124: <span class="ruby-ivar">@groups</span>.<span class="ruby-identifier">concat</span> <span class="ruby-identifier">args</span>
|
||||
125: <span class="ruby-keyword kw">yield</span>
|
||||
126: <span class="ruby-keyword kw">ensure</span>
|
||||
127: <span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> { <span class="ruby-ivar">@groups</span>.<span class="ruby-identifier">pop</span> }
|
||||
128: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 120</span>
|
||||
120: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">group</span>(*<span class="ruby-identifier">args</span>, &<span class="ruby-identifier">blk</span>)
|
||||
121: <span class="ruby-ivar">@groups</span>.<span class="ruby-identifier">concat</span> <span class="ruby-identifier">args</span>
|
||||
122: <span class="ruby-keyword kw">yield</span>
|
||||
123: <span class="ruby-keyword kw">ensure</span>
|
||||
124: <span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> { <span class="ruby-ivar">@groups</span>.<span class="ruby-identifier">pop</span> }
|
||||
125: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -722,10 +735,10 @@ Deprecated methods
|
|||
<div class="method-source-code"
|
||||
id="path-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 98</span>
|
||||
98: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">path</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">source_options</span> = {}, &<span class="ruby-identifier">blk</span>)
|
||||
99: <span class="ruby-identifier">source</span> <span class="ruby-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Path</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">_normalize_hash</span>(<span class="ruby-identifier">options</span>).<span class="ruby-identifier">merge</span>(<span class="ruby-value str">"path"</span> =<span class="ruby-operator">></span> <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">path</span>))), <span class="ruby-identifier">source_options</span>, &<span class="ruby-identifier">blk</span>
|
||||
100: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 95</span>
|
||||
95: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">path</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">source_options</span> = {}, &<span class="ruby-identifier">blk</span>)
|
||||
96: <span class="ruby-identifier">source</span> <span class="ruby-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Path</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">_normalize_hash</span>(<span class="ruby-identifier">options</span>).<span class="ruby-identifier">merge</span>(<span class="ruby-value str">"path"</span> =<span class="ruby-operator">></span> <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">path</span>))), <span class="ruby-identifier">source_options</span>, &<span class="ruby-identifier">blk</span>
|
||||
97: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -785,13 +798,13 @@ Deprecated methods
|
|||
<div class="method-source-code"
|
||||
id="platforms-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 130</span>
|
||||
130: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">platforms</span>(*<span class="ruby-identifier">platforms</span>)
|
||||
131: <span class="ruby-ivar">@platforms</span>.<span class="ruby-identifier">concat</span> <span class="ruby-identifier">platforms</span>
|
||||
132: <span class="ruby-keyword kw">yield</span>
|
||||
133: <span class="ruby-keyword kw">ensure</span>
|
||||
134: <span class="ruby-identifier">platforms</span>.<span class="ruby-identifier">each</span> { <span class="ruby-ivar">@platforms</span>.<span class="ruby-identifier">pop</span> }
|
||||
135: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 127</span>
|
||||
127: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">platforms</span>(*<span class="ruby-identifier">platforms</span>)
|
||||
128: <span class="ruby-ivar">@platforms</span>.<span class="ruby-identifier">concat</span> <span class="ruby-identifier">platforms</span>
|
||||
129: <span class="ruby-keyword kw">yield</span>
|
||||
130: <span class="ruby-keyword kw">ensure</span>
|
||||
131: <span class="ruby-identifier">platforms</span>.<span class="ruby-identifier">each</span> { <span class="ruby-ivar">@platforms</span>.<span class="ruby-identifier">pop</span> }
|
||||
132: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -826,25 +839,25 @@ Deprecated methods
|
|||
<div class="method-source-code"
|
||||
id="source-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 79</span>
|
||||
79: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">source</span>(<span class="ruby-identifier">source</span>, <span class="ruby-identifier">options</span> = {})
|
||||
80: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">source</span>
|
||||
81: <span class="ruby-keyword kw">when</span> <span class="ruby-value">:gemcutter</span>, <span class="ruby-value">:rubygems</span>, <span class="ruby-value">:rubyforge</span> <span class="ruby-keyword kw">then</span>
|
||||
82: <span class="ruby-identifier">rubygems_source</span> <span class="ruby-value str">"http://rubygems.org"</span>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 76</span>
|
||||
76: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">source</span>(<span class="ruby-identifier">source</span>, <span class="ruby-identifier">options</span> = {})
|
||||
77: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">source</span>
|
||||
78: <span class="ruby-keyword kw">when</span> <span class="ruby-value">:gemcutter</span>, <span class="ruby-value">:rubygems</span>, <span class="ruby-value">:rubyforge</span> <span class="ruby-keyword kw">then</span>
|
||||
79: <span class="ruby-identifier">rubygems_source</span> <span class="ruby-value str">"http://rubygems.org"</span>
|
||||
80: <span class="ruby-keyword kw">return</span>
|
||||
81: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">String</span>
|
||||
82: <span class="ruby-identifier">rubygems_source</span> <span class="ruby-identifier">source</span>
|
||||
83: <span class="ruby-keyword kw">return</span>
|
||||
84: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">String</span>
|
||||
85: <span class="ruby-identifier">rubygems_source</span> <span class="ruby-identifier">source</span>
|
||||
86: <span class="ruby-keyword kw">return</span>
|
||||
87: <span class="ruby-keyword kw">end</span>
|
||||
84: <span class="ruby-keyword kw">end</span>
|
||||
85:
|
||||
86: <span class="ruby-ivar">@source</span> = <span class="ruby-identifier">source</span>
|
||||
87: <span class="ruby-identifier">options</span>[<span class="ruby-value">:prepend</span>] <span class="ruby-operator">?</span> <span class="ruby-ivar">@sources</span>.<span class="ruby-identifier">unshift</span>(<span class="ruby-ivar">@source</span>) <span class="ruby-operator">:</span> <span class="ruby-ivar">@sources</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@source</span>
|
||||
88:
|
||||
89: <span class="ruby-ivar">@source</span> = <span class="ruby-identifier">source</span>
|
||||
90: <span class="ruby-identifier">options</span>[<span class="ruby-value">:prepend</span>] <span class="ruby-operator">?</span> <span class="ruby-ivar">@sources</span>.<span class="ruby-identifier">unshift</span>(<span class="ruby-ivar">@source</span>) <span class="ruby-operator">:</span> <span class="ruby-ivar">@sources</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@source</span>
|
||||
91:
|
||||
92: <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
||||
93: <span class="ruby-ivar">@source</span>
|
||||
94: <span class="ruby-keyword kw">ensure</span>
|
||||
95: <span class="ruby-ivar">@source</span> = <span class="ruby-keyword kw">nil</span>
|
||||
96: <span class="ruby-keyword kw">end</span></pre>
|
||||
89: <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
||||
90: <span class="ruby-ivar">@source</span>
|
||||
91: <span class="ruby-keyword kw">ensure</span>
|
||||
92: <span class="ruby-ivar">@source</span> = <span class="ruby-keyword kw">nil</span>
|
||||
93: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -875,12 +888,12 @@ Deprecated methods
|
|||
<div class="method-source-code"
|
||||
id="to-definition-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 117</span>
|
||||
117: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_definition</span>(<span class="ruby-identifier">lockfile</span>, <span class="ruby-identifier">unlock</span>)
|
||||
118: <span class="ruby-ivar">@sources</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@rubygems_source</span>
|
||||
119: <span class="ruby-ivar">@sources</span>.<span class="ruby-identifier">uniq!</span>
|
||||
120: <span class="ruby-constant">Definition</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">lockfile</span>, <span class="ruby-ivar">@dependencies</span>, <span class="ruby-ivar">@sources</span>, <span class="ruby-identifier">unlock</span>)
|
||||
121: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 114</span>
|
||||
114: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_definition</span>(<span class="ruby-identifier">lockfile</span>, <span class="ruby-identifier">unlock</span>)
|
||||
115: <span class="ruby-ivar">@sources</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@rubygems_source</span>
|
||||
116: <span class="ruby-ivar">@sources</span>.<span class="ruby-identifier">uniq!</span>
|
||||
117: <span class="ruby-constant">Definition</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">lockfile</span>, <span class="ruby-ivar">@dependencies</span>, <span class="ruby-ivar">@sources</span>, <span class="ruby-identifier">unlock</span>)
|
||||
118: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -917,18 +930,18 @@ Deprecated methods
|
|||
<div class="method-source-code"
|
||||
id="-deprecated-options-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 234</span>
|
||||
234: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_deprecated_options</span>(<span class="ruby-identifier">options</span>)
|
||||
235: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value">:require_as</span>)
|
||||
236: <span class="ruby-identifier">raise</span> <span class="ruby-constant">DeprecatedError</span>, <span class="ruby-value str">"Please replace :require_as with :require"</span>
|
||||
237: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value">:vendored_at</span>)
|
||||
238: <span class="ruby-identifier">raise</span> <span class="ruby-constant">DeprecatedError</span>, <span class="ruby-value str">"Please replace :vendored_at with :path"</span>
|
||||
239: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value">:only</span>)
|
||||
240: <span class="ruby-identifier">raise</span> <span class="ruby-constant">DeprecatedError</span>, <span class="ruby-value str">"Please replace :only with :group"</span>
|
||||
241: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value">:except</span>)
|
||||
242: <span class="ruby-identifier">raise</span> <span class="ruby-constant">DeprecatedError</span>, <span class="ruby-value str">"The :except option is no longer supported"</span>
|
||||
243: <span class="ruby-keyword kw">end</span>
|
||||
244: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 231</span>
|
||||
231: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_deprecated_options</span>(<span class="ruby-identifier">options</span>)
|
||||
232: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value">:require_as</span>)
|
||||
233: <span class="ruby-identifier">raise</span> <span class="ruby-constant">DeprecatedError</span>, <span class="ruby-value str">"Please replace :require_as with :require"</span>
|
||||
234: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value">:vendored_at</span>)
|
||||
235: <span class="ruby-identifier">raise</span> <span class="ruby-constant">DeprecatedError</span>, <span class="ruby-value str">"Please replace :vendored_at with :path"</span>
|
||||
236: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value">:only</span>)
|
||||
237: <span class="ruby-identifier">raise</span> <span class="ruby-constant">DeprecatedError</span>, <span class="ruby-value str">"Please replace :only with :group"</span>
|
||||
238: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value">:except</span>)
|
||||
239: <span class="ruby-identifier">raise</span> <span class="ruby-constant">DeprecatedError</span>, <span class="ruby-value str">"The :except option is no longer supported"</span>
|
||||
240: <span class="ruby-keyword kw">end</span>
|
||||
241: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -959,17 +972,17 @@ Deprecated methods
|
|||
<div class="method-source-code"
|
||||
id="-normalize-hash-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 175</span>
|
||||
175: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_normalize_hash</span>(<span class="ruby-identifier">opts</span>)
|
||||
176: <span class="ruby-comment cmt"># Cannot modify a hash during an iteration in 1.9</span>
|
||||
177: <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span>
|
||||
178: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">String</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">k</span>
|
||||
179: <span class="ruby-identifier">v</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">k</span>]
|
||||
180: <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">k</span>)
|
||||
181: <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span>] = <span class="ruby-identifier">v</span>
|
||||
182: <span class="ruby-keyword kw">end</span>
|
||||
183: <span class="ruby-identifier">opts</span>
|
||||
184: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 172</span>
|
||||
172: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_normalize_hash</span>(<span class="ruby-identifier">opts</span>)
|
||||
173: <span class="ruby-comment cmt"># Cannot modify a hash during an iteration in 1.9</span>
|
||||
174: <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span>
|
||||
175: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">String</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">k</span>
|
||||
176: <span class="ruby-identifier">v</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">k</span>]
|
||||
177: <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">k</span>)
|
||||
178: <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span>] = <span class="ruby-identifier">v</span>
|
||||
179: <span class="ruby-keyword kw">end</span>
|
||||
180: <span class="ruby-identifier">opts</span>
|
||||
181: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1000,54 +1013,54 @@ Deprecated methods
|
|||
<div class="method-source-code"
|
||||
id="-normalize-options-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 186</span>
|
||||
186: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_normalize_options</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">version</span>, <span class="ruby-identifier">opts</span>)
|
||||
187: <span class="ruby-identifier">_normalize_hash</span>(<span class="ruby-identifier">opts</span>)
|
||||
188:
|
||||
189: <span class="ruby-identifier">invalid_keys</span> = <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">keys</span> <span class="ruby-operator">-</span> <span class="ruby-node">%(group groups git path name branch ref tag require submodules platform platforms)</span>
|
||||
190: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">invalid_keys</span>.<span class="ruby-identifier">any?</span>
|
||||
191: <span class="ruby-identifier">plural</span> = <span class="ruby-identifier">invalid_keys</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">></span> <span class="ruby-value">1</span>
|
||||
192: <span class="ruby-identifier">message</span> = <span class="ruby-node">"You passed #{invalid_keys.map{|k| ':'+k }.join(", ")} "</span>
|
||||
193: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">plural</span>
|
||||
194: <span class="ruby-identifier">message</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"as options for gem '#{name}', but they are invalid."</span>
|
||||
195: <span class="ruby-keyword kw">else</span>
|
||||
196: <span class="ruby-identifier">message</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"as an option for gem '#{name}', but it is invalid."</span>
|
||||
197: <span class="ruby-keyword kw">end</span>
|
||||
198: <span class="ruby-identifier">raise</span> <span class="ruby-constant">InvalidOption</span>, <span class="ruby-identifier">message</span>
|
||||
199: <span class="ruby-keyword kw">end</span>
|
||||
200:
|
||||
201: <span class="ruby-identifier">groups</span> = <span class="ruby-ivar">@groups</span>.<span class="ruby-identifier">dup</span>
|
||||
202: <span class="ruby-identifier">opts</span>[<span class="ruby-value str">"group"</span>] = <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">"groups"</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value str">"group"</span>]
|
||||
203: <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">concat</span> <span class="ruby-constant">Array</span>(<span class="ruby-identifier">opts</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">"group"</span>))
|
||||
204: <span class="ruby-identifier">groups</span> = [<span class="ruby-value">:default</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">empty?</span>
|
||||
205:
|
||||
206: <span class="ruby-identifier">platforms</span> = <span class="ruby-ivar">@platforms</span>.<span class="ruby-identifier">dup</span>
|
||||
207: <span class="ruby-identifier">opts</span>[<span class="ruby-value str">"platforms"</span>] = <span class="ruby-identifier">opts</span>[<span class="ruby-value str">"platform"</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value str">"platforms"</span>]
|
||||
208: <span class="ruby-identifier">platforms</span>.<span class="ruby-identifier">concat</span> <span class="ruby-constant">Array</span>(<span class="ruby-identifier">opts</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">"platforms"</span>))
|
||||
209: <span class="ruby-identifier">platforms</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">to_sym</span> }
|
||||
210: <span class="ruby-identifier">platforms</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span>
|
||||
211: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">VALID_PLATFORMS</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">p</span>)
|
||||
212: <span class="ruby-identifier">raise</span> <span class="ruby-constant">DslError</span>, <span class="ruby-node">"`#{p}` is not a valid platform. The available options are: #{VALID_PLATFORMS.inspect}"</span>
|
||||
213: <span class="ruby-keyword kw">end</span>
|
||||
214:
|
||||
215: <span class="ruby-comment cmt"># Normalize git and path options</span>
|
||||
216: [<span class="ruby-value str">"git"</span>, <span class="ruby-value str">"path"</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">type</span><span class="ruby-operator">|</span>
|
||||
217: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">param</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">type</span>]
|
||||
218: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">version</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">version</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^\s*=?\s*(\d[^\s]*)\s*$/</span>
|
||||
219: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-value str">"name"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">name</span>, <span class="ruby-value str">"version"</span> =<span class="ruby-operator">></span> <span class="ruby-node">$1</span>)
|
||||
220: <span class="ruby-keyword kw">else</span>
|
||||
221: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">dup</span>
|
||||
222: <span class="ruby-keyword kw">end</span>
|
||||
223: <span class="ruby-identifier">source</span> = <span class="ruby-identifier">send</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">param</span>, <span class="ruby-identifier">options</span>, <span class="ruby-value">:prepend</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span>) {}
|
||||
224: <span class="ruby-identifier">opts</span>[<span class="ruby-value str">"source"</span>] = <span class="ruby-identifier">source</span>
|
||||
225: <span class="ruby-keyword kw">end</span>
|
||||
226: <span class="ruby-keyword kw">end</span>
|
||||
227:
|
||||
228: <span class="ruby-identifier">opts</span>[<span class="ruby-value str">"source"</span>] <span class="ruby-operator">||=</span> <span class="ruby-ivar">@source</span>
|
||||
229: <span class="ruby-identifier">opts</span>[<span class="ruby-value str">"env"</span>] <span class="ruby-operator">||=</span> <span class="ruby-ivar">@env</span>
|
||||
230: <span class="ruby-identifier">opts</span>[<span class="ruby-value str">"platforms"</span>] = <span class="ruby-identifier">platforms</span>.<span class="ruby-identifier">dup</span>
|
||||
231: <span class="ruby-identifier">opts</span>[<span class="ruby-value str">"group"</span>] = <span class="ruby-identifier">groups</span>
|
||||
232: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 183</span>
|
||||
183: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_normalize_options</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">version</span>, <span class="ruby-identifier">opts</span>)
|
||||
184: <span class="ruby-identifier">_normalize_hash</span>(<span class="ruby-identifier">opts</span>)
|
||||
185:
|
||||
186: <span class="ruby-identifier">invalid_keys</span> = <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">keys</span> <span class="ruby-operator">-</span> <span class="ruby-node">%(group groups git path name branch ref tag require submodules platform platforms)</span>
|
||||
187: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">invalid_keys</span>.<span class="ruby-identifier">any?</span>
|
||||
188: <span class="ruby-identifier">plural</span> = <span class="ruby-identifier">invalid_keys</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">></span> <span class="ruby-value">1</span>
|
||||
189: <span class="ruby-identifier">message</span> = <span class="ruby-node">"You passed #{invalid_keys.map{|k| ':'+k }.join(", ")} "</span>
|
||||
190: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">plural</span>
|
||||
191: <span class="ruby-identifier">message</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"as options for gem '#{name}', but they are invalid."</span>
|
||||
192: <span class="ruby-keyword kw">else</span>
|
||||
193: <span class="ruby-identifier">message</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"as an option for gem '#{name}', but it is invalid."</span>
|
||||
194: <span class="ruby-keyword kw">end</span>
|
||||
195: <span class="ruby-identifier">raise</span> <span class="ruby-constant">InvalidOption</span>, <span class="ruby-identifier">message</span>
|
||||
196: <span class="ruby-keyword kw">end</span>
|
||||
197:
|
||||
198: <span class="ruby-identifier">groups</span> = <span class="ruby-ivar">@groups</span>.<span class="ruby-identifier">dup</span>
|
||||
199: <span class="ruby-identifier">opts</span>[<span class="ruby-value str">"group"</span>] = <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">"groups"</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value str">"group"</span>]
|
||||
200: <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">concat</span> <span class="ruby-constant">Array</span>(<span class="ruby-identifier">opts</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">"group"</span>))
|
||||
201: <span class="ruby-identifier">groups</span> = [<span class="ruby-value">:default</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">empty?</span>
|
||||
202:
|
||||
203: <span class="ruby-identifier">platforms</span> = <span class="ruby-ivar">@platforms</span>.<span class="ruby-identifier">dup</span>
|
||||
204: <span class="ruby-identifier">opts</span>[<span class="ruby-value str">"platforms"</span>] = <span class="ruby-identifier">opts</span>[<span class="ruby-value str">"platform"</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value str">"platforms"</span>]
|
||||
205: <span class="ruby-identifier">platforms</span>.<span class="ruby-identifier">concat</span> <span class="ruby-constant">Array</span>(<span class="ruby-identifier">opts</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">"platforms"</span>))
|
||||
206: <span class="ruby-identifier">platforms</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">to_sym</span> }
|
||||
207: <span class="ruby-identifier">platforms</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span>
|
||||
208: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">VALID_PLATFORMS</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">p</span>)
|
||||
209: <span class="ruby-identifier">raise</span> <span class="ruby-constant">DslError</span>, <span class="ruby-node">"`#{p}` is not a valid platform. The available options are: #{VALID_PLATFORMS.inspect}"</span>
|
||||
210: <span class="ruby-keyword kw">end</span>
|
||||
211:
|
||||
212: <span class="ruby-comment cmt"># Normalize git and path options</span>
|
||||
213: [<span class="ruby-value str">"git"</span>, <span class="ruby-value str">"path"</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">type</span><span class="ruby-operator">|</span>
|
||||
214: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">param</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">type</span>]
|
||||
215: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">version</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">version</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^\s*=?\s*(\d[^\s]*)\s*$/</span>
|
||||
216: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-value str">"name"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">name</span>, <span class="ruby-value str">"version"</span> =<span class="ruby-operator">></span> <span class="ruby-node">$1</span>)
|
||||
217: <span class="ruby-keyword kw">else</span>
|
||||
218: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">dup</span>
|
||||
219: <span class="ruby-keyword kw">end</span>
|
||||
220: <span class="ruby-identifier">source</span> = <span class="ruby-identifier">send</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">param</span>, <span class="ruby-identifier">options</span>, <span class="ruby-value">:prepend</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span>) {}
|
||||
221: <span class="ruby-identifier">opts</span>[<span class="ruby-value str">"source"</span>] = <span class="ruby-identifier">source</span>
|
||||
222: <span class="ruby-keyword kw">end</span>
|
||||
223: <span class="ruby-keyword kw">end</span>
|
||||
224:
|
||||
225: <span class="ruby-identifier">opts</span>[<span class="ruby-value str">"source"</span>] <span class="ruby-operator">||=</span> <span class="ruby-ivar">@source</span>
|
||||
226: <span class="ruby-identifier">opts</span>[<span class="ruby-value str">"env"</span>] <span class="ruby-operator">||=</span> <span class="ruby-ivar">@env</span>
|
||||
227: <span class="ruby-identifier">opts</span>[<span class="ruby-value str">"platforms"</span>] = <span class="ruby-identifier">platforms</span>.<span class="ruby-identifier">dup</span>
|
||||
228: <span class="ruby-identifier">opts</span>[<span class="ruby-value str">"group"</span>] = <span class="ruby-identifier">groups</span>
|
||||
229: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1078,11 +1091,11 @@ Deprecated methods
|
|||
<div class="method-source-code"
|
||||
id="rubygems-source-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 170</span>
|
||||
170: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rubygems_source</span>(<span class="ruby-identifier">source</span>)
|
||||
171: <span class="ruby-ivar">@rubygems_source</span>.<span class="ruby-identifier">add_remote</span> <span class="ruby-identifier">source</span>
|
||||
172: <span class="ruby-ivar">@sources</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@rubygems_source</span>
|
||||
173: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/dsl.rb, line 167</span>
|
||||
167: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rubygems_source</span>(<span class="ruby-identifier">source</span>)
|
||||
168: <span class="ruby-ivar">@rubygems_source</span>.<span class="ruby-identifier">add_remote</span> <span class="ruby-identifier">source</span>
|
||||
169: <span class="ruby-ivar">@sources</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@rubygems_source</span>
|
||||
170: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -79,6 +79,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -188,16 +192,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
|
@ -104,6 +104,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -213,16 +217,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
|
@ -113,6 +113,17 @@
|
|||
|
||||
<!-- Included Modules -->
|
||||
|
||||
<div id="includes-section" class="section">
|
||||
<h3 class="section-header">Included Modules</h3>
|
||||
<ul class="link-list">
|
||||
|
||||
|
||||
<li><span class="include">Rake::DSL</span></li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="project-metadata">
|
||||
|
@ -124,6 +135,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -233,16 +248,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
||||
|
@ -399,7 +426,7 @@
|
|||
<div class="method-heading">
|
||||
|
||||
<span class="method-name">install_tasks</span><span
|
||||
class="method-args">(opts = nil)</span>
|
||||
class="method-args">(opts = {})</span>
|
||||
<span class="method-click-advice">click to toggle source</span>
|
||||
|
||||
</div>
|
||||
|
@ -413,11 +440,11 @@
|
|||
<div class="method-source-code"
|
||||
id="install-tasks-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 7</span>
|
||||
7: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">install_tasks</span>(<span class="ruby-identifier">opts</span> = <span class="ruby-keyword kw">nil</span>)
|
||||
8: <span class="ruby-identifier">dir</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-constant">Rake</span>.<span class="ruby-identifier">application</span>.<span class="ruby-identifier">rakefile_location</span>)
|
||||
9: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">dir</span>, <span class="ruby-identifier">opts</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">opts</span>[<span class="ruby-value">:name</span>]).<span class="ruby-identifier">install</span>
|
||||
10: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 9</span>
|
||||
9: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">install_tasks</span>(<span class="ruby-identifier">opts</span> = {})
|
||||
10: <span class="ruby-identifier">dir</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-value">:dir</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">pwd</span>
|
||||
11: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">dir</span>, <span class="ruby-identifier">opts</span>[<span class="ruby-value">:name</span>]).<span class="ruby-identifier">install</span>
|
||||
12: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -448,15 +475,15 @@
|
|||
<div class="method-source-code"
|
||||
id="new-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 14</span>
|
||||
14: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">base</span>, <span class="ruby-identifier">name</span> = <span class="ruby-keyword kw">nil</span>)
|
||||
15: <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-constant">Thor</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">shell</span>.<span class="ruby-identifier">new</span>)
|
||||
16: <span class="ruby-ivar">@base</span> = <span class="ruby-identifier">base</span>
|
||||
17: <span class="ruby-identifier">gemspecs</span> = <span class="ruby-identifier">name</span> <span class="ruby-operator">?</span> [<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">base</span>, <span class="ruby-node">"#{name}.gemspec"</span>)] <span class="ruby-operator">:</span> <span class="ruby-constant">Dir</span>[<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">base</span>, <span class="ruby-value str">"*.gemspec"</span>)]
|
||||
18: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Unable to determine name from existing gemspec. Use :name => 'gemname' in #install_tasks to manually set it."</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">gemspecs</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
|
||||
19: <span class="ruby-ivar">@spec_path</span> = <span class="ruby-identifier">gemspecs</span>.<span class="ruby-identifier">first</span>
|
||||
20: <span class="ruby-ivar">@gemspec</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load_gemspec</span>(<span class="ruby-ivar">@spec_path</span>)
|
||||
21: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 16</span>
|
||||
16: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">base</span>, <span class="ruby-identifier">name</span> = <span class="ruby-keyword kw">nil</span>)
|
||||
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-constant">Thor</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">shell</span>.<span class="ruby-identifier">new</span>)
|
||||
18: <span class="ruby-ivar">@base</span> = <span class="ruby-identifier">base</span>
|
||||
19: <span class="ruby-identifier">gemspecs</span> = <span class="ruby-identifier">name</span> <span class="ruby-operator">?</span> [<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">base</span>, <span class="ruby-node">"#{name}.gemspec"</span>)] <span class="ruby-operator">:</span> <span class="ruby-constant">Dir</span>[<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">base</span>, <span class="ruby-value str">"*.gemspec"</span>)]
|
||||
20: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Unable to determine name from existing gemspec. Use :name => 'gemname' in #install_tasks to manually set it."</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">gemspecs</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
|
||||
21: <span class="ruby-ivar">@spec_path</span> = <span class="ruby-identifier">gemspecs</span>.<span class="ruby-identifier">first</span>
|
||||
22: <span class="ruby-ivar">@gemspec</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load_gemspec</span>(<span class="ruby-ivar">@spec_path</span>)
|
||||
23: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -493,18 +520,18 @@
|
|||
<div class="method-source-code"
|
||||
id="build-gem-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 40</span>
|
||||
40: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build_gem</span>
|
||||
41: <span class="ruby-identifier">file_name</span> = <span class="ruby-keyword kw">nil</span>
|
||||
42: <span class="ruby-identifier">sh</span>(<span class="ruby-node">"gem build #{spec_path}"</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">out</span>, <span class="ruby-identifier">code</span><span class="ruby-operator">|</span>
|
||||
43: <span class="ruby-identifier">raise</span> <span class="ruby-identifier">out</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">out</span>[<span class="ruby-regexp re">/Successfully/</span>]
|
||||
44: <span class="ruby-identifier">file_name</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">built_gem_path</span>)
|
||||
45: <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">base</span>, <span class="ruby-value str">'pkg'</span>))
|
||||
46: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mv</span>(<span class="ruby-identifier">built_gem_path</span>, <span class="ruby-value str">'pkg'</span>)
|
||||
47: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-node">"#{name} #{version} built to pkg/#{file_name}"</span>
|
||||
48: }
|
||||
49: <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">base</span>, <span class="ruby-value str">'pkg'</span>, <span class="ruby-identifier">file_name</span>)
|
||||
50: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 42</span>
|
||||
42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build_gem</span>
|
||||
43: <span class="ruby-identifier">file_name</span> = <span class="ruby-keyword kw">nil</span>
|
||||
44: <span class="ruby-identifier">sh</span>(<span class="ruby-node">"gem build '#{spec_path}'"</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">out</span>, <span class="ruby-identifier">code</span><span class="ruby-operator">|</span>
|
||||
45: <span class="ruby-identifier">raise</span> <span class="ruby-identifier">out</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">out</span>[<span class="ruby-regexp re">/Successfully/</span>]
|
||||
46: <span class="ruby-identifier">file_name</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">built_gem_path</span>)
|
||||
47: <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">base</span>, <span class="ruby-value str">'pkg'</span>))
|
||||
48: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mv</span>(<span class="ruby-identifier">built_gem_path</span>, <span class="ruby-value str">'pkg'</span>)
|
||||
49: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-node">"#{name} #{version} built to pkg/#{file_name}"</span>
|
||||
50: }
|
||||
51: <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">base</span>, <span class="ruby-value str">'pkg'</span>, <span class="ruby-identifier">file_name</span>)
|
||||
52: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -535,23 +562,23 @@
|
|||
<div class="method-source-code"
|
||||
id="install-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 23</span>
|
||||
23: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install</span>
|
||||
24: <span class="ruby-identifier">desc</span> <span class="ruby-node">"Build #{name}-#{version}.gem into the pkg directory"</span>
|
||||
25: <span class="ruby-identifier">task</span> <span class="ruby-value str">'build'</span> <span class="ruby-keyword kw">do</span>
|
||||
26: <span class="ruby-identifier">build_gem</span>
|
||||
27: <span class="ruby-keyword kw">end</span>
|
||||
28:
|
||||
29: <span class="ruby-identifier">desc</span> <span class="ruby-node">"Build and install #{name}-#{version}.gem into system gems"</span>
|
||||
30: <span class="ruby-identifier">task</span> <span class="ruby-value str">'install'</span> <span class="ruby-keyword kw">do</span>
|
||||
31: <span class="ruby-identifier">install_gem</span>
|
||||
32: <span class="ruby-keyword kw">end</span>
|
||||
33:
|
||||
34: <span class="ruby-identifier">desc</span> <span class="ruby-node">"Create tag #{version_tag} and build and push #{name}-#{version}.gem to Rubygems"</span>
|
||||
35: <span class="ruby-identifier">task</span> <span class="ruby-value str">'release'</span> <span class="ruby-keyword kw">do</span>
|
||||
36: <span class="ruby-identifier">release_gem</span>
|
||||
37: <span class="ruby-keyword kw">end</span>
|
||||
38: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 25</span>
|
||||
25: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install</span>
|
||||
26: <span class="ruby-identifier">desc</span> <span class="ruby-node">"Build #{name}-#{version}.gem into the pkg directory"</span>
|
||||
27: <span class="ruby-identifier">task</span> <span class="ruby-value str">'build'</span> <span class="ruby-keyword kw">do</span>
|
||||
28: <span class="ruby-identifier">build_gem</span>
|
||||
29: <span class="ruby-keyword kw">end</span>
|
||||
30:
|
||||
31: <span class="ruby-identifier">desc</span> <span class="ruby-node">"Build and install #{name}-#{version}.gem into system gems"</span>
|
||||
32: <span class="ruby-identifier">task</span> <span class="ruby-value str">'install'</span> <span class="ruby-keyword kw">do</span>
|
||||
33: <span class="ruby-identifier">install_gem</span>
|
||||
34: <span class="ruby-keyword kw">end</span>
|
||||
35:
|
||||
36: <span class="ruby-identifier">desc</span> <span class="ruby-node">"Create tag #{version_tag} and build and push #{name}-#{version}.gem to Rubygems"</span>
|
||||
37: <span class="ruby-identifier">task</span> <span class="ruby-value str">'release'</span> <span class="ruby-keyword kw">do</span>
|
||||
38: <span class="ruby-identifier">release_gem</span>
|
||||
39: <span class="ruby-keyword kw">end</span>
|
||||
40: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -582,13 +609,13 @@
|
|||
<div class="method-source-code"
|
||||
id="install-gem-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 52</span>
|
||||
52: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install_gem</span>
|
||||
53: <span class="ruby-identifier">built_gem_path</span> = <span class="ruby-identifier">build_gem</span>
|
||||
54: <span class="ruby-identifier">out</span>, <span class="ruby-identifier">code</span> = <span class="ruby-identifier">sh_with_code</span>(<span class="ruby-node">"gem install #{built_gem_path}"</span>)
|
||||
55: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Couldn't install gem, run `gem install #{built_gem_path}' for more detailed output"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">out</span>[<span class="ruby-regexp re">/Successfully installed/</span>]
|
||||
56: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-node">"#{name} (#{version}) installed"</span>
|
||||
57: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 54</span>
|
||||
54: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install_gem</span>
|
||||
55: <span class="ruby-identifier">built_gem_path</span> = <span class="ruby-identifier">build_gem</span>
|
||||
56: <span class="ruby-identifier">out</span>, <span class="ruby-identifier">_</span> = <span class="ruby-identifier">sh_with_code</span>(<span class="ruby-node">"gem install '#{built_gem_path}'"</span>)
|
||||
57: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Couldn't install gem, run `gem install #{built_gem_path}' for more detailed output"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">out</span>[<span class="ruby-regexp re">/Successfully installed/</span>]
|
||||
58: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-node">"#{name} (#{version}) installed"</span>
|
||||
59: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -619,16 +646,16 @@
|
|||
<div class="method-source-code"
|
||||
id="release-gem-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 59</span>
|
||||
59: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">release_gem</span>
|
||||
60: <span class="ruby-identifier">guard_clean</span>
|
||||
61: <span class="ruby-identifier">guard_already_tagged</span>
|
||||
62: <span class="ruby-identifier">built_gem_path</span> = <span class="ruby-identifier">build_gem</span>
|
||||
63: <span class="ruby-identifier">tag_version</span> {
|
||||
64: <span class="ruby-identifier">git_push</span>
|
||||
65: <span class="ruby-identifier">rubygem_push</span>(<span class="ruby-identifier">built_gem_path</span>)
|
||||
66: }
|
||||
67: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 61</span>
|
||||
61: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">release_gem</span>
|
||||
62: <span class="ruby-identifier">guard_clean</span>
|
||||
63: <span class="ruby-identifier">guard_already_tagged</span>
|
||||
64: <span class="ruby-identifier">built_gem_path</span> = <span class="ruby-identifier">build_gem</span>
|
||||
65: <span class="ruby-identifier">tag_version</span> {
|
||||
66: <span class="ruby-identifier">git_push</span>
|
||||
67: <span class="ruby-identifier">rubygem_push</span>(<span class="ruby-identifier">built_gem_path</span>)
|
||||
68: }
|
||||
69: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -665,10 +692,10 @@
|
|||
<div class="method-source-code"
|
||||
id="built-gem-path-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 76</span>
|
||||
76: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">built_gem_path</span>
|
||||
77: <span class="ruby-constant">Dir</span>[<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">base</span>, <span class="ruby-node">"#{name}-*.gem"</span>)].<span class="ruby-identifier">sort_by</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">mtime</span>(<span class="ruby-identifier">f</span>)}.<span class="ruby-identifier">last</span>
|
||||
78: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 78</span>
|
||||
78: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">built_gem_path</span>
|
||||
79: <span class="ruby-constant">Dir</span>[<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">base</span>, <span class="ruby-node">"#{name}-*.gem"</span>)].<span class="ruby-identifier">sort_by</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">mtime</span>(<span class="ruby-identifier">f</span>)}.<span class="ruby-identifier">last</span>
|
||||
80: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -699,11 +726,10 @@
|
|||
<div class="method-source-code"
|
||||
id="clean--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 102</span>
|
||||
102: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clean?</span>
|
||||
103: <span class="ruby-identifier">out</span>, <span class="ruby-identifier">code</span> = <span class="ruby-identifier">sh_with_code</span>(<span class="ruby-value str">"git diff --exit-code"</span>)
|
||||
104: <span class="ruby-identifier">code</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
||||
105: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 104</span>
|
||||
104: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clean?</span>
|
||||
105: <span class="ruby-identifier">sh_with_code</span>(<span class="ruby-value str">"git diff --exit-code"</span>)[<span class="ruby-value">1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
||||
106: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -734,12 +760,12 @@
|
|||
<div class="method-source-code"
|
||||
id="git-push-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 80</span>
|
||||
80: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">git_push</span>
|
||||
81: <span class="ruby-identifier">perform_git_push</span>
|
||||
82: <span class="ruby-identifier">perform_git_push</span> <span class="ruby-value str">' --tags'</span>
|
||||
83: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-value str">"Pushed git commits and tags"</span>
|
||||
84: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 82</span>
|
||||
82: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">git_push</span>
|
||||
83: <span class="ruby-identifier">perform_git_push</span>
|
||||
84: <span class="ruby-identifier">perform_git_push</span> <span class="ruby-value str">' --tags'</span>
|
||||
85: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-value str">"Pushed git commits and tags"</span>
|
||||
86: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -770,12 +796,12 @@
|
|||
<div class="method-source-code"
|
||||
id="guard-already-tagged-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 92</span>
|
||||
92: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">guard_already_tagged</span>
|
||||
93: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">sh</span>(<span class="ruby-value str">'git tag'</span>).<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/\n/</span>).<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">version_tag</span>)
|
||||
94: <span class="ruby-identifier">raise</span>(<span class="ruby-value str">"This tag has already been committed to the repo."</span>)
|
||||
95: <span class="ruby-keyword kw">end</span>
|
||||
96: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 94</span>
|
||||
94: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">guard_already_tagged</span>
|
||||
95: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">sh</span>(<span class="ruby-value str">'git tag'</span>).<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/\n/</span>).<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">version_tag</span>)
|
||||
96: <span class="ruby-identifier">raise</span>(<span class="ruby-value str">"This tag has already been committed to the repo."</span>)
|
||||
97: <span class="ruby-keyword kw">end</span>
|
||||
98: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -806,10 +832,10 @@
|
|||
<div class="method-source-code"
|
||||
id="guard-clean-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 98</span>
|
||||
98: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">guard_clean</span>
|
||||
99: <span class="ruby-identifier">clean?</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">raise</span>(<span class="ruby-value str">"There are files that need to be committed first."</span>)
|
||||
100: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 100</span>
|
||||
100: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">guard_clean</span>
|
||||
101: <span class="ruby-identifier">clean?</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">raise</span>(<span class="ruby-value str">"There are files that need to be committed first."</span>)
|
||||
102: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -840,10 +866,10 @@
|
|||
<div class="method-source-code"
|
||||
id="name-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 125</span>
|
||||
125: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">name</span>
|
||||
126: <span class="ruby-identifier">gemspec</span>.<span class="ruby-identifier">name</span>
|
||||
127: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 126</span>
|
||||
126: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">name</span>
|
||||
127: <span class="ruby-identifier">gemspec</span>.<span class="ruby-identifier">name</span>
|
||||
128: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -874,12 +900,12 @@
|
|||
<div class="method-source-code"
|
||||
id="perform-git-push-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 86</span>
|
||||
86: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">perform_git_push</span>(<span class="ruby-identifier">options</span> = <span class="ruby-value str">''</span>)
|
||||
87: <span class="ruby-identifier">cmd</span> = <span class="ruby-node">"git push #{options}"</span>
|
||||
88: <span class="ruby-identifier">out</span>, <span class="ruby-identifier">code</span> = <span class="ruby-identifier">sh_with_code</span>(<span class="ruby-identifier">cmd</span>)
|
||||
89: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Couldn't git push. `#{cmd}' failed with the following output:\n\n#{out}\n"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">code</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
||||
90: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 88</span>
|
||||
88: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">perform_git_push</span>(<span class="ruby-identifier">options</span> = <span class="ruby-value str">''</span>)
|
||||
89: <span class="ruby-identifier">cmd</span> = <span class="ruby-node">"git push #{options}"</span>
|
||||
90: <span class="ruby-identifier">out</span>, <span class="ruby-identifier">code</span> = <span class="ruby-identifier">sh_with_code</span>(<span class="ruby-identifier">cmd</span>)
|
||||
91: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Couldn't git push. `#{cmd}' failed with the following output:\n\n#{out}\n"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">code</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
||||
92: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -910,12 +936,12 @@
|
|||
<div class="method-source-code"
|
||||
id="rubygem-push-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 70</span>
|
||||
70: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rubygem_push</span>(<span class="ruby-identifier">path</span>)
|
||||
71: <span class="ruby-identifier">out</span>, <span class="ruby-identifier">status</span> = <span class="ruby-identifier">sh</span>(<span class="ruby-node">"gem push #{path}"</span>)
|
||||
72: <span class="ruby-identifier">raise</span> <span class="ruby-value str">"Gem push failed due to lack of RubyGems.org credentials."</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">out</span>[<span class="ruby-regexp re">/Enter your RubyGems.org credentials/</span>]
|
||||
73: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-node">"Pushed #{name} #{version} to rubygems.org"</span>
|
||||
74: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 72</span>
|
||||
72: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rubygem_push</span>(<span class="ruby-identifier">path</span>)
|
||||
73: <span class="ruby-identifier">out</span>, <span class="ruby-identifier">_</span> = <span class="ruby-identifier">sh</span>(<span class="ruby-node">"gem push '#{path}'"</span>)
|
||||
74: <span class="ruby-identifier">raise</span> <span class="ruby-value str">"Gem push failed due to lack of RubyGems.org credentials."</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">out</span>[<span class="ruby-regexp re">/Enter your RubyGems.org credentials/</span>]
|
||||
75: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-node">"Pushed #{name} #{version} to rubygems.org"</span>
|
||||
76: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -946,11 +972,11 @@
|
|||
<div class="method-source-code"
|
||||
id="sh-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 129</span>
|
||||
129: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sh</span>(<span class="ruby-identifier">cmd</span>, &<span class="ruby-identifier">block</span>)
|
||||
130: <span class="ruby-identifier">out</span>, <span class="ruby-identifier">code</span> = <span class="ruby-identifier">sh_with_code</span>(<span class="ruby-identifier">cmd</span>, &<span class="ruby-identifier">block</span>)
|
||||
131: <span class="ruby-identifier">code</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">out</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">raise</span>(<span class="ruby-identifier">out</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">?</span> <span class="ruby-node">"Running `#{cmd}' failed. Run this command directly for more detailed output."</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">out</span>)
|
||||
132: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 130</span>
|
||||
130: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sh</span>(<span class="ruby-identifier">cmd</span>, &<span class="ruby-identifier">block</span>)
|
||||
131: <span class="ruby-identifier">out</span>, <span class="ruby-identifier">code</span> = <span class="ruby-identifier">sh_with_code</span>(<span class="ruby-identifier">cmd</span>, &<span class="ruby-identifier">block</span>)
|
||||
132: <span class="ruby-identifier">code</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">out</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">raise</span>(<span class="ruby-identifier">out</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">?</span> <span class="ruby-node">"Running `#{cmd}' failed. Run this command directly for more detailed output."</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">out</span>)
|
||||
133: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -981,19 +1007,19 @@
|
|||
<div class="method-source-code"
|
||||
id="sh-with-code-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 134</span>
|
||||
134: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sh_with_code</span>(<span class="ruby-identifier">cmd</span>, &<span class="ruby-identifier">block</span>)
|
||||
135: <span class="ruby-identifier">cmd</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" 2>&1"</span>
|
||||
136: <span class="ruby-identifier">outbuf</span> = <span class="ruby-value str">''</span>
|
||||
137: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-identifier">cmd</span>)
|
||||
138: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">base</span>) {
|
||||
139: <span class="ruby-identifier">outbuf</span> = <span class="ruby-node">`#{cmd}`</span>
|
||||
140: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$?</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
||||
141: <span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">outbuf</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>
|
||||
142: <span class="ruby-keyword kw">end</span>
|
||||
143: }
|
||||
144: [<span class="ruby-identifier">outbuf</span>, <span class="ruby-identifier">$?</span>]
|
||||
145: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 135</span>
|
||||
135: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sh_with_code</span>(<span class="ruby-identifier">cmd</span>, &<span class="ruby-identifier">block</span>)
|
||||
136: <span class="ruby-identifier">cmd</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" 2>&1"</span>
|
||||
137: <span class="ruby-identifier">outbuf</span> = <span class="ruby-value str">''</span>
|
||||
138: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-identifier">cmd</span>)
|
||||
139: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">base</span>) {
|
||||
140: <span class="ruby-identifier">outbuf</span> = <span class="ruby-node">`#{cmd}`</span>
|
||||
141: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$?</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
||||
142: <span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">outbuf</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>
|
||||
143: <span class="ruby-keyword kw">end</span>
|
||||
144: }
|
||||
145: [<span class="ruby-identifier">outbuf</span>, <span class="ruby-identifier">$?</span>]
|
||||
146: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1024,16 +1050,16 @@
|
|||
<div class="method-source-code"
|
||||
id="tag-version-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 107</span>
|
||||
107: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tag_version</span>
|
||||
108: <span class="ruby-identifier">sh</span> <span class="ruby-node">"git tag -a -m \"Version #{version}\" #{version_tag}"</span>
|
||||
109: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-node">"Tagged #{version_tag}"</span>
|
||||
110: <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
||||
111: <span class="ruby-keyword kw">rescue</span>
|
||||
112: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">"Untagged #{version_tag} due to error"</span>
|
||||
113: <span class="ruby-identifier">sh_with_code</span> <span class="ruby-node">"git tag -d #{version_tag}"</span>
|
||||
114: <span class="ruby-identifier">raise</span>
|
||||
115: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 108</span>
|
||||
108: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tag_version</span>
|
||||
109: <span class="ruby-identifier">sh</span> <span class="ruby-node">"git tag -a -m \"Version #{version}\" #{version_tag}"</span>
|
||||
110: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-node">"Tagged #{version_tag}"</span>
|
||||
111: <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
||||
112: <span class="ruby-keyword kw">rescue</span>
|
||||
113: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">"Untagged #{version_tag} due to error"</span>
|
||||
114: <span class="ruby-identifier">sh_with_code</span> <span class="ruby-node">"git tag -d #{version_tag}"</span>
|
||||
115: <span class="ruby-identifier">raise</span>
|
||||
116: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1064,10 +1090,10 @@
|
|||
<div class="method-source-code"
|
||||
id="version-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 117</span>
|
||||
117: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">version</span>
|
||||
118: <span class="ruby-identifier">gemspec</span>.<span class="ruby-identifier">version</span>
|
||||
119: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 118</span>
|
||||
118: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">version</span>
|
||||
119: <span class="ruby-identifier">gemspec</span>.<span class="ruby-identifier">version</span>
|
||||
120: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1098,10 +1124,10 @@
|
|||
<div class="method-source-code"
|
||||
id="version-tag-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 121</span>
|
||||
121: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">version_tag</span>
|
||||
122: <span class="ruby-node">"v#{version}"</span>
|
||||
123: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/gem_helper.rb, line 122</span>
|
||||
122: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">version_tag</span>
|
||||
123: <span class="ruby-node">"v#{version}"</span>
|
||||
124: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -81,6 +81,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -190,16 +194,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
||||
|
@ -336,17 +352,17 @@
|
|||
<div class="method-source-code"
|
||||
id="generic-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_ext.rb, line 193</span>
|
||||
193: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generic</span>(<span class="ruby-identifier">p</span>)
|
||||
194: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">p</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">p</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span><span class="ruby-operator">::</span><span class="ruby-constant">RUBY</span>
|
||||
195:
|
||||
196: <span class="ruby-constant">GENERIC_CACHE</span>[<span class="ruby-identifier">p</span>] <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">begin</span>
|
||||
197: <span class="ruby-identifier">found</span> = <span class="ruby-constant">GENERICS</span>.<span class="ruby-identifier">find</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p2</span><span class="ruby-operator">|</span>
|
||||
198: <span class="ruby-identifier">p2</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">p</span>.<span class="ruby-identifier">os</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">p2</span>.<span class="ruby-identifier">os</span>
|
||||
199: <span class="ruby-keyword kw">end</span>
|
||||
200: <span class="ruby-identifier">found</span> <span class="ruby-operator">||</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span><span class="ruby-operator">::</span><span class="ruby-constant">RUBY</span>
|
||||
201: <span class="ruby-keyword kw">end</span>
|
||||
202: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_ext.rb, line 207</span>
|
||||
207: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generic</span>(<span class="ruby-identifier">p</span>)
|
||||
208: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">p</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">p</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span><span class="ruby-operator">::</span><span class="ruby-constant">RUBY</span>
|
||||
209:
|
||||
210: <span class="ruby-constant">GENERIC_CACHE</span>[<span class="ruby-identifier">p</span>] <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">begin</span>
|
||||
211: <span class="ruby-identifier">found</span> = <span class="ruby-constant">GENERICS</span>.<span class="ruby-identifier">find</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p2</span><span class="ruby-operator">|</span>
|
||||
212: <span class="ruby-identifier">p2</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">p</span>.<span class="ruby-identifier">os</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">p2</span>.<span class="ruby-identifier">os</span>
|
||||
213: <span class="ruby-keyword kw">end</span>
|
||||
214: <span class="ruby-identifier">found</span> <span class="ruby-operator">||</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span><span class="ruby-operator">::</span><span class="ruby-constant">RUBY</span>
|
||||
215: <span class="ruby-keyword kw">end</span>
|
||||
216: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -79,6 +79,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -188,16 +192,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
|
@ -79,6 +79,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -188,16 +192,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
|
@ -79,6 +79,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -188,16 +192,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
|
@ -79,6 +79,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -188,16 +192,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
|
@ -79,6 +79,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -188,16 +192,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
|
@ -96,6 +96,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -205,16 +209,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
||||
|
@ -557,7 +573,7 @@
|
|||
83:
|
||||
84: <span class="ruby-comment cmt"># For gems in Gemfile, add details</span>
|
||||
85: <span class="ruby-ivar">@env</span>.<span class="ruby-identifier">current_dependencies</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dependency</span><span class="ruby-operator">|</span>
|
||||
86: <span class="ruby-identifier">node</span> = <span class="ruby-ivar">@nodes</span>[<span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">name</span>]
|
||||
86: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">node</span> = <span class="ruby-ivar">@nodes</span>[<span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">name</span>]
|
||||
87: <span class="ruby-identifier">node</span>.<span class="ruby-identifier">is_user</span> = <span class="ruby-keyword kw">true</span>
|
||||
88:
|
||||
89: <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">groups</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">group</span><span class="ruby-operator">|</span>
|
|
@ -88,6 +88,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -197,16 +201,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
|
@ -129,6 +129,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -238,16 +242,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
||||
|
@ -853,7 +869,7 @@
|
|||
104: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">same_version?</span>(<span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span>)
|
||||
105: <span class="ruby-identifier">regex</span> = <span class="ruby-regexp re">/^(.*?)(?:\.0)*$/</span>
|
||||
106:
|
||||
107: <span class="ruby-identifier">ret</span> = <span class="ruby-identifier">a</span>.<span class="ruby-identifier">to_s</span>[<span class="ruby-identifier">regex</span>, <span class="ruby-value">1</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">to_s</span>[<span class="ruby-identifier">regex</span>, <span class="ruby-value">1</span>]
|
||||
107: <span class="ruby-identifier">a</span>.<span class="ruby-identifier">to_s</span>[<span class="ruby-identifier">regex</span>, <span class="ruby-value">1</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">to_s</span>[<span class="ruby-identifier">regex</span>, <span class="ruby-value">1</span>]
|
||||
108: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
|
@ -889,18 +905,17 @@
|
|||
115: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">search_by_dependency</span>(<span class="ruby-identifier">dependency</span>)
|
||||
116: <span class="ruby-ivar">@cache</span>[<span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">hash</span>] <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">begin</span>
|
||||
117: <span class="ruby-identifier">specs</span> = <span class="ruby-ivar">@specs</span>[<span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">name</span>]
|
||||
118:
|
||||
119: <span class="ruby-identifier">wants_prerelease</span> = <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">requirement</span>.<span class="ruby-identifier">prerelease?</span>
|
||||
120: <span class="ruby-identifier">only_prerelease</span> = <span class="ruby-identifier">specs</span>.<span class="ruby-identifier">all?</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">spec</span><span class="ruby-operator">|</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">version</span>.<span class="ruby-identifier">prerelease?</span> }
|
||||
121: <span class="ruby-identifier">found</span> = <span class="ruby-identifier">specs</span>.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">spec</span><span class="ruby-operator">|</span> <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">matches_spec?</span>(<span class="ruby-identifier">spec</span>) <span class="ruby-operator">&&</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">platform</span>) }
|
||||
122:
|
||||
123: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">wants_prerelease</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">only_prerelease</span>
|
||||
124: <span class="ruby-identifier">found</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">spec</span><span class="ruby-operator">|</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">version</span>.<span class="ruby-identifier">prerelease?</span> }
|
||||
125: <span class="ruby-keyword kw">end</span>
|
||||
126:
|
||||
127: <span class="ruby-identifier">found</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">version</span>, <span class="ruby-identifier">s</span>.<span class="ruby-identifier">platform</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'ruby'</span> <span class="ruby-operator">?</span> <span class="ruby-value str">"\00""</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">platform</span>.<span class="ruby-identifier">to_s</span>] }
|
||||
128: <span class="ruby-keyword kw">end</span>
|
||||
129: <span class="ruby-keyword kw">end</span></pre>
|
||||
118: <span class="ruby-identifier">found</span> = <span class="ruby-identifier">specs</span>.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">spec</span><span class="ruby-operator">|</span> <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">matches_spec?</span>(<span class="ruby-identifier">spec</span>) <span class="ruby-operator">&&</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">platform</span>) }
|
||||
119:
|
||||
120: <span class="ruby-identifier">wants_prerelease</span> = <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">requirement</span>.<span class="ruby-identifier">prerelease?</span>
|
||||
121: <span class="ruby-identifier">only_prerelease</span> = <span class="ruby-identifier">specs</span>.<span class="ruby-identifier">all?</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">spec</span><span class="ruby-operator">|</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">version</span>.<span class="ruby-identifier">prerelease?</span> }
|
||||
122: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">wants_prerelease</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">only_prerelease</span>
|
||||
123: <span class="ruby-identifier">found</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">spec</span><span class="ruby-operator">|</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">version</span>.<span class="ruby-identifier">prerelease?</span> }
|
||||
124: <span class="ruby-keyword kw">end</span>
|
||||
125:
|
||||
126: <span class="ruby-identifier">found</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">version</span>, <span class="ruby-identifier">s</span>.<span class="ruby-identifier">platform</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'ruby'</span> <span class="ruby-operator">?</span> <span class="ruby-value str">"\00""</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">platform</span>.<span class="ruby-identifier">to_s</span>] }
|
||||
127: <span class="ruby-keyword kw">end</span>
|
||||
128: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -92,6 +92,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -201,16 +205,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
||||
|
@ -374,61 +390,62 @@
|
|||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/installer.rb, line 12</span>
|
||||
12: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>(<span class="ruby-identifier">options</span>)
|
||||
13: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:frozen</span>]
|
||||
14: <span class="ruby-ivar">@definition</span>.<span class="ruby-identifier">ensure_equivalent_gemfile_and_lockfile</span>
|
||||
15: <span class="ruby-keyword kw">end</span>
|
||||
16:
|
||||
17: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dependencies</span>.<span class="ruby-identifier">empty?</span>
|
||||
18: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">"The Gemfile specifies no dependencies"</span>
|
||||
19: <span class="ruby-keyword kw">return</span>
|
||||
20: <span class="ruby-keyword kw">end</span>
|
||||
21:
|
||||
22: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">default_lockfile</span>.<span class="ruby-identifier">exist?</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">options</span>[<span class="ruby-value str">"update"</span>]
|
||||
23: <span class="ruby-keyword kw">begin</span>
|
||||
24: <span class="ruby-identifier">tmpdef</span> = <span class="ruby-constant">Definition</span>.<span class="ruby-identifier">build</span>(<span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">default_gemfile</span>, <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">default_lockfile</span>, <span class="ruby-keyword kw">nil</span>)
|
||||
25: <span class="ruby-identifier">local</span> = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">tmpdef</span>.<span class="ruby-identifier">new_platform?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">tmpdef</span>.<span class="ruby-identifier">missing_specs</span>.<span class="ruby-identifier">any?</span>
|
||||
26: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">BundlerError</span>
|
||||
27: <span class="ruby-keyword kw">end</span>
|
||||
13: <span class="ruby-comment cmt"># Create the BUNDLE_PATH directory</span>
|
||||
14: <span class="ruby-keyword kw">begin</span>
|
||||
15: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">bundle_path</span>.<span class="ruby-identifier">mkpath</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">bundle_path</span>.<span class="ruby-identifier">exist?</span>
|
||||
16: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">EEXIST</span>
|
||||
17: <span class="ruby-identifier">raise</span> <span class="ruby-constant">PathError</span>, <span class="ruby-node">"Could not install to path `#{Bundler.settings[:path]}` "</span> <span class="ruby-operator">+</span>
|
||||
18: <span class="ruby-value str">"because of an invalid symlink. Remove the symlink so the directory can be created."</span>
|
||||
19: <span class="ruby-keyword kw">end</span>
|
||||
20:
|
||||
21: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:frozen</span>]
|
||||
22: <span class="ruby-ivar">@definition</span>.<span class="ruby-identifier">ensure_equivalent_gemfile_and_lockfile</span>(<span class="ruby-identifier">options</span>[<span class="ruby-value">:deployment</span>])
|
||||
23: <span class="ruby-keyword kw">end</span>
|
||||
24:
|
||||
25: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dependencies</span>.<span class="ruby-identifier">empty?</span>
|
||||
26: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">"The Gemfile specifies no dependencies"</span>
|
||||
27: <span class="ruby-keyword kw">return</span>
|
||||
28: <span class="ruby-keyword kw">end</span>
|
||||
29:
|
||||
30: <span class="ruby-comment cmt"># Since we are installing, we can resolve the definition</span>
|
||||
31: <span class="ruby-comment cmt"># using remote specs</span>
|
||||
32: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">local</span>
|
||||
33: <span class="ruby-identifier">options</span>[<span class="ruby-value str">"local"</span>] <span class="ruby-operator">?</span>
|
||||
34: <span class="ruby-ivar">@definition</span>.<span class="ruby-identifier">resolve_with_cache!</span> <span class="ruby-operator">:</span>
|
||||
35: <span class="ruby-ivar">@definition</span>.<span class="ruby-identifier">resolve_remotely!</span>
|
||||
30: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">default_lockfile</span>.<span class="ruby-identifier">exist?</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">options</span>[<span class="ruby-value str">"update"</span>]
|
||||
31: <span class="ruby-keyword kw">begin</span>
|
||||
32: <span class="ruby-identifier">tmpdef</span> = <span class="ruby-constant">Definition</span>.<span class="ruby-identifier">build</span>(<span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">default_gemfile</span>, <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">default_lockfile</span>, <span class="ruby-keyword kw">nil</span>)
|
||||
33: <span class="ruby-identifier">local</span> = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">tmpdef</span>.<span class="ruby-identifier">new_platform?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">tmpdef</span>.<span class="ruby-identifier">missing_specs</span>.<span class="ruby-identifier">any?</span>
|
||||
34: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">BundlerError</span>
|
||||
35: <span class="ruby-keyword kw">end</span>
|
||||
36: <span class="ruby-keyword kw">end</span>
|
||||
37:
|
||||
38: <span class="ruby-comment cmt"># Ensure that BUNDLE_PATH exists</span>
|
||||
39: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">bundle_path</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">bundle_path</span>)
|
||||
40:
|
||||
41: <span class="ruby-comment cmt"># Must install gems in the order that the resolver provides</span>
|
||||
42: <span class="ruby-comment cmt"># as dependencies might actually affect the installation of</span>
|
||||
43: <span class="ruby-comment cmt"># the gem.</span>
|
||||
44: <span class="ruby-identifier">specs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">spec</span><span class="ruby-operator">|</span>
|
||||
45: <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-identifier">spec</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:fetch</span>)
|
||||
46:
|
||||
47: <span class="ruby-comment cmt"># unless requested_specs.include?(spec)</span>
|
||||
48: <span class="ruby-comment cmt"># Bundler.ui.debug " * Not in requested group; skipping."</span>
|
||||
49: <span class="ruby-comment cmt"># next</span>
|
||||
50: <span class="ruby-comment cmt"># end</span>
|
||||
38: <span class="ruby-comment cmt"># Since we are installing, we can resolve the definition</span>
|
||||
39: <span class="ruby-comment cmt"># using remote specs</span>
|
||||
40: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">local</span>
|
||||
41: <span class="ruby-identifier">options</span>[<span class="ruby-value str">"local"</span>] <span class="ruby-operator">?</span>
|
||||
42: <span class="ruby-ivar">@definition</span>.<span class="ruby-identifier">resolve_with_cache!</span> <span class="ruby-operator">:</span>
|
||||
43: <span class="ruby-ivar">@definition</span>.<span class="ruby-identifier">resolve_remotely!</span>
|
||||
44: <span class="ruby-keyword kw">end</span>
|
||||
45:
|
||||
46: <span class="ruby-comment cmt"># Must install gems in the order that the resolver provides</span>
|
||||
47: <span class="ruby-comment cmt"># as dependencies might actually affect the installation of</span>
|
||||
48: <span class="ruby-comment cmt"># the gem.</span>
|
||||
49: <span class="ruby-identifier">specs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">spec</span><span class="ruby-operator">|</span>
|
||||
50: <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-identifier">spec</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:fetch</span>)
|
||||
51:
|
||||
52: <span class="ruby-keyword kw">begin</span>
|
||||
53: <span class="ruby-identifier">old_args</span> = <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Command</span>.<span class="ruby-identifier">build_args</span>
|
||||
54: <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Command</span>.<span class="ruby-identifier">build_args</span> = [<span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-node">"build.#{spec.name}"</span>]]
|
||||
55: <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">install</span>(<span class="ruby-identifier">spec</span>)
|
||||
56: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">debug</span> <span class="ruby-node">"from #{spec.loaded_from} "</span>
|
||||
57: <span class="ruby-keyword kw">ensure</span>
|
||||
58: <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Command</span>.<span class="ruby-identifier">build_args</span> = <span class="ruby-identifier">old_args</span>
|
||||
59: <span class="ruby-keyword kw">end</span>
|
||||
60:
|
||||
61: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">""</span>
|
||||
62: <span class="ruby-identifier">generate_bundler_executable_stubs</span>(<span class="ruby-identifier">spec</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:bin</span>]
|
||||
63: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span>(<span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">tmp</span>)
|
||||
64: <span class="ruby-keyword kw">end</span>
|
||||
65:
|
||||
66: <span class="ruby-identifier">lock</span>
|
||||
67: <span class="ruby-keyword kw">end</span></pre>
|
||||
52: <span class="ruby-comment cmt"># unless requested_specs.include?(spec)</span>
|
||||
53: <span class="ruby-comment cmt"># Bundler.ui.debug " * Not in requested group; skipping."</span>
|
||||
54: <span class="ruby-comment cmt"># next</span>
|
||||
55: <span class="ruby-comment cmt"># end</span>
|
||||
56:
|
||||
57: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">with_build_args</span> [<span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-node">"build.#{spec.name}"</span>]] <span class="ruby-keyword kw">do</span>
|
||||
58: <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">install</span>(<span class="ruby-identifier">spec</span>)
|
||||
59: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">debug</span> <span class="ruby-node">"from #{spec.loaded_from} "</span>
|
||||
60: <span class="ruby-keyword kw">end</span>
|
||||
61:
|
||||
62: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">""</span>
|
||||
63: <span class="ruby-identifier">generate_bundler_executable_stubs</span>(<span class="ruby-identifier">spec</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:bin</span>]
|
||||
64: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span>(<span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">tmp</span>)
|
||||
65: <span class="ruby-keyword kw">end</span>
|
||||
66:
|
||||
67: <span class="ruby-identifier">lock</span>
|
||||
68: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -465,20 +482,20 @@
|
|||
<div class="method-source-code"
|
||||
id="generate-bundler-executable-stubs-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/installer.rb, line 71</span>
|
||||
71: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate_bundler_executable_stubs</span>(<span class="ruby-identifier">spec</span>)
|
||||
72: <span class="ruby-identifier">bin_path</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">bin_path</span>
|
||||
73: <span class="ruby-identifier">template</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-value str">'../templates/Executable'</span>, <span class="ruby-keyword kw">__FILE__</span>))
|
||||
74: <span class="ruby-identifier">relative_gemfile_path</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">default_gemfile</span>.<span class="ruby-identifier">relative_path_from</span>(<span class="ruby-identifier">bin_path</span>)
|
||||
75: <span class="ruby-identifier">ruby_command</span> = <span class="ruby-constant">Thor</span><span class="ruby-operator">::</span><span class="ruby-constant">Util</span>.<span class="ruby-identifier">ruby_command</span>
|
||||
76:
|
||||
77: <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">executables</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">executable</span><span class="ruby-operator">|</span>
|
||||
78: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">executable</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"bundle"</span>
|
||||
79: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span> <span class="ruby-node">"#{bin_path}/#{executable}"</span>, <span class="ruby-value str">'w'</span>, <span class="ruby-value">0755</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
||||
80: <span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span> <span class="ruby-constant">ERB</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">template</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-value str">'-'</span>).<span class="ruby-identifier">result</span>(<span class="ruby-identifier">binding</span>)
|
||||
81: <span class="ruby-keyword kw">end</span>
|
||||
82: <span class="ruby-keyword kw">end</span>
|
||||
83: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/installer.rb, line 72</span>
|
||||
72: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate_bundler_executable_stubs</span>(<span class="ruby-identifier">spec</span>)
|
||||
73: <span class="ruby-identifier">bin_path</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">bin_path</span>
|
||||
74: <span class="ruby-identifier">template</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-value str">'../templates/Executable'</span>, <span class="ruby-keyword kw">__FILE__</span>))
|
||||
75: <span class="ruby-identifier">relative_gemfile_path</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">default_gemfile</span>.<span class="ruby-identifier">relative_path_from</span>(<span class="ruby-identifier">bin_path</span>)
|
||||
76: <span class="ruby-identifier">ruby_command</span> = <span class="ruby-constant">Thor</span><span class="ruby-operator">::</span><span class="ruby-constant">Util</span>.<span class="ruby-identifier">ruby_command</span>
|
||||
77:
|
||||
78: <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">executables</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">executable</span><span class="ruby-operator">|</span>
|
||||
79: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">executable</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"bundle"</span>
|
||||
80: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span> <span class="ruby-node">"#{bin_path}/#{executable}"</span>, <span class="ruby-value str">'w'</span>, <span class="ruby-value">0755</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
||||
81: <span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span> <span class="ruby-constant">ERB</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">template</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-value str">'-'</span>).<span class="ruby-identifier">result</span>(<span class="ruby-identifier">binding</span>)
|
||||
82: <span class="ruby-keyword kw">end</span>
|
||||
83: <span class="ruby-keyword kw">end</span>
|
||||
84: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -79,6 +79,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -188,16 +192,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
|
@ -79,6 +79,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -188,16 +192,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
|
@ -113,6 +113,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -222,16 +226,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
||||
|
@ -627,7 +643,7 @@
|
|||
36: <span class="ruby-identifier">out</span> = <span class="ruby-node">" #{name} (#{version}-#{platform})\n"</span>
|
||||
37: <span class="ruby-keyword kw">end</span>
|
||||
38:
|
||||
39: <span class="ruby-identifier">dependencies</span>.<span class="ruby-identifier">sort_by</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-identifier">d</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">dep</span><span class="ruby-operator">|</span>
|
||||
39: <span class="ruby-identifier">dependencies</span>.<span class="ruby-identifier">sort_by</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">to_s</span> }.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dep</span><span class="ruby-operator">|</span>
|
||||
40: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-value">:development</span>
|
||||
41: <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" #{dep.to_lock}\n"</span>
|
||||
42: <span class="ruby-keyword kw">end</span>
|
|
@ -96,6 +96,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -205,16 +209,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
|
@ -92,6 +92,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -201,16 +205,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
||||
|
@ -330,12 +346,12 @@
|
|||
<div class="method-source-code"
|
||||
id="match-platform-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_ext.rb, line 208</span>
|
||||
208: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">match_platform</span>(<span class="ruby-identifier">p</span>)
|
||||
209: <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span><span class="ruby-operator">::</span><span class="ruby-constant">RUBY</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">platform</span> <span class="ruby-keyword kw">or</span>
|
||||
210: <span class="ruby-identifier">platform</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">p</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">platform</span> <span class="ruby-keyword kw">or</span>
|
||||
211: <span class="ruby-identifier">generic</span>(<span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">platform</span>)) <span class="ruby-operator">==</span> <span class="ruby-identifier">p</span>
|
||||
212: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_ext.rb, line 222</span>
|
||||
222: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">match_platform</span>(<span class="ruby-identifier">p</span>)
|
||||
223: <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span><span class="ruby-operator">::</span><span class="ruby-constant">RUBY</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">platform</span> <span class="ruby-keyword kw">or</span>
|
||||
224: <span class="ruby-identifier">platform</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">p</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">platform</span> <span class="ruby-keyword kw">or</span>
|
||||
225: <span class="ruby-identifier">generic</span>(<span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">platform</span>)) <span class="ruby-operator">==</span> <span class="ruby-identifier">p</span>
|
||||
226: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -79,6 +79,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -188,16 +192,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
|
@ -79,6 +79,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -188,16 +192,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
|
@ -109,6 +109,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -218,16 +222,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
|
@ -121,6 +121,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -230,16 +234,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
||||
|
@ -577,7 +593,7 @@ If the list of dependencies can be resolved, a
|
|||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/resolver.rb, line 409</span>
|
||||
409: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">error_message</span>
|
||||
410: <span class="ruby-identifier">output</span> = <span class="ruby-identifier">errors</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value str">""</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">o</span>, (<span class="ruby-identifier">conflict</span>, (<span class="ruby-identifier">origin</span>, <span class="ruby-identifier">requirement</span>))<span class="ruby-operator">|</span>
|
||||
410: <span class="ruby-identifier">errors</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value str">""</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">o</span>, (<span class="ruby-identifier">conflict</span>, (<span class="ruby-identifier">origin</span>, <span class="ruby-identifier">requirement</span>))<span class="ruby-operator">|</span>
|
||||
411:
|
||||
412: <span class="ruby-comment cmt"># origin is the SpecSet of specs from the Gemfile that is conflicted with</span>
|
||||
413: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">origin</span>
|
||||
|
@ -592,7 +608,7 @@ If the list of dependencies can be resolved, a
|
|||
422: <span class="ruby-identifier">o</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" Current Bundler version:\n"</span>
|
||||
423: <span class="ruby-identifier">newer_bundler_required</span> = <span class="ruby-identifier">requirement</span>.<span class="ruby-identifier">requirement</span> <span class="ruby-operator">></span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Requirement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">origin</span>.<span class="ruby-identifier">version</span>)
|
||||
424: <span class="ruby-comment cmt"># If the origin is a LockfileParser, it does not respond_to :required_by</span>
|
||||
425: <span class="ruby-keyword kw">elsif</span> <span class="ruby-operator">!</span><span class="ruby-identifier">origin</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:required_by</span>) <span class="ruby-operator">||</span> <span class="ruby-operator">!</span>(<span class="ruby-identifier">required_by</span> = <span class="ruby-identifier">origin</span>.<span class="ruby-identifier">required_by</span>.<span class="ruby-identifier">first</span>)
|
||||
425: <span class="ruby-keyword kw">elsif</span> <span class="ruby-operator">!</span><span class="ruby-identifier">origin</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:required_by</span>) <span class="ruby-operator">||</span> <span class="ruby-operator">!</span>(<span class="ruby-identifier">origin</span>.<span class="ruby-identifier">required_by</span>.<span class="ruby-identifier">first</span>)
|
||||
426: <span class="ruby-identifier">o</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" In snapshot (Gemfile.lock):\n"</span>
|
||||
427: <span class="ruby-keyword kw">end</span>
|
||||
428:
|
|
@ -117,6 +117,10 @@
|
|||
|
||||
<li class="file"><a href="../../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -226,16 +230,28 @@
|
|||
|
||||
<li><a href="../../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
1619
vendor/plugins/bundler/doc/bundler-1.0.15/rdoc/Bundler/RubygemsIntegration.html
vendored
Normal file
1619
vendor/plugins/bundler/doc/bundler-1.0.15/rdoc/Bundler/RubygemsIntegration.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
388
vendor/plugins/bundler/doc/bundler-1.0.15/rdoc/Bundler/RubygemsIntegration/AlmostModern.html
vendored
Normal file
388
vendor/plugins/bundler/doc/bundler-1.0.15/rdoc/Bundler/RubygemsIntegration/AlmostModern.html
vendored
Normal file
|
@ -0,0 +1,388 @@
|
|||
<?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::RubygemsIntegration::AlmostModern</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/rubygems_integration_rb.html?TB_iframe=true&height=550&width=785"
|
||||
class="thickbox" title="lib/bundler/rubygems_integration.rb">lib/bundler/rubygems_integration.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="Modern.html">Bundler::RubygemsIntegration::Modern</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-i-preserve_paths">#preserve_paths</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Included Modules -->
|
||||
|
||||
</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-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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/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::RubygemsIntegration::AlmostModern</h1>
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
Rubygems 1.8.0 to 1.8.4
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Constants -->
|
||||
|
||||
|
||||
<!-- Attributes -->
|
||||
|
||||
|
||||
<!-- Methods -->
|
||||
|
||||
<div id="public-instance-method-details" class="method-section section">
|
||||
<h3 class="section-header">Public Instance Methods</h3>
|
||||
|
||||
|
||||
<div id="preserve-paths-method" class="method-detail ">
|
||||
<a name="method-i-preserve_paths"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
|
||||
<span class="method-name">preserve_paths</span><span
|
||||
class="method-args">()</span>
|
||||
<span class="method-click-advice">click to toggle source</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
|
||||
<p>
|
||||
Rubygems [>= 1.8.0, < 1.8.5] has a bug that changes Gem.dir whenever you
|
||||
call Gem::Installer#install with an :install_dir set. We have to change it
|
||||
back for our sudo mode to work.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<div class="method-source-code"
|
||||
id="preserve-paths-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_integration.rb, line 301</span>
|
||||
301: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">preserve_paths</span>
|
||||
302: <span class="ruby-identifier">old_dir</span>, <span class="ruby-identifier">old_path</span> = <span class="ruby-identifier">gem_dir</span>, <span class="ruby-identifier">gem_path</span>
|
||||
303: <span class="ruby-keyword kw">yield</span>
|
||||
304: <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">use_paths</span>(<span class="ruby-identifier">old_dir</span>, <span class="ruby-identifier">old_path</span>)
|
||||
305: <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>
|
||||
|
377
vendor/plugins/bundler/doc/bundler-1.0.15/rdoc/Bundler/RubygemsIntegration/Deprecate.html
vendored
Normal file
377
vendor/plugins/bundler/doc/bundler-1.0.15/rdoc/Bundler/RubygemsIntegration/Deprecate.html
vendored
Normal file
|
@ -0,0 +1,377 @@
|
|||
<?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::RubygemsIntegration::Deprecate</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/rubygems_integration_rb.html?TB_iframe=true&height=550&width=785"
|
||||
class="thickbox" title="lib/bundler/rubygems_integration.rb">lib/bundler/rubygems_integration.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">Object</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-i-skip_during">#skip_during</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Included Modules -->
|
||||
|
||||
</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-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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/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::RubygemsIntegration::Deprecate</h1>
|
||||
|
||||
<div id="description">
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Constants -->
|
||||
|
||||
|
||||
<!-- Attributes -->
|
||||
|
||||
|
||||
<!-- Methods -->
|
||||
|
||||
<div id="public-instance-method-details" class="method-section section">
|
||||
<h3 class="section-header">Public Instance Methods</h3>
|
||||
|
||||
|
||||
<div id="skip-during-method" class="method-detail ">
|
||||
<a name="method-i-skip_during"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
|
||||
<span class="method-name">skip_during</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="skip-during-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_integration.rb, line 166</span>
|
||||
166: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">skip_during</span>; <span class="ruby-keyword kw">yield</span>; <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>
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
<head>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
||||
|
||||
<title>Module: Bundler::SharedHelpers::Gem</title>
|
||||
<title>Module: Bundler::RubygemsIntegration::Gem</title>
|
||||
|
||||
<link rel="stylesheet" href="../../rdoc.css" type="text/css" media="screen" />
|
||||
|
||||
|
@ -38,8 +38,8 @@
|
|||
<div class="section-body">
|
||||
<ul>
|
||||
|
||||
<li><a href="../../lib/bundler/shared_helpers_rb.html?TB_iframe=true&height=550&width=785"
|
||||
class="thickbox" title="lib/bundler/shared_helpers.rb">lib/bundler/shared_helpers.rb</a></li>
|
||||
<li><a href="../../lib/bundler/rubygems_integration_rb.html?TB_iframe=true&height=550&width=785"
|
||||
class="thickbox" title="lib/bundler/rubygems_integration.rb">lib/bundler/rubygems_integration.rb</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -72,6 +72,10 @@
|
|||
|
||||
<li class="file"><a href="../../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -181,16 +185,28 @@
|
|||
|
||||
<li><a href="../../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
||||
|
@ -272,7 +288,7 @@
|
|||
</div>
|
||||
|
||||
<div id="documentation">
|
||||
<h1 class="module">Bundler::SharedHelpers::Gem</h1>
|
||||
<h1 class="module">Bundler::RubygemsIntegration::Gem</h1>
|
||||
|
||||
<div id="description">
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
<head>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
||||
|
||||
<title>Module: Bundler::SharedHelpers::Gem::SourceIndex</title>
|
||||
<title>Module: Bundler::RubygemsIntegration::Gem::SourceIndex</title>
|
||||
|
||||
<link rel="stylesheet" href="../../../rdoc.css" type="text/css" media="screen" />
|
||||
|
||||
|
@ -38,8 +38,8 @@
|
|||
<div class="section-body">
|
||||
<ul>
|
||||
|
||||
<li><a href="../../../lib/bundler/shared_helpers_rb.html?TB_iframe=true&height=550&width=785"
|
||||
class="thickbox" title="lib/bundler/shared_helpers.rb">lib/bundler/shared_helpers.rb</a></li>
|
||||
<li><a href="../../../lib/bundler/rubygems_integration_rb.html?TB_iframe=true&height=550&width=785"
|
||||
class="thickbox" title="lib/bundler/rubygems_integration.rb">lib/bundler/rubygems_integration.rb</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -72,6 +72,10 @@
|
|||
|
||||
<li class="file"><a href="../../../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../../../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../../../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -181,16 +185,28 @@
|
|||
|
||||
<li><a href="../../../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../../../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../../../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../../../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../../../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../../../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../../../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../../../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../../../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
||||
|
@ -272,7 +288,7 @@
|
|||
</div>
|
||||
|
||||
<div id="documentation">
|
||||
<h1 class="module">Bundler::SharedHelpers::Gem::SourceIndex</h1>
|
||||
<h1 class="module">Bundler::RubygemsIntegration::Gem::SourceIndex</h1>
|
||||
|
||||
<div id="description">
|
||||
|
454
vendor/plugins/bundler/doc/bundler-1.0.15/rdoc/Bundler/RubygemsIntegration/Legacy.html
vendored
Normal file
454
vendor/plugins/bundler/doc/bundler-1.0.15/rdoc/Bundler/RubygemsIntegration/Legacy.html
vendored
Normal file
|
@ -0,0 +1,454 @@
|
|||
<?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::RubygemsIntegration::Legacy</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/rubygems_integration_rb.html?TB_iframe=true&height=550&width=785"
|
||||
class="thickbox" title="lib/bundler/rubygems_integration.rb">lib/bundler/rubygems_integration.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="../RubygemsIntegration.html">Bundler::RubygemsIntegration</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-i-all_specs">#all_specs</a></li>
|
||||
|
||||
<li><a href="#method-i-find_name">#find_name</a></li>
|
||||
|
||||
<li><a href="#method-i-stub_rubygems">#stub_rubygems</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Included Modules -->
|
||||
|
||||
</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-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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/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::RubygemsIntegration::Legacy</h1>
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
Rubygems versions 1.3.6 through 1.6.2
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Constants -->
|
||||
|
||||
|
||||
<!-- Attributes -->
|
||||
|
||||
|
||||
<!-- Methods -->
|
||||
|
||||
<div id="public-instance-method-details" class="method-section section">
|
||||
<h3 class="section-header">Public Instance Methods</h3>
|
||||
|
||||
|
||||
<div id="all-specs-method" class="method-detail ">
|
||||
<a name="method-i-all_specs"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
|
||||
<span class="method-name">all_specs</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="all-specs-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_integration.rb, line 259</span>
|
||||
259: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">all_specs</span>
|
||||
260: <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">source_index</span>.<span class="ruby-identifier">gems</span>.<span class="ruby-identifier">values</span>
|
||||
261: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="find-name-method" class="method-detail ">
|
||||
<a name="method-i-find_name"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
|
||||
<span class="method-name">find_name</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="find-name-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_integration.rb, line 263</span>
|
||||
263: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_name</span>(<span class="ruby-identifier">name</span>)
|
||||
264: <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">source_index</span>.<span class="ruby-identifier">find_name</span>(<span class="ruby-identifier">name</span>)
|
||||
265: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="stub-rubygems-method" class="method-detail ">
|
||||
<a name="method-i-stub_rubygems"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
|
||||
<span class="method-name">stub_rubygems</span><span
|
||||
class="method-args">(specs)</span>
|
||||
<span class="method-click-advice">click to toggle source</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="method-source-code"
|
||||
id="stub-rubygems-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_integration.rb, line 255</span>
|
||||
255: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stub_rubygems</span>(<span class="ruby-identifier">specs</span>)
|
||||
256: <span class="ruby-identifier">stub_source_index137</span>(<span class="ruby-identifier">specs</span>)
|
||||
257: <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>
|
||||
|
460
vendor/plugins/bundler/doc/bundler-1.0.15/rdoc/Bundler/RubygemsIntegration/Modern.html
vendored
Normal file
460
vendor/plugins/bundler/doc/bundler-1.0.15/rdoc/Bundler/RubygemsIntegration/Modern.html
vendored
Normal file
|
@ -0,0 +1,460 @@
|
|||
<?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::RubygemsIntegration::Modern</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/rubygems_integration_rb.html?TB_iframe=true&height=550&width=785"
|
||||
class="thickbox" title="lib/bundler/rubygems_integration.rb">lib/bundler/rubygems_integration.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="../RubygemsIntegration.html">Bundler::RubygemsIntegration</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-i-all_specs">#all_specs</a></li>
|
||||
|
||||
<li><a href="#method-i-find_name">#find_name</a></li>
|
||||
|
||||
<li><a href="#method-i-stub_rubygems">#stub_rubygems</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Included Modules -->
|
||||
|
||||
</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-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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/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::RubygemsIntegration::Modern</h1>
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
Rubygems 1.8.5
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Constants -->
|
||||
|
||||
|
||||
<!-- Attributes -->
|
||||
|
||||
|
||||
<!-- Methods -->
|
||||
|
||||
<div id="public-instance-method-details" class="method-section section">
|
||||
<h3 class="section-header">Public Instance Methods</h3>
|
||||
|
||||
|
||||
<div id="all-specs-method" class="method-detail ">
|
||||
<a name="method-i-all_specs"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
|
||||
<span class="method-name">all_specs</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="all-specs-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_integration.rb, line 287</span>
|
||||
287: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">all_specs</span>
|
||||
288: <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Specification</span>.<span class="ruby-identifier">to_a</span>
|
||||
289: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="find-name-method" class="method-detail ">
|
||||
<a name="method-i-find_name"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
|
||||
<span class="method-name">find_name</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="find-name-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_integration.rb, line 291</span>
|
||||
291: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_name</span>(<span class="ruby-identifier">name</span>)
|
||||
292: <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Specification</span>.<span class="ruby-identifier">find_all_by_name</span> <span class="ruby-identifier">name</span>
|
||||
293: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="stub-rubygems-method" class="method-detail ">
|
||||
<a name="method-i-stub_rubygems"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
|
||||
<span class="method-name">stub_rubygems</span><span
|
||||
class="method-args">(specs)</span>
|
||||
<span class="method-click-advice">click to toggle source</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="method-source-code"
|
||||
id="stub-rubygems-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_integration.rb, line 277</span>
|
||||
277: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stub_rubygems</span>(<span class="ruby-identifier">specs</span>)
|
||||
278: <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Specification</span>.<span class="ruby-identifier">all</span> = <span class="ruby-identifier">specs</span>
|
||||
279:
|
||||
280: <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">post_reset</span> {
|
||||
281: <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Specification</span>.<span class="ruby-identifier">all</span> = <span class="ruby-identifier">specs</span>
|
||||
282: }
|
||||
283:
|
||||
284: <span class="ruby-identifier">stub_source_index170</span>(<span class="ruby-identifier">specs</span>)
|
||||
285: <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>
|
||||
|
382
vendor/plugins/bundler/doc/bundler-1.0.15/rdoc/Bundler/RubygemsIntegration/Transitional.html
vendored
Normal file
382
vendor/plugins/bundler/doc/bundler-1.0.15/rdoc/Bundler/RubygemsIntegration/Transitional.html
vendored
Normal file
|
@ -0,0 +1,382 @@
|
|||
<?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::RubygemsIntegration::Transitional</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/rubygems_integration_rb.html?TB_iframe=true&height=550&width=785"
|
||||
class="thickbox" title="lib/bundler/rubygems_integration.rb">lib/bundler/rubygems_integration.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="Legacy.html">Bundler::RubygemsIntegration::Legacy</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-i-stub_rubygems">#stub_rubygems</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Included Modules -->
|
||||
|
||||
</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-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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/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::RubygemsIntegration::Transitional</h1>
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
Rubygems 1.7
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Constants -->
|
||||
|
||||
|
||||
<!-- Attributes -->
|
||||
|
||||
|
||||
<!-- Methods -->
|
||||
|
||||
<div id="public-instance-method-details" class="method-section section">
|
||||
<h3 class="section-header">Public Instance Methods</h3>
|
||||
|
||||
|
||||
<div id="stub-rubygems-method" class="method-detail ">
|
||||
<a name="method-i-stub_rubygems"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
|
||||
<span class="method-name">stub_rubygems</span><span
|
||||
class="method-args">(specs)</span>
|
||||
<span class="method-click-advice">click to toggle source</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="method-source-code"
|
||||
id="stub-rubygems-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/rubygems_integration.rb, line 270</span>
|
||||
270: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stub_rubygems</span>(<span class="ruby-identifier">specs</span>)
|
||||
271: <span class="ruby-identifier">stub_source_index170</span>(<span class="ruby-identifier">specs</span>)
|
||||
272: <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>
|
||||
|
|
@ -111,6 +111,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -220,16 +224,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
||||
|
@ -361,17 +377,17 @@
|
|||
<div class="method-source-code"
|
||||
id="cache-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/runtime.rb, line 83</span>
|
||||
83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache</span>
|
||||
84: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">cache_path</span>)
|
||||
85:
|
||||
86: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">"Updating .gem files in vendor/cache"</span>
|
||||
87: <span class="ruby-identifier">specs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">spec</span><span class="ruby-operator">|</span>
|
||||
88: <span class="ruby-keyword kw">next</span> <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>
|
||||
89: <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">cache</span>(<span class="ruby-identifier">spec</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:cache</span>)
|
||||
90: <span class="ruby-keyword kw">end</span>
|
||||
91: <span class="ruby-identifier">prune_cache</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:no_prune</span>]
|
||||
92: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/runtime.rb, line 87</span>
|
||||
87: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache</span>
|
||||
88: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">cache_path</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">cache_path</span>)
|
||||
89:
|
||||
90: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">"Updating .gem files in vendor/cache"</span>
|
||||
91: <span class="ruby-identifier">specs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">spec</span><span class="ruby-operator">|</span>
|
||||
92: <span class="ruby-keyword kw">next</span> <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>
|
||||
93: <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">cache</span>(<span class="ruby-identifier">spec</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:cache</span>)
|
||||
94: <span class="ruby-keyword kw">end</span>
|
||||
95: <span class="ruby-identifier">prune_cache</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:no_prune</span>]
|
||||
96: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -402,14 +418,14 @@
|
|||
<div class="method-source-code"
|
||||
id="dependencies-for-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/runtime.rb, line 73</span>
|
||||
73: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dependencies_for</span>(*<span class="ruby-identifier">groups</span>)
|
||||
74: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">empty?</span>
|
||||
75: <span class="ruby-identifier">dependencies</span>
|
||||
76: <span class="ruby-keyword kw">else</span>
|
||||
77: <span class="ruby-identifier">dependencies</span>.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> (<span class="ruby-identifier">groups</span> & <span class="ruby-identifier">d</span>.<span class="ruby-identifier">groups</span>).<span class="ruby-identifier">any?</span> }
|
||||
78: <span class="ruby-keyword kw">end</span>
|
||||
79: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/runtime.rb, line 77</span>
|
||||
77: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dependencies_for</span>(*<span class="ruby-identifier">groups</span>)
|
||||
78: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">empty?</span>
|
||||
79: <span class="ruby-identifier">dependencies</span>
|
||||
80: <span class="ruby-keyword kw">else</span>
|
||||
81: <span class="ruby-identifier">dependencies</span>.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> (<span class="ruby-identifier">groups</span> & <span class="ruby-identifier">d</span>.<span class="ruby-identifier">groups</span>).<span class="ruby-identifier">any?</span> }
|
||||
82: <span class="ruby-keyword kw">end</span>
|
||||
83: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -440,30 +456,30 @@
|
|||
<div class="method-source-code"
|
||||
id="prune-cache-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/runtime.rb, line 94</span>
|
||||
94: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">prune_cache</span>
|
||||
95: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">cache_path</span>)
|
||||
96:
|
||||
97: <span class="ruby-identifier">resolve</span> = <span class="ruby-ivar">@definition</span>.<span class="ruby-identifier">resolve</span>
|
||||
98: <span class="ruby-identifier">cached</span> = <span class="ruby-constant">Dir</span>[<span class="ruby-node">"#{cache_path}/*.gem"</span>]
|
||||
99:
|
||||
100: <span class="ruby-identifier">cached</span> = <span class="ruby-identifier">cached</span>.<span class="ruby-identifier">delete_if</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span>
|
||||
101: <span class="ruby-identifier">spec</span> = <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Format</span>.<span class="ruby-identifier">from_file_by_path</span>(<span class="ruby-identifier">path</span>).<span class="ruby-identifier">spec</span>
|
||||
102:
|
||||
103: <span class="ruby-identifier">resolve</span>.<span class="ruby-identifier">any?</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
|
||||
104: <span class="ruby-identifier">s</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">version</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">version</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">s</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Git</span>)
|
||||
105: <span class="ruby-keyword kw">end</span>
|
||||
106: <span class="ruby-keyword kw">end</span>
|
||||
107:
|
||||
108: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cached</span>.<span class="ruby-identifier">any?</span>
|
||||
109: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">"Removing outdated .gem files from vendor/cache"</span>
|
||||
110:
|
||||
111: <span class="ruby-identifier">cached</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span>
|
||||
112: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">" * #{File.basename(path)}"</span>
|
||||
113: <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">path</span>)
|
||||
114: <span class="ruby-keyword kw">end</span>
|
||||
115: <span class="ruby-keyword kw">end</span>
|
||||
116: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/runtime.rb, line 98</span>
|
||||
98: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">prune_cache</span>
|
||||
99: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">cache_path</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">cache_path</span>)
|
||||
100:
|
||||
101: <span class="ruby-identifier">resolve</span> = <span class="ruby-ivar">@definition</span>.<span class="ruby-identifier">resolve</span>
|
||||
102: <span class="ruby-identifier">cached</span> = <span class="ruby-constant">Dir</span>[<span class="ruby-node">"#{cache_path}/*.gem"</span>]
|
||||
103:
|
||||
104: <span class="ruby-identifier">cached</span> = <span class="ruby-identifier">cached</span>.<span class="ruby-identifier">delete_if</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span>
|
||||
105: <span class="ruby-identifier">spec</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">spec_from_gem</span> <span class="ruby-identifier">path</span>
|
||||
106:
|
||||
107: <span class="ruby-identifier">resolve</span>.<span class="ruby-identifier">any?</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
|
||||
108: <span class="ruby-identifier">s</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">version</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">version</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">s</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Git</span>)
|
||||
109: <span class="ruby-keyword kw">end</span>
|
||||
110: <span class="ruby-keyword kw">end</span>
|
||||
111:
|
||||
112: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cached</span>.<span class="ruby-identifier">any?</span>
|
||||
113: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-value str">"Removing outdated .gem files from vendor/cache"</span>
|
||||
114:
|
||||
115: <span class="ruby-identifier">cached</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span>
|
||||
116: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">" * #{File.basename(path)}"</span>
|
||||
117: <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">path</span>)
|
||||
118: <span class="ruby-keyword kw">end</span>
|
||||
119: <span class="ruby-keyword kw">end</span>
|
||||
120: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -494,32 +510,32 @@
|
|||
<div class="method-source-code"
|
||||
id="require-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/runtime.rb, line 47</span>
|
||||
47: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">require</span>(*<span class="ruby-identifier">groups</span>)
|
||||
48: <span class="ruby-identifier">groups</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> }
|
||||
49: <span class="ruby-identifier">groups</span> = [<span class="ruby-value">:default</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">empty?</span>
|
||||
50:
|
||||
51: <span class="ruby-ivar">@definition</span>.<span class="ruby-identifier">dependencies</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dep</span><span class="ruby-operator">|</span>
|
||||
52: <span class="ruby-comment cmt"># Skip the dependency if it is not in any of the requested</span>
|
||||
53: <span class="ruby-comment cmt"># groups</span>
|
||||
54: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">unless</span> ((<span class="ruby-identifier">dep</span>.<span class="ruby-identifier">groups</span> & <span class="ruby-identifier">groups</span>).<span class="ruby-identifier">any?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">current_platform?</span>)
|
||||
55:
|
||||
56: <span class="ruby-identifier">required_file</span> = <span class="ruby-keyword kw">nil</span>
|
||||
57:
|
||||
58: <span class="ruby-keyword kw">begin</span>
|
||||
59: <span class="ruby-comment cmt"># Loop through all the specified autorequires for the</span>
|
||||
60: <span class="ruby-comment cmt"># dependency. If there are none, use the dependency's name</span>
|
||||
61: <span class="ruby-comment cmt"># as the autorequire.</span>
|
||||
62: <span class="ruby-constant">Array</span>(<span class="ruby-identifier">dep</span>.<span class="ruby-identifier">autorequire</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">dep</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">file</span><span class="ruby-operator">|</span>
|
||||
63: <span class="ruby-identifier">required_file</span> = <span class="ruby-identifier">file</span>
|
||||
64: <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">require</span> <span class="ruby-identifier">file</span>
|
||||
65: <span class="ruby-keyword kw">end</span>
|
||||
66: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">LoadError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
||||
67: <span class="ruby-constant">REGEXPS</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">r</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">message</span> }
|
||||
68: <span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">autorequire</span> <span class="ruby-operator">||</span> <span class="ruby-node">$1</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">required_file</span>
|
||||
69: <span class="ruby-keyword kw">end</span>
|
||||
70: <span class="ruby-keyword kw">end</span>
|
||||
71: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/runtime.rb, line 51</span>
|
||||
51: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">require</span>(*<span class="ruby-identifier">groups</span>)
|
||||
52: <span class="ruby-identifier">groups</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> }
|
||||
53: <span class="ruby-identifier">groups</span> = [<span class="ruby-value">:default</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">empty?</span>
|
||||
54:
|
||||
55: <span class="ruby-ivar">@definition</span>.<span class="ruby-identifier">dependencies</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dep</span><span class="ruby-operator">|</span>
|
||||
56: <span class="ruby-comment cmt"># Skip the dependency if it is not in any of the requested</span>
|
||||
57: <span class="ruby-comment cmt"># groups</span>
|
||||
58: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">unless</span> ((<span class="ruby-identifier">dep</span>.<span class="ruby-identifier">groups</span> & <span class="ruby-identifier">groups</span>).<span class="ruby-identifier">any?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">current_platform?</span>)
|
||||
59:
|
||||
60: <span class="ruby-identifier">required_file</span> = <span class="ruby-keyword kw">nil</span>
|
||||
61:
|
||||
62: <span class="ruby-keyword kw">begin</span>
|
||||
63: <span class="ruby-comment cmt"># Loop through all the specified autorequires for the</span>
|
||||
64: <span class="ruby-comment cmt"># dependency. If there are none, use the dependency's name</span>
|
||||
65: <span class="ruby-comment cmt"># as the autorequire.</span>
|
||||
66: <span class="ruby-constant">Array</span>(<span class="ruby-identifier">dep</span>.<span class="ruby-identifier">autorequire</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">dep</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">file</span><span class="ruby-operator">|</span>
|
||||
67: <span class="ruby-identifier">required_file</span> = <span class="ruby-identifier">file</span>
|
||||
68: <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">require</span> <span class="ruby-identifier">file</span>
|
||||
69: <span class="ruby-keyword kw">end</span>
|
||||
70: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">LoadError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
||||
71: <span class="ruby-constant">REGEXPS</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">r</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">message</span> }
|
||||
72: <span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dep</span>.<span class="ruby-identifier">autorequire</span> <span class="ruby-operator">||</span> <span class="ruby-node">$1</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">required_file</span>
|
||||
73: <span class="ruby-keyword kw">end</span>
|
||||
74: <span class="ruby-keyword kw">end</span>
|
||||
75: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -558,7 +574,7 @@
|
|||
11: <span class="ruby-identifier">specs</span> = <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">any?</span> <span class="ruby-operator">?</span> <span class="ruby-ivar">@definition</span>.<span class="ruby-identifier">specs_for</span>(<span class="ruby-identifier">groups</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">requested_specs</span>
|
||||
12:
|
||||
13: <span class="ruby-identifier">setup_environment</span>
|
||||
14: <span class="ruby-identifier">cripple_rubygems</span>(<span class="ruby-identifier">specs</span>)
|
||||
14: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">replace_entrypoints</span>(<span class="ruby-identifier">specs</span>)
|
||||
15:
|
||||
16: <span class="ruby-comment cmt"># Activate the specs</span>
|
||||
17: <span class="ruby-identifier">specs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">spec</span><span class="ruby-operator">|</span>
|
||||
|
@ -566,22 +582,26 @@
|
|||
19: <span class="ruby-identifier">raise</span> <span class="ruby-constant">GemNotFound</span>, <span class="ruby-node">"#{spec.full_name} is missing. Run `bundle` to get it."</span>
|
||||
20: <span class="ruby-keyword kw">end</span>
|
||||
21:
|
||||
22: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">activated_spec</span> = <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">loaded_specs</span>[<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">name</span>] <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">activated_spec</span>.<span class="ruby-identifier">version</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">version</span>
|
||||
22: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">activated_spec</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">loaded_specs</span>(<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">name</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">activated_spec</span>.<span class="ruby-identifier">version</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">version</span>
|
||||
23: <span class="ruby-identifier">e</span> = <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">LoadError</span>.<span class="ruby-identifier">new</span> <span class="ruby-node">"You have already activated #{activated_spec.name} #{activated_spec.version}, "</span> <span class="ruby-node">"but your Gemfile requires #{spec.name} #{spec.version}. Consider using bundle exec."</span>
|
||||
24: <span class="ruby-identifier">e</span>.<span class="ruby-identifier">name</span> = <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">name</span>
|
||||
25: <span class="ruby-identifier">e</span>.<span class="ruby-identifier">version_requirement</span> = <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Requirement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">version</span>.<span class="ruby-identifier">to_s</span>)
|
||||
26: <span class="ruby-identifier">raise</span> <span class="ruby-identifier">e</span>
|
||||
27: <span class="ruby-keyword kw">end</span>
|
||||
28:
|
||||
29: <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">loaded_specs</span>[<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">spec</span>
|
||||
30: <span class="ruby-identifier">load_paths</span> = <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">load_paths</span>.<span class="ruby-identifier">reject</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span> <span class="ruby-identifier">$LOAD_PATH</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">path</span>)}
|
||||
31: <span class="ruby-identifier">$LOAD_PATH</span>.<span class="ruby-identifier">unshift</span>(*<span class="ruby-identifier">load_paths</span>)
|
||||
32: <span class="ruby-keyword kw">end</span>
|
||||
33:
|
||||
34: <span class="ruby-identifier">lock</span>
|
||||
35:
|
||||
36: <span class="ruby-keyword kw">self</span>
|
||||
37: <span class="ruby-keyword kw">end</span></pre>
|
||||
25: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:requirement=</span>)
|
||||
26: <span class="ruby-identifier">e</span>.<span class="ruby-identifier">requirement</span> = <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Requirement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">version</span>.<span class="ruby-identifier">to_s</span>)
|
||||
27: <span class="ruby-keyword kw">else</span>
|
||||
28: <span class="ruby-identifier">e</span>.<span class="ruby-identifier">version_requirement</span> = <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Requirement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">version</span>.<span class="ruby-identifier">to_s</span>)
|
||||
29: <span class="ruby-keyword kw">end</span>
|
||||
30: <span class="ruby-identifier">raise</span> <span class="ruby-identifier">e</span>
|
||||
31: <span class="ruby-keyword kw">end</span>
|
||||
32:
|
||||
33: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">mark_loaded</span>(<span class="ruby-identifier">spec</span>)
|
||||
34: <span class="ruby-identifier">load_paths</span> = <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">load_paths</span>.<span class="ruby-identifier">reject</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span> <span class="ruby-identifier">$LOAD_PATH</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">path</span>)}
|
||||
35: <span class="ruby-identifier">$LOAD_PATH</span>.<span class="ruby-identifier">unshift</span>(*<span class="ruby-identifier">load_paths</span>)
|
||||
36: <span class="ruby-keyword kw">end</span>
|
||||
37:
|
||||
38: <span class="ruby-identifier">lock</span>
|
||||
39:
|
||||
40: <span class="ruby-keyword kw">self</span>
|
||||
41: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -618,10 +638,10 @@
|
|||
<div class="method-source-code"
|
||||
id="cache-path-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/runtime.rb, line 120</span>
|
||||
120: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache_path</span>
|
||||
121: <span class="ruby-identifier">root</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"vendor/cache"</span>)
|
||||
122: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/runtime.rb, line 124</span>
|
||||
124: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache_path</span>
|
||||
125: <span class="ruby-identifier">root</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"vendor/cache"</span>)
|
||||
126: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -652,30 +672,30 @@
|
|||
<div class="method-source-code"
|
||||
id="setup-environment-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/runtime.rb, line 124</span>
|
||||
124: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup_environment</span>
|
||||
125: <span class="ruby-keyword kw">begin</span>
|
||||
126: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"BUNDLE_BIN_PATH"</span>] = <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">bin_path</span>(<span class="ruby-value str">"bundler"</span>, <span class="ruby-value str">"bundle"</span>, <span class="ruby-constant">VERSION</span>)
|
||||
127: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">GemNotFoundException</span>
|
||||
128: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"BUNDLE_BIN_PATH"</span>] = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-value str">"../../../bin/bundle"</span>, <span class="ruby-keyword kw">__FILE__</span>)
|
||||
129: <span class="ruby-keyword kw">end</span>
|
||||
130:
|
||||
131: <span class="ruby-comment cmt"># Set PATH</span>
|
||||
132: <span class="ruby-identifier">paths</span> = (<span class="ruby-constant">ENV</span>[<span class="ruby-value str">"PATH"</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">""</span>).<span class="ruby-identifier">split</span>(<span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">PATH_SEPARATOR</span>)
|
||||
133: <span class="ruby-identifier">paths</span>.<span class="ruby-identifier">unshift</span> <span class="ruby-node">"#{Bundler.bundle_path}/bin"</span>
|
||||
134: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"PATH"</span>] = <span class="ruby-identifier">paths</span>.<span class="ruby-identifier">uniq</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">PATH_SEPARATOR</span>)
|
||||
135:
|
||||
136: <span class="ruby-comment cmt"># Set BUNDLE_GEMFILE</span>
|
||||
137: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"BUNDLE_GEMFILE"</span>] = <span class="ruby-identifier">default_gemfile</span>.<span class="ruby-identifier">to_s</span>
|
||||
138:
|
||||
139: <span class="ruby-comment cmt"># Set RUBYOPT</span>
|
||||
140: <span class="ruby-identifier">rubyopt</span> = [<span class="ruby-constant">ENV</span>[<span class="ruby-value str">"RUBYOPT"</span>]].<span class="ruby-identifier">compact</span>
|
||||
141: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rubyopt</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">rubyopt</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/-rbundler\/setup/</span>
|
||||
142: <span class="ruby-identifier">rubyopt</span>.<span class="ruby-identifier">unshift</span> <span class="ruby-value str">"-rbundler/setup"</span>
|
||||
143: <span class="ruby-identifier">rubyopt</span>.<span class="ruby-identifier">unshift</span> <span class="ruby-node">"-I#{File.expand_path('../..', __FILE__)}"</span>
|
||||
144: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"RUBYOPT"</span>] = <span class="ruby-identifier">rubyopt</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>)
|
||||
145: <span class="ruby-keyword kw">end</span>
|
||||
146: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/runtime.rb, line 128</span>
|
||||
128: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup_environment</span>
|
||||
129: <span class="ruby-keyword kw">begin</span>
|
||||
130: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"BUNDLE_BIN_PATH"</span>] = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">bin_path</span>(<span class="ruby-value str">"bundler"</span>, <span class="ruby-value str">"bundle"</span>, <span class="ruby-constant">VERSION</span>)
|
||||
131: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">GemNotFoundException</span>
|
||||
132: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"BUNDLE_BIN_PATH"</span>] = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-value str">"../../../bin/bundle"</span>, <span class="ruby-keyword kw">__FILE__</span>)
|
||||
133: <span class="ruby-keyword kw">end</span>
|
||||
134:
|
||||
135: <span class="ruby-comment cmt"># Set PATH</span>
|
||||
136: <span class="ruby-identifier">paths</span> = (<span class="ruby-constant">ENV</span>[<span class="ruby-value str">"PATH"</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">""</span>).<span class="ruby-identifier">split</span>(<span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">PATH_SEPARATOR</span>)
|
||||
137: <span class="ruby-identifier">paths</span>.<span class="ruby-identifier">unshift</span> <span class="ruby-node">"#{Bundler.bundle_path}/bin"</span>
|
||||
138: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"PATH"</span>] = <span class="ruby-identifier">paths</span>.<span class="ruby-identifier">uniq</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">PATH_SEPARATOR</span>)
|
||||
139:
|
||||
140: <span class="ruby-comment cmt"># Set BUNDLE_GEMFILE</span>
|
||||
141: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"BUNDLE_GEMFILE"</span>] = <span class="ruby-identifier">default_gemfile</span>.<span class="ruby-identifier">to_s</span>
|
||||
142:
|
||||
143: <span class="ruby-comment cmt"># Set RUBYOPT</span>
|
||||
144: <span class="ruby-identifier">rubyopt</span> = [<span class="ruby-constant">ENV</span>[<span class="ruby-value str">"RUBYOPT"</span>]].<span class="ruby-identifier">compact</span>
|
||||
145: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rubyopt</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">rubyopt</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/-rbundler\/setup/</span>
|
||||
146: <span class="ruby-identifier">rubyopt</span>.<span class="ruby-identifier">unshift</span> <span class="ruby-value str">"-rbundler/setup"</span>
|
||||
147: <span class="ruby-identifier">rubyopt</span>.<span class="ruby-identifier">unshift</span> <span class="ruby-node">"-I#{File.expand_path('../..', __FILE__)}"</span>
|
||||
148: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"RUBYOPT"</span>] = <span class="ruby-identifier">rubyopt</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>)
|
||||
149: <span class="ruby-keyword kw">end</span>
|
||||
150: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -118,6 +118,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -227,16 +231,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
||||
|
@ -542,7 +558,7 @@
|
|||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/settings.rb, line 18</span>
|
||||
18: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">key</span>)
|
||||
19: <span class="ruby-ivar">@local_config</span>
|
||||
19: <span class="ruby-ivar">@local_config</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">key_for</span>(<span class="ruby-identifier">key</span>))
|
||||
20: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
|
@ -624,7 +640,7 @@ ENV[“BUNDLE_PATH“]
|
|||
79: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">path</span> = <span class="ruby-keyword kw">self</span>[<span class="ruby-value">:path</span>]
|
||||
80: <span class="ruby-node">"#{path}/#{Bundler.ruby_scope}"</span>
|
||||
81: <span class="ruby-keyword kw">else</span>
|
||||
82: <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">dir</span>
|
||||
82: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">gem_dir</span>
|
||||
83: <span class="ruby-keyword kw">end</span>
|
||||
84: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
@ -819,7 +835,7 @@ ENV[“BUNDLE_PATH“]
|
|||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/settings.rb, line 108</span>
|
||||
108: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">global_config_file</span>
|
||||
109: <span class="ruby-identifier">file</span> = <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"BUNDLE_CONFIG"</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">Gem</span>.<span class="ruby-identifier">user_home</span>, <span class="ruby-value str">".bundle/config"</span>)
|
||||
109: <span class="ruby-identifier">file</span> = <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"BUNDLE_CONFIG"</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">user_home</span>, <span class="ruby-value str">".bundle/config"</span>)
|
||||
110: <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">file</span>)
|
||||
111: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
|
@ -0,0 +1,572 @@
|
|||
<?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>Module: Bundler::SharedHelpers</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="module">
|
||||
|
||||
<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/shared_helpers_rb.html?TB_iframe=true&height=550&width=785"
|
||||
class="thickbox" title="lib/bundler/shared_helpers.rb">lib/bundler/shared_helpers.rb</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="class-metadata">
|
||||
|
||||
<!-- Parent Class -->
|
||||
|
||||
|
||||
<!-- 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-i-clean_load_path">#clean_load_path</a></li>
|
||||
|
||||
<li><a href="#method-i-default_gemfile">#default_gemfile</a></li>
|
||||
|
||||
<li><a href="#method-i-default_lockfile">#default_lockfile</a></li>
|
||||
|
||||
<li><a href="#method-i-find_gemfile">#find_gemfile</a></li>
|
||||
|
||||
<li><a href="#method-i-in_bundle%3F">#in_bundle?</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Included Modules -->
|
||||
|
||||
</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-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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/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="module">Bundler::SharedHelpers</h1>
|
||||
|
||||
<div id="description">
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Constants -->
|
||||
|
||||
|
||||
<!-- Attributes -->
|
||||
|
||||
<div id="attribute-method-details" class="method-section section">
|
||||
<h3 class="section-header">Attributes</h3>
|
||||
|
||||
|
||||
<div id="gem-loaded-attribute-method" class="method-detail">
|
||||
<a name="gem_loaded"></a>
|
||||
|
||||
<a name="gem_loaded="></a>
|
||||
|
||||
<div class="method-heading attribute-method-heading">
|
||||
<span class="method-name">gem_loaded</span><span
|
||||
class="attribute-access-type">[RW]</span>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Methods -->
|
||||
|
||||
<div id="public-instance-method-details" class="method-section section">
|
||||
<h3 class="section-header">Public Instance Methods</h3>
|
||||
|
||||
|
||||
<div id="default-gemfile-method" class="method-detail ">
|
||||
<a name="method-i-default_gemfile"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
|
||||
<span class="method-name">default_gemfile</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="default-gemfile-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/shared_helpers.rb, line 20</span>
|
||||
20: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">default_gemfile</span>
|
||||
21: <span class="ruby-identifier">gemfile</span> = <span class="ruby-identifier">find_gemfile</span>
|
||||
22: <span class="ruby-identifier">raise</span> <span class="ruby-constant">GemfileNotFound</span>, <span class="ruby-value str">"Could not locate Gemfile"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">gemfile</span>
|
||||
23: <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">gemfile</span>)
|
||||
24: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="default-lockfile-method" class="method-detail ">
|
||||
<a name="method-i-default_lockfile"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
|
||||
<span class="method-name">default_lockfile</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="default-lockfile-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/shared_helpers.rb, line 26</span>
|
||||
26: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">default_lockfile</span>
|
||||
27: <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"#{default_gemfile}.lock"</span>)
|
||||
28: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="in-bundle--method" class="method-detail ">
|
||||
<a name="method-i-in_bundle%3F"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
|
||||
<span class="method-name">in_bundle?</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="in-bundle--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/shared_helpers.rb, line 30</span>
|
||||
30: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">in_bundle?</span>
|
||||
31: <span class="ruby-identifier">find_gemfile</span>
|
||||
32: <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="clean-load-path-method" class="method-detail ">
|
||||
<a name="method-i-clean_load_path"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
|
||||
<span class="method-name">clean_load_path</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="clean-load-path-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/shared_helpers.rb, line 56</span>
|
||||
56: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clean_load_path</span>
|
||||
57: <span class="ruby-comment cmt"># handle 1.9 where system gems are always on the load path</span>
|
||||
58: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-operator">::</span><span class="ruby-constant">Gem</span>)
|
||||
59: <span class="ruby-identifier">me</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>)
|
||||
60: <span class="ruby-identifier">$LOAD_PATH</span>.<span class="ruby-identifier">reject!</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span>
|
||||
61: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">p</span>) <span class="ruby-operator">=~</span> <span class="ruby-node">/^#{Regexp.escape(me)}/</span>
|
||||
62: <span class="ruby-identifier">p</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>) <span class="ruby-operator">&&</span>
|
||||
63: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">gem_path</span>.<span class="ruby-identifier">any?</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">gp</span><span class="ruby-operator">|</span> <span class="ruby-identifier">p</span> <span class="ruby-operator">=~</span> <span class="ruby-node">/^#{Regexp.escape(gp)}/</span> }
|
||||
64: <span class="ruby-keyword kw">end</span>
|
||||
65: <span class="ruby-identifier">$LOAD_PATH</span>.<span class="ruby-identifier">uniq!</span>
|
||||
66: <span class="ruby-keyword kw">end</span>
|
||||
67: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="find-gemfile-method" class="method-detail ">
|
||||
<a name="method-i-find_gemfile"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
|
||||
<span class="method-name">find_gemfile</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="find-gemfile-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/shared_helpers.rb, line 36</span>
|
||||
36: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_gemfile</span>
|
||||
37: <span class="ruby-identifier">given</span> = <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'BUNDLE_GEMFILE'</span>]
|
||||
38: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">given</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">given</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">given</span>.<span class="ruby-identifier">empty?</span>
|
||||
39:
|
||||
40: <span class="ruby-identifier">previous</span> = <span class="ruby-keyword kw">nil</span>
|
||||
41: <span class="ruby-identifier">current</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-constant">Dir</span>.<span class="ruby-identifier">pwd</span>)
|
||||
42:
|
||||
43: <span class="ruby-keyword kw">until</span> <span class="ruby-operator">!</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">current</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">current</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">previous</span>
|
||||
44: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'BUNDLE_SPEC_RUN'</span>]
|
||||
45: <span class="ruby-comment cmt"># avoid stepping above the tmp directory when testing</span>
|
||||
46: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">current</span>, <span class="ruby-value str">'bundler.gemspec'</span>))
|
||||
47: <span class="ruby-keyword kw">end</span>
|
||||
48:
|
||||
49: <span class="ruby-comment cmt"># otherwise return the Gemfile if it's there</span>
|
||||
50: <span class="ruby-identifier">filename</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">current</span>, <span class="ruby-value str">'Gemfile'</span>)
|
||||
51: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">filename</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-identifier">filename</span>)
|
||||
52: <span class="ruby-identifier">current</span>, <span class="ruby-identifier">previous</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-value str">".."</span>, <span class="ruby-identifier">current</span>), <span class="ruby-identifier">current</span>
|
||||
53: <span class="ruby-keyword kw">end</span>
|
||||
54: <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>
|
||||
|
|
@ -85,6 +85,10 @@
|
|||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -194,16 +198,28 @@
|
|||
|
||||
<li><a href="../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
|
@ -117,6 +117,8 @@
|
|||
|
||||
<li><a href="#method-i-unlock%21">#unlock!</a></li>
|
||||
|
||||
<li><a href="#method-i-uri_escaped">#uri_escaped</a></li>
|
||||
|
||||
<li><a href="#method-i-uri_hash">#uri_hash</a></li>
|
||||
|
||||
</ul>
|
||||
|
@ -136,6 +138,10 @@
|
|||
|
||||
<li class="file"><a href="../../lib/bundler/man/bundle.html">bundle</a></li>
|
||||
|
||||
<li class="file"><a href="../../lib/bundler/man/bundle-benchmark.html">bundle-benchmark</a></li>
|
||||
|
||||
<li class="file"><a href="../../lib/bundler/man/bundle-benchmark_txt.html">bundle-benchmark.txt</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>
|
||||
|
@ -245,16 +251,28 @@
|
|||
|
||||
<li><a href="../../Bundler/Resolver/SpecGroup.html">Bundler::Resolver::SpecGroup</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration.html">Bundler::RubygemsIntegration</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/AlmostModern.html">Bundler::RubygemsIntegration::AlmostModern</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Deprecate.html">Bundler::RubygemsIntegration::Deprecate</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Gem.html">Bundler::RubygemsIntegration::Gem</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Gem/SourceIndex.html">Bundler::RubygemsIntegration::Gem::SourceIndex</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Legacy.html">Bundler::RubygemsIntegration::Legacy</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Modern.html">Bundler::RubygemsIntegration::Modern</a></li>
|
||||
|
||||
<li><a href="../../Bundler/RubygemsIntegration/Transitional.html">Bundler::RubygemsIntegration::Transitional</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>
|
||||
|
@ -440,10 +458,10 @@
|
|||
<div class="method-source-code"
|
||||
id="from-lock-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 476</span>
|
||||
476: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">from_lock</span>(<span class="ruby-identifier">options</span>)
|
||||
477: <span class="ruby-identifier">new</span>(<span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-value str">"uri"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">"remote"</span>)))
|
||||
478: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 489</span>
|
||||
489: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">from_lock</span>(<span class="ruby-identifier">options</span>)
|
||||
490: <span class="ruby-identifier">new</span>(<span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-value str">"uri"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">"remote"</span>)))
|
||||
491: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -474,19 +492,19 @@
|
|||
<div class="method-source-code"
|
||||
id="new-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 463</span>
|
||||
463: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>)
|
||||
464: <span class="ruby-keyword kw">super</span>
|
||||
465:
|
||||
466: <span class="ruby-comment cmt"># stringify options that could be set as symbols</span>
|
||||
467: <span class="ruby-node">%(ref branch tag revision)</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">k</span>].<span class="ruby-identifier">to_s</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">k</span>] }
|
||||
468:
|
||||
469: <span class="ruby-ivar">@uri</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value str">"uri"</span>]
|
||||
470: <span class="ruby-ivar">@ref</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value str">"ref"</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">options</span>[<span class="ruby-value str">"branch"</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">options</span>[<span class="ruby-value str">"tag"</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'master'</span>
|
||||
471: <span class="ruby-ivar">@revision</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value str">"revision"</span>]
|
||||
472: <span class="ruby-ivar">@submodules</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value str">"submodules"</span>]
|
||||
473: <span class="ruby-ivar">@update</span> = <span class="ruby-keyword kw">false</span>
|
||||
474: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 476</span>
|
||||
476: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>)
|
||||
477: <span class="ruby-keyword kw">super</span>
|
||||
478:
|
||||
479: <span class="ruby-comment cmt"># stringify options that could be set as symbols</span>
|
||||
480: <span class="ruby-node">%(ref branch tag revision)</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">k</span>].<span class="ruby-identifier">to_s</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">k</span>] }
|
||||
481:
|
||||
482: <span class="ruby-ivar">@uri</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value str">"uri"</span>]
|
||||
483: <span class="ruby-ivar">@ref</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value str">"ref"</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">options</span>[<span class="ruby-value str">"branch"</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">options</span>[<span class="ruby-value str">"tag"</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'master'</span>
|
||||
484: <span class="ruby-ivar">@revision</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value str">"revision"</span>]
|
||||
485: <span class="ruby-ivar">@submodules</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value str">"submodules"</span>]
|
||||
486: <span class="ruby-ivar">@update</span> = <span class="ruby-keyword kw">false</span>
|
||||
487: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -552,15 +570,15 @@
|
|||
<div class="method-source-code"
|
||||
id="eql--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 491</span>
|
||||
491: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">eql?</span>(<span class="ruby-identifier">o</span>)
|
||||
492: <span class="ruby-constant">Git</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">o</span> <span class="ruby-operator">&&</span>
|
||||
493: <span class="ruby-identifier">uri</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">uri</span> <span class="ruby-operator">&&</span>
|
||||
494: <span class="ruby-identifier">ref</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">ref</span> <span class="ruby-operator">&&</span>
|
||||
495: <span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">&&</span>
|
||||
496: <span class="ruby-identifier">version</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">version</span> <span class="ruby-operator">&&</span>
|
||||
497: <span class="ruby-identifier">submodules</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">submodules</span>
|
||||
498: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 504</span>
|
||||
504: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">eql?</span>(<span class="ruby-identifier">o</span>)
|
||||
505: <span class="ruby-constant">Git</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">o</span> <span class="ruby-operator">&&</span>
|
||||
506: <span class="ruby-identifier">uri</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">uri</span> <span class="ruby-operator">&&</span>
|
||||
507: <span class="ruby-identifier">ref</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">ref</span> <span class="ruby-operator">&&</span>
|
||||
508: <span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">&&</span>
|
||||
509: <span class="ruby-identifier">version</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">version</span> <span class="ruby-operator">&&</span>
|
||||
510: <span class="ruby-identifier">submodules</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">submodules</span>
|
||||
511: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -595,17 +613,17 @@
|
|||
<div class="method-source-code"
|
||||
id="install-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 538</span>
|
||||
538: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install</span>(<span class="ruby-identifier">spec</span>)
|
||||
539: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Using #{spec.name} (#{spec.version}) from #{to_s} "</span>
|
||||
540:
|
||||
541: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@installed</span>
|
||||
542: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">debug</span> <span class="ruby-node">" * Checking out revision: #{ref}"</span>
|
||||
543: <span class="ruby-identifier">checkout</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">allow_git_ops?</span>
|
||||
544: <span class="ruby-ivar">@installed</span> = <span class="ruby-keyword kw">true</span>
|
||||
545: <span class="ruby-keyword kw">end</span>
|
||||
546: <span class="ruby-identifier">generate_bin</span>(<span class="ruby-identifier">spec</span>)
|
||||
547: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 551</span>
|
||||
551: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install</span>(<span class="ruby-identifier">spec</span>)
|
||||
552: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Using #{spec.name} (#{spec.version}) from #{to_s} "</span>
|
||||
553:
|
||||
554: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@installed</span>
|
||||
555: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">debug</span> <span class="ruby-node">" * Checking out revision: #{ref}"</span>
|
||||
556: <span class="ruby-identifier">checkout</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">allow_git_ops?</span>
|
||||
557: <span class="ruby-ivar">@installed</span> = <span class="ruby-keyword kw">true</span>
|
||||
558: <span class="ruby-keyword kw">end</span>
|
||||
559: <span class="ruby-identifier">generate_bin</span>(<span class="ruby-identifier">spec</span>)
|
||||
560: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -636,12 +654,12 @@
|
|||
<div class="method-source-code"
|
||||
id="load-spec-files-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 549</span>
|
||||
549: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_spec_files</span>
|
||||
550: <span class="ruby-keyword kw">super</span>
|
||||
551: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">PathError</span>, <span class="ruby-constant">GitError</span>
|
||||
552: <span class="ruby-identifier">raise</span> <span class="ruby-constant">GitError</span>, <span class="ruby-node">"#{to_s} is not checked out. Please run `bundle install`"</span>
|
||||
553: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 562</span>
|
||||
562: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_spec_files</span>
|
||||
563: <span class="ruby-keyword kw">super</span>
|
||||
564: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">PathError</span>, <span class="ruby-constant">GitError</span>
|
||||
565: <span class="ruby-identifier">raise</span> <span class="ruby-constant">GitError</span>, <span class="ruby-node">"#{to_s} is not checked out. Please run `bundle install`"</span>
|
||||
566: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -672,10 +690,10 @@
|
|||
<div class="method-source-code"
|
||||
id="name-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 507</span>
|
||||
507: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">name</span>
|
||||
508: <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-ivar">@uri</span>, <span class="ruby-value str">'.git'</span>)
|
||||
509: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 520</span>
|
||||
520: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">name</span>
|
||||
521: <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-ivar">@uri</span>, <span class="ruby-value str">'.git'</span>)
|
||||
522: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -706,18 +724,18 @@
|
|||
<div class="method-source-code"
|
||||
id="path-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 511</span>
|
||||
511: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">path</span>
|
||||
512: <span class="ruby-ivar">@install_path</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">begin</span>
|
||||
513: <span class="ruby-identifier">git_scope</span> = <span class="ruby-node">"#{base_name}-#{shortref_for_path(revision)}"</span>
|
||||
514:
|
||||
515: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">requires_sudo?</span>
|
||||
516: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">user_bundle_path</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ruby_scope</span>).<span class="ruby-identifier">join</span>(<span class="ruby-identifier">git_scope</span>)
|
||||
517: <span class="ruby-keyword kw">else</span>
|
||||
518: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">install_path</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">git_scope</span>)
|
||||
519: <span class="ruby-keyword kw">end</span>
|
||||
520: <span class="ruby-keyword kw">end</span>
|
||||
521: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 524</span>
|
||||
524: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">path</span>
|
||||
525: <span class="ruby-ivar">@install_path</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">begin</span>
|
||||
526: <span class="ruby-identifier">git_scope</span> = <span class="ruby-node">"#{base_name}-#{shortref_for_path(revision)}"</span>
|
||||
527:
|
||||
528: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">requires_sudo?</span>
|
||||
529: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">user_bundle_path</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ruby_scope</span>).<span class="ruby-identifier">join</span>(<span class="ruby-identifier">git_scope</span>)
|
||||
530: <span class="ruby-keyword kw">else</span>
|
||||
531: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">install_path</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">git_scope</span>)
|
||||
532: <span class="ruby-keyword kw">end</span>
|
||||
533: <span class="ruby-keyword kw">end</span>
|
||||
534: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -750,16 +768,16 @@ TODO: actually cache git specs
|
|||
<div class="method-source-code"
|
||||
id="specs-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 528</span>
|
||||
528: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">specs</span>
|
||||
529: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">allow_git_ops?</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@update</span>
|
||||
530: <span class="ruby-comment cmt"># Start by making sure the git cache is up to date</span>
|
||||
531: <span class="ruby-identifier">cache</span>
|
||||
532: <span class="ruby-identifier">checkout</span>
|
||||
533: <span class="ruby-ivar">@update</span> = <span class="ruby-keyword kw">true</span>
|
||||
534: <span class="ruby-keyword kw">end</span>
|
||||
535: <span class="ruby-identifier">local_specs</span>
|
||||
536: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 541</span>
|
||||
541: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">specs</span>
|
||||
542: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">allow_git_ops?</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@update</span>
|
||||
543: <span class="ruby-comment cmt"># Start by making sure the git cache is up to date</span>
|
||||
544: <span class="ruby-identifier">cache</span>
|
||||
545: <span class="ruby-identifier">checkout</span>
|
||||
546: <span class="ruby-ivar">@update</span> = <span class="ruby-keyword kw">true</span>
|
||||
547: <span class="ruby-keyword kw">end</span>
|
||||
548: <span class="ruby-identifier">local_specs</span>
|
||||
549: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -790,17 +808,17 @@ TODO: actually cache git specs
|
|||
<div class="method-source-code"
|
||||
id="to-lock-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 480</span>
|
||||
480: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_lock</span>
|
||||
481: <span class="ruby-identifier">out</span> = <span class="ruby-value str">"GIT\n"</span>
|
||||
482: <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" remote: #{@uri}\n"</span>
|
||||
483: <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" revision: #{revision}\n"</span>
|
||||
484: <span class="ruby-node">%(ref branch tag submodules)</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">opt</span><span class="ruby-operator">|</span>
|
||||
485: <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" #{opt}: #{options[opt]}\n"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">opt</span>]
|
||||
486: <span class="ruby-keyword kw">end</span>
|
||||
487: <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" glob: #{@glob}\n"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@glob</span> <span class="ruby-operator">==</span> <span class="ruby-constant">DEFAULT_GLOB</span>
|
||||
488: <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" specs:\n"</span>
|
||||
489: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 493</span>
|
||||
493: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_lock</span>
|
||||
494: <span class="ruby-identifier">out</span> = <span class="ruby-value str">"GIT\n"</span>
|
||||
495: <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" remote: #{@uri}\n"</span>
|
||||
496: <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" revision: #{revision}\n"</span>
|
||||
497: <span class="ruby-node">%(ref branch tag submodules)</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">opt</span><span class="ruby-operator">|</span>
|
||||
498: <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" #{opt}: #{options[opt]}\n"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">opt</span>]
|
||||
499: <span class="ruby-keyword kw">end</span>
|
||||
500: <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-node">" glob: #{@glob}\n"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@glob</span> <span class="ruby-operator">==</span> <span class="ruby-constant">DEFAULT_GLOB</span>
|
||||
501: <span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" specs:\n"</span>
|
||||
502: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -831,11 +849,11 @@ TODO: actually cache git specs
|
|||
<div class="method-source-code"
|
||||
id="to-s-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 502</span>
|
||||
502: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
||||
503: <span class="ruby-identifier">sref</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value str">"ref"</span>] <span class="ruby-operator">?</span> <span class="ruby-identifier">shortref_for_display</span>(<span class="ruby-identifier">options</span>[<span class="ruby-value str">"ref"</span>]) <span class="ruby-operator">:</span> <span class="ruby-identifier">ref</span>
|
||||
504: <span class="ruby-node">"#{uri} (at #{sref})"</span>
|
||||
505: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 515</span>
|
||||
515: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
||||
516: <span class="ruby-identifier">sref</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value str">"ref"</span>] <span class="ruby-operator">?</span> <span class="ruby-identifier">shortref_for_display</span>(<span class="ruby-identifier">options</span>[<span class="ruby-value str">"ref"</span>]) <span class="ruby-operator">:</span> <span class="ruby-identifier">ref</span>
|
||||
517: <span class="ruby-node">"#{uri} (at #{sref})"</span>
|
||||
518: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -866,10 +884,10 @@ TODO: actually cache git specs
|
|||
<div class="method-source-code"
|
||||
id="unlock--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 523</span>
|
||||
523: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unlock!</span>
|
||||
524: <span class="ruby-ivar">@revision</span> = <span class="ruby-keyword kw">nil</span>
|
||||
525: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 536</span>
|
||||
536: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unlock!</span>
|
||||
537: <span class="ruby-ivar">@revision</span> = <span class="ruby-keyword kw">nil</span>
|
||||
538: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -906,10 +924,10 @@ TODO: actually cache git specs
|
|||
<div class="method-source-code"
|
||||
id="allow-git-ops--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 647</span>
|
||||
647: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">allow_git_ops?</span>
|
||||
648: <span class="ruby-ivar">@allow_remote</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@allow_cached</span>
|
||||
649: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 676</span>
|
||||
676: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">allow_git_ops?</span>
|
||||
677: <span class="ruby-ivar">@allow_remote</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@allow_cached</span>
|
||||
678: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -940,10 +958,10 @@ TODO: actually cache git specs
|
|||
<div class="method-source-code"
|
||||
id="base-name-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 572</span>
|
||||
572: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">base_name</span>
|
||||
573: <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">uri</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">%{^(\w+://)?([^/:]+:)}</span>,<span class="ruby-value str">''</span>), <span class="ruby-value str">".git"</span>)
|
||||
574: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 587</span>
|
||||
587: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">base_name</span>
|
||||
588: <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">uri</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">%{^(\w+://)?([^/:]+:)}</span>,<span class="ruby-value str">''</span>), <span class="ruby-value str">".git"</span>)
|
||||
589: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -974,20 +992,20 @@ TODO: actually cache git specs
|
|||
<div class="method-source-code"
|
||||
id="cache-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 608</span>
|
||||
608: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache</span>
|
||||
609: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cached?</span>
|
||||
610: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">has_revision_cached?</span>
|
||||
611: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Updating #{uri}"</span>
|
||||
612: <span class="ruby-identifier">in_cache</span> <span class="ruby-keyword kw">do</span>
|
||||
613: <span class="ruby-identifier">git</span> <span class="ruby-node">%fetch --force --quiet --tags "#{uri}" refs/heads/*:refs/heads/*|</span>
|
||||
614: <span class="ruby-keyword kw">end</span>
|
||||
615: <span class="ruby-keyword kw">else</span>
|
||||
616: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Fetching #{uri}"</span>
|
||||
617: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">cache_path</span>.<span class="ruby-identifier">dirname</span>)
|
||||
618: <span class="ruby-identifier">git</span> <span class="ruby-node">%clone "#{uri}" "#{cache_path}" --bare --no-hardlinks|</span>
|
||||
619: <span class="ruby-keyword kw">end</span>
|
||||
620: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 636</span>
|
||||
636: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache</span>
|
||||
637: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cached?</span>
|
||||
638: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">has_revision_cached?</span>
|
||||
639: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Updating #{uri}"</span>
|
||||
640: <span class="ruby-identifier">in_cache</span> <span class="ruby-keyword kw">do</span>
|
||||
641: <span class="ruby-identifier">git</span> <span class="ruby-node">%fetch --force --quiet --tags #{uri_escaped} "refs/heads/*:refs/heads/*"|</span>
|
||||
642: <span class="ruby-keyword kw">end</span>
|
||||
643: <span class="ruby-keyword kw">else</span>
|
||||
644: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Fetching #{uri}"</span>
|
||||
645: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">cache_path</span>.<span class="ruby-identifier">dirname</span>)
|
||||
646: <span class="ruby-identifier">git</span> <span class="ruby-node">%clone #{uri_escaped} "#{cache_path}" --bare --no-hardlinks|</span>
|
||||
647: <span class="ruby-keyword kw">end</span>
|
||||
648: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1018,18 +1036,18 @@ TODO: actually cache git specs
|
|||
<div class="method-source-code"
|
||||
id="cache-path-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 596</span>
|
||||
596: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache_path</span>
|
||||
597: <span class="ruby-ivar">@cache_path</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">begin</span>
|
||||
598: <span class="ruby-identifier">git_scope</span> = <span class="ruby-node">"#{base_name}-#{uri_hash}"</span>
|
||||
599:
|
||||
600: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">requires_sudo?</span>
|
||||
601: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">user_bundle_path</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"cache/git"</span>, <span class="ruby-identifier">git_scope</span>)
|
||||
602: <span class="ruby-keyword kw">else</span>
|
||||
603: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">cache</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"git"</span>, <span class="ruby-identifier">git_scope</span>)
|
||||
604: <span class="ruby-keyword kw">end</span>
|
||||
605: <span class="ruby-keyword kw">end</span>
|
||||
606: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 624</span>
|
||||
624: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache_path</span>
|
||||
625: <span class="ruby-ivar">@cache_path</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">begin</span>
|
||||
626: <span class="ruby-identifier">git_scope</span> = <span class="ruby-node">"#{base_name}-#{uri_hash}"</span>
|
||||
627:
|
||||
628: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">requires_sudo?</span>
|
||||
629: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">user_bundle_path</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"cache/git"</span>, <span class="ruby-identifier">git_scope</span>)
|
||||
630: <span class="ruby-keyword kw">else</span>
|
||||
631: <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">cache</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"git"</span>, <span class="ruby-identifier">git_scope</span>)
|
||||
632: <span class="ruby-keyword kw">end</span>
|
||||
633: <span class="ruby-keyword kw">end</span>
|
||||
634: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1060,10 +1078,10 @@ TODO: actually cache git specs
|
|||
<div class="method-source-code"
|
||||
id="cached--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 661</span>
|
||||
661: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cached?</span>
|
||||
662: <span class="ruby-identifier">cache_path</span>.<span class="ruby-identifier">exist?</span>
|
||||
663: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 690</span>
|
||||
690: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cached?</span>
|
||||
691: <span class="ruby-identifier">cache_path</span>.<span class="ruby-identifier">exist?</span>
|
||||
692: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1094,23 +1112,24 @@ TODO: actually cache git specs
|
|||
<div class="method-source-code"
|
||||
id="checkout-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 622</span>
|
||||
622: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">checkout</span>
|
||||
623: <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">path</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">".git"</span>))
|
||||
624: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">path</span>.<span class="ruby-identifier">dirname</span>)
|
||||
625: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span>(<span class="ruby-identifier">path</span>)
|
||||
626: <span class="ruby-identifier">git</span> <span class="ruby-node">%clone --no-checkout "#{cache_path}" "#{path}"|</span>
|
||||
627: <span class="ruby-keyword kw">end</span>
|
||||
628: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">path</span>) <span class="ruby-keyword kw">do</span>
|
||||
629: <span class="ruby-identifier">git</span> <span class="ruby-node">%fetch --force --quiet --tags "#{cache_path}"|</span>
|
||||
630: <span class="ruby-identifier">git</span> <span class="ruby-node">"reset --hard #{revision}"</span>
|
||||
631:
|
||||
632: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@submodules</span>
|
||||
633: <span class="ruby-identifier">git</span> <span class="ruby-value str">"submodule init"</span>
|
||||
634: <span class="ruby-identifier">git</span> <span class="ruby-value str">"submodule update"</span>
|
||||
635: <span class="ruby-keyword kw">end</span>
|
||||
636: <span class="ruby-keyword kw">end</span>
|
||||
637: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 650</span>
|
||||
650: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">checkout</span>
|
||||
651: <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">path</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">".git"</span>))
|
||||
652: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">path</span>.<span class="ruby-identifier">dirname</span>)
|
||||
653: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span>(<span class="ruby-identifier">path</span>)
|
||||
654: <span class="ruby-identifier">git</span> <span class="ruby-node">%clone --no-checkout "#{cache_path}" "#{path}"|</span>
|
||||
655: <span class="ruby-constant">File</span>.<span class="ruby-identifier">chmod</span>((<span class="ruby-value">0777</span> & <span class="ruby-operator">~</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">umask</span>), <span class="ruby-identifier">path</span>)
|
||||
656: <span class="ruby-keyword kw">end</span>
|
||||
657: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">path</span>) <span class="ruby-keyword kw">do</span>
|
||||
658: <span class="ruby-identifier">git</span> <span class="ruby-node">%fetch --force --quiet --tags "#{cache_path}"|</span>
|
||||
659: <span class="ruby-identifier">git</span> <span class="ruby-node">"reset --hard #{revision}"</span>
|
||||
660:
|
||||
661: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@submodules</span>
|
||||
662: <span class="ruby-identifier">git</span> <span class="ruby-value str">"submodule init"</span>
|
||||
663: <span class="ruby-identifier">git</span> <span class="ruby-value str">"submodule update"</span>
|
||||
664: <span class="ruby-keyword kw">end</span>
|
||||
665: <span class="ruby-keyword kw">end</span>
|
||||
666: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1141,19 +1160,21 @@ TODO: actually cache git specs
|
|||
<div class="method-source-code"
|
||||
id="git-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 557</span>
|
||||
557: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">git</span>(<span class="ruby-identifier">command</span>)
|
||||
558: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">allow_git_ops?</span>
|
||||
559: <span class="ruby-identifier">out</span> = <span class="ruby-node">%{git #{command}}</span>
|
||||
560:
|
||||
561: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$?</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
|
||||
562: <span class="ruby-identifier">raise</span> <span class="ruby-constant">GitError</span>, <span class="ruby-node">"An error has occurred in git when running `git #{command}`. Cannot complete bundling."</span>
|
||||
563: <span class="ruby-keyword kw">end</span>
|
||||
564: <span class="ruby-identifier">out</span>
|
||||
565: <span class="ruby-keyword kw">else</span>
|
||||
566: <span class="ruby-identifier">raise</span> <span class="ruby-constant">GitError</span>, <span class="ruby-node">"Bundler is trying to run a `git #{command}` at runtime. You probably need to run `bundle install`. However, "</span> <span class="ruby-value str">"this error message could probably be more useful. Please submit a ticket at http://github.com/carlhuda/bundler/issues "</span> <span class="ruby-node">"with steps to reproduce as well as the following\n\nCALLER: #{caller.join("\n")}"</span>
|
||||
567: <span class="ruby-keyword kw">end</span>
|
||||
568: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 570</span>
|
||||
570: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">git</span>(<span class="ruby-identifier">command</span>)
|
||||
571: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">allow_git_ops?</span>
|
||||
572: <span class="ruby-identifier">out</span> = <span class="ruby-node">%{git #{command}}</span>
|
||||
573:
|
||||
574: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$?</span>.<span class="ruby-identifier">exitstatus</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
|
||||
575: <span class="ruby-identifier">msg</span> = <span class="ruby-node">"Git error: command `git #{command}` in directory #{Dir.pwd} has failed."</span>
|
||||
576: <span class="ruby-identifier">msg</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"\nIf this error persists you could try removing the cache directory '#{cache_path}'"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cached?</span>
|
||||
577: <span class="ruby-identifier">raise</span> <span class="ruby-constant">GitError</span>, <span class="ruby-identifier">msg</span>
|
||||
578: <span class="ruby-keyword kw">end</span>
|
||||
579: <span class="ruby-identifier">out</span>
|
||||
580: <span class="ruby-keyword kw">else</span>
|
||||
581: <span class="ruby-identifier">raise</span> <span class="ruby-constant">GitError</span>, <span class="ruby-node">"Bundler is trying to run a `git #{command}` at runtime. You probably need to run `bundle install`. However, "</span> <span class="ruby-value str">"this error message could probably be more useful. Please submit a ticket at http://github.com/carlhuda/bundler/issues "</span> <span class="ruby-node">"with steps to reproduce as well as the following\n\nCALLER: #{caller.join("\n")}"</span>
|
||||
582: <span class="ruby-keyword kw">end</span>
|
||||
583: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1184,14 +1205,14 @@ TODO: actually cache git specs
|
|||
<div class="method-source-code"
|
||||
id="has-revision-cached--source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 639</span>
|
||||
639: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">has_revision_cached?</span>
|
||||
640: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@revision</span>
|
||||
641: <span class="ruby-identifier">in_cache</span> { <span class="ruby-identifier">git</span> <span class="ruby-node">%cat-file -e #{@revision}|</span> }
|
||||
642: <span class="ruby-keyword kw">true</span>
|
||||
643: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">GitError</span>
|
||||
644: <span class="ruby-keyword kw">false</span>
|
||||
645: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 668</span>
|
||||
668: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">has_revision_cached?</span>
|
||||
669: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@revision</span>
|
||||
670: <span class="ruby-identifier">in_cache</span> { <span class="ruby-identifier">git</span> <span class="ruby-node">%cat-file -e #{@revision}|</span> }
|
||||
671: <span class="ruby-keyword kw">true</span>
|
||||
672: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">GitError</span>
|
||||
673: <span class="ruby-keyword kw">false</span>
|
||||
674: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1222,11 +1243,11 @@ TODO: actually cache git specs
|
|||
<div class="method-source-code"
|
||||
id="in-cache-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 665</span>
|
||||
665: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">in_cache</span>(&<span class="ruby-identifier">blk</span>)
|
||||
666: <span class="ruby-identifier">cache</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">cached?</span>
|
||||
667: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">cache_path</span>, &<span class="ruby-identifier">blk</span>)
|
||||
668: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 694</span>
|
||||
694: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">in_cache</span>(&<span class="ruby-identifier">blk</span>)
|
||||
695: <span class="ruby-identifier">cache</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">cached?</span>
|
||||
696: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">cache_path</span>, &<span class="ruby-identifier">blk</span>)
|
||||
697: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1257,16 +1278,16 @@ TODO: actually cache git specs
|
|||
<div class="method-source-code"
|
||||
id="revision-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 651</span>
|
||||
651: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">revision</span>
|
||||
652: <span class="ruby-ivar">@revision</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">begin</span>
|
||||
653: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">allow_git_ops?</span>
|
||||
654: <span class="ruby-identifier">in_cache</span> { <span class="ruby-identifier">git</span>(<span class="ruby-node">"rev-parse #{ref}"</span>).<span class="ruby-identifier">strip</span> }
|
||||
655: <span class="ruby-keyword kw">else</span>
|
||||
656: <span class="ruby-identifier">raise</span> <span class="ruby-constant">GitError</span>, <span class="ruby-node">"The git source #{uri} is not yet checked out. Please run `bundle install` before trying to start your application"</span>
|
||||
657: <span class="ruby-keyword kw">end</span>
|
||||
658: <span class="ruby-keyword kw">end</span>
|
||||
659: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 680</span>
|
||||
680: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">revision</span>
|
||||
681: <span class="ruby-ivar">@revision</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">begin</span>
|
||||
682: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">allow_git_ops?</span>
|
||||
683: <span class="ruby-identifier">in_cache</span> { <span class="ruby-identifier">git</span>(<span class="ruby-node">"rev-parse #{ref}"</span>).<span class="ruby-identifier">strip</span> }
|
||||
684: <span class="ruby-keyword kw">else</span>
|
||||
685: <span class="ruby-identifier">raise</span> <span class="ruby-constant">GitError</span>, <span class="ruby-node">"The git source #{uri} is not yet checked out. Please run `bundle install` before trying to start your application"</span>
|
||||
686: <span class="ruby-keyword kw">end</span>
|
||||
687: <span class="ruby-keyword kw">end</span>
|
||||
688: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1297,10 +1318,10 @@ TODO: actually cache git specs
|
|||
<div class="method-source-code"
|
||||
id="shortref-for-display-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 576</span>
|
||||
576: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">shortref_for_display</span>(<span class="ruby-identifier">ref</span>)
|
||||
577: <span class="ruby-identifier">ref</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">6</span>]
|
||||
578: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 591</span>
|
||||
591: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">shortref_for_display</span>(<span class="ruby-identifier">ref</span>)
|
||||
592: <span class="ruby-identifier">ref</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">6</span>]
|
||||
593: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1331,10 +1352,54 @@ TODO: actually cache git specs
|
|||
<div class="method-source-code"
|
||||
id="shortref-for-path-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 580</span>
|
||||
580: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">shortref_for_path</span>(<span class="ruby-identifier">ref</span>)
|
||||
581: <span class="ruby-identifier">ref</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">11</span>]
|
||||
582: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 595</span>
|
||||
595: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">shortref_for_path</span>(<span class="ruby-identifier">ref</span>)
|
||||
596: <span class="ruby-identifier">ref</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">11</span>]
|
||||
597: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="uri-escaped-method" class="method-detail ">
|
||||
<a name="method-i-uri_escaped"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
|
||||
<span class="method-name">uri_escaped</span><span
|
||||
class="method-args">()</span>
|
||||
<span class="method-click-advice">click to toggle source</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
|
||||
<p>
|
||||
Escape the URI for git commands
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<div class="method-source-code"
|
||||
id="uri-escaped-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 612</span>
|
||||
612: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">uri_escaped</span>
|
||||
613: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">WINDOWS</span>
|
||||
614: <span class="ruby-comment cmt"># Windows quoting requires double quotes only, with double quotes</span>
|
||||
615: <span class="ruby-comment cmt"># inside the string escaped by being doubled.</span>
|
||||
616: <span class="ruby-value str">'"'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">'"'</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-value str">'""'</span>} <span class="ruby-operator">+</span> <span class="ruby-value str">'"'</span>
|
||||
617: <span class="ruby-keyword kw">else</span>
|
||||
618: <span class="ruby-comment cmt"># Bash requires single quoted strings, with the single quotes escaped</span>
|
||||
619: <span class="ruby-comment cmt"># by ending the string, escaping the quote, and restarting the string.</span>
|
||||
620: <span class="ruby-value str">"'"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">"'"</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-value str">"'\\''"</span>} <span class="ruby-operator">+</span> <span class="ruby-value str">"'"</span>
|
||||
621: <span class="ruby-keyword kw">end</span>
|
||||
622: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1365,18 +1430,18 @@ TODO: actually cache git specs
|
|||
<div class="method-source-code"
|
||||
id="uri-hash-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 584</span>
|
||||
584: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">uri_hash</span>
|
||||
585: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">uri</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">%{^\w+://(\w+@)?}</span>
|
||||
586: <span class="ruby-comment cmt"># Downcase the domain component of the URI</span>
|
||||
587: <span class="ruby-comment cmt"># and strip off a trailing slash, if one is present</span>
|
||||
588: <span class="ruby-identifier">input</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">uri</span>).<span class="ruby-identifier">normalize</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">%{/$}</span>,<span class="ruby-value str">''</span>)
|
||||
589: <span class="ruby-keyword kw">else</span>
|
||||
590: <span class="ruby-comment cmt"># If there is no URI scheme, assume it is an ssh/git URI</span>
|
||||
591: <span class="ruby-identifier">input</span> = <span class="ruby-identifier">uri</span>
|
||||
592: <span class="ruby-keyword kw">end</span>
|
||||
593: <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">SHA1</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-identifier">input</span>)
|
||||
594: <span class="ruby-keyword kw">end</span></pre>
|
||||
<span class="ruby-comment cmt"># File lib/bundler/source.rb, line 599</span>
|
||||
599: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">uri_hash</span>
|
||||
600: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">uri</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">%{^\w+://(\w+@)?}</span>
|
||||
601: <span class="ruby-comment cmt"># Downcase the domain component of the URI</span>
|
||||
602: <span class="ruby-comment cmt"># and strip off a trailing slash, if one is present</span>
|
||||
603: <span class="ruby-identifier">input</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">uri</span>).<span class="ruby-identifier">normalize</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">%{/$}</span>,<span class="ruby-value str">''</span>)
|
||||
604: <span class="ruby-keyword kw">else</span>
|
||||
605: <span class="ruby-comment cmt"># If there is no URI scheme, assume it is an ssh/git URI</span>
|
||||
606: <span class="ruby-identifier">input</span> = <span class="ruby-identifier">uri</span>
|
||||
607: <span class="ruby-keyword kw">end</span>
|
||||
608: <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">SHA1</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-identifier">input</span>)
|
||||
609: <span class="ruby-keyword kw">end</span></pre>
|
||||
</div>
|
||||
|
||||
</div>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue