docs/code/Utopia/Setup.html in utopia-2.5.5 vs docs/code/Utopia/Setup.html in utopia-2.6.0

- old
+ new

@@ -1,690 +1,696 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> -<meta name="viewport" content="width=device-width, initial-scale=1.0"> -<title> - Class: Utopia::Setup - - &mdash; Documentation by YARD 0.9.12 - -</title> - - <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" /> - - <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" /> - -<script type="text/javascript" charset="utf-8"> - pathId = "Utopia::Setup"; - relpath = '../'; -</script> - - - <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script> - - <script type="text/javascript" charset="utf-8" src="../js/app.js"></script> - - - </head> - <body> - <div class="nav_wrap"> - <iframe id="nav" src="../class_list.html?1"></iframe> - <div id="resizer"></div> - </div> - - <div id="main" tabindex="-1"> - <div id="header"> - <div id="menu"> - - <a href="../_index.html">Index (S)</a> &raquo; - <span class='title'><span class='object_link'><a href="../Utopia.html" title="Utopia (module)">Utopia</a></span></span> - &raquo; - <span class="title">Setup</span> - -</div> - - <div id="search"> - - <a class="full_list_link" id="class_list_link" - href="../class_list.html"> - - <svg width="24" height="24"> - <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect> - <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect> - <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect> - </svg> - </a> - -</div> - <div class="clear"></div> - </div> - - <div id="content"><h1>Class: Utopia::Setup - - - -</h1> -<div class="box_info"> - - <dl> - <dt>Inherits:</dt> - <dd> - <span class="inheritName">Object</span> - - <ul class="fullTree"> - <li>Object</li> - - <li class="next">Utopia::Setup</li> - - </ul> - <a href="#" class="inheritanceTree">show all</a> - - </dd> - </dl> - - - - - - - - - - - - <dl> - <dt>Defined in:</dt> - <dd>lib/utopia/setup.rb</dd> - </dl> - -</div> - -<h2>Overview</h2><div class="docstring"> - <div class="discussion"> +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> +<title> + Class: Utopia::Setup + + &mdash; Documentation by YARD 0.9.18 + +</title> + + <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" /> + + <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" /> + +<script type="text/javascript" charset="utf-8"> + pathId = "Utopia::Setup"; + relpath = '../'; +</script> + + + <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script> + + <script type="text/javascript" charset="utf-8" src="../js/app.js"></script> + + + </head> + <body> + <div class="nav_wrap"> + <iframe id="nav" src="../class_list.html?1"></iframe> + <div id="resizer"></div> + </div> + + <div id="main" tabindex="-1"> + <div id="header"> + <div id="menu"> + + <a href="../_index.html">Index (S)</a> &raquo; + <span class='title'><span class='object_link'><a href="../Utopia.html" title="Utopia (module)">Utopia</a></span></span> + &raquo; + <span class="title">Setup</span> + +</div> + + <div id="search"> + + <a class="full_list_link" id="class_list_link" + href="../class_list.html"> + + <svg width="24" height="24"> + <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect> + <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect> + <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect> + </svg> + </a> + +</div> + <div class="clear"></div> + </div> + + <div id="content"><h1>Class: Utopia::Setup + + + +</h1> +<div class="box_info"> + + <dl> + <dt>Inherits:</dt> + <dd> + <span class="inheritName">Object</span> + + <ul class="fullTree"> + <li>Object</li> + + <li class="next">Utopia::Setup</li> + + </ul> + <a href="#" class="inheritanceTree">show all</a> + + </dd> + </dl> + + + + + + + + + + + + <dl> + <dt>Defined in:</dt> + <dd>lib/utopia/setup.rb</dd> + </dl> + +</div> + +<h2>Overview</h2><div class="docstring"> + <div class="discussion"> <p>Used for setting up a Utopia web application, typically via <code>config/environment.rb</code></p> - - - </div> -</div> -<div class="tags"> - - -</div> - <h2>Constant Summary</h2> - <dl class="constants"> - - <dt id="ENVIRONMENT_KEY-constant" class="">ENVIRONMENT_KEY = - - </dt> - <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>UTOPIA_ENV</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd> - - <dt id="DEFAULT_ENVIRONMENT-constant" class="">DEFAULT_ENVIRONMENT = - - </dt> - <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>environment</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd> - - </dl> - - - - - <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2> - <ul class="summary"> - - <li class="public "> - <span class="summary_signature"> - - <a href="#config_root-instance_method" title="#config_root (instance method)">#<strong>config_root</strong> &#x21d2; Object </a> - - - - </span> - - - - - <span class="note title readonly">readonly</span> - - - - - - - - - + + + </div> +</div> +<div class="tags"> + + +</div> + + <h2> + Constant Summary + <small><a href="#" class="constants_summary_toggle">collapse</a></small> + </h2> + + <dl class="constants"> + + <dt id="ENVIRONMENT_KEY-constant" class="">ENVIRONMENT_KEY = + + </dt> + <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>UTOPIA_ENV</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd> + + <dt id="DEFAULT_ENVIRONMENT-constant" class="">DEFAULT_ENVIRONMENT = + + </dt> + <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>environment</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd> + + </dl> + + + + + + <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2> + <ul class="summary"> + + <li class="public "> + <span class="summary_signature"> + + <a href="#config_root-instance_method" title="#config_root (instance method)">#<strong>config_root</strong> &#x21d2; Object </a> + + + + </span> + + + + + <span class="note title readonly">readonly</span> + + + + + + + + + <span class="summary_desc"><div class='inline'><p>Returns the value of attribute config_root.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#environment-instance_method" title="#environment (instance method)">#<strong>environment</strong> &#x21d2; Object </a> - - - - </span> - - - - - <span class="note title readonly">readonly</span> - - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#environment-instance_method" title="#environment (instance method)">#<strong>environment</strong> &#x21d2; Object </a> + + + + </span> + + + + + <span class="note title readonly">readonly</span> + + + + + + + + + <span class="summary_desc"><div class='inline'><p>Returns the value of attribute environment.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#external_encoding-instance_method" title="#external_encoding (instance method)">#<strong>external_encoding</strong> &#x21d2; Object </a> - - - - </span> - - - - - <span class="note title readonly">readonly</span> - - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#external_encoding-instance_method" title="#external_encoding (instance method)">#<strong>external_encoding</strong> &#x21d2; Object </a> + + + + </span> + + + + + <span class="note title readonly">readonly</span> + + + + + + + + + <span class="summary_desc"><div class='inline'><p>Returns the value of attribute external_encoding.</p> -</div></span> - -</li> - - - </ul> - - - - - - <h2> - Instance Method Summary - <small><a href="#" class="summary_toggle">collapse</a></small> - </h2> - - <ul class="summary"> - - <li class="public "> - <span class="summary_signature"> - - <a href="#add_load_path-instance_method" title="#add_load_path (instance method)">#<strong>add_load_path</strong>(path) &#x21d2; Object </a> - - - - </span> - - - - - - - - - +</div></span> + +</li> + + + </ul> + + + + + + <h2> + Instance Method Summary + <small><a href="#" class="summary_toggle">collapse</a></small> + </h2> + + <ul class="summary"> + + <li class="public "> + <span class="summary_signature"> + + <a href="#add_load_path-instance_method" title="#add_load_path (instance method)">#<strong>add_load_path</strong>(path) &#x21d2; Object </a> + + + + </span> + + + + + + + + + <span class="summary_desc"><div class='inline'><p>Add the given path to $LOAD_PATH.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#apply-instance_method" title="#apply (instance method)">#<strong>apply</strong> &#x21d2; Object </a> - - - - </span> - - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#apply-instance_method" title="#apply (instance method)">#<strong>apply</strong> &#x21d2; Object </a> + + + + </span> + + + + + + + + + <span class="summary_desc"><div class='inline'> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#apply_environment-instance_method" title="#apply_environment (instance method)">#<strong>apply_environment</strong> &#x21d2; Object </a> - - - - </span> - - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#apply_environment-instance_method" title="#apply_environment (instance method)">#<strong>apply_environment</strong> &#x21d2; Object </a> + + + + </span> + + + + + + + + + <span class="summary_desc"><div class='inline'> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#environment_path-instance_method" title="#environment_path (instance method)">#<strong>environment_path</strong>(name, root = @config_root) &#x21d2; Object </a> - - - - </span> - - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#environment_path-instance_method" title="#environment_path (instance method)">#<strong>environment_path</strong>(name, root = @config_root) &#x21d2; Object </a> + + + + </span> + + + + + + + + + <span class="summary_desc"><div class='inline'> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#explicit_environment_name-instance_method" title="#explicit_environment_name (instance method)">#<strong>explicit_environment_name</strong> &#x21d2; Object </a> - - - - </span> - - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#explicit_environment_name-instance_method" title="#explicit_environment_name (instance method)">#<strong>explicit_environment_name</strong> &#x21d2; Object </a> + + + + </span> + + + + + + + + + <span class="summary_desc"><div class='inline'> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(config_root, external_encoding: Encoding::UTF_8) &#x21d2; Setup </a> - - - - </span> - - - <span class="note title constructor">constructor</span> - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(config_root, external_encoding: Encoding::UTF_8) &#x21d2; Setup </a> + + + + </span> + + + <span class="note title constructor">constructor</span> + + + + + + + + <span class="summary_desc"><div class='inline'><p>A new instance of Setup.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#load_environment-instance_method" title="#load_environment (instance method)">#<strong>load_environment</strong>(*args) &#x21d2; Object </a> - - - - </span> - - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#load_environment-instance_method" title="#load_environment (instance method)">#<strong>load_environment</strong>(*args) &#x21d2; Object </a> + + + + </span> + + + + + + + + + <span class="summary_desc"><div class='inline'><p>Load the named configuration file from the <code>config_root</code> directory.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#set_external_encoding-instance_method" title="#set_external_encoding (instance method)">#<strong>set_external_encoding</strong>(encoding = Encoding::UTF_8) &#x21d2; Object </a> - - - - </span> - - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#set_external_encoding-instance_method" title="#set_external_encoding (instance method)">#<strong>set_external_encoding</strong>(encoding = Encoding::UTF_8) &#x21d2; Object </a> + + + + </span> + + + + + + + + + <span class="summary_desc"><div class='inline'><p>If you don’t specify these, it’s possible to have issues when encodings mismatch on the server.</p> -</div></span> - -</li> - - - <li class="public "> - <span class="summary_signature"> - - <a href="#site_root-instance_method" title="#site_root (instance method)">#<strong>site_root</strong> &#x21d2; Object </a> - - - - </span> - - - - - - - - - +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#site_root-instance_method" title="#site_root (instance method)">#<strong>site_root</strong> &#x21d2; Object </a> + + + + </span> + + + + + + + + + <span class="summary_desc"><div class='inline'> -</div></span> - -</li> - - - </ul> - - -<div id="constructor_details" class="method_details_list"> - <h2>Constructor Details</h2> - - <div class="method_details first"> - <h3 class="signature first" id="initialize-instance_method"> - - #<strong>initialize</strong>(config_root, external_encoding: Encoding::UTF_8) &#x21d2; <tt><span class='object_link'><a href="" title="Utopia::Setup (class)">Setup</a></span></tt> - - - - - -</h3><div class="docstring"> - <div class="discussion"> +</div></span> + +</li> + + + </ul> + + +<div id="constructor_details" class="method_details_list"> + <h2>Constructor Details</h2> + + <div class="method_details first"> + <h3 class="signature first" id="initialize-instance_method"> + + #<strong>initialize</strong>(config_root, external_encoding: Encoding::UTF_8) &#x21d2; <tt><span class='object_link'><a href="" title="Utopia::Setup (class)">Setup</a></span></tt> + + + + + +</h3><div class="docstring"> + <div class="discussion"> <p>Returns a new instance of Setup</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> + + + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> + <tr> + <td> <pre class="lines"> 26 27 28 29 30 31 -32</pre> - </td> - <td> +32</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/setup.rb', line 26</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_config_root'>config_root</span><span class='comma'>,</span> <span class='label'>external_encoding:</span> <span class='const'>Encoding</span><span class='op'>::</span><span class='const'>UTF_8</span><span class='rparen'>)</span> <span class='ivar'>@config_root</span> <span class='op'>=</span> <span class='id identifier rubyid_config_root'>config_root</span> <span class='ivar'>@external_encoding</span> <span class='op'>=</span> <span class='id identifier rubyid_external_encoding'>external_encoding</span> <span class='ivar'>@environment</span> <span class='op'>=</span> <span class='kw'>nil</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - -</div> - - <div id="instance_attr_details" class="attr_details"> - <h2>Instance Attribute Details</h2> - - - <span id=""></span> - <div class="method_details first"> - <h3 class="signature first" id="config_root-instance_method"> - - #<strong>config_root</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span> - - - - - -</h3><div class="docstring"> - <div class="discussion"> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + +</div> + + <div id="instance_attr_details" class="attr_details"> + <h2>Instance Attribute Details</h2> + + + <span id=""></span> + <div class="method_details first"> + <h3 class="signature first" id="config_root-instance_method"> + + #<strong>config_root</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span> + + + + + +</h3><div class="docstring"> + <div class="discussion"> <p>Returns the value of attribute config_root</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> + + + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> + <tr> + <td> <pre class="lines"> 34 35 -36</pre> - </td> - <td> +36</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/setup.rb', line 34</span> <span class='kw'>def</span> <span class='id identifier rubyid_config_root'>config_root</span> <span class='ivar'>@config_root</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - - <span id=""></span> - <div class="method_details "> - <h3 class="signature " id="environment-instance_method"> - - #<strong>environment</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span> - - - - - -</h3><div class="docstring"> - <div class="discussion"> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + + <span id=""></span> + <div class="method_details "> + <h3 class="signature " id="environment-instance_method"> + + #<strong>environment</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span> + + + + + +</h3><div class="docstring"> + <div class="discussion"> <p>Returns the value of attribute environment</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> + + + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> + <tr> + <td> <pre class="lines"> 36 37 -38</pre> - </td> - <td> +38</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/setup.rb', line 36</span> <span class='kw'>def</span> <span class='id identifier rubyid_environment'>environment</span> <span class='ivar'>@environment</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - - <span id=""></span> - <div class="method_details "> - <h3 class="signature " id="external_encoding-instance_method"> - - #<strong>external_encoding</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span> - - - - - -</h3><div class="docstring"> - <div class="discussion"> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + + <span id=""></span> + <div class="method_details "> + <h3 class="signature " id="external_encoding-instance_method"> + + #<strong>external_encoding</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span> + + + + + +</h3><div class="docstring"> + <div class="discussion"> <p>Returns the value of attribute external_encoding</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> + + + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> + <tr> + <td> <pre class="lines"> 35 36 -37</pre> - </td> - <td> +37</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/setup.rb', line 35</span> <span class='kw'>def</span> <span class='id identifier rubyid_external_encoding'>external_encoding</span> <span class='ivar'>@external_encoding</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - </div> - - - <div id="instance_method_details" class="method_details_list"> - <h2>Instance Method Details</h2> - - - <div class="method_details first"> - <h3 class="signature first" id="add_load_path-instance_method"> - - #<strong>add_load_path</strong>(path) &#x21d2; <tt>Object</tt> - - - - - -</h3><div class="docstring"> - <div class="discussion"> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + </div> + + + <div id="instance_method_details" class="method_details_list"> + <h2>Instance Method Details</h2> + + + <div class="method_details first"> + <h3 class="signature first" id="add_load_path-instance_method"> + + #<strong>add_load_path</strong>(path) &#x21d2; <tt>Object</tt> + + + + + +</h3><div class="docstring"> + <div class="discussion"> <p>Add the given path to $LOAD_PATH. If it’s relative, make it absolute relative to <code>site_path</code>.</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> + + + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> + <tr> + <td> <pre class="lines"> 96 97 98 -99</pre> - </td> - <td> +99</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/setup.rb', line 96</span> <span class='kw'>def</span> <span class='id identifier rubyid_add_load_path'>add_load_path</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='comment'># Allow loading library code from lib directory: </span> <span class='gvar'>$LOAD_PATH</span> <span class='op'>&lt;&lt;</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_site_root'>site_root</span><span class='rparen'>)</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="apply-instance_method"> - - #<strong>apply</strong> &#x21d2; <tt>Object</tt> - - - - - -</h3><table class="source_code"> - <tr> - <td> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> + <h3 class="signature " id="apply-instance_method"> + + #<strong>apply</strong> &#x21d2; <tt>Object</tt> + + + + + +</h3><table class="source_code"> + <tr> + <td> <pre class="lines"> 49 50 @@ -692,149 +698,149 @@ 52 53 54 55 56 -57</pre> - </td> - <td> +57</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/setup.rb', line 49</span> <span class='kw'>def</span> <span class='id identifier rubyid_apply'>apply</span> <span class='id identifier rubyid_set_external_encoding'>set_external_encoding</span> <span class='id identifier rubyid_apply_environment'>apply_environment</span> <span class='id identifier rubyid_add_load_path'>add_load_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>lib</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='id identifier rubyid_require_relative'>require_relative</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>../utopia</span><span class='tstring_end'>&#39;</span></span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="apply_environment-instance_method"> - - #<strong>apply_environment</strong> &#x21d2; <tt>Object</tt> - - - - - -</h3><table class="source_code"> - <tr> - <td> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> + <h3 class="signature " id="apply_environment-instance_method"> + + #<strong>apply_environment</strong> &#x21d2; <tt>Object</tt> + + + + + +</h3><table class="source_code"> + <tr> + <td> <pre class="lines"> 59 60 61 62 63 64 -65</pre> - </td> - <td> +65</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/setup.rb', line 59</span> <span class='kw'>def</span> <span class='id identifier rubyid_apply_environment'>apply_environment</span> <span class='kw'>if</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='id identifier rubyid_explicit_environment_name'>explicit_environment_name</span> <span class='id identifier rubyid_load_environment'>load_environment</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span> <span class='kw'>else</span> <span class='id identifier rubyid_load_environment'>load_environment</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="#DEFAULT_ENVIRONMENT-constant" title="Utopia::Setup::DEFAULT_ENVIRONMENT (constant)">DEFAULT_ENVIRONMENT</a></span></span><span class='rparen'>)</span> <span class='kw'>end</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="environment_path-instance_method"> - - #<strong>environment_path</strong>(name, root = @config_root) &#x21d2; <tt>Object</tt> - - - - - -</h3><table class="source_code"> - <tr> - <td> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> + <h3 class="signature " id="environment_path-instance_method"> + + #<strong>environment_path</strong>(name, root = @config_root) &#x21d2; <tt>Object</tt> + + + + + +</h3><table class="source_code"> + <tr> + <td> <pre class="lines"> 67 68 -69</pre> - </td> - <td> +69</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/setup.rb', line 67</span> <span class='kw'>def</span> <span class='id identifier rubyid_environment_path'>environment_path</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_root'><span class='object_link'><a href="../top-level-namespace.html" title="Top Level Namespace (root)">root</a></span></span> <span class='op'>=</span> <span class='ivar'>@config_root</span><span class='rparen'>)</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>.yaml</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_root'><span class='object_link'><a href="../top-level-namespace.html" title="Top Level Namespace (root)">root</a></span></span><span class='rparen'>)</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="explicit_environment_name-instance_method"> - - #<strong>explicit_environment_name</strong> &#x21d2; <tt>Object</tt> - - - - - -</h3><table class="source_code"> - <tr> - <td> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> + <h3 class="signature " id="explicit_environment_name-instance_method"> + + #<strong>explicit_environment_name</strong> &#x21d2; <tt>Object</tt> + + + + + +</h3><table class="source_code"> + <tr> + <td> <pre class="lines"> 41 42 -43</pre> - </td> - <td> +43</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/setup.rb', line 41</span> <span class='kw'>def</span> <span class='id identifier rubyid_explicit_environment_name'>explicit_environment_name</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#ENVIRONMENT_KEY-constant" title="Utopia::Setup::ENVIRONMENT_KEY (constant)">ENVIRONMENT_KEY</a></span></span><span class='rbracket'>]</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="load_environment-instance_method"> - - #<strong>load_environment</strong>(*args) &#x21d2; <tt>Object</tt> - - - - - -</h3><div class="docstring"> - <div class="discussion"> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> + <h3 class="signature " id="load_environment-instance_method"> + + #<strong>load_environment</strong>(*args) &#x21d2; <tt>Object</tt> + + + + + +</h3><div class="docstring"> + <div class="discussion"> <p>Load the named configuration file from the <code>config_root</code> directory.</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> + + + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> + <tr> + <td> <pre class="lines"> 81 82 @@ -846,13 +852,13 @@ 88 89 90 91 92 -93</pre> - </td> - <td> +93</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/setup.rb', line 81</span> <span class='kw'>def</span> <span class='id identifier rubyid_load_environment'>load_environment</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span> <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='id identifier rubyid_environment_path'>environment_path</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span> @@ -863,102 +869,102 @@ <span class='comment'># We update ENV but only when it&#39;s not already set to something: </span> <span class='const'>ENV</span><span class='period'>.</span><span class='id identifier rubyid_update'>update</span><span class='lparen'>(</span><span class='ivar'>@environment</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_old_value'>old_value</span><span class='comma'>,</span> <span class='id identifier rubyid_new_value'>new_value</span><span class='op'>|</span> <span class='id identifier rubyid_old_value'>old_value</span> <span class='op'>||</span> <span class='id identifier rubyid_new_value'>new_value</span> <span class='kw'>end</span> <span class='kw'>end</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="set_external_encoding-instance_method"> - - #<strong>set_external_encoding</strong>(encoding = Encoding::UTF_8) &#x21d2; <tt>Object</tt> - - - - - -</h3><div class="docstring"> - <div class="discussion"> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> + <h3 class="signature " id="set_external_encoding-instance_method"> + + #<strong>set_external_encoding</strong>(encoding = Encoding::UTF_8) &#x21d2; <tt>Object</tt> + + + + + +</h3><div class="docstring"> + <div class="discussion"> <p>If you don’t specify these, it’s possible to have issues when encodings mismatch on the server.</p> - - - </div> -</div> -<div class="tags"> - - -</div><table class="source_code"> - <tr> - <td> + + + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> + <tr> + <td> <pre class="lines"> 72 73 74 75 76 77 -78</pre> - </td> - <td> +78</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/setup.rb', line 72</span> <span class='kw'>def</span> <span class='id identifier rubyid_set_external_encoding'>set_external_encoding</span><span class='lparen'>(</span><span class='id identifier rubyid_encoding'>encoding</span> <span class='op'>=</span> <span class='const'>Encoding</span><span class='op'>::</span><span class='const'>UTF_8</span><span class='rparen'>)</span> <span class='comment'># TODO: Deprecate and remove this setup - it should be the responsibility of the server to set this correctly. </span> <span class='kw'>if</span> <span class='const'>Encoding</span><span class='period'>.</span><span class='id identifier rubyid_default_external'>default_external</span> <span class='op'>!=</span> <span class='id identifier rubyid_encoding'>encoding</span> <span class='id identifier rubyid_warn'>warn</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Updating Encoding.default_external from </span><span class='embexpr_beg'>#{</span><span class='const'>Encoding</span><span class='period'>.</span><span class='id identifier rubyid_default_external'>default_external</span><span class='embexpr_end'>}</span><span class='tstring_content'> to </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_encoding'>encoding</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='gvar'>$VERBOSE</span> <span class='const'>Encoding</span><span class='period'>.</span><span class='id identifier rubyid_default_external'>default_external</span> <span class='op'>=</span> <span class='id identifier rubyid_encoding'>encoding</span> <span class='kw'>end</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - <div class="method_details "> - <h3 class="signature " id="site_root-instance_method"> - - #<strong>site_root</strong> &#x21d2; <tt>Object</tt> - - - - - -</h3><table class="source_code"> - <tr> - <td> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> + <h3 class="signature " id="site_root-instance_method"> + + #<strong>site_root</strong> &#x21d2; <tt>Object</tt> + + + + + +</h3><table class="source_code"> + <tr> + <td> <pre class="lines"> 45 46 -47</pre> - </td> - <td> +47</pre> + </td> + <td> <pre class="code"><span class="info file"># File 'lib/utopia/setup.rb', line 45</span> <span class='kw'>def</span> <span class='id identifier rubyid_site_root'>site_root</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='ivar'>@config_root</span><span class='rparen'>)</span> -<span class='kw'>end</span></pre> - </td> - </tr> -</table> -</div> - - </div> - -</div> - - <div id="footer"> - Generated on Sat Mar 24 21:17:19 2018 by - <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.9.12 (ruby-2.5.0). -</div> - - </div> - </body> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + </div> + +</div> + + <div id="footer"> + Generated on Sat Mar 9 12:01:52 2019 by + <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> + 0.9.18 (ruby-2.6.1). +</div> + + </div> + </body> </html> \ No newline at end of file