2010-09-25 05:36:30 +02:00
<?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::Dsl< / 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/dsl_rb.html?TB_iframe=true&height=550&width=785"
class="thickbox" title="lib/bundler/dsl.rb">lib/bundler/dsl.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-c-deprecate" > ::deprecate< / a > < / li >
< li > < a href = "#method-c-evaluate" > ::evaluate< / a > < / li >
< li > < a href = "#method-c-new" > ::new< / a > < / li >
< li > < a href = "#method-i-_deprecated_options" > #_deprecated_options< / a > < / li >
< li > < a href = "#method-i-_normalize_hash" > #_normalize_hash< / a > < / li >
< li > < a href = "#method-i-_normalize_options" > #_normalize_options< / a > < / li >
< li > < a href = "#method-i-env" > #env< / a > < / li >
< li > < a href = "#method-i-gem" > #gem< / a > < / li >
< li > < a href = "#method-i-gemspec" > #gemspec< / a > < / li >
< li > < a href = "#method-i-git" > #git< / a > < / li >
< li > < a href = "#method-i-group" > #group< / a > < / li >
< li > < a href = "#method-i-path" > #path< / a > < / li >
2010-12-07 04:11:19 +01:00
< li > < a href = "#method-i-platform" > #platform< / a > < / li >
2010-09-25 05:36:30 +02:00
< li > < a href = "#method-i-platforms" > #platforms< / a > < / li >
< li > < a href = "#method-i-rubygems_source" > #rubygems_source< / a > < / li >
< li > < a href = "#method-i-source" > #source< / a > < / li >
< li > < a href = "#method-i-to_definition" > #to_definition< / 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 >
2011-06-15 07:43:38 +02:00
< 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 >
2010-09-25 05:36:30 +02:00
< 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 >
2010-12-07 04:11:19 +01:00
< li > < a href = "../Bundler/Deployment.html" > Bundler::Deployment< / a > < / li >
2010-09-25 05:36:30 +02:00
< 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 >
2011-06-15 07:43:38 +02:00
< 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 >
2010-09-25 05:36:30 +02:00
< 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 >
2010-12-07 04:11:19 +01:00
< li > < a href = "../Gem/Requirement.html" > Gem::Requirement< / a > < / li >
2010-09-25 05:36:30 +02:00
< 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::Dsl< / h1 >
< div id = "description" >
< / div >
<!-- Constants -->
< div id = "constants-list" class = "section" >
< h3 class = "section-header" > Constants< / h3 >
< dl >
< dt > < a name = "VALID_PLATFORMS" > VALID_PLATFORMS< / a > < / dt >
< dd class = "description" > < / dd >
< / dl >
< / div >
<!-- Attributes -->
<!-- Methods -->
< div id = "public-class-method-details" class = "method-section section" >
< h3 class = "section-header" > Public Class Methods< / h3 >
< div id = "deprecate-method" class = "method-detail " >
< a name = "method-c-deprecate" > < / a >
< div class = "method-heading" >
< span class = "method-name" > deprecate< / span > < span
class="method-args">(name, replacement = nil)< / span >
< span class = "method-click-advice" > click to toggle source< / span >
< / div >
< div class = "method-description" >
< p >
Deprecated methods
< / p >
< div class = "method-source-code"
id="deprecate-source">
< pre >
2011-06-15 07:43:38 +02:00
< 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 >
2010-09-25 05:36:30 +02:00
< / div >
< / div >
< / div >
< div id = "evaluate-method" class = "method-detail " >
< a name = "method-c-evaluate" > < / a >
< div class = "method-heading" >
< span class = "method-name" > evaluate< / span > < span
2010-12-07 04:11:19 +01:00
class="method-args">(gemfile, lockfile, unlock)< / span >
2010-09-25 05:36:30 +02:00
< span class = "method-click-advice" > click to toggle source< / span >
< / div >
< div class = "method-description" >
< div class = "method-source-code"
id="evaluate-source">
< pre >
< span class = "ruby-comment cmt" > # File lib/bundler/dsl.rb, line 5< / span >
2010-12-07 04:11:19 +01:00
5: < span class = "ruby-keyword kw" > def< / span > < span class = "ruby-keyword kw" > self< / span > .< span class = "ruby-identifier" > evaluate< / span > (< span class = "ruby-identifier" > gemfile< / span > , < span class = "ruby-identifier" > lockfile< / span > , < span class = "ruby-identifier" > unlock< / span > )
2010-09-25 05:36:30 +02:00
6: < span class = "ruby-identifier" > builder< / span > = < span class = "ruby-identifier" > new< / span >
7: < span class = "ruby-identifier" > builder< / span > .< span class = "ruby-identifier" > instance_eval< / span > (< span class = "ruby-constant" > Bundler< / span > .< span class = "ruby-identifier" > read_file< / span > (< span class = "ruby-identifier" > gemfile< / span > .< span class = "ruby-identifier" > to_s< / span > ), < span class = "ruby-identifier" > gemfile< / span > .< span class = "ruby-identifier" > to_s< / span > , < span class = "ruby-value" > 1< / span > )
2010-12-07 04:11:19 +01:00
8: < span class = "ruby-identifier" > builder< / span > .< span class = "ruby-identifier" > to_definition< / span > (< span class = "ruby-identifier" > lockfile< / span > , < span class = "ruby-identifier" > unlock< / span > )
2010-09-25 05:36:30 +02:00
9: < span class = "ruby-keyword kw" > end< / span > < / pre >
< / div >
< / div >
< / div >
< div id = "new-method" class = "method-detail " >
< a name = "method-c-new" > < / a >
< div class = "method-heading" >
< span class = "method-name" > new< / span > < span
class="method-args">()< / span >
< span class = "method-click-advice" > click to toggle source< / span >
< / div >
< div class = "method-description" >
< div class = "method-source-code"
id="new-source">
< pre >
< span class = "ruby-comment cmt" > # File lib/bundler/dsl.rb, line 13< / span >
13: < span class = "ruby-keyword kw" > def< / span > < span class = "ruby-identifier" > initialize< / span >
14: < span class = "ruby-ivar" > @rubygems_source< / span > = < span class = "ruby-constant" > Source< / span > < span class = "ruby-operator" > ::< / span > < span class = "ruby-constant" > Rubygems< / span > .< span class = "ruby-identifier" > new< / span >
15: < span class = "ruby-ivar" > @source< / span > = < span class = "ruby-keyword kw" > nil< / span >
16: < span class = "ruby-ivar" > @sources< / span > = []
17: < span class = "ruby-ivar" > @dependencies< / span > = []
18: < span class = "ruby-ivar" > @groups< / span > = []
19: < span class = "ruby-ivar" > @platforms< / span > = []
20: < span class = "ruby-ivar" > @env< / span > = < span class = "ruby-keyword kw" > nil< / span >
21: < span class = "ruby-keyword kw" > end< / span > < / pre >
< / div >
< / div >
< / div >
< / div >
< div id = "public-instance-method-details" class = "method-section section" >
< h3 class = "section-header" > Public Instance Methods< / h3 >
< div id = "env-method" class = "method-detail " >
< a name = "method-i-env" > < / a >
< div class = "method-heading" >
< span class = "method-name" > env< / 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="env-source">
< pre >
2011-06-15 07:43:38 +02:00
< 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 >
2010-09-25 05:36:30 +02:00
< / div >
< / div >
< / div >
< div id = "gem-method" class = "method-detail " >
< a name = "method-i-gem" > < / a >
< div class = "method-heading" >
< span class = "method-name" > gem< / span > < span
class="method-args">(name, *args)< / span >
< span class = "method-click-advice" > click to toggle source< / span >
< / div >
< div class = "method-description" >
< div class = "method-source-code"
id="gem-source">
< pre >
2011-06-15 07:43:38 +02:00
< 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 > ]
2010-12-07 04:11:19 +01:00
54:
2011-06-15 07:43:38 +02:00
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 > )
2010-12-07 04:11:19 +01:00
57:
2011-06-15 07:43:38 +02:00
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 >
2010-09-25 05:36:30 +02:00
< / div >
< / div >
< / div >
< div id = "gemspec-method" class = "method-detail " >
< a name = "method-i-gemspec" > < / a >
< div class = "method-heading" >
< span class = "method-name" > gemspec< / span > < span
class="method-args">(opts = nil)< / span >
< span class = "method-click-advice" > click to toggle source< / span >
< / div >
< div class = "method-description" >
< div class = "method-source-code"
id="gemspec-source">
< pre >
< span class = "ruby-comment cmt" > # File lib/bundler/dsl.rb, line 23< / span >
23: < span class = "ruby-keyword kw" > def< / span > < span class = "ruby-identifier" > gemspec< / span > (< span class = "ruby-identifier" > opts< / span > = < span class = "ruby-keyword kw" > nil< / span > )
24: < span class = "ruby-identifier" > path< / span > = < span class = "ruby-identifier" > opts< / 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-value str" > '.'< / span >
25: < span class = "ruby-identifier" > name< / 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-operator" > ||< / span > < span class = "ruby-value str" > '*'< / span >
26: < span class = "ruby-identifier" > development_group< / span > = < span class = "ruby-identifier" > opts< / span > < span class = "ruby-operator" > & & < / span > < span class = "ruby-identifier" > opts< / span > [< span class = "ruby-value" > :development_group< / span > ] < span class = "ruby-operator" > ||< / span > < span class = "ruby-value" > :development< / span >
27: < span class = "ruby-identifier" > path< / span > = < span class = "ruby-constant" > File< / span > .< span class = "ruby-identifier" > expand_path< / span > (< span class = "ruby-identifier" > path< / span > , < span class = "ruby-constant" > Bundler< / span > .< span class = "ruby-identifier" > default_gemfile< / span > .< span class = "ruby-identifier" > dirname< / span > )
28: < span class = "ruby-identifier" > gemspecs< / span > = < span class = "ruby-constant" > Dir< / span > [< span class = "ruby-constant" > File< / span > .< span class = "ruby-identifier" > join< / span > (< span class = "ruby-identifier" > path< / span > , < span class = "ruby-node" > " #{name}.gemspec" < / span > )]
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 >
2011-06-15 07:43:38 +02:00
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 > )
2010-12-07 04:11:19 +01:00
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 >
2011-06-15 07:43:38 +02:00
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 >
2010-09-25 05:36:30 +02:00
< / div >
< / div >
< / div >
< div id = "git-method" class = "method-detail " >
< a name = "method-i-git" > < / a >
< div class = "method-heading" >
< span class = "method-name" > git< / span > < span
class="method-args">(uri, options = {}, source_options = {}, & blk)< / span >
< span class = "method-click-advice" > click to toggle source< / span >
< / div >
< div class = "method-description" >
< div class = "method-source-code"
id="git-source">
< pre >
2011-06-15 07:43:38 +02:00
< 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 >
2010-09-25 05:36:30 +02:00
< / div >
< / div >
< / div >
< div id = "group-method" class = "method-detail " >
< a name = "method-i-group" > < / a >
< div class = "method-heading" >
< span class = "method-name" > group< / span > < span
class="method-args">(*args, & blk)< / span >
< span class = "method-click-advice" > click to toggle source< / span >
< / div >
< div class = "method-description" >
< div class = "method-source-code"
id="group-source">
< pre >
2011-06-15 07:43:38 +02:00
< 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 >
2010-09-25 05:36:30 +02:00
< / div >
< / div >
< / div >
< div id = "path-method" class = "method-detail " >
< a name = "method-i-path" > < / a >
< div class = "method-heading" >
< span class = "method-name" > path< / span > < span
class="method-args">(path, options = {}, source_options = {}, & blk)< / span >
< span class = "method-click-advice" > click to toggle source< / span >
< / div >
< div class = "method-description" >
< div class = "method-source-code"
id="path-source">
< pre >
2011-06-15 07:43:38 +02:00
< 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 >
2010-09-25 05:36:30 +02:00
< / div >
< / div >
< / div >
2010-12-07 04:11:19 +01:00
< div id = "platform-method" class = "method-detail method-alias" >
< a name = "method-i-platform" > < / a >
< div class = "method-heading" >
< span class = "method-name" > platform< / span > < span
class="method-args">(*platforms)< / span >
< span class = "method-click-advice" > click to toggle source< / span >
< / div >
< div class = "method-description" >
< / div >
< div class = "aliases" >
Alias for: < a href = "Dsl.html#method-i-platforms" > platforms< / a >
< / div >
< / div >
2010-09-25 05:36:30 +02:00
< div id = "platforms-method" class = "method-detail " >
< a name = "method-i-platforms" > < / a >
< div class = "method-heading" >
< span class = "method-name" > platforms< / span > < span
class="method-args">(*platforms)< / span >
< span class = "method-click-advice" > click to toggle source< / span >
< / div >
< div class = "method-description" >
< div class = "method-source-code"
id="platforms-source">
< pre >
2011-06-15 07:43:38 +02:00
< 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 >
2010-09-25 05:36:30 +02:00
< / div >
< / div >
2010-12-07 04:11:19 +01:00
< div class = "aliases" >
Also aliased as: < a href = "Dsl.html#method-i-platform" > platform< / a >
< / div >
2010-09-25 05:36:30 +02:00
< / div >
< div id = "source-method" class = "method-detail " >
< a name = "method-i-source" > < / a >
< div class = "method-heading" >
< span class = "method-name" > source< / span > < span
class="method-args">(source, options = {})< / span >
< span class = "method-click-advice" > click to toggle source< / span >
< / div >
< div class = "method-description" >
< div class = "method-source-code"
id="source-source">
< pre >
2011-06-15 07:43:38 +02:00
< 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 >
2010-12-07 04:11:19 +01:00
83: < span class = "ruby-keyword kw" > return< / span >
2011-06-15 07:43:38 +02:00
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 >
2010-12-07 04:11:19 +01:00
88:
2011-06-15 07:43:38 +02:00
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 >
2010-09-25 05:36:30 +02:00
< / div >
< / div >
< / div >
< div id = "to-definition-method" class = "method-detail " >
< a name = "method-i-to_definition" > < / a >
< div class = "method-heading" >
< span class = "method-name" > to_definition< / span > < span
class="method-args">(lockfile, unlock)< / span >
< span class = "method-click-advice" > click to toggle source< / span >
< / div >
< div class = "method-description" >
< div class = "method-source-code"
id="to-definition-source">
< pre >
2011-06-15 07:43:38 +02:00
< 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 >
2010-09-25 05:36:30 +02:00
< / div >
< / div >
< / div >
< / div >
< div id = "private-instance-method-details" class = "method-section section" >
< h3 class = "section-header" > Private Instance Methods< / h3 >
< div id = "-deprecated-options-method" class = "method-detail " >
< a name = "method-i-_deprecated_options" > < / a >
< div class = "method-heading" >
< span class = "method-name" > _deprecated_options< / span > < span
class="method-args">(options)< / span >
< span class = "method-click-advice" > click to toggle source< / span >
< / div >
< div class = "method-description" >
< div class = "method-source-code"
id="-deprecated-options-source">
< pre >
2011-06-15 07:43:38 +02:00
< 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 >
2010-09-25 05:36:30 +02:00
< / div >
< / div >
< / div >
< div id = "-normalize-hash-method" class = "method-detail " >
< a name = "method-i-_normalize_hash" > < / a >
< div class = "method-heading" >
< span class = "method-name" > _normalize_hash< / span > < span
class="method-args">(opts)< / span >
< span class = "method-click-advice" > click to toggle source< / span >
< / div >
< div class = "method-description" >
< div class = "method-source-code"
id="-normalize-hash-source">
< pre >
2011-06-15 07:43:38 +02:00
< 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 >
2010-09-25 05:36:30 +02:00
< / div >
< / div >
< / div >
< div id = "-normalize-options-method" class = "method-detail " >
< a name = "method-i-_normalize_options" > < / a >
< div class = "method-heading" >
< span class = "method-name" > _normalize_options< / span > < span
class="method-args">(name, version, opts)< / span >
< span class = "method-click-advice" > click to toggle source< / span >
< / div >
< div class = "method-description" >
< div class = "method-source-code"
id="-normalize-options-source">
< pre >
2011-06-15 07:43:38 +02:00
< 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 >
2010-09-25 05:36:30 +02:00
< / div >
< / div >
< / div >
< div id = "rubygems-source-method" class = "method-detail " >
< a name = "method-i-rubygems_source" > < / a >
< div class = "method-heading" >
< span class = "method-name" > rubygems_source< / span > < span
class="method-args">(source)< / span >
< span class = "method-click-advice" > click to toggle source< / span >
< / div >
< div class = "method-description" >
< div class = "method-source-code"
id="rubygems-source-source">
< pre >
2011-06-15 07:43:38 +02:00
< 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 >
2010-09-25 05:36:30 +02:00
< / 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 >