diff options
Diffstat (limited to 'doc/code/classes')
193 files changed, 0 insertions, 58041 deletions
diff --git a/doc/code/classes/Ability.html b/doc/code/classes/Ability.html deleted file mode 100644 index c50e5d3e708..00000000000 --- a/doc/code/classes/Ability.html +++ /dev/null @@ -1,507 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Ability</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Ability - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/models/ability_rb.html">app/models/ability.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-allowed">allowed</a> - </li> - - </ul> - </dd> - - <dt>G</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-group_abilities">group_abilities</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-project_abilities">project_abilities</a>, - </li> - - - <li> - <a href="#method-c-project_admin_rules">project_admin_rules</a>, - </li> - - - <li> - <a href="#method-c-project_dev_rules">project_dev_rules</a>, - </li> - - - <li> - <a href="#method-c-project_guest_rules">project_guest_rules</a>, - </li> - - - <li> - <a href="#method-c-project_master_rules">project_master_rules</a>, - </li> - - - <li> - <a href="#method-c-project_report_rules">project_report_rules</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-allowed"> - - <b>allowed</b>(object, subject) - - <a href="../classes/Ability.html#method-c-allowed" name="method-c-allowed" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-allowed_source')" id="l_method-c-allowed_source">show</a> - - </p> - <div id="method-c-allowed_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/ability.rb, line 3</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">allowed</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">subject</span>) - <span class="ruby-keyword">case</span> <span class="ruby-identifier">subject</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span> - <span class="ruby-keyword">when</span> <span class="ruby-string">"Project"</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">project_abilities</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">subject</span>) - <span class="ruby-keyword">when</span> <span class="ruby-string">"Issue"</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">issue_abilities</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">subject</span>) - <span class="ruby-keyword">when</span> <span class="ruby-string">"Note"</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">note_abilities</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">subject</span>) - <span class="ruby-keyword">when</span> <span class="ruby-string">"Snippet"</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">snippet_abilities</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">subject</span>) - <span class="ruby-keyword">when</span> <span class="ruby-string">"MergeRequest"</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">merge_request_abilities</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">subject</span>) - <span class="ruby-keyword">when</span> <span class="ruby-string">"Group"</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">group_abilities</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">subject</span>) - <span class="ruby-keyword">else</span> [] - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-group_abilities"> - - <b>group_abilities</b>(user, group) - - <a href="../classes/Ability.html#method-c-group_abilities" name="method-c-group_abilities" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-group_abilities_source')" id="l_method-c-group_abilities_source">show</a> - - </p> - <div id="method-c-group_abilities_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/ability.rb, line 107</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">group_abilities</span> <span class="ruby-identifier">user</span>, <span class="ruby-identifier">group</span> - <span class="ruby-identifier">rules</span> = [] - - <span class="ruby-identifier">rules</span> <span class="ruby-operator"><<</span> [ - <span class="ruby-value">:manage_group</span> - ] <span class="ruby-keyword">if</span> <span class="ruby-identifier">group</span>.<span class="ruby-identifier">owner</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">user</span> - - <span class="ruby-identifier">rules</span>.<span class="ruby-identifier">flatten</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-project_abilities"> - - <b>project_abilities</b>(user, project) - - <a href="../classes/Ability.html#method-c-project_abilities" name="method-c-project_abilities" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-project_abilities_source')" id="l_method-c-project_abilities_source">show</a> - - </p> - <div id="method-c-project_abilities_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/ability.rb, line 15</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">project_abilities</span>(<span class="ruby-identifier">user</span>, <span class="ruby-identifier">project</span>) - <span class="ruby-identifier">rules</span> = [] - - <span class="ruby-comment"># Rules based on role in project</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">project</span>.<span class="ruby-identifier">master_access_for?</span>(<span class="ruby-identifier">user</span>) - <span class="ruby-identifier">rules</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">project_master_rules</span> - - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">project</span>.<span class="ruby-identifier">dev_access_for?</span>(<span class="ruby-identifier">user</span>) - <span class="ruby-identifier">rules</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">project_dev_rules</span> - - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">project</span>.<span class="ruby-identifier">report_access_for?</span>(<span class="ruby-identifier">user</span>) - <span class="ruby-identifier">rules</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">project_report_rules</span> - - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">project</span>.<span class="ruby-identifier">guest_access_for?</span>(<span class="ruby-identifier">user</span>) - <span class="ruby-identifier">rules</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">project_guest_rules</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">project</span>.<span class="ruby-identifier">namespace</span> - <span class="ruby-comment"># If user own project namespace</span> - <span class="ruby-comment"># (Ex. group owner or account owner)</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">project</span>.<span class="ruby-identifier">namespace</span>.<span class="ruby-identifier">owner</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">user</span> - <span class="ruby-identifier">rules</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">project_admin_rules</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">else</span> - <span class="ruby-comment"># For compatibility with global projects</span> - <span class="ruby-comment"># use projects.owner_id</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">project</span>.<span class="ruby-identifier">owner</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">user</span> - <span class="ruby-identifier">rules</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">project_admin_rules</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - - - <span class="ruby-identifier">rules</span>.<span class="ruby-identifier">flatten</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-project_admin_rules"> - - <b>project_admin_rules</b>() - - <a href="../classes/Ability.html#method-c-project_admin_rules" name="method-c-project_admin_rules" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-project_admin_rules_source')" id="l_method-c-project_admin_rules_source">show</a> - - </p> - <div id="method-c-project_admin_rules_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/ability.rb, line 99</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">project_admin_rules</span> - <span class="ruby-identifier">project_master_rules</span> <span class="ruby-operator">+</span> [ - <span class="ruby-value">:change_namespace</span>, - <span class="ruby-value">:rename_project</span>, - <span class="ruby-value">:remove_project</span> - ] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-project_dev_rules"> - - <b>project_dev_rules</b>() - - <a href="../classes/Ability.html#method-c-project_dev_rules" name="method-c-project_dev_rules" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-project_dev_rules_source')" id="l_method-c-project_dev_rules_source">show</a> - - </p> - <div id="method-c-project_dev_rules_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/ability.rb, line 74</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">project_dev_rules</span> - <span class="ruby-identifier">project_report_rules</span> <span class="ruby-operator">+</span> [ - <span class="ruby-value">:write_wiki</span>, - <span class="ruby-value">:push_code</span> - ] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-project_guest_rules"> - - <b>project_guest_rules</b>() - - <a href="../classes/Ability.html#method-c-project_guest_rules" name="method-c-project_guest_rules" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-project_guest_rules_source')" id="l_method-c-project_guest_rules_source">show</a> - - </p> - <div id="method-c-project_guest_rules_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/ability.rb, line 50</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">project_guest_rules</span> - [ - <span class="ruby-value">:read_project</span>, - <span class="ruby-value">:read_wiki</span>, - <span class="ruby-value">:read_issue</span>, - <span class="ruby-value">:read_milestone</span>, - <span class="ruby-value">:read_snippet</span>, - <span class="ruby-value">:read_team_member</span>, - <span class="ruby-value">:read_merge_request</span>, - <span class="ruby-value">:read_note</span>, - <span class="ruby-value">:write_project</span>, - <span class="ruby-value">:write_issue</span>, - <span class="ruby-value">:write_note</span> - ] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-project_master_rules"> - - <b>project_master_rules</b>() - - <a href="../classes/Ability.html#method-c-project_master_rules" name="method-c-project_master_rules" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-project_master_rules_source')" id="l_method-c-project_master_rules_source">show</a> - - </p> - <div id="method-c-project_master_rules_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/ability.rb, line 81</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">project_master_rules</span> - <span class="ruby-identifier">project_dev_rules</span> <span class="ruby-operator">+</span> [ - <span class="ruby-value">:push_code_to_protected_branches</span>, - <span class="ruby-value">:modify_issue</span>, - <span class="ruby-value">:modify_snippet</span>, - <span class="ruby-value">:modify_merge_request</span>, - <span class="ruby-value">:admin_issue</span>, - <span class="ruby-value">:admin_milestone</span>, - <span class="ruby-value">:admin_snippet</span>, - <span class="ruby-value">:admin_team_member</span>, - <span class="ruby-value">:admin_merge_request</span>, - <span class="ruby-value">:admin_note</span>, - <span class="ruby-value">:accept_mr</span>, - <span class="ruby-value">:admin_wiki</span>, - <span class="ruby-value">:admin_project</span> - ] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-project_report_rules"> - - <b>project_report_rules</b>() - - <a href="../classes/Ability.html#method-c-project_report_rules" name="method-c-project_report_rules" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-project_report_rules_source')" id="l_method-c-project_report_rules_source">show</a> - - </p> - <div id="method-c-project_report_rules_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/ability.rb, line 66</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">project_report_rules</span> - <span class="ruby-identifier">project_guest_rules</span> <span class="ruby-operator">+</span> [ - <span class="ruby-value">:download_code</span>, - <span class="ruby-value">:write_merge_request</span>, - <span class="ruby-value">:write_snippet</span> - ] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Account.html b/doc/code/classes/Account.html deleted file mode 100644 index 21119cc8462..00000000000 --- a/doc/code/classes/Account.html +++ /dev/null @@ -1,1032 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Account</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - Account - - </h1> - <ul class="files"> - - <li><a href="../files/app/roles/account_rb.html">app/roles/account.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-abilities">abilities</a>, - </li> - - - <li> - <a href="#method-i-authorized_groups">authorized_groups</a>, - </li> - - - <li> - <a href="#method-i-authorized_projects">authorized_projects</a> - </li> - - </ul> - </dd> - - <dt>B</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-block">block</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-can-3F">can?</a>, - </li> - - - <li> - <a href="#method-i-can_create_group-3F">can_create_group?</a>, - </li> - - - <li> - <a href="#method-i-can_create_project-3F">can_create_project?</a>, - </li> - - - <li> - <a href="#method-i-cared_merge_requests">cared_merge_requests</a> - </li> - - </ul> - </dd> - - <dt>F</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-first_name">first_name</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-identifier">identifier</a>, - </li> - - - <li> - <a href="#method-i-is_admin-3F">is_admin?</a> - </li> - - </ul> - </dd> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-last_activity_project">last_activity_project</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-my_own_projects">my_own_projects</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-namespace_id">namespace_id</a>, - </li> - - - <li> - <a href="#method-i-namespaces">namespaces</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-project_ids">project_ids</a>, - </li> - - - <li> - <a href="#method-i-projects_limit_percent">projects_limit_percent</a>, - </li> - - - <li> - <a href="#method-i-projects_sorted_by_activity">projects_sorted_by_activity</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-recent_push">recent_push</a>, - </li> - - - <li> - <a href="#method-i-require_ssh_key-3F">require_ssh_key?</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-several_namespaces-3F">several_namespaces?</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-abilities"> - - <b>abilities</b>() - - <a href="../classes/Account.html#method-i-abilities" name="method-i-abilities" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-abilities_source')" id="l_method-i-abilities_source">show</a> - - </p> - <div id="method-i-abilities_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/account.rb, line 29</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">abilities</span> - <span class="ruby-ivar">@abilities</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span> - <span class="ruby-identifier">abilities</span> = <span class="ruby-constant">Six</span>.<span class="ruby-identifier">new</span> - <span class="ruby-identifier">abilities</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Ability</span> - <span class="ruby-identifier">abilities</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-authorized_groups"> - - <b>authorized_groups</b>() - - <a href="../classes/Account.html#method-i-authorized_groups" name="method-i-authorized_groups" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-authorized_groups_source')" id="l_method-i-authorized_groups_source">show</a> - - </p> - <div id="method-i-authorized_groups_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/account.rb, line 109</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">authorized_groups</span> - <span class="ruby-ivar">@authorized_groups</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span> - <span class="ruby-identifier">groups</span> = <span class="ruby-constant">Group</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">id</span><span class="ruby-operator">:</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">projects</span>.<span class="ruby-identifier">pluck</span>(<span class="ruby-value">:namespace_id</span>)).<span class="ruby-identifier">all</span> - <span class="ruby-identifier">groups</span> = <span class="ruby-identifier">groups</span> <span class="ruby-operator">+</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">groups</span> - <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">uniq</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-authorized_projects"> - - <b>authorized_projects</b>() - - <a href="../classes/Account.html#method-i-authorized_projects" name="method-i-authorized_projects" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-authorized_projects_source')" id="l_method-i-authorized_projects_source">show</a> - - </p> - <div id="method-i-authorized_projects_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/account.rb, line 117</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">authorized_projects</span> - <span class="ruby-constant">Project</span>.<span class="ruby-identifier">authorized_for</span>(<span class="ruby-keyword">self</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-block"> - - <b>block</b>() - - <a href="../classes/Account.html#method-i-block" name="method-i-block" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Remove user from all projects and set blocked attribute to true</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-block_source')" id="l_method-i-block_source">show</a> - - </p> - <div id="method-i-block_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/account.rb, line 59</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">block</span> - <span class="ruby-identifier">users_projects</span>.<span class="ruby-identifier">find_each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">membership</span><span class="ruby-operator">|</span> - <span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">membership</span>.<span class="ruby-identifier">destroy</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">blocked</span> = <span class="ruby-keyword">true</span> - <span class="ruby-identifier">save</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-can-3F"> - - <b>can?</b>(action, subject) - - <a href="../classes/Account.html#method-i-can-3F" name="method-i-can-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-can-3F_source')" id="l_method-i-can-3F_source">show</a> - - </p> - <div id="method-i-can-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/account.rb, line 37</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">can?</span> <span class="ruby-identifier">action</span>, <span class="ruby-identifier">subject</span> - <span class="ruby-identifier">abilities</span>.<span class="ruby-identifier">allowed?</span>(<span class="ruby-keyword">self</span>, <span class="ruby-identifier">action</span>, <span class="ruby-identifier">subject</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-can_create_group-3F"> - - <b>can_create_group?</b>() - - <a href="../classes/Account.html#method-i-can_create_group-3F" name="method-i-can_create_group-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-can_create_group-3F_source')" id="l_method-i-can_create_group-3F_source">show</a> - - </p> - <div id="method-i-can_create_group-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/account.rb, line 25</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">can_create_group?</span> - <span class="ruby-identifier">is_admin?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-can_create_project-3F"> - - <b>can_create_project?</b>() - - <a href="../classes/Account.html#method-i-can_create_project-3F" name="method-i-can_create_project-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-can_create_project-3F_source')" id="l_method-i-can_create_project-3F_source">show</a> - - </p> - <div id="method-i-can_create_project-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/account.rb, line 21</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">can_create_project?</span> - <span class="ruby-identifier">projects_limit</span> <span class="ruby-operator">></span> <span class="ruby-identifier">my_own_projects</span>.<span class="ruby-identifier">count</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-cared_merge_requests"> - - <b>cared_merge_requests</b>() - - <a href="../classes/Account.html#method-i-cared_merge_requests" name="method-i-cared_merge_requests" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-cared_merge_requests_source')" id="l_method-i-cared_merge_requests_source">show</a> - - </p> - <div id="method-i-cared_merge_requests_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/account.rb, line 49</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">cared_merge_requests</span> - <span class="ruby-constant">MergeRequest</span>.<span class="ruby-identifier">where</span>(<span class="ruby-string">"author_id = :id or assignee_id = :id"</span>, <span class="ruby-identifier">id</span><span class="ruby-operator">:</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">id</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-first_name"> - - <b>first_name</b>() - - <a href="../classes/Account.html#method-i-first_name" name="method-i-first_name" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-first_name_source')" id="l_method-i-first_name_source">show</a> - - </p> - <div id="method-i-first_name_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/account.rb, line 45</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">first_name</span> - <span class="ruby-identifier">name</span>.<span class="ruby-identifier">split</span>.<span class="ruby-identifier">first</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">blank?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-identifier"> - - <b>identifier</b>() - - <a href="../classes/Account.html#method-i-identifier" name="method-i-identifier" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Returns a string for use as a Gitolite user identifier</p> - -<p><a href="Note.html">Note</a> that Gitolite 2.x requires the following -pattern for users:</p> - -<pre>^@?[0-9a-zA-Z][0-9a-zA-Z._\@+-]*$</pre> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-identifier_source')" id="l_method-i-identifier_source">show</a> - - </p> - <div id="method-i-identifier_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/account.rb, line 7</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">identifier</span> - <span class="ruby-comment"># Replace non-word chars with underscores, then make sure it starts with</span> - <span class="ruby-comment"># valid chars</span> - <span class="ruby-identifier">email</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp">%r\W/</span>, <span class="ruby-string">'_'</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp">%r\A([\W\_])+/</span>, <span class="ruby-string">''</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-is_admin-3F"> - - <b>is_admin?</b>() - - <a href="../classes/Account.html#method-i-is_admin-3F" name="method-i-is_admin-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-is_admin-3F_source')" id="l_method-i-is_admin-3F_source">show</a> - - </p> - <div id="method-i-is_admin-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/account.rb, line 13</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">is_admin?</span> - <span class="ruby-identifier">admin</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-last_activity_project"> - - <b>last_activity_project</b>() - - <a href="../classes/Account.html#method-i-last_activity_project" name="method-i-last_activity_project" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-last_activity_project_source')" id="l_method-i-last_activity_project_source">show</a> - - </p> - <div id="method-i-last_activity_project_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/account.rb, line 41</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">last_activity_project</span> - <span class="ruby-identifier">projects</span>.<span class="ruby-identifier">first</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-my_own_projects"> - - <b>my_own_projects</b>() - - <a href="../classes/Account.html#method-i-my_own_projects" name="method-i-my_own_projects" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-my_own_projects_source')" id="l_method-i-my_own_projects_source">show</a> - - </p> - <div id="method-i-my_own_projects_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/account.rb, line 121</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">my_own_projects</span> - <span class="ruby-constant">Project</span>.<span class="ruby-identifier">personal</span>(<span class="ruby-keyword">self</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-namespace_id"> - - <b>namespace_id</b>() - - <a href="../classes/Account.html#method-i-namespace_id" name="method-i-namespace_id" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-namespace_id_source')" id="l_method-i-namespace_id_source">show</a> - - </p> - <div id="method-i-namespace_id_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/account.rb, line 105</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">namespace_id</span> - <span class="ruby-identifier">namespace</span>.<span class="ruby-identifier">try</span> <span class="ruby-value">:id</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-namespaces"> - - <b>namespaces</b>() - - <a href="../classes/Account.html#method-i-namespaces" name="method-i-namespaces" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-namespaces_source')" id="l_method-i-namespaces_source">show</a> - - </p> - <div id="method-i-namespaces_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/account.rb, line 86</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">namespaces</span> - <span class="ruby-identifier">namespaces</span> = [] - - <span class="ruby-comment"># Add user account namespace</span> - <span class="ruby-identifier">namespaces</span> <span class="ruby-operator"><<</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">namespace</span> <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">namespace</span> - - <span class="ruby-comment"># Add groups you can manage</span> - <span class="ruby-identifier">namespaces</span> <span class="ruby-operator">+=</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">admin</span> - <span class="ruby-constant">Group</span>.<span class="ruby-identifier">all</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">all</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">namespaces</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-project_ids"> - - <b>project_ids</b>() - - <a href="../classes/Account.html#method-i-project_ids" name="method-i-project_ids" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-project_ids_source')" id="l_method-i-project_ids_source">show</a> - - </p> - <div id="method-i-project_ids_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/account.rb, line 53</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">project_ids</span> - <span class="ruby-identifier">projects</span>.<span class="ruby-identifier">map</span>(&<span class="ruby-value">:id</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-projects_limit_percent"> - - <b>projects_limit_percent</b>() - - <a href="../classes/Account.html#method-i-projects_limit_percent" name="method-i-projects_limit_percent" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-projects_limit_percent_source')" id="l_method-i-projects_limit_percent_source">show</a> - - </p> - <div id="method-i-projects_limit_percent_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/account.rb, line 68</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">projects_limit_percent</span> - <span class="ruby-keyword">return</span> <span class="ruby-number">100</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">projects_limit</span>.<span class="ruby-identifier">zero?</span> - (<span class="ruby-identifier">my_own_projects</span>.<span class="ruby-identifier">count</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">projects_limit</span>) * <span class="ruby-number">100</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-projects_sorted_by_activity"> - - <b>projects_sorted_by_activity</b>() - - <a href="../classes/Account.html#method-i-projects_sorted_by_activity" name="method-i-projects_sorted_by_activity" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-projects_sorted_by_activity_source')" id="l_method-i-projects_sorted_by_activity_source">show</a> - - </p> - <div id="method-i-projects_sorted_by_activity_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/account.rb, line 82</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">projects_sorted_by_activity</span> - <span class="ruby-identifier">projects</span>.<span class="ruby-identifier">sorted_by_activity</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-recent_push"> - - <b>recent_push</b>(project_id = nil) - - <a href="../classes/Account.html#method-i-recent_push" name="method-i-recent_push" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-recent_push_source')" id="l_method-i-recent_push_source">show</a> - - </p> - <div id="method-i-recent_push_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/account.rb, line 73</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">recent_push</span> <span class="ruby-identifier">project_id</span> = <span class="ruby-keyword">nil</span> - <span class="ruby-comment"># Get push events not earlier than 2 hours ago</span> - <span class="ruby-identifier">events</span> = <span class="ruby-identifier">recent_events</span>.<span class="ruby-identifier">code_push</span>.<span class="ruby-identifier">where</span>(<span class="ruby-string">"created_at > ?"</span>, <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-operator">-</span> <span class="ruby-number">2</span>.<span class="ruby-identifier">hours</span>) - <span class="ruby-identifier">events</span> = <span class="ruby-identifier">events</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">project_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">project_id</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">project_id</span> - - <span class="ruby-comment"># Take only latest one</span> - <span class="ruby-identifier">events</span> = <span class="ruby-identifier">events</span>.<span class="ruby-identifier">recent</span>.<span class="ruby-identifier">limit</span>(<span class="ruby-number">1</span>).<span class="ruby-identifier">first</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-require_ssh_key-3F"> - - <b>require_ssh_key?</b>() - - <a href="../classes/Account.html#method-i-require_ssh_key-3F" name="method-i-require_ssh_key-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-require_ssh_key-3F_source')" id="l_method-i-require_ssh_key-3F_source">show</a> - - </p> - <div id="method-i-require_ssh_key-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/account.rb, line 17</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">require_ssh_key?</span> - <span class="ruby-identifier">keys</span>.<span class="ruby-identifier">count</span> <span class="ruby-operator">==</span> <span class="ruby-number">0</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-several_namespaces-3F"> - - <b>several_namespaces?</b>() - - <a href="../classes/Account.html#method-i-several_namespaces-3F" name="method-i-several_namespaces-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-several_namespaces-3F_source')" id="l_method-i-several_namespaces-3F_source">show</a> - - </p> - <div id="method-i-several_namespaces-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/account.rb, line 101</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">several_namespaces?</span> - <span class="ruby-identifier">namespaces</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">></span> <span class="ruby-number">1</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ActiveRecord.html b/doc/code/classes/ActiveRecord.html deleted file mode 100644 index fdf88c1cf34..00000000000 --- a/doc/code/classes/ActiveRecord.html +++ /dev/null @@ -1,79 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ActiveRecord</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - ActiveRecord - - </h1> - <ul class="files"> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">MODULE</span> - <a href="ActiveRecord/ConnectionAdapters.html">ActiveRecord::ConnectionAdapters</a> - </li> - - </ul> - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ActiveRecord/ConnectionAdapters.html b/doc/code/classes/ActiveRecord/ConnectionAdapters.html deleted file mode 100644 index ec3891660ab..00000000000 --- a/doc/code/classes/ActiveRecord/ConnectionAdapters.html +++ /dev/null @@ -1,86 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ActiveRecord::ConnectionAdapters</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - ActiveRecord::ConnectionAdapters - - </h1> - <ul class="files"> - - <li><a href="../../files/config/initializers/connection_fix_rb.html">config/initializers/connection_fix.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">CLASS</span> - <a href="ConnectionAdapters/Mysql2Adapter.html">ActiveRecord::ConnectionAdapters::Mysql2Adapter</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="ConnectionAdapters/PostgreSQLAdapter.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter</a> - </li> - - </ul> - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ActiveRecord/ConnectionAdapters/Mysql2Adapter.html b/doc/code/classes/ActiveRecord/ConnectionAdapters/Mysql2Adapter.html deleted file mode 100644 index 2c8d740a69a..00000000000 --- a/doc/code/classes/ActiveRecord/ConnectionAdapters/Mysql2Adapter.html +++ /dev/null @@ -1,167 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ActiveRecord::ConnectionAdapters::Mysql2Adapter</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - ActiveRecord::ConnectionAdapters::Mysql2Adapter - - <span class="parent">< - - <a href="../../Object.html">Object</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/config/initializers/connection_fix_rb.html">config/initializers/connection_fix.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-execute">execute</a>, - </li> - - - <li> - <a href="#method-i-execute_without_retry">execute_without_retry</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-execute"> - - <b>execute</b>(*args) - - <a href="../../../classes/ActiveRecord/ConnectionAdapters/Mysql2Adapter.html#method-i-execute" name="method-i-execute" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - <div class="aka"> - Also aliased as: <a href="Mysql2Adapter.html#method-i-execute_without_retry">execute_without_retry</a> - </div> - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-execute_source')" id="l_method-i-execute_source">show</a> - - </p> - <div id="method-i-execute_source" class="dyn-source"> - <pre><span class="ruby-comment"># File config/initializers/connection_fix.rb, line 21</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">execute</span>(*<span class="ruby-identifier">args</span>) - <span class="ruby-identifier">execute_without_retry</span>(*<span class="ruby-identifier">args</span>) -<span class="ruby-keyword">rescue</span> <span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">StatementInvalid</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">message</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">%rserver has gone away/</span> - <span class="ruby-identifier">warn</span> <span class="ruby-string">"Server timed out, retrying"</span> - <span class="ruby-identifier">reconnect!</span> - <span class="ruby-keyword">retry</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">raise</span> <span class="ruby-identifier">e</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-execute_without_retry"> - - <b>execute_without_retry</b>(*args) - - <a href="../../../classes/ActiveRecord/ConnectionAdapters/Mysql2Adapter.html#method-i-execute_without_retry" name="method-i-execute_without_retry" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html b/doc/code/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html deleted file mode 100644 index 0ee82105cd4..00000000000 --- a/doc/code/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html +++ /dev/null @@ -1,191 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ActiveRecord::ConnectionAdapters::PostgreSQLAdapter</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - ActiveRecord::ConnectionAdapters::PostgreSQLAdapter - - <span class="parent">< - - <a href="../../Object.html">Object</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/config/initializers/postgresql_limit_fix_rb.html">config/initializers/postgresql_limit_fix.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">CLASS</span> - <a href="PostgreSQLAdapter/TableDefinition.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::TableDefinition</a> - </li> - - </ul> - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-add_column_with_limit_filter">add_column_with_limit_filter</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-change_column_with_limit_filter">change_column_with_limit_filter</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-add_column_with_limit_filter"> - - <b>add_column_with_limit_filter</b>(table_name, column_name, type, options = {}) - - <a href="../../../classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html#method-i-add_column_with_limit_filter" name="method-i-add_column_with_limit_filter" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-add_column_with_limit_filter_source')" id="l_method-i-add_column_with_limit_filter_source">show</a> - - </p> - <div id="method-i-add_column_with_limit_filter_source" class="dyn-source"> - <pre><span class="ruby-comment"># File config/initializers/postgresql_limit_fix.rb, line 13</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">add_column_with_limit_filter</span>(<span class="ruby-identifier">table_name</span>, <span class="ruby-identifier">column_name</span>, <span class="ruby-identifier">type</span>, <span class="ruby-identifier">options</span> = {}) - <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:limit</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-value">:text</span> - <span class="ruby-identifier">add_column_without_limit_filter</span>(<span class="ruby-identifier">table_name</span>, <span class="ruby-identifier">column_name</span>, <span class="ruby-identifier">type</span>, <span class="ruby-identifier">options</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-change_column_with_limit_filter"> - - <b>change_column_with_limit_filter</b>(table_name, column_name, type, options = {}) - - <a href="../../../classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html#method-i-change_column_with_limit_filter" name="method-i-change_column_with_limit_filter" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-change_column_with_limit_filter_source')" id="l_method-i-change_column_with_limit_filter_source">show</a> - - </p> - <div id="method-i-change_column_with_limit_filter_source" class="dyn-source"> - <pre><span class="ruby-comment"># File config/initializers/postgresql_limit_fix.rb, line 18</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">change_column_with_limit_filter</span>(<span class="ruby-identifier">table_name</span>, <span class="ruby-identifier">column_name</span>, <span class="ruby-identifier">type</span>, <span class="ruby-identifier">options</span> = {}) - <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:limit</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-value">:text</span> - <span class="ruby-identifier">change_column_without_limit_filter</span>(<span class="ruby-identifier">table_name</span>, <span class="ruby-identifier">column_name</span>, <span class="ruby-identifier">type</span>, <span class="ruby-identifier">options</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter/TableDefinition.html b/doc/code/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter/TableDefinition.html deleted file mode 100644 index f2ea0db417a..00000000000 --- a/doc/code/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter/TableDefinition.html +++ /dev/null @@ -1,135 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::TableDefinition</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::TableDefinition - - <span class="parent">< - - <a href="../../../Object.html">Object</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../../files/config/initializers/postgresql_limit_fix_rb.html">config/initializers/postgresql_limit_fix.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-text">text</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-text"> - - <b>text</b>(*args) - - <a href="../../../../classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter/TableDefinition.html#method-i-text" name="method-i-text" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-text_source')" id="l_method-i-text_source">show</a> - - </p> - <div id="method-i-text_source" class="dyn-source"> - <pre><span class="ruby-comment"># File config/initializers/postgresql_limit_fix.rb, line 4</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">text</span>(*<span class="ruby-identifier">args</span>) - <span class="ruby-identifier">options</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">extract_options!</span> - <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:limit</span>) - <span class="ruby-identifier">column_names</span> = <span class="ruby-identifier">args</span> - <span class="ruby-identifier">type</span> = <span class="ruby-value">:text</span> - <span class="ruby-identifier">column_names</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span> <span class="ruby-identifier">column</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">type</span>, <span class="ruby-identifier">options</span>) } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ActivityObserver.html b/doc/code/classes/ActivityObserver.html deleted file mode 100644 index 31f4982edd0..00000000000 --- a/doc/code/classes/ActivityObserver.html +++ /dev/null @@ -1,194 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ActivityObserver</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - ActivityObserver - - <span class="parent">< - - ActiveRecord::Observer - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/observers/activity_observer_rb.html">app/observers/activity_observer.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-after_create">after_create</a>, - </li> - - - <li> - <a href="#method-i-after_save">after_save</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-after_create"> - - <b>after_create</b>(record) - - <a href="../classes/ActivityObserver.html#method-i-after_create" name="method-i-after_create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-after_create_source')" id="l_method-i-after_create_source">show</a> - - </p> - <div id="method-i-after_create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/activity_observer.rb, line 4</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">after_create</span>(<span class="ruby-identifier">record</span>) - <span class="ruby-identifier">event_author_id</span> = <span class="ruby-identifier">record</span>.<span class="ruby-identifier">author_id</span> - - <span class="ruby-comment"># Skip status notes</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Note</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">note</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-string">"_Status changed to "</span>) - <span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">event_author_id</span> - <span class="ruby-constant">Event</span>.<span class="ruby-identifier">create</span>( - <span class="ruby-identifier">project</span><span class="ruby-operator">:</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">project</span>, - <span class="ruby-identifier">target_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">id</span>, - <span class="ruby-identifier">target_type</span><span class="ruby-operator">:</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-constant">Event</span>.<span class="ruby-identifier">determine_action</span>(<span class="ruby-identifier">record</span>), - <span class="ruby-identifier">author_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">event_author_id</span> - ) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-after_save"> - - <b>after_save</b>(record) - - <a href="../classes/ActivityObserver.html#method-i-after_save" name="method-i-after_save" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-after_save_source')" id="l_method-i-after_save_source">show</a> - - </p> - <div id="method-i-after_save_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/activity_observer.rb, line 23</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">after_save</span>(<span class="ruby-identifier">record</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">changed</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-string">"closed"</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">author_id_of_changes</span> - <span class="ruby-constant">Event</span>.<span class="ruby-identifier">create</span>( - <span class="ruby-identifier">project</span><span class="ruby-operator">:</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">project</span>, - <span class="ruby-identifier">target_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">id</span>, - <span class="ruby-identifier">target_type</span><span class="ruby-operator">:</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> (<span class="ruby-identifier">record</span>.<span class="ruby-identifier">closed</span> <span class="ruby-operator">?</span> <span class="ruby-constant">Event</span><span class="ruby-operator">::</span><span class="ruby-constant">Closed</span> <span class="ruby-operator">:</span> <span class="ruby-constant">Event</span><span class="ruby-operator">::</span><span class="ruby-constant">Reopened</span>), - <span class="ruby-identifier">author_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">author_id_of_changes</span> - ) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Admin.html b/doc/code/classes/Admin.html deleted file mode 100644 index ba82287d551..00000000000 --- a/doc/code/classes/Admin.html +++ /dev/null @@ -1,114 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Admin</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - Admin - - </h1> - <ul class="files"> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">CLASS</span> - <a href="Admin/DashboardController.html">Admin::DashboardController</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Admin/GroupsController.html">Admin::GroupsController</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Admin/HooksController.html">Admin::HooksController</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Admin/LogsController.html">Admin::LogsController</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Admin/ProjectsController.html">Admin::ProjectsController</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Admin/ResqueController.html">Admin::ResqueController</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Admin/TeamMembersController.html">Admin::TeamMembersController</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Admin/UsersController.html">Admin::UsersController</a> - </li> - - </ul> - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Admin/DashboardController.html b/doc/code/classes/Admin/DashboardController.html deleted file mode 100644 index 02643b7fe39..00000000000 --- a/doc/code/classes/Admin/DashboardController.html +++ /dev/null @@ -1,139 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Admin::DashboardController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Admin::DashboardController - - <span class="parent">< - - <a href="../AdminController.html">AdminController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/app/controllers/admin/dashboard_controller_rb.html">app/controllers/admin/dashboard_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-index">index</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-index"> - - <b>index</b>() - - <a href="../../classes/Admin/DashboardController.html#method-i-index" name="method-i-index" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-index_source')" id="l_method-i-index_source">show</a> - - </p> - <div id="method-i-index_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/dashboard_controller.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">index</span> - <span class="ruby-ivar">@projects</span> = <span class="ruby-constant">Project</span>.<span class="ruby-identifier">order</span>(<span class="ruby-string">"created_at DESC"</span>).<span class="ruby-identifier">limit</span>(<span class="ruby-number">10</span>) - <span class="ruby-ivar">@users</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">order</span>(<span class="ruby-string">"created_at DESC"</span>).<span class="ruby-identifier">limit</span>(<span class="ruby-number">10</span>) - - <span class="ruby-ivar">@resque_accessible</span> = <span class="ruby-keyword">true</span> - <span class="ruby-ivar">@workers</span> = <span class="ruby-constant">Resque</span>.<span class="ruby-identifier">workers</span> - <span class="ruby-ivar">@pending_jobs</span> = <span class="ruby-constant">Resque</span>.<span class="ruby-identifier">size</span>(<span class="ruby-value">:post_receive</span>) - -<span class="ruby-keyword">rescue</span> <span class="ruby-constant">Redis</span><span class="ruby-operator">::</span><span class="ruby-constant">InheritedError</span> - <span class="ruby-ivar">@resque_accessible</span> = <span class="ruby-keyword">false</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Admin/GroupsController.html b/doc/code/classes/Admin/GroupsController.html deleted file mode 100644 index b3651e8b98e..00000000000 --- a/doc/code/classes/Admin/GroupsController.html +++ /dev/null @@ -1,586 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Admin::GroupsController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Admin::GroupsController - - <span class="parent">< - - <a href="../AdminController.html">AdminController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/app/controllers/admin/groups_controller_rb.html">app/controllers/admin/groups_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-create">create</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-destroy">destroy</a> - </li> - - </ul> - </dd> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-edit">edit</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-index">index</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-new">new</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-project_teams_update">project_teams_update</a>, - </li> - - - <li> - <a href="#method-i-project_update">project_update</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-remove_project">remove_project</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-show">show</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-update">update</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-create"> - - <b>create</b>() - - <a href="../../classes/Admin/GroupsController.html#method-i-create" name="method-i-create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-create_source')" id="l_method-i-create_source">show</a> - - </p> - <div id="method-i-create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/groups_controller.rb, line 26</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">create</span> - <span class="ruby-ivar">@group</span> = <span class="ruby-constant">Group</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:group</span>]) - <span class="ruby-ivar">@group</span>.<span class="ruby-identifier">path</span> = <span class="ruby-ivar">@group</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">dup</span>.<span class="ruby-identifier">parameterize</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@group</span>.<span class="ruby-identifier">name</span> - <span class="ruby-ivar">@group</span>.<span class="ruby-identifier">owner</span> = <span class="ruby-identifier">current_user</span> - - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@group</span>.<span class="ruby-identifier">save</span> - <span class="ruby-identifier">redirect_to</span> [<span class="ruby-value">:admin</span>, <span class="ruby-ivar">@group</span>], <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">'Group was successfully created.'</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">render</span> <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">"new"</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-destroy"> - - <b>destroy</b>() - - <a href="../../classes/Admin/GroupsController.html#method-i-destroy" name="method-i-destroy" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-destroy_source')" id="l_method-i-destroy_source">show</a> - - </p> - <div id="method-i-destroy_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/groups_controller.rb, line 75</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">destroy</span> - <span class="ruby-ivar">@group</span>.<span class="ruby-identifier">truncate_teams</span> - - <span class="ruby-ivar">@group</span>.<span class="ruby-identifier">destroy</span> - - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">admin_groups_path</span>, <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">'Group was successfully deleted.'</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-edit"> - - <b>edit</b>() - - <a href="../../classes/Admin/GroupsController.html#method-i-edit" name="method-i-edit" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-edit_source')" id="l_method-i-edit_source">show</a> - - </p> - <div id="method-i-edit_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/groups_controller.rb, line 23</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">edit</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-index"> - - <b>index</b>() - - <a href="../../classes/Admin/GroupsController.html#method-i-index" name="method-i-index" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-index_source')" id="l_method-i-index_source">show</a> - - </p> - <div id="method-i-index_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/groups_controller.rb, line 4</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">index</span> - <span class="ruby-ivar">@groups</span> = <span class="ruby-constant">Group</span>.<span class="ruby-identifier">order</span>(<span class="ruby-string">'name ASC'</span>) - <span class="ruby-ivar">@groups</span> = <span class="ruby-ivar">@groups</span>.<span class="ruby-identifier">search</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:name</span>]) <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:name</span>].<span class="ruby-identifier">present?</span> - <span class="ruby-ivar">@groups</span> = <span class="ruby-ivar">@groups</span>.<span class="ruby-identifier">page</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:page</span>]).<span class="ruby-identifier">per</span>(<span class="ruby-number">20</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-new"> - - <b>new</b>() - - <a href="../../classes/Admin/GroupsController.html#method-i-new" name="method-i-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-new_source')" id="l_method-i-new_source">show</a> - - </p> - <div id="method-i-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/groups_controller.rb, line 19</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">new</span> - <span class="ruby-ivar">@group</span> = <span class="ruby-constant">Group</span>.<span class="ruby-identifier">new</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-project_teams_update"> - - <b>project_teams_update</b>() - - <a href="../../classes/Admin/GroupsController.html#method-i-project_teams_update" name="method-i-project_teams_update" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-project_teams_update_source')" id="l_method-i-project_teams_update_source">show</a> - - </p> - <div id="method-i-project_teams_update_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/groups_controller.rb, line 70</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">project_teams_update</span> - <span class="ruby-ivar">@group</span>.<span class="ruby-identifier">add_users_to_project_teams</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:user_ids</span>], <span class="ruby-identifier">params</span>[<span class="ruby-value">:project_access</span>]) - <span class="ruby-identifier">redirect_to</span> [<span class="ruby-value">:admin</span>, <span class="ruby-ivar">@group</span>], <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">'Users was successfully added.'</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-project_update"> - - <b>project_update</b>() - - <a href="../../classes/Admin/GroupsController.html#method-i-project_update" name="method-i-project_update" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-project_update_source')" id="l_method-i-project_update_source">show</a> - - </p> - <div id="method-i-project_update_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/groups_controller.rb, line 53</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">project_update</span> - <span class="ruby-identifier">project_ids</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:project_ids</span>] - - <span class="ruby-constant">Project</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">project_ids</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">project</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">transfer</span>(<span class="ruby-ivar">@group</span>) - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">redirect_to</span> <span class="ruby-value">:back</span>, <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">'Group was successfully updated.'</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-remove_project"> - - <b>remove_project</b>() - - <a href="../../classes/Admin/GroupsController.html#method-i-remove_project" name="method-i-remove_project" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-remove_project_source')" id="l_method-i-remove_project_source">show</a> - - </p> - <div id="method-i-remove_project_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/groups_controller.rb, line 63</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">remove_project</span> - <span class="ruby-ivar">@project</span> = <span class="ruby-constant">Project</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:project_id</span>]) - <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">transfer</span>(<span class="ruby-keyword">nil</span>) - - <span class="ruby-identifier">redirect_to</span> <span class="ruby-value">:back</span>, <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">'Group was successfully updated.'</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-show"> - - <b>show</b>() - - <a href="../../classes/Admin/GroupsController.html#method-i-show" name="method-i-show" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a> - - </p> - <div id="method-i-show_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/groups_controller.rb, line 10</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span> - <span class="ruby-ivar">@projects</span> = <span class="ruby-constant">Project</span>.<span class="ruby-identifier">scoped</span> - <span class="ruby-ivar">@projects</span> = <span class="ruby-ivar">@projects</span>.<span class="ruby-identifier">not_in_group</span>(<span class="ruby-ivar">@group</span>) <span class="ruby-keyword">if</span> <span class="ruby-ivar">@group</span>.<span class="ruby-identifier">projects</span>.<span class="ruby-identifier">present?</span> - <span class="ruby-ivar">@projects</span> = <span class="ruby-ivar">@projects</span>.<span class="ruby-identifier">all</span> - <span class="ruby-ivar">@projects</span>.<span class="ruby-identifier">reject!</span>(&<span class="ruby-value">:empty_repo?</span>) - - <span class="ruby-ivar">@users</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">active</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update"> - - <b>update</b>() - - <a href="../../classes/Admin/GroupsController.html#method-i-update" name="method-i-update" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_source')" id="l_method-i-update_source">show</a> - - </p> - <div id="method-i-update_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/groups_controller.rb, line 38</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update</span> - <span class="ruby-identifier">group_params</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:group</span>].<span class="ruby-identifier">dup</span> - <span class="ruby-identifier">owner_id</span> =<span class="ruby-identifier">group_params</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:owner_id</span>) - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">owner_id</span> - <span class="ruby-ivar">@group</span>.<span class="ruby-identifier">owner</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">owner_id</span>) - <span class="ruby-keyword">end</span> - - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@group</span>.<span class="ruby-identifier">update_attributes</span>(<span class="ruby-identifier">group_params</span>) - <span class="ruby-identifier">redirect_to</span> [<span class="ruby-value">:admin</span>, <span class="ruby-ivar">@group</span>], <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">'Group was successfully updated.'</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">render</span> <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">"edit"</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Admin/HooksController.html b/doc/code/classes/Admin/HooksController.html deleted file mode 100644 index 1d56fbc7b98..00000000000 --- a/doc/code/classes/Admin/HooksController.html +++ /dev/null @@ -1,294 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Admin::HooksController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Admin::HooksController - - <span class="parent">< - - <a href="../AdminController.html">AdminController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/app/controllers/admin/hooks_controller_rb.html">app/controllers/admin/hooks_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-create">create</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-destroy">destroy</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-index">index</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-test">test</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-create"> - - <b>create</b>() - - <a href="../../classes/Admin/HooksController.html#method-i-create" name="method-i-create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-create_source')" id="l_method-i-create_source">show</a> - - </p> - <div id="method-i-create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/hooks_controller.rb, line 7</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">create</span> - <span class="ruby-ivar">@hook</span> = <span class="ruby-constant">SystemHook</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:hook</span>]) - - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@hook</span>.<span class="ruby-identifier">save</span> - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">admin_hooks_path</span>, <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">'Hook was successfully created.'</span> - <span class="ruby-keyword">else</span> - <span class="ruby-ivar">@hooks</span> = <span class="ruby-constant">SystemHook</span>.<span class="ruby-identifier">all</span> - <span class="ruby-identifier">render</span> <span class="ruby-value">:index</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-destroy"> - - <b>destroy</b>() - - <a href="../../classes/Admin/HooksController.html#method-i-destroy" name="method-i-destroy" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-destroy_source')" id="l_method-i-destroy_source">show</a> - - </p> - <div id="method-i-destroy_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/hooks_controller.rb, line 18</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">destroy</span> - <span class="ruby-ivar">@hook</span> = <span class="ruby-constant">SystemHook</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) - <span class="ruby-ivar">@hook</span>.<span class="ruby-identifier">destroy</span> - - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">admin_hooks_path</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-index"> - - <b>index</b>() - - <a href="../../classes/Admin/HooksController.html#method-i-index" name="method-i-index" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-index_source')" id="l_method-i-index_source">show</a> - - </p> - <div id="method-i-index_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/hooks_controller.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">index</span> - <span class="ruby-ivar">@hooks</span> = <span class="ruby-constant">SystemHook</span>.<span class="ruby-identifier">all</span> - <span class="ruby-ivar">@hook</span> = <span class="ruby-constant">SystemHook</span>.<span class="ruby-identifier">new</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-test"> - - <b>test</b>() - - <a href="../../classes/Admin/HooksController.html#method-i-test" name="method-i-test" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-test_source')" id="l_method-i-test_source">show</a> - - </p> - <div id="method-i-test_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/hooks_controller.rb, line 26</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">test</span> - <span class="ruby-ivar">@hook</span> = <span class="ruby-constant">SystemHook</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:hook_id</span>]) - <span class="ruby-identifier">data</span> = { - <span class="ruby-identifier">event_name</span><span class="ruby-operator">:</span> <span class="ruby-string">"project_create"</span>, - <span class="ruby-identifier">name</span><span class="ruby-operator">:</span> <span class="ruby-string">"Ruby"</span>, - <span class="ruby-identifier">path</span><span class="ruby-operator">:</span> <span class="ruby-string">"ruby"</span>, - <span class="ruby-identifier">project_id</span><span class="ruby-operator">:</span> <span class="ruby-number">1</span>, - <span class="ruby-identifier">owner_name</span><span class="ruby-operator">:</span> <span class="ruby-string">"Someone"</span>, - <span class="ruby-identifier">owner_email</span><span class="ruby-operator">:</span> <span class="ruby-string">"example@gitlabhq.com"</span> - } - <span class="ruby-ivar">@hook</span>.<span class="ruby-identifier">execute</span>(<span class="ruby-identifier">data</span>) - - <span class="ruby-identifier">redirect_to</span> <span class="ruby-value">:back</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Admin/LogsController.html b/doc/code/classes/Admin/LogsController.html deleted file mode 100644 index 8782d95f5ac..00000000000 --- a/doc/code/classes/Admin/LogsController.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Admin::LogsController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Admin::LogsController - - <span class="parent">< - - <a href="../AdminController.html">AdminController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/app/controllers/admin/logs_controller_rb.html">app/controllers/admin/logs_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Admin/ProjectsController.html b/doc/code/classes/Admin/ProjectsController.html deleted file mode 100644 index 1a0bd492112..00000000000 --- a/doc/code/classes/Admin/ProjectsController.html +++ /dev/null @@ -1,436 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Admin::ProjectsController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Admin::ProjectsController - - <span class="parent">< - - <a href="../AdminController.html">AdminController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/app/controllers/admin/projects_controller_rb.html">app/controllers/admin/projects_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-destroy">destroy</a> - </li> - - </ul> - </dd> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-edit">edit</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-index">index</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-project">project</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-show">show</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-team_update">team_update</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-update">update</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-destroy"> - - <b>destroy</b>() - - <a href="../../classes/Admin/ProjectsController.html#method-i-destroy" name="method-i-destroy" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-destroy_source')" id="l_method-i-destroy_source">show</a> - - </p> - <div id="method-i-destroy_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/projects_controller.rb, line 37</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">destroy</span> - <span class="ruby-comment"># Delete team first in order to prevent multiple gitolite calls</span> - <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">truncate_team</span> - - <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">destroy</span> - - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">admin_projects_path</span>, <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">'Project was successfully deleted.'</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-edit"> - - <b>edit</b>() - - <a href="../../classes/Admin/ProjectsController.html#method-i-edit" name="method-i-edit" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-edit_source')" id="l_method-i-edit_source">show</a> - - </p> - <div id="method-i-edit_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/projects_controller.rb, line 18</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">edit</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-index"> - - <b>index</b>() - - <a href="../../classes/Admin/ProjectsController.html#method-i-index" name="method-i-index" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-index_source')" id="l_method-i-index_source">show</a> - - </p> - <div id="method-i-index_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/projects_controller.rb, line 4</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">index</span> - <span class="ruby-ivar">@projects</span> = <span class="ruby-constant">Project</span>.<span class="ruby-identifier">scoped</span> - <span class="ruby-ivar">@projects</span> = <span class="ruby-ivar">@projects</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">namespace_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:namespace_id</span>]) <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:namespace_id</span>].<span class="ruby-identifier">present?</span> - <span class="ruby-ivar">@projects</span> = <span class="ruby-ivar">@projects</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">namespace_id</span><span class="ruby-operator">:</span> <span class="ruby-keyword">nil</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:namespace_id</span>] <span class="ruby-operator">==</span> <span class="ruby-constant">Namespace</span>.<span class="ruby-identifier">global_id</span> - <span class="ruby-ivar">@projects</span> = <span class="ruby-ivar">@projects</span>.<span class="ruby-identifier">search</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:name</span>]) <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:name</span>].<span class="ruby-identifier">present?</span> - <span class="ruby-ivar">@projects</span> = <span class="ruby-ivar">@projects</span>.<span class="ruby-identifier">includes</span>(<span class="ruby-value">:namespace</span>).<span class="ruby-identifier">order</span>(<span class="ruby-string">"namespaces.path, projects.name ASC"</span>).<span class="ruby-identifier">page</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:page</span>]).<span class="ruby-identifier">per</span>(<span class="ruby-number">20</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-show"> - - <b>show</b>() - - <a href="../../classes/Admin/ProjectsController.html#method-i-show" name="method-i-show" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a> - - </p> - <div id="method-i-show_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/projects_controller.rb, line 12</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span> - <span class="ruby-ivar">@users</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">active</span> - <span class="ruby-ivar">@users</span> = <span class="ruby-ivar">@users</span>.<span class="ruby-identifier">not_in_project</span>(<span class="ruby-ivar">@project</span>) <span class="ruby-keyword">if</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">users</span>.<span class="ruby-identifier">present?</span> - <span class="ruby-ivar">@users</span> = <span class="ruby-ivar">@users</span>.<span class="ruby-identifier">all</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-team_update"> - - <b>team_update</b>() - - <a href="../../classes/Admin/ProjectsController.html#method-i-team_update" name="method-i-team_update" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-team_update_source')" id="l_method-i-team_update_source">show</a> - - </p> - <div id="method-i-team_update_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/projects_controller.rb, line 21</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">team_update</span> - <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">add_users_ids_to_team</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:user_ids</span>], <span class="ruby-identifier">params</span>[<span class="ruby-value">:project_access</span>]) - - <span class="ruby-identifier">redirect_to</span> [<span class="ruby-value">:admin</span>, <span class="ruby-ivar">@project</span>], <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">'Project was successfully updated.'</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update"> - - <b>update</b>() - - <a href="../../classes/Admin/ProjectsController.html#method-i-update" name="method-i-update" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_source')" id="l_method-i-update_source">show</a> - - </p> - <div id="method-i-update_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/projects_controller.rb, line 27</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update</span> - <span class="ruby-identifier">status</span> = <span class="ruby-constant">ProjectUpdateContext</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">current_user</span>, <span class="ruby-identifier">params</span>).<span class="ruby-identifier">execute</span>(<span class="ruby-value">:admin</span>) - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">status</span> - <span class="ruby-identifier">redirect_to</span> [<span class="ruby-value">:admin</span>, <span class="ruby-ivar">@project</span>], <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">'Project was successfully updated.'</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">render</span> <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">"edit"</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-project"> - - <b>project</b>() - - <a href="../../classes/Admin/ProjectsController.html#method-i-project" name="method-i-project" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-project_source')" id="l_method-i-project_source">show</a> - - </p> - <div id="method-i-project_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/projects_controller.rb, line 48</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">project</span> - <span class="ruby-identifier">id</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:project_id</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>] - - <span class="ruby-ivar">@project</span> = <span class="ruby-constant">Project</span>.<span class="ruby-identifier">find_with_namespace</span>(<span class="ruby-identifier">id</span>) - <span class="ruby-ivar">@project</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">render_404</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Admin/ResqueController.html b/doc/code/classes/Admin/ResqueController.html deleted file mode 100644 index 52cb2f870e9..00000000000 --- a/doc/code/classes/Admin/ResqueController.html +++ /dev/null @@ -1,130 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Admin::ResqueController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Admin::ResqueController - - <span class="parent">< - - <a href="../AdminController.html">AdminController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/app/controllers/admin/resque_controller_rb.html">app/controllers/admin/resque_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-show">show</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-show"> - - <b>show</b>() - - <a href="../../classes/Admin/ResqueController.html#method-i-show" name="method-i-show" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a> - - </p> - <div id="method-i-show_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/resque_controller.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Admin/TeamMembersController.html b/doc/code/classes/Admin/TeamMembersController.html deleted file mode 100644 index b055f509137..00000000000 --- a/doc/code/classes/Admin/TeamMembersController.html +++ /dev/null @@ -1,234 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Admin::TeamMembersController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Admin::TeamMembersController - - <span class="parent">< - - <a href="../AdminController.html">AdminController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/app/controllers/admin/team_members_controller_rb.html">app/controllers/admin/team_members_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-destroy">destroy</a> - </li> - - </ul> - </dd> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-edit">edit</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-update">update</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-destroy"> - - <b>destroy</b>() - - <a href="../../classes/Admin/TeamMembersController.html#method-i-destroy" name="method-i-destroy" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-destroy_source')" id="l_method-i-destroy_source">show</a> - - </p> - <div id="method-i-destroy_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/team_members_controller.rb, line 16</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">destroy</span> - <span class="ruby-ivar">@admin_team_member</span> = <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) - <span class="ruby-ivar">@admin_team_member</span>.<span class="ruby-identifier">destroy</span> - - <span class="ruby-identifier">redirect_to</span> <span class="ruby-value">:back</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-edit"> - - <b>edit</b>() - - <a href="../../classes/Admin/TeamMembersController.html#method-i-edit" name="method-i-edit" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-edit_source')" id="l_method-i-edit_source">show</a> - - </p> - <div id="method-i-edit_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/team_members_controller.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">edit</span> - <span class="ruby-ivar">@admin_team_member</span> = <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update"> - - <b>update</b>() - - <a href="../../classes/Admin/TeamMembersController.html#method-i-update" name="method-i-update" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_source')" id="l_method-i-update_source">show</a> - - </p> - <div id="method-i-update_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/team_members_controller.rb, line 6</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update</span> - <span class="ruby-ivar">@admin_team_member</span> = <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) - - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@admin_team_member</span>.<span class="ruby-identifier">update_attributes</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:team_member</span>]) - <span class="ruby-identifier">redirect_to</span> [<span class="ruby-value">:admin</span>, <span class="ruby-ivar">@admin_team_member</span>.<span class="ruby-identifier">project</span>], <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">'Project Access was successfully updated.'</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">render</span> <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">"edit"</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Admin/UsersController.html b/doc/code/classes/Admin/UsersController.html deleted file mode 100644 index cfe1e514ae8..00000000000 --- a/doc/code/classes/Admin/UsersController.html +++ /dev/null @@ -1,616 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Admin::UsersController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Admin::UsersController - - <span class="parent">< - - <a href="../AdminController.html">AdminController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/app/controllers/admin/users_controller_rb.html">app/controllers/admin/users_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>B</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-block">block</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-create">create</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-destroy">destroy</a> - </li> - - </ul> - </dd> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-edit">edit</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-index">index</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-new">new</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-show">show</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-team_update">team_update</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-unblock">unblock</a>, - </li> - - - <li> - <a href="#method-i-update">update</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-block"> - - <b>block</b>() - - <a href="../../classes/Admin/UsersController.html#method-i-block" name="method-i-block" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-block_source')" id="l_method-i-block_source">show</a> - - </p> - <div id="method-i-block_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/users_controller.rb, line 40</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">block</span> - <span class="ruby-ivar">@admin_user</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) - - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@admin_user</span>.<span class="ruby-identifier">block</span> - <span class="ruby-identifier">redirect_to</span> <span class="ruby-value">:back</span>, <span class="ruby-identifier">alert</span><span class="ruby-operator">:</span> <span class="ruby-string">"Successfully blocked"</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">redirect_to</span> <span class="ruby-value">:back</span>, <span class="ruby-identifier">alert</span><span class="ruby-operator">:</span> <span class="ruby-string">"Error occured. User was not blocked"</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-create"> - - <b>create</b>() - - <a href="../../classes/Admin/UsersController.html#method-i-create" name="method-i-create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-create_source')" id="l_method-i-create_source">show</a> - - </p> - <div id="method-i-create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/users_controller.rb, line 60</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">create</span> - <span class="ruby-identifier">admin</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:user</span>].<span class="ruby-identifier">delete</span>(<span class="ruby-string">"admin"</span>) - - <span class="ruby-ivar">@admin_user</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:user</span>], <span class="ruby-identifier">as</span><span class="ruby-operator">:</span> <span class="ruby-value">:admin</span>) - <span class="ruby-ivar">@admin_user</span>.<span class="ruby-identifier">admin</span> = (<span class="ruby-identifier">admin</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">admin</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">></span> <span class="ruby-number">0</span>) - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@admin_user</span>.<span class="ruby-identifier">save</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> { <span class="ruby-identifier">redirect_to</span> [<span class="ruby-value">:admin</span>, <span class="ruby-ivar">@admin_user</span>], <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">'User was successfully created.'</span> } - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">json</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">json</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@admin_user</span>, <span class="ruby-identifier">status</span><span class="ruby-operator">:</span> <span class="ruby-value">:created</span>, <span class="ruby-identifier">location</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@admin_user</span> } - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">"new"</span> } - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">json</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">json</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@admin_user</span>.<span class="ruby-identifier">errors</span>, <span class="ruby-identifier">status</span><span class="ruby-operator">:</span> <span class="ruby-value">:unprocessable_entity</span> } - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-destroy"> - - <b>destroy</b>() - - <a href="../../classes/Admin/UsersController.html#method-i-destroy" name="method-i-destroy" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-destroy_source')" id="l_method-i-destroy_source">show</a> - - </p> - <div id="method-i-destroy_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/users_controller.rb, line 99</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">destroy</span> - <span class="ruby-ivar">@admin_user</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@admin_user</span>.<span class="ruby-identifier">my_own_projects</span>.<span class="ruby-identifier">count</span> <span class="ruby-operator">></span> <span class="ruby-number">0</span> - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">admin_users_path</span>, <span class="ruby-identifier">alert</span><span class="ruby-operator">:</span> <span class="ruby-string">"User is a project owner and can't be removed."</span> <span class="ruby-keyword">and</span> <span class="ruby-keyword">return</span> - <span class="ruby-keyword">end</span> - <span class="ruby-ivar">@admin_user</span>.<span class="ruby-identifier">destroy</span> - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> { <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">admin_users_url</span> } - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">json</span> { <span class="ruby-identifier">head</span> <span class="ruby-value">:ok</span> } - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-edit"> - - <b>edit</b>() - - <a href="../../classes/Admin/UsersController.html#method-i-edit" name="method-i-edit" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-edit_source')" id="l_method-i-edit_source">show</a> - - </p> - <div id="method-i-edit_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/users_controller.rb, line 36</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">edit</span> - <span class="ruby-ivar">@admin_user</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-index"> - - <b>index</b>() - - <a href="../../classes/Admin/UsersController.html#method-i-index" name="method-i-index" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-index_source')" id="l_method-i-index_source">show</a> - - </p> - <div id="method-i-index_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/users_controller.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">index</span> - <span class="ruby-ivar">@admin_users</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">scoped</span> - <span class="ruby-ivar">@admin_users</span> = <span class="ruby-ivar">@admin_users</span>.<span class="ruby-identifier">filter</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:filter</span>]) - <span class="ruby-ivar">@admin_users</span> = <span class="ruby-ivar">@admin_users</span>.<span class="ruby-identifier">search</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:name</span>]) <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:name</span>].<span class="ruby-identifier">present?</span> - <span class="ruby-ivar">@admin_users</span> = <span class="ruby-ivar">@admin_users</span>.<span class="ruby-identifier">alphabetically</span>.<span class="ruby-identifier">page</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:page</span>]) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-new"> - - <b>new</b>() - - <a href="../../classes/Admin/UsersController.html#method-i-new" name="method-i-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-new_source')" id="l_method-i-new_source">show</a> - - </p> - <div id="method-i-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/users_controller.rb, line 32</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">new</span> - <span class="ruby-ivar">@admin_user</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">new</span>({ <span class="ruby-identifier">projects_limit</span><span class="ruby-operator">:</span> <span class="ruby-constant">Gitlab</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">gitlab</span>.<span class="ruby-identifier">default_projects_limit</span> }, <span class="ruby-identifier">as</span><span class="ruby-operator">:</span> <span class="ruby-value">:admin</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-show"> - - <b>show</b>() - - <a href="../../classes/Admin/UsersController.html#method-i-show" name="method-i-show" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a> - - </p> - <div id="method-i-show_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/users_controller.rb, line 9</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span> - <span class="ruby-ivar">@admin_user</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) - - <span class="ruby-ivar">@projects</span> = <span class="ruby-keyword">if</span> <span class="ruby-ivar">@admin_user</span>.<span class="ruby-identifier">projects</span>.<span class="ruby-identifier">empty?</span> - <span class="ruby-constant">Project</span> - <span class="ruby-keyword">else</span> - <span class="ruby-constant">Project</span>.<span class="ruby-identifier">without_user</span>(<span class="ruby-ivar">@admin_user</span>) - <span class="ruby-keyword">end</span>.<span class="ruby-identifier">all</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-team_update"> - - <b>team_update</b>() - - <a href="../../classes/Admin/UsersController.html#method-i-team_update" name="method-i-team_update" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-team_update_source')" id="l_method-i-team_update_source">show</a> - - </p> - <div id="method-i-team_update_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/users_controller.rb, line 19</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">team_update</span> - <span class="ruby-ivar">@admin_user</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) - - <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">user_bulk_import</span>( - <span class="ruby-ivar">@admin_user</span>, - <span class="ruby-identifier">params</span>[<span class="ruby-value">:project_ids</span>], - <span class="ruby-identifier">params</span>[<span class="ruby-value">:project_access</span>] - ) - - <span class="ruby-identifier">redirect_to</span> [<span class="ruby-value">:admin</span>, <span class="ruby-ivar">@admin_user</span>], <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">'Teams were successfully updated.'</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-unblock"> - - <b>unblock</b>() - - <a href="../../classes/Admin/UsersController.html#method-i-unblock" name="method-i-unblock" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-unblock_source')" id="l_method-i-unblock_source">show</a> - - </p> - <div id="method-i-unblock_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/users_controller.rb, line 50</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">unblock</span> - <span class="ruby-ivar">@admin_user</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) - - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@admin_user</span>.<span class="ruby-identifier">update_attribute</span>(<span class="ruby-value">:blocked</span>, <span class="ruby-keyword">false</span>) - <span class="ruby-identifier">redirect_to</span> <span class="ruby-value">:back</span>, <span class="ruby-identifier">alert</span><span class="ruby-operator">:</span> <span class="ruby-string">"Successfully unblocked"</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">redirect_to</span> <span class="ruby-value">:back</span>, <span class="ruby-identifier">alert</span><span class="ruby-operator">:</span> <span class="ruby-string">"Error occured. User was not unblocked"</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update"> - - <b>update</b>() - - <a href="../../classes/Admin/UsersController.html#method-i-update" name="method-i-update" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_source')" id="l_method-i-update_source">show</a> - - </p> - <div id="method-i-update_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin/users_controller.rb, line 77</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update</span> - <span class="ruby-identifier">admin</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:user</span>].<span class="ruby-identifier">delete</span>(<span class="ruby-string">"admin"</span>) - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:user</span>][<span class="ruby-value">:password</span>].<span class="ruby-identifier">blank?</span> - <span class="ruby-identifier">params</span>[<span class="ruby-value">:user</span>].<span class="ruby-identifier">delete</span>(<span class="ruby-value">:password</span>) - <span class="ruby-identifier">params</span>[<span class="ruby-value">:user</span>].<span class="ruby-identifier">delete</span>(<span class="ruby-value">:password_confirmation</span>) - <span class="ruby-keyword">end</span> - - <span class="ruby-ivar">@admin_user</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) - <span class="ruby-ivar">@admin_user</span>.<span class="ruby-identifier">admin</span> = (<span class="ruby-identifier">admin</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">admin</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">></span> <span class="ruby-number">0</span>) - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@admin_user</span>.<span class="ruby-identifier">update_attributes</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:user</span>], <span class="ruby-identifier">as</span><span class="ruby-operator">:</span> <span class="ruby-value">:admin</span>) - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> { <span class="ruby-identifier">redirect_to</span> [<span class="ruby-value">:admin</span>, <span class="ruby-ivar">@admin_user</span>], <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">'User was successfully updated.'</span> } - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">json</span> { <span class="ruby-identifier">head</span> <span class="ruby-value">:ok</span> } - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">"edit"</span> } - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">json</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">json</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@admin_user</span>.<span class="ruby-identifier">errors</span>, <span class="ruby-identifier">status</span><span class="ruby-operator">:</span> <span class="ruby-value">:unprocessable_entity</span> } - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/AdminController.html b/doc/code/classes/AdminController.html deleted file mode 100644 index 629a30fe62c..00000000000 --- a/doc/code/classes/AdminController.html +++ /dev/null @@ -1,140 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>AdminController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - AdminController - - <span class="parent">< - - <a href="ApplicationController.html">ApplicationController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/admin_controller_rb.html">app/controllers/admin_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>Provides a base class for <a href="Admin.html">Admin</a> controllers to -subclass</p> - -<p>Automatically sets the layout and ensures an administrator is logged in</p> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-authenticate_admin-21">authenticate_admin!</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-authenticate_admin-21"> - - <b>authenticate_admin!</b>() - - <a href="../classes/AdminController.html#method-i-authenticate_admin-21" name="method-i-authenticate_admin-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-authenticate_admin-21_source')" id="l_method-i-authenticate_admin-21_source">show</a> - - </p> - <div id="method-i-authenticate_admin-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/admin_controller.rb, line 8</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">authenticate_admin!</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">render_404</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">is_admin?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ApplicationController.html b/doc/code/classes/ApplicationController.html deleted file mode 100644 index f1c3bed954e..00000000000 --- a/doc/code/classes/ApplicationController.html +++ /dev/null @@ -1,942 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ApplicationController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - ApplicationController - - <span class="parent">< - - ActionController::Base - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/application_controller_rb.html">app/controllers/application_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-abilities">abilities</a>, - </li> - - - <li> - <a href="#method-i-access_denied-21">access_denied!</a>, - </li> - - - <li> - <a href="#method-i-add_abilities">add_abilities</a>, - </li> - - - <li> - <a href="#method-i-after_sign_in_path_for">after_sign_in_path_for</a>, - </li> - - - <li> - <a href="#method-i-authorize_code_access-21">authorize_code_access!</a>, - </li> - - - <li> - <a href="#method-i-authorize_project-21">authorize_project!</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-can-3F">can?</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-dev_tools">dev_tools</a> - </li> - - </ul> - </dd> - - <dt>G</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-git_not_found-21">git_not_found!</a> - </li> - - </ul> - </dd> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-log_exception">log_exception</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-method_missing">method_missing</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-no_cache_headers">no_cache_headers</a>, - </li> - - - <li> - <a href="#method-i-not_found-21">not_found!</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-project">project</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-reject_blocked-21">reject_blocked!</a>, - </li> - - - <li> - <a href="#method-i-render_403">render_403</a>, - </li> - - - <li> - <a href="#method-i-render_404">render_404</a>, - </li> - - - <li> - <a href="#method-i-require_non_empty_project">require_non_empty_project</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-set_current_user_for_observers">set_current_user_for_observers</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-abilities"> - - <b>abilities</b>() - - <a href="../classes/ApplicationController.html#method-i-abilities" name="method-i-abilities" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-abilities_source')" id="l_method-i-abilities_source">show</a> - - </p> - <div id="method-i-abilities_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/application_controller.rb, line 58</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">abilities</span> - <span class="ruby-ivar">@abilities</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Six</span>.<span class="ruby-identifier">new</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-access_denied-21"> - - <b>access_denied!</b>() - - <a href="../classes/ApplicationController.html#method-i-access_denied-21" name="method-i-access_denied-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-access_denied-21_source')" id="l_method-i-access_denied-21_source">show</a> - - </p> - <div id="method-i-access_denied-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/application_controller.rb, line 91</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">access_denied!</span> - <span class="ruby-identifier">render</span> <span class="ruby-string">"errors/access_denied"</span>, <span class="ruby-identifier">layout</span><span class="ruby-operator">:</span> <span class="ruby-string">"errors"</span>, <span class="ruby-identifier">status</span><span class="ruby-operator">:</span> <span class="ruby-number">404</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-add_abilities"> - - <b>add_abilities</b>() - - <a href="../classes/ApplicationController.html#method-i-add_abilities" name="method-i-add_abilities" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-add_abilities_source')" id="l_method-i-add_abilities_source">show</a> - - </p> - <div id="method-i-add_abilities_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/application_controller.rb, line 79</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">add_abilities</span> - <span class="ruby-identifier">abilities</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Ability</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-after_sign_in_path_for"> - - <b>after_sign_in_path_for</b>(resource) - - <a href="../classes/ApplicationController.html#method-i-after_sign_in_path_for" name="method-i-after_sign_in_path_for" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-after_sign_in_path_for_source')" id="l_method-i-after_sign_in_path_for_source">show</a> - - </p> - <div id="method-i-after_sign_in_path_for_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/application_controller.rb, line 43</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">after_sign_in_path_for</span> <span class="ruby-identifier">resource</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">User</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:blocked</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">resource</span>.<span class="ruby-identifier">blocked</span> - <span class="ruby-identifier">sign_out</span> <span class="ruby-identifier">resource</span> - <span class="ruby-identifier">flash</span>[<span class="ruby-value">:alert</span>] = <span class="ruby-string">"Your account is blocked. Retry when an admin unblock it."</span> - <span class="ruby-identifier">new_user_session_path</span> - <span class="ruby-keyword">else</span> - <span class="ruby-keyword">super</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-authorize_code_access-21"> - - <b>authorize_code_access!</b>() - - <a href="../classes/ApplicationController.html#method-i-authorize_code_access-21" name="method-i-authorize_code_access-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-authorize_code_access-21_source')" id="l_method-i-authorize_code_access-21_source">show</a> - - </p> - <div id="method-i-authorize_code_access-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/application_controller.rb, line 87</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">authorize_code_access!</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">access_denied!</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-value">:download_code</span>, <span class="ruby-identifier">project</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-authorize_project-21"> - - <b>authorize_project!</b>(action) - - <a href="../classes/ApplicationController.html#method-i-authorize_project-21" name="method-i-authorize_project-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-authorize_project-21_source')" id="l_method-i-authorize_project-21_source">show</a> - - </p> - <div id="method-i-authorize_project-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/application_controller.rb, line 83</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">authorize_project!</span>(<span class="ruby-identifier">action</span>) - <span class="ruby-keyword">return</span> <span class="ruby-identifier">access_denied!</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-identifier">action</span>, <span class="ruby-identifier">project</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-can-3F"> - - <b>can?</b>(object, action, subject) - - <a href="../classes/ApplicationController.html#method-i-can-3F" name="method-i-can-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-can-3F_source')" id="l_method-i-can-3F_source">show</a> - - </p> - <div id="method-i-can-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/application_controller.rb, line 62</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">can?</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">action</span>, <span class="ruby-identifier">subject</span>) - <span class="ruby-identifier">abilities</span>.<span class="ruby-identifier">allowed?</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">action</span>, <span class="ruby-identifier">subject</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-dev_tools"> - - <b>dev_tools</b>() - - <a href="../classes/ApplicationController.html#method-i-dev_tools" name="method-i-dev_tools" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-dev_tools_source')" id="l_method-i-dev_tools_source">show</a> - - </p> - <div id="method-i-dev_tools_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/application_controller.rb, line 129</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">dev_tools</span> - <span class="ruby-constant">Rack</span><span class="ruby-operator">::</span><span class="ruby-constant">MiniProfiler</span>.<span class="ruby-identifier">authorize_request</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-git_not_found-21"> - - <b>git_not_found!</b>() - - <a href="../classes/ApplicationController.html#method-i-git_not_found-21" name="method-i-git_not_found-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-git_not_found-21_source')" id="l_method-i-git_not_found-21_source">show</a> - - </p> - <div id="method-i-git_not_found-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/application_controller.rb, line 99</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">git_not_found!</span> - <span class="ruby-identifier">render</span> <span class="ruby-string">"errors/git_not_found"</span>, <span class="ruby-identifier">layout</span><span class="ruby-operator">:</span> <span class="ruby-string">"errors"</span>, <span class="ruby-identifier">status</span><span class="ruby-operator">:</span> <span class="ruby-number">404</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-log_exception"> - - <b>log_exception</b>(exception) - - <a href="../classes/ApplicationController.html#method-i-log_exception" name="method-i-log_exception" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-log_exception_source')" id="l_method-i-log_exception_source">show</a> - - </p> - <div id="method-i-log_exception_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/application_controller.rb, line 29</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">log_exception</span>(<span class="ruby-identifier">exception</span>) - <span class="ruby-identifier">application_trace</span> = <span class="ruby-constant">ActionDispatch</span><span class="ruby-operator">::</span><span class="ruby-constant">ExceptionWrapper</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">env</span>, <span class="ruby-identifier">exception</span>).<span class="ruby-identifier">application_trace</span> - <span class="ruby-identifier">application_trace</span>.<span class="ruby-identifier">map!</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span> <span class="ruby-node">" #{t}\n"</span> } - <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">error</span> <span class="ruby-node">"\n#{exception.class.name} (#{exception.message}):\n#{application_trace.join}"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-method_missing"> - - <b>method_missing</b>(method_sym, *arguments, &block) - - <a href="../classes/ApplicationController.html#method-i-method_missing" name="method-i-method_missing" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-method_missing_source')" id="l_method-i-method_missing_source">show</a> - - </p> - <div id="method-i-method_missing_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/application_controller.rb, line 103</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">method_missing</span>(<span class="ruby-identifier">method_sym</span>, *<span class="ruby-identifier">arguments</span>, &<span class="ruby-identifier">block</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">method_sym</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">%r^authorize_(.*)!$/</span> - <span class="ruby-identifier">authorize_project!</span>(<span class="ruby-node">$1</span>.<span class="ruby-identifier">to_sym</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-keyword">super</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-no_cache_headers"> - - <b>no_cache_headers</b>() - - <a href="../classes/ApplicationController.html#method-i-no_cache_headers" name="method-i-no_cache_headers" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-no_cache_headers_source')" id="l_method-i-no_cache_headers_source">show</a> - - </p> - <div id="method-i-no_cache_headers_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/application_controller.rb, line 123</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">no_cache_headers</span> - <span class="ruby-identifier">response</span>.<span class="ruby-identifier">headers</span>[<span class="ruby-string">"Cache-Control"</span>] = <span class="ruby-string">"no-cache, no-store, max-age=0, must-revalidate"</span> - <span class="ruby-identifier">response</span>.<span class="ruby-identifier">headers</span>[<span class="ruby-string">"Pragma"</span>] = <span class="ruby-string">"no-cache"</span> - <span class="ruby-identifier">response</span>.<span class="ruby-identifier">headers</span>[<span class="ruby-string">"Expires"</span>] = <span class="ruby-string">"Fri, 01 Jan 1990 00:00:00 GMT"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-not_found-21"> - - <b>not_found!</b>() - - <a href="../classes/ApplicationController.html#method-i-not_found-21" name="method-i-not_found-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-not_found-21_source')" id="l_method-i-not_found-21_source">show</a> - - </p> - <div id="method-i-not_found-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/application_controller.rb, line 95</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">not_found!</span> - <span class="ruby-identifier">render</span> <span class="ruby-string">"errors/not_found"</span>, <span class="ruby-identifier">layout</span><span class="ruby-operator">:</span> <span class="ruby-string">"errors"</span>, <span class="ruby-identifier">status</span><span class="ruby-operator">:</span> <span class="ruby-number">404</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-project"> - - <b>project</b>() - - <a href="../classes/ApplicationController.html#method-i-project" name="method-i-project" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-project_source')" id="l_method-i-project_source">show</a> - - </p> - <div id="method-i-project_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/application_controller.rb, line 66</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">project</span> - <span class="ruby-identifier">id</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:project_id</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>] - - <span class="ruby-ivar">@project</span> = <span class="ruby-constant">Project</span>.<span class="ruby-identifier">find_with_namespace</span>(<span class="ruby-identifier">id</span>) - - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@project</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-value">:read_project</span>, <span class="ruby-ivar">@project</span>) - <span class="ruby-ivar">@project</span> - <span class="ruby-keyword">else</span> - <span class="ruby-ivar">@project</span> = <span class="ruby-keyword">nil</span> - <span class="ruby-identifier">render_404</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-reject_blocked-21"> - - <b>reject_blocked!</b>() - - <a href="../classes/ApplicationController.html#method-i-reject_blocked-21" name="method-i-reject_blocked-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-reject_blocked-21_source')" id="l_method-i-reject_blocked-21_source">show</a> - - </p> - <div id="method-i-reject_blocked-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/application_controller.rb, line 35</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">reject_blocked!</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">current_user</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">blocked</span> - <span class="ruby-identifier">sign_out</span> <span class="ruby-identifier">current_user</span> - <span class="ruby-identifier">flash</span>[<span class="ruby-value">:alert</span>] = <span class="ruby-string">"Your account is blocked. Retry when an admin unblock it."</span> - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">new_user_session_path</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-render_403"> - - <b>render_403</b>() - - <a href="../classes/ApplicationController.html#method-i-render_403" name="method-i-render_403" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-render_403_source')" id="l_method-i-render_403_source">show</a> - - </p> - <div id="method-i-render_403_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/application_controller.rb, line 115</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">render_403</span> - <span class="ruby-identifier">render</span> <span class="ruby-identifier">file</span><span class="ruby-operator">:</span> <span class="ruby-constant">Rails</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">"public"</span>, <span class="ruby-string">"403"</span>), <span class="ruby-identifier">layout</span><span class="ruby-operator">:</span> <span class="ruby-keyword">false</span>, <span class="ruby-identifier">status</span><span class="ruby-operator">:</span> <span class="ruby-string">"403"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-render_404"> - - <b>render_404</b>() - - <a href="../classes/ApplicationController.html#method-i-render_404" name="method-i-render_404" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-render_404_source')" id="l_method-i-render_404_source">show</a> - - </p> - <div id="method-i-render_404_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/application_controller.rb, line 111</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">render_404</span> - <span class="ruby-identifier">render</span> <span class="ruby-identifier">file</span><span class="ruby-operator">:</span> <span class="ruby-constant">Rails</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">"public"</span>, <span class="ruby-string">"404"</span>), <span class="ruby-identifier">layout</span><span class="ruby-operator">:</span> <span class="ruby-keyword">false</span>, <span class="ruby-identifier">status</span><span class="ruby-operator">:</span> <span class="ruby-string">"404"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-require_non_empty_project"> - - <b>require_non_empty_project</b>() - - <a href="../classes/ApplicationController.html#method-i-require_non_empty_project" name="method-i-require_non_empty_project" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-require_non_empty_project_source')" id="l_method-i-require_non_empty_project_source">show</a> - - </p> - <div id="method-i-require_non_empty_project_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/application_controller.rb, line 119</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">require_non_empty_project</span> - <span class="ruby-identifier">redirect_to</span> <span class="ruby-ivar">@project</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">empty_repo?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-set_current_user_for_observers"> - - <b>set_current_user_for_observers</b>() - - <a href="../classes/ApplicationController.html#method-i-set_current_user_for_observers" name="method-i-set_current_user_for_observers" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-set_current_user_for_observers_source')" id="l_method-i-set_current_user_for_observers_source">show</a> - - </p> - <div id="method-i-set_current_user_for_observers_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/application_controller.rb, line 53</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">set_current_user_for_observers</span> - <span class="ruby-constant">MergeRequestObserver</span>.<span class="ruby-identifier">current_user</span> = <span class="ruby-identifier">current_user</span> - <span class="ruby-constant">IssueObserver</span>.<span class="ruby-identifier">current_user</span> = <span class="ruby-identifier">current_user</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ApplicationDecorator.html b/doc/code/classes/ApplicationDecorator.html deleted file mode 100644 index 348cf42a0c9..00000000000 --- a/doc/code/classes/ApplicationDecorator.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ApplicationDecorator</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - ApplicationDecorator - - <span class="parent">< - - Draper::Base - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/decorators/application_decorator_rb.html">app/decorators/application_decorator.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ApplicationHelper.html b/doc/code/classes/ApplicationHelper.html deleted file mode 100644 index 2c3a82bb7b1..00000000000 --- a/doc/code/classes/ApplicationHelper.html +++ /dev/null @@ -1,890 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ApplicationHelper</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - ApplicationHelper - - </h1> - <ul class="files"> - - <li><a href="../files/app/helpers/application_helper_rb.html">app/helpers/application_helper.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-app_theme">app_theme</a>, - </li> - - - <li> - <a href="#method-i-authbutton">authbutton</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-current_action-3F">current_action?</a>, - </li> - - - <li> - <a href="#method-i-current_controller-3F">current_controller?</a> - </li> - - </ul> - </dd> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-emoji_autocomplete_source">emoji_autocomplete_source</a> - </li> - - </ul> - </dd> - - <dt>G</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-gravatar_icon">gravatar_icon</a>, - </li> - - - <li> - <a href="#method-i-grouped_options_refs">grouped_options_refs</a> - </li> - - </ul> - </dd> - - <dt>H</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-hexdigest">hexdigest</a> - </li> - - </ul> - </dd> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-last_commit">last_commit</a>, - </li> - - - <li> - <a href="#method-i-ldap_enable-3F">ldap_enable?</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-project_last_activity">project_last_activity</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-request_protocol">request_protocol</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-search_autocomplete_source">search_autocomplete_source</a>, - </li> - - - <li> - <a href="#method-i-show_last_push_widget-3F">show_last_push_widget?</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-user_color_scheme_class">user_color_scheme_class</a> - </li> - - </ul> - </dd> - - <dt>W</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-web_app_url">web_app_url</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-app_theme"> - - <b>app_theme</b>() - - <a href="../classes/ApplicationHelper.html#method-i-app_theme" name="method-i-app_theme" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-app_theme_source')" id="l_method-i-app_theme_source">show</a> - - </p> - <div id="method-i-app_theme_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/application_helper.rb, line 130</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">app_theme</span> - <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">Theme</span>.<span class="ruby-identifier">css_class_by_id</span>(<span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">try</span>(<span class="ruby-value">:theme_id</span>)) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-authbutton"> - - <b>authbutton</b>(provider, size = 64) - - <a href="../classes/ApplicationHelper.html#method-i-authbutton" name="method-i-authbutton" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-authbutton_source')" id="l_method-i-authbutton_source">show</a> - - </p> - <div id="method-i-authbutton_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/application_helper.rb, line 159</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">authbutton</span>(<span class="ruby-identifier">provider</span>, <span class="ruby-identifier">size</span> = <span class="ruby-number">64</span>) - <span class="ruby-identifier">file_name</span> = <span class="ruby-node">"#{provider.to_s.split('_').first}_#{size}.png"</span> - <span class="ruby-identifier">image_tag</span>(<span class="ruby-node">"authbuttons/#{file_name}"</span>, - <span class="ruby-identifier">alt</span><span class="ruby-operator">:</span> <span class="ruby-node">"Sign in with #{provider.to_s.titleize}"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-current_action-3F"> - - <b>current_action?</b>(*args) - - <a href="../classes/ApplicationHelper.html#method-i-current_action-3F" name="method-i-current_action-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Check if a partcular action is the current one</p> - -<p>args - One or more action names to check</p> - -<p>Examples</p> - -<pre class="ruby"><span class="ruby-comment"># On Projects#new</span> -<span class="ruby-identifier">current_action?</span>(:<span class="ruby-identifier">new</span>) <span class="ruby-comment"># => true</span> -<span class="ruby-identifier">current_action?</span>(:<span class="ruby-identifier">create</span>) <span class="ruby-comment"># => false</span> -<span class="ruby-identifier">current_action?</span>(:<span class="ruby-identifier">new</span>, :<span class="ruby-identifier">create</span>) <span class="ruby-comment"># => true</span> -</pre> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-current_action-3F_source')" id="l_method-i-current_action-3F_source">show</a> - - </p> - <div id="method-i-current_action-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/application_helper.rb, line 30</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">current_action?</span>(*<span class="ruby-identifier">args</span>) - <span class="ruby-identifier">args</span>.<span class="ruby-identifier">any?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">downcase</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">action_name</span> } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-current_controller-3F"> - - <b>current_controller?</b>(*args) - - <a href="../classes/ApplicationHelper.html#method-i-current_controller-3F" name="method-i-current_controller-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Check if a particular controller is the current one</p> - -<p>args - One or more controller names to check</p> - -<p>Examples</p> - -<pre class="ruby"><span class="ruby-comment"># On TreeController</span> -<span class="ruby-identifier">current_controller?</span>(:<span class="ruby-identifier">tree</span>) <span class="ruby-comment"># => true</span> -<span class="ruby-identifier">current_controller?</span>(:<span class="ruby-identifier">commits</span>) <span class="ruby-comment"># => false</span> -<span class="ruby-identifier">current_controller?</span>(:<span class="ruby-identifier">commits</span>, :<span class="ruby-identifier">tree</span>) <span class="ruby-comment"># => true</span> -</pre> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-current_controller-3F_source')" id="l_method-i-current_controller-3F_source">show</a> - - </p> - <div id="method-i-current_controller-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/application_helper.rb, line 16</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">current_controller?</span>(*<span class="ruby-identifier">args</span>) - <span class="ruby-identifier">args</span>.<span class="ruby-identifier">any?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">downcase</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">controller</span>.<span class="ruby-identifier">controller_name</span> } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-emoji_autocomplete_source"> - - <b>emoji_autocomplete_source</b>() - - <a href="../classes/ApplicationHelper.html#method-i-emoji_autocomplete_source" name="method-i-emoji_autocomplete_source" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-emoji_autocomplete_source_source')" id="l_method-i-emoji_autocomplete_source_source">show</a> - - </p> - <div id="method-i-emoji_autocomplete_source_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/application_helper.rb, line 120</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">emoji_autocomplete_source</span> - <span class="ruby-comment"># should be an array of strings</span> - <span class="ruby-comment"># so to_s can be called, because it is sufficient and to_json is too slow</span> - <span class="ruby-constant">Emoji</span>.<span class="ruby-identifier">names</span>.<span class="ruby-identifier">to_s</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-gravatar_icon"> - - <b>gravatar_icon</b>(user_email = '', size = nil) - - <a href="../classes/ApplicationHelper.html#method-i-gravatar_icon" name="method-i-gravatar_icon" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-gravatar_icon_source')" id="l_method-i-gravatar_icon_source">show</a> - - </p> - <div id="method-i-gravatar_icon_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/application_helper.rb, line 34</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">gravatar_icon</span>(<span class="ruby-identifier">user_email</span> = <span class="ruby-string">''</span>, <span class="ruby-identifier">size</span> = <span class="ruby-keyword">nil</span>) - <span class="ruby-identifier">size</span> = <span class="ruby-number">40</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">size</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">size</span> <span class="ruby-operator"><=</span> <span class="ruby-number">0</span> - - <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-constant">Gitlab</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">gravatar</span>.<span class="ruby-identifier">enabled</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">user_email</span>.<span class="ruby-identifier">blank?</span> - <span class="ruby-string">'no_avatar.png'</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">gravatar_url</span> = <span class="ruby-identifier">request</span>.<span class="ruby-identifier">ssl?</span> <span class="ruby-operator">?</span> <span class="ruby-constant">Gitlab</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">gravatar</span>.<span class="ruby-identifier">ssl_url</span> <span class="ruby-operator">:</span> <span class="ruby-constant">Gitlab</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">gravatar</span>.<span class="ruby-identifier">plain_url</span> - <span class="ruby-identifier">user_email</span>.<span class="ruby-identifier">strip!</span> - <span class="ruby-identifier">sprintf</span>(<span class="ruby-identifier">gravatar_url</span>, {<span class="ruby-value">:hash</span> =<span class="ruby-operator">></span> <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">MD5</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-identifier">user_email</span>.<span class="ruby-identifier">downcase</span>), <span class="ruby-value">:email</span> =<span class="ruby-operator">></span> <span class="ruby-constant">URI</span>.<span class="ruby-identifier">escape</span>(<span class="ruby-identifier">user_email</span>), <span class="ruby-value">:size</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">size</span>}) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-grouped_options_refs"> - - <b>grouped_options_refs</b>(destination = :tree) - - <a href="../classes/ApplicationHelper.html#method-i-grouped_options_refs" name="method-i-grouped_options_refs" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-grouped_options_refs_source')" id="l_method-i-grouped_options_refs_source">show</a> - - </p> - <div id="method-i-grouped_options_refs_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/application_helper.rb, line 64</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">grouped_options_refs</span>(<span class="ruby-identifier">destination</span> = <span class="ruby-value">:tree</span>) - <span class="ruby-identifier">options</span> = [ - [<span class="ruby-string">"Branch"</span>, <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">branch_names</span> ], - [ <span class="ruby-string">"Tag"</span>, <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">tag_names</span> ] - ] - - <span class="ruby-comment"># If reference is commit id -</span> - <span class="ruby-comment"># we should add it to branch/tag selectbox</span> - <span class="ruby-keyword">if</span>(<span class="ruby-ivar">@ref</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">options</span>.<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-ivar">@ref</span>) <span class="ruby-operator">&&</span> - <span class="ruby-ivar">@ref</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">%r^[0-9a-zA-Z]{6,52}$/</span>) - <span class="ruby-identifier">options</span> <span class="ruby-operator"><<</span> [<span class="ruby-string">"Commit"</span>, [<span class="ruby-ivar">@ref</span>]] - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">grouped_options_for_select</span>(<span class="ruby-identifier">options</span>, <span class="ruby-ivar">@ref</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">default_branch</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-hexdigest"> - - <b>hexdigest</b>(string) - - <a href="../classes/ApplicationHelper.html#method-i-hexdigest" name="method-i-hexdigest" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-hexdigest_source')" id="l_method-i-hexdigest_source">show</a> - - </p> - <div id="method-i-hexdigest_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/application_helper.rb, line 146</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">hexdigest</span>(<span class="ruby-identifier">string</span>) - <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">SHA1</span>.<span class="ruby-identifier">hexdigest</span> <span class="ruby-identifier">string</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-last_commit"> - - <b>last_commit</b>(project) - - <a href="../classes/ApplicationHelper.html#method-i-last_commit" name="method-i-last_commit" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-last_commit_source')" id="l_method-i-last_commit_source">show</a> - - </p> - <div id="method-i-last_commit_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/application_helper.rb, line 54</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">last_commit</span>(<span class="ruby-identifier">project</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">project</span>.<span class="ruby-identifier">repo_exists?</span> - <span class="ruby-identifier">time_ago_in_words</span>(<span class="ruby-identifier">project</span>.<span class="ruby-identifier">commit</span>.<span class="ruby-identifier">committed_date</span>) <span class="ruby-operator">+</span> <span class="ruby-string">" ago"</span> - <span class="ruby-keyword">else</span> - <span class="ruby-string">"Never"</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">rescue</span> - <span class="ruby-string">"Never"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-ldap_enable-3F"> - - <b>ldap_enable?</b>() - - <a href="../classes/ApplicationHelper.html#method-i-ldap_enable-3F" name="method-i-ldap_enable-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-ldap_enable-3F_source')" id="l_method-i-ldap_enable-3F_source">show</a> - - </p> - <div id="method-i-ldap_enable-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/application_helper.rb, line 126</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">ldap_enable?</span> - <span class="ruby-constant">Devise</span>.<span class="ruby-identifier">omniauth_providers</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value">:ldap</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-project_last_activity"> - - <b>project_last_activity</b>(project) - - <a href="../classes/ApplicationHelper.html#method-i-project_last_activity" name="method-i-project_last_activity" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-project_last_activity_source')" id="l_method-i-project_last_activity_source">show</a> - - </p> - <div id="method-i-project_last_activity_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/application_helper.rb, line 150</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">project_last_activity</span> <span class="ruby-identifier">project</span> - <span class="ruby-identifier">activity</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">last_activity</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">activity</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">activity</span>.<span class="ruby-identifier">created_at</span> - <span class="ruby-identifier">time_ago_in_words</span>(<span class="ruby-identifier">activity</span>.<span class="ruby-identifier">created_at</span>) <span class="ruby-operator">+</span> <span class="ruby-string">" ago"</span> - <span class="ruby-keyword">else</span> - <span class="ruby-string">"Never"</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-request_protocol"> - - <b>request_protocol</b>() - - <a href="../classes/ApplicationHelper.html#method-i-request_protocol" name="method-i-request_protocol" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-request_protocol_source')" id="l_method-i-request_protocol_source">show</a> - - </p> - <div id="method-i-request_protocol_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/application_helper.rb, line 46</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">request_protocol</span> - <span class="ruby-identifier">request</span>.<span class="ruby-identifier">ssl?</span> <span class="ruby-operator">?</span> <span class="ruby-string">"https"</span> <span class="ruby-operator">:</span> <span class="ruby-string">"http"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-search_autocomplete_source"> - - <b>search_autocomplete_source</b>() - - <a href="../classes/ApplicationHelper.html#method-i-search_autocomplete_source" name="method-i-search_autocomplete_source" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-search_autocomplete_source_source')" id="l_method-i-search_autocomplete_source_source">show</a> - - </p> - <div id="method-i-search_autocomplete_source_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/application_helper.rb, line 80</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">search_autocomplete_source</span> - <span class="ruby-identifier">projects</span> = <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">authorized_projects</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">label</span><span class="ruby-operator">:</span> <span class="ruby-identifier">p</span>.<span class="ruby-identifier">name_with_namespace</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">project_path</span>(<span class="ruby-identifier">p</span>) } } - <span class="ruby-identifier">groups</span> = <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">authorized_groups</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">group</span><span class="ruby-operator">|</span> { <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-node">"<group> #{group.name}"</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">group_path</span>(<span class="ruby-identifier">group</span>) } } - - <span class="ruby-identifier">default_nav</span> = [ - { <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-string">"My Profile"</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">profile_path</span> }, - { <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-string">"My SSH Keys"</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">keys_path</span> }, - { <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-string">"My Dashboard"</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">root_path</span> }, - { <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-string">"Admin Section"</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">admin_root_path</span> }, - ] - - <span class="ruby-identifier">help_nav</span> = [ - { <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-string">"Workflow Help"</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">help_workflow_path</span> }, - { <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-string">"Permissions Help"</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">help_permissions_path</span> }, - { <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-string">"Web Hooks Help"</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">help_web_hooks_path</span> }, - { <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-string">"System Hooks Help"</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">help_system_hooks_path</span> }, - { <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-string">"API Help"</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">help_api_path</span> }, - { <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-string">"Markdown Help"</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">help_markdown_path</span> }, - { <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-string">"SSH Keys Help"</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">help_ssh_path</span> }, - { <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-string">"Gitlab Rake Tasks Help"</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">help_raketasks_path</span> }, - ] - - <span class="ruby-identifier">project_nav</span> = [] - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@project</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@project</span>.<span class="ruby-identifier">new_record?</span> - <span class="ruby-identifier">project_nav</span> = [ - { <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-node">"#{@project.name} Issues"</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">project_issues_path</span>(<span class="ruby-ivar">@project</span>) }, - { <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-node">"#{@project.name} Commits"</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">project_commits_path</span>(<span class="ruby-ivar">@project</span>, <span class="ruby-ivar">@ref</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">root_ref</span>) }, - { <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-node">"#{@project.name} Merge Requests"</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">project_merge_requests_path</span>(<span class="ruby-ivar">@project</span>) }, - { <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-node">"#{@project.name} Milestones"</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">project_milestones_path</span>(<span class="ruby-ivar">@project</span>) }, - { <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-node">"#{@project.name} Snippets"</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">project_snippets_path</span>(<span class="ruby-ivar">@project</span>) }, - { <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-node">"#{@project.name} Team"</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">project_team_index_path</span>(<span class="ruby-ivar">@project</span>) }, - { <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-node">"#{@project.name} Tree"</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">project_tree_path</span>(<span class="ruby-ivar">@project</span>, <span class="ruby-ivar">@ref</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">root_ref</span>) }, - { <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-node">"#{@project.name} Wall"</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">wall_project_path</span>(<span class="ruby-ivar">@project</span>) }, - { <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-node">"#{@project.name} Wiki"</span>, <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">project_wikis_path</span>(<span class="ruby-ivar">@project</span>) }, - ] - <span class="ruby-keyword">end</span> - - [<span class="ruby-identifier">groups</span>, <span class="ruby-identifier">projects</span>, <span class="ruby-identifier">default_nav</span>, <span class="ruby-identifier">project_nav</span>, <span class="ruby-identifier">help_nav</span>].<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">to_json</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-show_last_push_widget-3F"> - - <b>show_last_push_widget?</b>(event) - - <a href="../classes/ApplicationHelper.html#method-i-show_last_push_widget-3F" name="method-i-show_last_push_widget-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_last_push_widget-3F_source')" id="l_method-i-show_last_push_widget-3F_source">show</a> - - </p> - <div id="method-i-show_last_push_widget-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/application_helper.rb, line 138</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show_last_push_widget?</span>(<span class="ruby-identifier">event</span>) - <span class="ruby-identifier">event</span> <span class="ruby-operator">&&</span> - <span class="ruby-identifier">event</span>.<span class="ruby-identifier">last_push_to_non_root?</span> <span class="ruby-operator">&&</span> - <span class="ruby-operator">!</span><span class="ruby-identifier">event</span>.<span class="ruby-identifier">rm_ref?</span> <span class="ruby-operator">&&</span> - <span class="ruby-identifier">event</span>.<span class="ruby-identifier">project</span> <span class="ruby-operator">&&</span> - <span class="ruby-identifier">event</span>.<span class="ruby-identifier">project</span>.<span class="ruby-identifier">merge_requests_enabled</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-user_color_scheme_class"> - - <b>user_color_scheme_class</b>() - - <a href="../classes/ApplicationHelper.html#method-i-user_color_scheme_class" name="method-i-user_color_scheme_class" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-user_color_scheme_class_source')" id="l_method-i-user_color_scheme_class_source">show</a> - - </p> - <div id="method-i-user_color_scheme_class_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/application_helper.rb, line 134</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">user_color_scheme_class</span> - <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">dark_scheme</span> <span class="ruby-operator">?</span> <span class="ruby-value">:black</span> <span class="ruby-operator">:</span> <span class="ruby-value">:white</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-web_app_url"> - - <b>web_app_url</b>() - - <a href="../classes/ApplicationHelper.html#method-i-web_app_url" name="method-i-web_app_url" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-web_app_url_source')" id="l_method-i-web_app_url_source">show</a> - - </p> - <div id="method-i-web_app_url_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/application_helper.rb, line 50</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">web_app_url</span> - <span class="ruby-node">"#{request_protocol}://#{Gitlab.config.gitlab.host}/"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/AttachmentUploader.html b/doc/code/classes/AttachmentUploader.html deleted file mode 100644 index 79bc7c989c5..00000000000 --- a/doc/code/classes/AttachmentUploader.html +++ /dev/null @@ -1,132 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>AttachmentUploader</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - AttachmentUploader - - <span class="parent">< - - CarrierWave::Uploader::Base - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/uploaders/attachment_uploader_rb.html">app/uploaders/attachment_uploader.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-store_dir">store_dir</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-store_dir"> - - <b>store_dir</b>() - - <a href="../classes/AttachmentUploader.html#method-i-store_dir" name="method-i-store_dir" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Override the directory where uploaded files will be stored. This is a -sensible default for uploaders that are meant to be mounted:</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-store_dir_source')" id="l_method-i-store_dir_source">show</a> - - </p> - <div id="method-i-store_dir_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/uploaders/attachment_uploader.rb, line 15</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">store_dir</span> - <span class="ruby-node">"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Authority.html b/doc/code/classes/Authority.html deleted file mode 100644 index fc93f4bea1a..00000000000 --- a/doc/code/classes/Authority.html +++ /dev/null @@ -1,528 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Authority</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - Authority - - </h1> - <ul class="files"> - - <li><a href="../files/app/roles/authority_rb.html">app/roles/authority.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-add_access">add_access</a>, - </li> - - - <li> - <a href="#method-i-allow_read_for-3F">allow_read_for?</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-dev_access_for-3F">dev_access_for?</a> - </li> - - </ul> - </dd> - - <dt>G</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-guest_access_for-3F">guest_access_for?</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-master_access_for-3F">master_access_for?</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-report_access_for-3F">report_access_for?</a>, - </li> - - - <li> - <a href="#method-i-repository_masters">repository_masters</a>, - </li> - - - <li> - <a href="#method-i-repository_readers">repository_readers</a>, - </li> - - - <li> - <a href="#method-i-repository_writers">repository_writers</a>, - </li> - - - <li> - <a href="#method-i-reset_access">reset_access</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-add_access"> - - <b>add_access</b>(user, *access) - - <a href="../classes/Authority.html#method-i-add_access" name="method-i-add_access" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Compatible with all access rights Should be rewrited for new access rights</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-add_access_source')" id="l_method-i-add_access_source">show</a> - - </p> - <div id="method-i-add_access_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/authority.rb, line 4</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">add_access</span>(<span class="ruby-identifier">user</span>, *<span class="ruby-identifier">access</span>) - <span class="ruby-identifier">access</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">access</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value">:admin</span>) - { <span class="ruby-identifier">project_access</span><span class="ruby-operator">:</span> <span class="ruby-constant">UsersProject</span><span class="ruby-operator">::</span><span class="ruby-constant">MASTER</span> } - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">access</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value">:write</span>) - { <span class="ruby-identifier">project_access</span><span class="ruby-operator">:</span> <span class="ruby-constant">UsersProject</span><span class="ruby-operator">::</span><span class="ruby-constant">DEVELOPER</span> } - <span class="ruby-keyword">else</span> - { <span class="ruby-identifier">project_access</span><span class="ruby-operator">:</span> <span class="ruby-constant">UsersProject</span><span class="ruby-operator">::</span><span class="ruby-constant">REPORTER</span> } - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">opts</span> = { <span class="ruby-identifier">user</span><span class="ruby-operator">:</span> <span class="ruby-identifier">user</span> } - <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">access</span>) - <span class="ruby-identifier">users_projects</span>.<span class="ruby-identifier">create</span>(<span class="ruby-identifier">opts</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-allow_read_for-3F"> - - <b>allow_read_for?</b>(user) - - <a href="../classes/Authority.html#method-i-allow_read_for-3F" name="method-i-allow_read_for-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-allow_read_for-3F_source')" id="l_method-i-allow_read_for-3F_source">show</a> - - </p> - <div id="method-i-allow_read_for-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/authority.rb, line 39</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">allow_read_for?</span>(<span class="ruby-identifier">user</span>) - <span class="ruby-operator">!</span><span class="ruby-identifier">users_projects</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">user_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>).<span class="ruby-identifier">empty?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-dev_access_for-3F"> - - <b>dev_access_for?</b>(user) - - <a href="../classes/Authority.html#method-i-dev_access_for-3F" name="method-i-dev_access_for-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-dev_access_for-3F_source')" id="l_method-i-dev_access_for-3F_source">show</a> - - </p> - <div id="method-i-dev_access_for-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/authority.rb, line 51</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">dev_access_for?</span>(<span class="ruby-identifier">user</span>) - <span class="ruby-operator">!</span><span class="ruby-identifier">users_projects</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">user_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">project_access</span><span class="ruby-operator">:</span> [<span class="ruby-constant">UsersProject</span><span class="ruby-operator">::</span><span class="ruby-constant">DEVELOPER</span>, <span class="ruby-constant">UsersProject</span><span class="ruby-operator">::</span><span class="ruby-constant">MASTER</span>]).<span class="ruby-identifier">empty?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-guest_access_for-3F"> - - <b>guest_access_for?</b>(user) - - <a href="../classes/Authority.html#method-i-guest_access_for-3F" name="method-i-guest_access_for-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-guest_access_for-3F_source')" id="l_method-i-guest_access_for-3F_source">show</a> - - </p> - <div id="method-i-guest_access_for-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/authority.rb, line 43</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">guest_access_for?</span>(<span class="ruby-identifier">user</span>) - <span class="ruby-operator">!</span><span class="ruby-identifier">users_projects</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">user_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>).<span class="ruby-identifier">empty?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-master_access_for-3F"> - - <b>master_access_for?</b>(user) - - <a href="../classes/Authority.html#method-i-master_access_for-3F" name="method-i-master_access_for-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-master_access_for-3F_source')" id="l_method-i-master_access_for-3F_source">show</a> - - </p> - <div id="method-i-master_access_for-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/authority.rb, line 55</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">master_access_for?</span>(<span class="ruby-identifier">user</span>) - <span class="ruby-operator">!</span><span class="ruby-identifier">users_projects</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">user_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">project_access</span><span class="ruby-operator">:</span> [<span class="ruby-constant">UsersProject</span><span class="ruby-operator">::</span><span class="ruby-constant">MASTER</span>]).<span class="ruby-identifier">empty?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-report_access_for-3F"> - - <b>report_access_for?</b>(user) - - <a href="../classes/Authority.html#method-i-report_access_for-3F" name="method-i-report_access_for-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-report_access_for-3F_source')" id="l_method-i-report_access_for-3F_source">show</a> - - </p> - <div id="method-i-report_access_for-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/authority.rb, line 47</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">report_access_for?</span>(<span class="ruby-identifier">user</span>) - <span class="ruby-operator">!</span><span class="ruby-identifier">users_projects</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">user_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">project_access</span><span class="ruby-operator">:</span> [<span class="ruby-constant">UsersProject</span><span class="ruby-operator">::</span><span class="ruby-constant">REPORTER</span>, <span class="ruby-constant">UsersProject</span><span class="ruby-operator">::</span><span class="ruby-constant">DEVELOPER</span>, <span class="ruby-constant">UsersProject</span><span class="ruby-operator">::</span><span class="ruby-constant">MASTER</span>]).<span class="ruby-identifier">empty?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-repository_masters"> - - <b>repository_masters</b>() - - <a href="../classes/Authority.html#method-i-repository_masters" name="method-i-repository_masters" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-repository_masters_source')" id="l_method-i-repository_masters_source">show</a> - - </p> - <div id="method-i-repository_masters_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/authority.rb, line 33</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">repository_masters</span> - <span class="ruby-identifier">keys</span> = <span class="ruby-constant">Key</span>.<span class="ruby-identifier">joins</span>({<span class="ruby-identifier">user</span><span class="ruby-operator">:</span> <span class="ruby-value">:users_projects</span>}). - <span class="ruby-identifier">where</span>(<span class="ruby-string">"users_projects.project_id = ? AND users_projects.project_access = ?"</span>, <span class="ruby-identifier">id</span>, <span class="ruby-constant">UsersProject</span><span class="ruby-operator">::</span><span class="ruby-constant">MASTER</span>) - <span class="ruby-identifier">keys</span>.<span class="ruby-identifier">map</span>(&<span class="ruby-value">:identifier</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-repository_readers"> - - <b>repository_readers</b>() - - <a href="../classes/Authority.html#method-i-repository_readers" name="method-i-repository_readers" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-repository_readers_source')" id="l_method-i-repository_readers_source">show</a> - - </p> - <div id="method-i-repository_readers_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/authority.rb, line 21</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">repository_readers</span> - <span class="ruby-identifier">keys</span> = <span class="ruby-constant">Key</span>.<span class="ruby-identifier">joins</span>({<span class="ruby-identifier">user</span><span class="ruby-operator">:</span> <span class="ruby-value">:users_projects</span>}). - <span class="ruby-identifier">where</span>(<span class="ruby-string">"users_projects.project_id = ? AND users_projects.project_access = ?"</span>, <span class="ruby-identifier">id</span>, <span class="ruby-constant">UsersProject</span><span class="ruby-operator">::</span><span class="ruby-constant">REPORTER</span>) - <span class="ruby-identifier">keys</span>.<span class="ruby-identifier">map</span>(&<span class="ruby-value">:identifier</span>) <span class="ruby-operator">+</span> <span class="ruby-identifier">deploy_keys</span>.<span class="ruby-identifier">map</span>(&<span class="ruby-value">:identifier</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-repository_writers"> - - <b>repository_writers</b>() - - <a href="../classes/Authority.html#method-i-repository_writers" name="method-i-repository_writers" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-repository_writers_source')" id="l_method-i-repository_writers_source">show</a> - - </p> - <div id="method-i-repository_writers_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/authority.rb, line 27</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">repository_writers</span> - <span class="ruby-identifier">keys</span> = <span class="ruby-constant">Key</span>.<span class="ruby-identifier">joins</span>({<span class="ruby-identifier">user</span><span class="ruby-operator">:</span> <span class="ruby-value">:users_projects</span>}). - <span class="ruby-identifier">where</span>(<span class="ruby-string">"users_projects.project_id = ? AND users_projects.project_access = ?"</span>, <span class="ruby-identifier">id</span>, <span class="ruby-constant">UsersProject</span><span class="ruby-operator">::</span><span class="ruby-constant">DEVELOPER</span>) - <span class="ruby-identifier">keys</span>.<span class="ruby-identifier">map</span>(&<span class="ruby-value">:identifier</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-reset_access"> - - <b>reset_access</b>(user) - - <a href="../classes/Authority.html#method-i-reset_access" name="method-i-reset_access" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-reset_access_source')" id="l_method-i-reset_access_source">show</a> - - </p> - <div id="method-i-reset_access_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/authority.rb, line 17</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">reset_access</span>(<span class="ruby-identifier">user</span>) - <span class="ruby-identifier">users_projects</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">project_id</span><span class="ruby-operator">:</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">user_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>).<span class="ruby-identifier">destroy</span> <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">id</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/BaseContext.html b/doc/code/classes/BaseContext.html deleted file mode 100644 index 3fbc76bf7e0..00000000000 --- a/doc/code/classes/BaseContext.html +++ /dev/null @@ -1,261 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>BaseContext</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - BaseContext - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/contexts/base_context_rb.html">app/contexts/base_context.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-abilities">abilities</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-can-3F">can?</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-new">new</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>current_user</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>params</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>project</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-new"> - - <b>new</b>(project, user, params) - - <a href="../classes/BaseContext.html#method-c-new" name="method-c-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a> - - </p> - <div id="method-c-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/contexts/base_context.rb, line 4</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">user</span>, <span class="ruby-identifier">params</span>) - <span class="ruby-ivar">@project</span>, <span class="ruby-ivar">@current_user</span>, <span class="ruby-ivar">@params</span> = <span class="ruby-identifier">project</span>, <span class="ruby-identifier">user</span>, <span class="ruby-identifier">params</span>.<span class="ruby-identifier">dup</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-abilities"> - - <b>abilities</b>() - - <a href="../classes/BaseContext.html#method-i-abilities" name="method-i-abilities" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-abilities_source')" id="l_method-i-abilities_source">show</a> - - </p> - <div id="method-i-abilities_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/contexts/base_context.rb, line 8</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">abilities</span> - <span class="ruby-ivar">@abilities</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span> - <span class="ruby-identifier">abilities</span> = <span class="ruby-constant">Six</span>.<span class="ruby-identifier">new</span> - <span class="ruby-identifier">abilities</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Ability</span> - <span class="ruby-identifier">abilities</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-can-3F"> - - <b>can?</b>(object, action, subject) - - <a href="../classes/BaseContext.html#method-i-can-3F" name="method-i-can-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-can-3F_source')" id="l_method-i-can-3F_source">show</a> - - </p> - <div id="method-i-can-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/contexts/base_context.rb, line 16</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">can?</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">action</span>, <span class="ruby-identifier">subject</span>) - <span class="ruby-identifier">abilities</span>.<span class="ruby-identifier">allowed?</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">action</span>, <span class="ruby-identifier">subject</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/BlameController.html b/doc/code/classes/BlameController.html deleted file mode 100644 index 2d641cb099b..00000000000 --- a/doc/code/classes/BlameController.html +++ /dev/null @@ -1,152 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>BlameController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - BlameController - - <span class="parent">< - - <a href="ProjectResourceController.html">ProjectResourceController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/blame_controller_rb.html">app/controllers/blame_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>Controller for viewing a file’s blame</p> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-show">show</a> - </li> - - </ul> - </dd> - - </dl> - - - - <!-- Includes --> - <div class="sectiontitle">Included Modules</div> - <ul> - - <li> - - <a href="ExtractsPath.html"> - ExtractsPath - </a> - - </li> - - </ul> - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-show"> - - <b>show</b>() - - <a href="../classes/BlameController.html#method-i-show" name="method-i-show" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a> - - </p> - <div id="method-i-show_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/blame_controller.rb, line 12</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span> - <span class="ruby-ivar">@repo</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">repo</span> - <span class="ruby-ivar">@blame</span> = <span class="ruby-constant">Grit</span><span class="ruby-operator">::</span><span class="ruby-constant">Blob</span>.<span class="ruby-identifier">blame</span>(<span class="ruby-ivar">@repo</span>, <span class="ruby-ivar">@commit</span>.<span class="ruby-identifier">id</span>, <span class="ruby-ivar">@path</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/BlobController.html b/doc/code/classes/BlobController.html deleted file mode 100644 index 22df013f475..00000000000 --- a/doc/code/classes/BlobController.html +++ /dev/null @@ -1,160 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>BlobController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - BlobController - - <span class="parent">< - - <a href="ProjectResourceController.html">ProjectResourceController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/blob_controller_rb.html">app/controllers/blob_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>Controller for viewing a file’s blame</p> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-show">show</a> - </li> - - </ul> - </dd> - - </dl> - - - - <!-- Includes --> - <div class="sectiontitle">Included Modules</div> - <ul> - - <li> - - <a href="ExtractsPath.html"> - ExtractsPath - </a> - - </li> - - </ul> - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-show"> - - <b>show</b>() - - <a href="../classes/BlobController.html#method-i-show" name="method-i-show" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a> - - </p> - <div id="method-i-show_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/blob_controller.rb, line 12</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span> - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@tree</span>.<span class="ruby-identifier">is_blob?</span> - <span class="ruby-identifier">send_data</span>( - <span class="ruby-ivar">@tree</span>.<span class="ruby-identifier">data</span>, - <span class="ruby-identifier">type</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@tree</span>.<span class="ruby-identifier">mime_type</span>, - <span class="ruby-identifier">disposition</span><span class="ruby-operator">:</span> <span class="ruby-string">'inline'</span>, - <span class="ruby-identifier">filename</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@tree</span>.<span class="ruby-identifier">name</span> - ) - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">not_found!</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Commit.html b/doc/code/classes/Commit.html deleted file mode 100644 index 15369b8981a..00000000000 --- a/doc/code/classes/Commit.html +++ /dev/null @@ -1,1077 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Commit</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Commit - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/models/commit_rb.html">app/models/commit.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-author_email">author_email</a>, - </li> - - - <li> - <a href="#method-i-author_name">author_name</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-commits">commits</a>, - </li> - - - <li> - <a href="#method-c-commits_between">commits_between</a>, - </li> - - - <li> - <a href="#method-c-commits_since">commits_since</a>, - </li> - - - <li> - <a href="#method-c-commits_with_refs">commits_with_refs</a>, - </li> - - - <li> - <a href="#method-i-committer_email">committer_email</a>, - </li> - - - <li> - <a href="#method-i-committer_name">committer_name</a>, - </li> - - - <li> - <a href="#method-c-compare">compare</a>, - </li> - - - <li> - <a href="#method-i-created_at">created_at</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-different_committer-3F">different_committer?</a> - </li> - - </ul> - </dd> - - <dt>F</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-find_or_first">find_or_first</a>, - </li> - - - <li> - <a href="#method-c-fresh_commits">fresh_commits</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-new">new</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-parents_count">parents_count</a>, - </li> - - - <li> - <a href="#method-i-prev_commit">prev_commit</a>, - </li> - - - <li> - <a href="#method-i-prev_commit_id">prev_commit_id</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-safe_message">safe_message</a>, - </li> - - - <li> - <a href="#method-i-short_id">short_id</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_diff">to_diff</a> - </li> - - </ul> - </dd> - - </dl> - - - - <!-- Includes --> - <div class="sectiontitle">Included Modules</div> - <ul> - - <li> - - ActiveModel::Conversion - - </li> - - <li> - - <a href="StaticModel.html"> - StaticModel - </a> - - </li> - - </ul> - - - - - - - - - - - - <!-- Section constants --> - <div class="sectiontitle">Constants</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class="attr-name">DIFF_SAFE_SIZE</td> - <td>=</td> - <td class="attr-value">100</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"><p>Safe amount of files with diffs in one commit to render Used to prevent 500 -error on huge commits by suppressing diff</p></td> - </tr> - - - </table> - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>commit</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>head</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>refs</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-commits"> - - <b>commits</b>(repo, ref, path = nil, limit = nil, offset = nil) - - <a href="../classes/Commit.html#method-c-commits" name="method-c-commits" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-commits_source')" id="l_method-c-commits_source">show</a> - - </p> - <div id="method-c-commits_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/commit.rb, line 62</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commits</span>(<span class="ruby-identifier">repo</span>, <span class="ruby-identifier">ref</span>, <span class="ruby-identifier">path</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">limit</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">offset</span> = <span class="ruby-keyword">nil</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">path</span> - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">log</span>(<span class="ruby-identifier">ref</span>, <span class="ruby-identifier">path</span>, <span class="ruby-identifier">max_count</span><span class="ruby-operator">:</span> <span class="ruby-identifier">limit</span>, <span class="ruby-identifier">skip</span><span class="ruby-operator">:</span> <span class="ruby-identifier">offset</span>) - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">limit</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">offset</span> - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">commits</span>(<span class="ruby-identifier">ref</span>, <span class="ruby-identifier">limit</span>, <span class="ruby-identifier">offset</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">commits</span>(<span class="ruby-identifier">ref</span>) - <span class="ruby-keyword">end</span>.<span class="ruby-identifier">map</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-constant">Commit</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">c</span>) } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-commits_between"> - - <b>commits_between</b>(repo, from, to) - - <a href="../classes/Commit.html#method-c-commits_between" name="method-c-commits_between" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-commits_between_source')" id="l_method-c-commits_between_source">show</a> - - </p> - <div id="method-c-commits_between_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/commit.rb, line 72</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commits_between</span>(<span class="ruby-identifier">repo</span>, <span class="ruby-identifier">from</span>, <span class="ruby-identifier">to</span>) - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">commits_between</span>(<span class="ruby-identifier">from</span>, <span class="ruby-identifier">to</span>).<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-constant">Commit</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">c</span>) } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-commits_since"> - - <b>commits_since</b>(repo, date) - - <a href="../classes/Commit.html#method-c-commits_since" name="method-c-commits_since" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-commits_since_source')" id="l_method-c-commits_since_source">show</a> - - </p> - <div id="method-c-commits_since_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/commit.rb, line 50</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commits_since</span>(<span class="ruby-identifier">repo</span>, <span class="ruby-identifier">date</span>) - <span class="ruby-identifier">commits</span> = <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">heads</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">h</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">log</span>(<span class="ruby-identifier">h</span>.<span class="ruby-identifier">name</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">since</span><span class="ruby-operator">:</span> <span class="ruby-identifier">date</span>).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-constant">Commit</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">c</span>, <span class="ruby-identifier">h</span>) } - <span class="ruby-keyword">end</span>.<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">uniq</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">id</span> } - - <span class="ruby-identifier">commits</span>.<span class="ruby-identifier">sort!</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">y</span>.<span class="ruby-identifier">committed_date</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">committed_date</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">commits</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-commits_with_refs"> - - <b>commits_with_refs</b>(repo, n = 20) - - <a href="../classes/Commit.html#method-c-commits_with_refs" name="method-c-commits_with_refs" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-commits_with_refs_source')" id="l_method-c-commits_with_refs_source">show</a> - - </p> - <div id="method-c-commits_with_refs_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/commit.rb, line 40</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commits_with_refs</span>(<span class="ruby-identifier">repo</span>, <span class="ruby-identifier">n</span> = <span class="ruby-number">20</span>) - <span class="ruby-identifier">commits</span> = <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">branches</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">ref</span><span class="ruby-operator">|</span> <span class="ruby-constant">Commit</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">commit</span>, <span class="ruby-identifier">ref</span>) } - - <span class="ruby-identifier">commits</span>.<span class="ruby-identifier">sort!</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">y</span>.<span class="ruby-identifier">committed_date</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">committed_date</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">commits</span>[<span class="ruby-number">0</span><span class="ruby-operator">..</span><span class="ruby-identifier">n</span>] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-compare"> - - <b>compare</b>(project, from, to) - - <a href="../classes/Commit.html#method-c-compare" name="method-c-compare" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-compare_source')" id="l_method-c-compare_source">show</a> - - </p> - <div id="method-c-compare_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/commit.rb, line 76</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">compare</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">from</span>, <span class="ruby-identifier">to</span>) - <span class="ruby-identifier">result</span> = { - <span class="ruby-identifier">commits</span><span class="ruby-operator">:</span> [], - <span class="ruby-identifier">diffs</span><span class="ruby-operator">:</span> [], - <span class="ruby-identifier">commit</span><span class="ruby-operator">:</span> <span class="ruby-keyword">nil</span>, - <span class="ruby-identifier">same</span><span class="ruby-operator">:</span> <span class="ruby-keyword">false</span> - } - - <span class="ruby-keyword">return</span> <span class="ruby-identifier">result</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">from</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">to</span> - - <span class="ruby-identifier">first</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">commit</span>(<span class="ruby-identifier">to</span>.<span class="ruby-identifier">try</span>(<span class="ruby-value">:strip</span>)) - <span class="ruby-identifier">last</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">commit</span>(<span class="ruby-identifier">from</span>.<span class="ruby-identifier">try</span>(<span class="ruby-value">:strip</span>)) - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">first</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">last</span> - <span class="ruby-identifier">result</span>[<span class="ruby-value">:same</span>] = (<span class="ruby-identifier">first</span>.<span class="ruby-identifier">id</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">last</span>.<span class="ruby-identifier">id</span>) - <span class="ruby-identifier">result</span>[<span class="ruby-value">:commits</span>] = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">repo</span>.<span class="ruby-identifier">commits_between</span>(<span class="ruby-identifier">last</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">first</span>.<span class="ruby-identifier">id</span>).<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-constant">Commit</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">c</span>)} - <span class="ruby-identifier">result</span>[<span class="ruby-value">:diffs</span>] = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">repo</span>.<span class="ruby-identifier">diff</span>(<span class="ruby-identifier">last</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">first</span>.<span class="ruby-identifier">id</span>) <span class="ruby-keyword">rescue</span> [] - <span class="ruby-identifier">result</span>[<span class="ruby-value">:commit</span>] = <span class="ruby-constant">Commit</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">first</span>) - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">result</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-find_or_first"> - - <b>find_or_first</b>(repo, commit_id = nil, root_ref) - - <a href="../classes/Commit.html#method-c-find_or_first" name="method-c-find_or_first" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-find_or_first_source')" id="l_method-c-find_or_first_source">show</a> - - </p> - <div id="method-c-find_or_first_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/commit.rb, line 18</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">find_or_first</span>(<span class="ruby-identifier">repo</span>, <span class="ruby-identifier">commit_id</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">root_ref</span>) - <span class="ruby-identifier">commit</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">commit_id</span> - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">commit</span>(<span class="ruby-identifier">commit_id</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">commits</span>(<span class="ruby-identifier">root_ref</span>).<span class="ruby-identifier">first</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-constant">Commit</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">commit</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">commit</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-fresh_commits"> - - <b>fresh_commits</b>(repo, n = 10) - - <a href="../classes/Commit.html#method-c-fresh_commits" name="method-c-fresh_commits" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-fresh_commits_source')" id="l_method-c-fresh_commits_source">show</a> - - </p> - <div id="method-c-fresh_commits_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/commit.rb, line 28</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">fresh_commits</span>(<span class="ruby-identifier">repo</span>, <span class="ruby-identifier">n</span> = <span class="ruby-number">10</span>) - <span class="ruby-identifier">commits</span> = <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">heads</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">h</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">commits</span>(<span class="ruby-identifier">h</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">n</span>).<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-constant">Commit</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">c</span>, <span class="ruby-identifier">h</span>) } - <span class="ruby-keyword">end</span>.<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">uniq</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">id</span> } - - <span class="ruby-identifier">commits</span>.<span class="ruby-identifier">sort!</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">y</span>.<span class="ruby-identifier">committed_date</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">committed_date</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">commits</span>[<span class="ruby-number">0</span><span class="ruby-operator">...</span><span class="ruby-identifier">n</span>] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-new"> - - <b>new</b>(raw_commit, head = nil) - - <a href="../classes/Commit.html#method-c-new" name="method-c-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a> - - </p> - <div id="method-c-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/commit.rb, line 100</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span>(<span class="ruby-identifier">raw_commit</span>, <span class="ruby-identifier">head</span> = <span class="ruby-keyword">nil</span>) - <span class="ruby-ivar">@commit</span> = <span class="ruby-identifier">raw_commit</span> - <span class="ruby-ivar">@head</span> = <span class="ruby-identifier">head</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-author_email"> - - <b>author_email</b>() - - <a href="../classes/Commit.html#method-i-author_email" name="method-i-author_email" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-author_email_source')" id="l_method-i-author_email_source">show</a> - - </p> - <div id="method-i-author_email_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/commit.rb, line 117</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">author_email</span> - <span class="ruby-identifier">author</span>.<span class="ruby-identifier">email</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-author_name"> - - <b>author_name</b>() - - <a href="../classes/Commit.html#method-i-author_name" name="method-i-author_name" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-author_name_source')" id="l_method-i-author_name_source">show</a> - - </p> - <div id="method-i-author_name_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/commit.rb, line 121</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">author_name</span> - <span class="ruby-identifier">author</span>.<span class="ruby-identifier">name</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-committer_email"> - - <b>committer_email</b>() - - <a href="../classes/Commit.html#method-i-committer_email" name="method-i-committer_email" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-committer_email_source')" id="l_method-i-committer_email_source">show</a> - - </p> - <div id="method-i-committer_email_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/commit.rb, line 134</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">committer_email</span> - <span class="ruby-identifier">committer</span>.<span class="ruby-identifier">email</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-committer_name"> - - <b>committer_name</b>() - - <a href="../classes/Commit.html#method-i-committer_name" name="method-i-committer_name" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-committer_name_source')" id="l_method-i-committer_name_source">show</a> - - </p> - <div id="method-i-committer_name_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/commit.rb, line 130</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">committer_name</span> - <span class="ruby-identifier">committer</span>.<span class="ruby-identifier">name</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-created_at"> - - <b>created_at</b>() - - <a href="../classes/Commit.html#method-i-created_at" name="method-i-created_at" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-created_at_source')" id="l_method-i-created_at_source">show</a> - - </p> - <div id="method-i-created_at_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/commit.rb, line 113</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">created_at</span> - <span class="ruby-identifier">committed_date</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-different_committer-3F"> - - <b>different_committer?</b>() - - <a href="../classes/Commit.html#method-i-different_committer-3F" name="method-i-different_committer-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Was this commit committed by a different person than the original author?</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-different_committer-3F_source')" id="l_method-i-different_committer-3F_source">show</a> - - </p> - <div id="method-i-different_committer-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/commit.rb, line 126</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">different_committer?</span> - <span class="ruby-identifier">author_name</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">committer_name</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">author_email</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">committer_email</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-parents_count"> - - <b>parents_count</b>() - - <a href="../classes/Commit.html#method-i-parents_count" name="method-i-parents_count" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-parents_count_source')" id="l_method-i-parents_count_source">show</a> - - </p> - <div id="method-i-parents_count_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/commit.rb, line 146</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">parents_count</span> - <span class="ruby-identifier">parents</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">parents</span>.<span class="ruby-identifier">count</span> <span class="ruby-operator">||</span> <span class="ruby-number">0</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-prev_commit"> - - <b>prev_commit</b>() - - <a href="../classes/Commit.html#method-i-prev_commit" name="method-i-prev_commit" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-prev_commit_source')" id="l_method-i-prev_commit_source">show</a> - - </p> - <div id="method-i-prev_commit_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/commit.rb, line 138</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">prev_commit</span> - <span class="ruby-identifier">parents</span>.<span class="ruby-identifier">try</span> <span class="ruby-value">:first</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-prev_commit_id"> - - <b>prev_commit_id</b>() - - <a href="../classes/Commit.html#method-i-prev_commit_id" name="method-i-prev_commit_id" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-prev_commit_id_source')" id="l_method-i-prev_commit_id_source">show</a> - - </p> - <div id="method-i-prev_commit_id_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/commit.rb, line 142</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">prev_commit_id</span> - <span class="ruby-identifier">prev_commit</span>.<span class="ruby-identifier">try</span> <span class="ruby-value">:id</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-safe_message"> - - <b>safe_message</b>() - - <a href="../classes/Commit.html#method-i-safe_message" name="method-i-safe_message" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-safe_message_source')" id="l_method-i-safe_message_source">show</a> - - </p> - <div id="method-i-safe_message_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/commit.rb, line 109</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">safe_message</span> - <span class="ruby-ivar">@safe_message</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">message</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-short_id"> - - <b>short_id</b>(length = 10) - - <a href="../classes/Commit.html#method-i-short_id" name="method-i-short_id" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-short_id_source')" id="l_method-i-short_id_source">show</a> - - </p> - <div id="method-i-short_id_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/commit.rb, line 105</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">short_id</span>(<span class="ruby-identifier">length</span> = <span class="ruby-number">10</span>) - <span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_s</span>[<span class="ruby-number">0</span><span class="ruby-operator">..</span><span class="ruby-identifier">length</span>] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_diff"> - - <b>to_diff</b>() - - <a href="../classes/Commit.html#method-i-to_diff" name="method-i-to_diff" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Shows the diff between the commit’s parent and the commit.</p> - -<p>Cuts out the header and stats from to_patch and returns only the diff.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_diff_source')" id="l_method-i-to_diff_source">show</a> - - </p> - <div id="method-i-to_diff_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/commit.rb, line 153</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_diff</span> - <span class="ruby-comment"># see Grit::Commit#show</span> - <span class="ruby-identifier">patch</span> = <span class="ruby-identifier">to_patch</span> - - <span class="ruby-comment"># discard lines before the diff</span> - <span class="ruby-identifier">lines</span> = <span class="ruby-identifier">patch</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">"\n"</span>) - <span class="ruby-keyword">while</span> <span class="ruby-operator">!</span><span class="ruby-identifier">lines</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">start_with?</span>(<span class="ruby-string">"diff --git"</span>) <span class="ruby-keyword">do</span> - <span class="ruby-identifier">lines</span>.<span class="ruby-identifier">shift</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">lines</span>.<span class="ruby-identifier">pop</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">lines</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">%r^[\d.]+$/</span> <span class="ruby-comment"># Git version</span> - <span class="ruby-identifier">lines</span>.<span class="ruby-identifier">pop</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">lines</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">==</span> <span class="ruby-string">"-- "</span> <span class="ruby-comment"># end of diff</span> - <span class="ruby-identifier">lines</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">"\n"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/CommitController.html b/doc/code/classes/CommitController.html deleted file mode 100644 index 5f0bbe9e9f3..00000000000 --- a/doc/code/classes/CommitController.html +++ /dev/null @@ -1,160 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>CommitController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - CommitController - - <span class="parent">< - - <a href="ProjectResourceController.html">ProjectResourceController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/commit_controller_rb.html">app/controllers/commit_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>Controller for a specific <a href="Commit.html">Commit</a></p> - -<p>Not to be confused with <a -href="CommitsController.html">CommitsController</a>, plural.</p> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-show">show</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-show"> - - <b>show</b>() - - <a href="../classes/CommitController.html#method-i-show" name="method-i-show" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a> - - </p> - <div id="method-i-show_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/commit_controller.rb, line 10</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span> - <span class="ruby-identifier">result</span> = <span class="ruby-constant">CommitLoadContext</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">current_user</span>, <span class="ruby-identifier">params</span>).<span class="ruby-identifier">execute</span> - - <span class="ruby-ivar">@commit</span> = <span class="ruby-identifier">result</span>[<span class="ruby-value">:commit</span>] - <span class="ruby-identifier">git_not_found!</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@commit</span> - - <span class="ruby-ivar">@suppress_diff</span> = <span class="ruby-identifier">result</span>[<span class="ruby-value">:suppress_diff</span>] - <span class="ruby-ivar">@note</span> = <span class="ruby-identifier">result</span>[<span class="ruby-value">:note</span>] - <span class="ruby-ivar">@line_notes</span> = <span class="ruby-identifier">result</span>[<span class="ruby-value">:line_notes</span>] - <span class="ruby-ivar">@notes_count</span> = <span class="ruby-identifier">result</span>[<span class="ruby-value">:notes_count</span>] - <span class="ruby-ivar">@comments_allowed</span> = <span class="ruby-keyword">true</span> - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> <span class="ruby-keyword">do</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">result</span>[<span class="ruby-value">:status</span>] <span class="ruby-operator">==</span> <span class="ruby-value">:huge_commit</span> - <span class="ruby-identifier">render</span> <span class="ruby-string">"huge_commit"</span> <span class="ruby-keyword">and</span> <span class="ruby-keyword">return</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">diff</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">text</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@commit</span>.<span class="ruby-identifier">to_diff</span> } - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">patch</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">text</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@commit</span>.<span class="ruby-identifier">to_patch</span> } - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/CommitDecorator.html b/doc/code/classes/CommitDecorator.html deleted file mode 100644 index 9063057850c..00000000000 --- a/doc/code/classes/CommitDecorator.html +++ /dev/null @@ -1,472 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>CommitDecorator</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - CommitDecorator - - <span class="parent">< - - <a href="ApplicationDecorator.html">ApplicationDecorator</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/decorators/commit_decorator_rb.html">app/decorators/commit_decorator.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-author_link">author_link</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-committer_link">committer_link</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-description">description</a> - </li> - - </ul> - </dd> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-link_title">link_title</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-no_commit_message">no_commit_message</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-person_link">person_link</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-title">title</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-author_link"> - - <b>author_link</b>(options = {}) - - <a href="../classes/CommitDecorator.html#method-i-author_link" name="method-i-author_link" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Returns a link to the commit author. If the author has a matching user and -is a member of the current @project it will link to the team member page. -Otherwise it will link to the author email as specified in the commit.</p> - -<p>options:</p> - -<pre>avatar: true will prepend the avatar image -size: size of the avatar image in px</pre> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-author_link_source')" id="l_method-i-author_link_source">show</a> - - </p> - <div id="method-i-author_link_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/decorators/commit_decorator.rb, line 52</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">author_link</span>(<span class="ruby-identifier">options</span> = {}) - <span class="ruby-identifier">person_link</span>(<span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge</span> <span class="ruby-identifier">source</span><span class="ruby-operator">:</span> <span class="ruby-value">:author</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-committer_link"> - - <b>committer_link</b>(options = {}) - - <a href="../classes/CommitDecorator.html#method-i-committer_link" name="method-i-committer_link" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Just like <a -href="CommitDecorator.html#method-i-author_link">author_link</a> but for -the committer.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-committer_link_source')" id="l_method-i-committer_link_source">show</a> - - </p> - <div id="method-i-committer_link_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/decorators/commit_decorator.rb, line 57</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">committer_link</span>(<span class="ruby-identifier">options</span> = {}) - <span class="ruby-identifier">person_link</span>(<span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge</span> <span class="ruby-identifier">source</span><span class="ruby-operator">:</span> <span class="ruby-value">:committer</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-description"> - - <b>description</b>() - - <a href="../classes/CommitDecorator.html#method-i-description" name="method-i-description" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Returns the commits description</p> - -<p>cut off, ellipses (`&hellp;`) are prepended to the commit message.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-description_source')" id="l_method-i-description_source">show</a> - - </p> - <div id="method-i-description_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/decorators/commit_decorator.rb, line 34</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">description</span> - <span class="ruby-identifier">description</span> = <span class="ruby-identifier">safe_message</span> - - <span class="ruby-identifier">title_end</span> = <span class="ruby-identifier">description</span>.<span class="ruby-identifier">index</span>(<span class="ruby-regexp">%r\n/</span>) - <span class="ruby-keyword">if</span> (<span class="ruby-operator">!</span><span class="ruby-identifier">title_end</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">description</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">></span> <span class="ruby-number">80</span>) <span class="ruby-operator">||</span> (<span class="ruby-identifier">title_end</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">title_end</span> <span class="ruby-operator">></span> <span class="ruby-number">80</span>) - <span class="ruby-string">"&hellip;"</span>.<span class="ruby-identifier">html_safe</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">description</span>[<span class="ruby-number">70</span><span class="ruby-operator">..</span><span class="ruby-number">-1</span>] - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">description</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp">%r\n/</span>, <span class="ruby-number">2</span>)[<span class="ruby-number">1</span>].<span class="ruby-identifier">try</span>(<span class="ruby-value">:chomp</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-link_title"> - - <b>link_title</b>() - - <a href="../classes/CommitDecorator.html#method-i-link_title" name="method-i-link_title" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Returns a string describing the commit for use in a link title</p> - -<p>Example</p> - -<pre>"Commit: Alex Denisov - Project git clone panel"</pre> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-link_title_source')" id="l_method-i-link_title_source">show</a> - - </p> - <div id="method-i-link_title_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/decorators/commit_decorator.rb, line 9</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">link_title</span> - <span class="ruby-node">"Commit: #{author_name} - #{title}"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-title"> - - <b>title</b>() - - <a href="../classes/CommitDecorator.html#method-i-title" name="method-i-title" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Returns the commits title.</p> - -<p>Usually, the commit title is the first line of the commit message. In case -this first line is longer than 80 characters, it is cut off after 70 -characters and ellipses (`&hellp;`) are appended.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-title_source')" id="l_method-i-title_source">show</a> - - </p> - <div id="method-i-title_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/decorators/commit_decorator.rb, line 18</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">title</span> - <span class="ruby-identifier">title</span> = <span class="ruby-identifier">safe_message</span> - - <span class="ruby-keyword">return</span> <span class="ruby-identifier">no_commit_message</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">title</span>.<span class="ruby-identifier">blank?</span> - - <span class="ruby-identifier">title_end</span> = <span class="ruby-identifier">title</span>.<span class="ruby-identifier">index</span>(<span class="ruby-regexp">%r\n/</span>) - <span class="ruby-keyword">if</span> (<span class="ruby-operator">!</span><span class="ruby-identifier">title_end</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">title</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">></span> <span class="ruby-number">80</span>) <span class="ruby-operator">||</span> (<span class="ruby-identifier">title_end</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">title_end</span> <span class="ruby-operator">></span> <span class="ruby-number">80</span>) - <span class="ruby-identifier">title</span>[<span class="ruby-number">0</span><span class="ruby-operator">..</span><span class="ruby-number">69</span>] <span class="ruby-operator"><<</span> <span class="ruby-string">"&hellip;"</span>.<span class="ruby-identifier">html_safe</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">title</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp">%r\n/</span>, <span class="ruby-number">2</span>).<span class="ruby-identifier">first</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-no_commit_message"> - - <b>no_commit_message</b>() - - <a href="../classes/CommitDecorator.html#method-i-no_commit_message" name="method-i-no_commit_message" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-no_commit_message_source')" id="l_method-i-no_commit_message_source">show</a> - - </p> - <div id="method-i-no_commit_message_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/decorators/commit_decorator.rb, line 63</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">no_commit_message</span> - <span class="ruby-string">"--no commit message"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-person_link"> - - <b>person_link</b>(options = {}) - - <a href="../classes/CommitDecorator.html#method-i-person_link" name="method-i-person_link" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Private: Returns a link to a person. If the person has a matching user and -is a member of the current @project it will link to the team member page. -Otherwise it will link to the person email as specified in the commit.</p> - -<p>options:</p> - -<pre>source: one of :author or :committer -avatar: true will prepend the avatar image -size: size of the avatar image in px</pre> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-person_link_source')" id="l_method-i-person_link_source">show</a> - - </p> - <div id="method-i-person_link_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/decorators/commit_decorator.rb, line 75</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">person_link</span>(<span class="ruby-identifier">options</span> = {}) - <span class="ruby-identifier">source_name</span> = <span class="ruby-identifier">send</span> <span class="ruby-node">"#{options[:source]}_name"</span>.<span class="ruby-identifier">to_sym</span> - <span class="ruby-identifier">source_email</span> = <span class="ruby-identifier">send</span> <span class="ruby-node">"#{options[:source]}_email"</span>.<span class="ruby-identifier">to_sym</span> - <span class="ruby-identifier">text</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:avatar</span>] - <span class="ruby-identifier">avatar</span> = <span class="ruby-identifier">h</span>.<span class="ruby-identifier">image_tag</span> <span class="ruby-identifier">h</span>.<span class="ruby-identifier">gravatar_icon</span>(<span class="ruby-identifier">source_email</span>, <span class="ruby-identifier">options</span>[<span class="ruby-value">:size</span>]), <span class="ruby-keyword">class</span><span class="ruby-operator">:</span> <span class="ruby-node">"avatar #{"s#{options[:size]}" if options[:size]}"</span>, <span class="ruby-keyword ruby-title">width</span><span class="ruby-operator">:</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:size</span>], <span class="ruby-identifier">alt</span><span class="ruby-operator">:</span> <span class="ruby-string">""</span> - <span class="ruby-node">%Q{#{avatar} <span class="commit-#{options[:source]}-name">#{source_name}</span>}</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">source_name</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">team_member</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">try</span>(<span class="ruby-value">:team_member_by_name_or_email</span>, <span class="ruby-identifier">source_name</span>, <span class="ruby-identifier">source_email</span>) - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">team_member</span>.<span class="ruby-identifier">nil?</span> - <span class="ruby-identifier">h</span>.<span class="ruby-identifier">mail_to</span> <span class="ruby-identifier">source_email</span>, <span class="ruby-identifier">text</span>.<span class="ruby-identifier">html_safe</span>, <span class="ruby-keyword">class</span><span class="ruby-operator">:</span> <span class="ruby-node">"commit-#{options[:source]}-link"</span> - <span class="ruby-keyword ruby-title">else</span> - <span class="ruby-identifier">h</span>.<span class="ruby-identifier">link_to</span> <span class="ruby-identifier">text</span>, <span class="ruby-identifier">h</span>.<span class="ruby-identifier">project_team_member_path</span>(<span class="ruby-ivar">@project</span>, <span class="ruby-identifier">team_member</span>), <span class="ruby-keyword">class</span><span class="ruby-operator">:</span> <span class="ruby-node">"commit-#{options[:source]}-link"</span> - <span class="ruby-keyword ruby-title">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/CommitLoadContext.html b/doc/code/classes/CommitLoadContext.html deleted file mode 100644 index 82c04febe6b..00000000000 --- a/doc/code/classes/CommitLoadContext.html +++ /dev/null @@ -1,159 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>CommitLoadContext</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - CommitLoadContext - - <span class="parent">< - - <a href="BaseContext.html">BaseContext</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/contexts/commit_load_context_rb.html">app/contexts/commit_load_context.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-execute">execute</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-execute"> - - <b>execute</b>() - - <a href="../classes/CommitLoadContext.html#method-i-execute" name="method-i-execute" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-execute_source')" id="l_method-i-execute_source">show</a> - - </p> - <div id="method-i-execute_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/contexts/commit_load_context.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">execute</span> - <span class="ruby-identifier">result</span> = { - <span class="ruby-identifier">commit</span><span class="ruby-operator">:</span> <span class="ruby-keyword">nil</span>, - <span class="ruby-identifier">suppress_diff</span><span class="ruby-operator">:</span> <span class="ruby-keyword">false</span>, - <span class="ruby-identifier">line_notes</span><span class="ruby-operator">:</span> [], - <span class="ruby-identifier">notes_count</span><span class="ruby-operator">:</span> <span class="ruby-number">0</span>, - <span class="ruby-identifier">note</span><span class="ruby-operator">:</span> <span class="ruby-keyword">nil</span>, - <span class="ruby-identifier">status</span><span class="ruby-operator">:</span> <span class="ruby-value">:ok</span> - } - - <span class="ruby-identifier">commit</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">commit</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">commit</span> - <span class="ruby-identifier">commit</span> = <span class="ruby-constant">CommitDecorator</span>.<span class="ruby-identifier">decorate</span>(<span class="ruby-identifier">commit</span>) - <span class="ruby-identifier">line_notes</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">commit_line_notes</span>(<span class="ruby-identifier">commit</span>) - - <span class="ruby-identifier">result</span>[<span class="ruby-value">:commit</span>] = <span class="ruby-identifier">commit</span> - <span class="ruby-identifier">result</span>[<span class="ruby-value">:note</span>] = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">build_commit_note</span>(<span class="ruby-identifier">commit</span>) - <span class="ruby-identifier">result</span>[<span class="ruby-value">:line_notes</span>] = <span class="ruby-identifier">line_notes</span> - <span class="ruby-identifier">result</span>[<span class="ruby-value">:notes_count</span>] = <span class="ruby-identifier">line_notes</span>.<span class="ruby-identifier">count</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">project</span>.<span class="ruby-identifier">commit_notes</span>(<span class="ruby-identifier">commit</span>).<span class="ruby-identifier">count</span> - - <span class="ruby-keyword">begin</span> - <span class="ruby-identifier">result</span>[<span class="ruby-value">:suppress_diff</span>] = <span class="ruby-keyword">true</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">commit</span>.<span class="ruby-identifier">diffs</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">></span> <span class="ruby-constant">Commit</span><span class="ruby-operator">::</span><span class="ruby-constant">DIFF_SAFE_SIZE</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">params</span>[<span class="ruby-value">:force_show_diff</span>] - <span class="ruby-keyword">rescue</span> <span class="ruby-constant">Grit</span><span class="ruby-operator">::</span><span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">GitTimeout</span> - <span class="ruby-identifier">result</span>[<span class="ruby-value">:suppress_diff</span>] = <span class="ruby-keyword">true</span> - <span class="ruby-identifier">result</span>[<span class="ruby-value">:status</span>] = <span class="ruby-value">:huge_commit</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">result</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/CommitsController.html b/doc/code/classes/CommitsController.html deleted file mode 100644 index 53d329673f8..00000000000 --- a/doc/code/classes/CommitsController.html +++ /dev/null @@ -1,155 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>CommitsController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - CommitsController - - <span class="parent">< - - <a href="ProjectResourceController.html">ProjectResourceController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/commits_controller_rb.html">app/controllers/commits_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-show">show</a> - </li> - - </ul> - </dd> - - </dl> - - - - <!-- Includes --> - <div class="sectiontitle">Included Modules</div> - <ul> - - <li> - - <a href="ExtractsPath.html"> - ExtractsPath - </a> - - </li> - - </ul> - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-show"> - - <b>show</b>() - - <a href="../classes/CommitsController.html#method-i-show" name="method-i-show" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a> - - </p> - <div id="method-i-show_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/commits_controller.rb, line 11</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span> - <span class="ruby-ivar">@repo</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">repo</span> - <span class="ruby-ivar">@limit</span>, <span class="ruby-ivar">@offset</span> = (<span class="ruby-identifier">params</span>[<span class="ruby-value">:limit</span>] <span class="ruby-operator">||</span> <span class="ruby-number">40</span>), (<span class="ruby-identifier">params</span>[<span class="ruby-value">:offset</span>] <span class="ruby-operator">||</span> <span class="ruby-number">0</span>) - - <span class="ruby-ivar">@commits</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">commits</span>(<span class="ruby-ivar">@ref</span>, <span class="ruby-ivar">@path</span>, <span class="ruby-ivar">@limit</span>, <span class="ruby-ivar">@offset</span>) - <span class="ruby-ivar">@commits</span> = <span class="ruby-constant">CommitDecorator</span>.<span class="ruby-identifier">decorate</span>(<span class="ruby-ivar">@commits</span>) - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> <span class="ruby-comment"># index.html.erb</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">atom</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">layout</span><span class="ruby-operator">:</span> <span class="ruby-keyword">false</span> } - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/CommitsHelper.html b/doc/code/classes/CommitsHelper.html deleted file mode 100644 index 4e4addfb8ac..00000000000 --- a/doc/code/classes/CommitsHelper.html +++ /dev/null @@ -1,409 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>CommitsHelper</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - CommitsHelper - - </h1> - <ul class="files"> - - <li><a href="../files/app/helpers/commits_helper_rb.html">app/helpers/commits_helper.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>B</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-build_line_anchor">build_line_anchor</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-commit_to_html">commit_to_html</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-diff_line_content">diff_line_content</a> - </li> - - </ul> - </dd> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-each_diff_line">each_diff_line</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-identification_type">identification_type</a>, - </li> - - - <li> - <a href="#method-i-image_diff_class">image_diff_class</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-build_line_anchor"> - - <b>build_line_anchor</b>(index, line_new, line_old) - - <a href="../classes/CommitsHelper.html#method-i-build_line_anchor" name="method-i-build_line_anchor" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-build_line_anchor_source')" id="l_method-i-build_line_anchor_source">show</a> - - </p> - <div id="method-i-build_line_anchor_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/commits_helper.rb, line 12</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">build_line_anchor</span>(<span class="ruby-identifier">index</span>, <span class="ruby-identifier">line_new</span>, <span class="ruby-identifier">line_old</span>) - <span class="ruby-node">"#{index}_#{line_old}_#{line_new}"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-commit_to_html"> - - <b>commit_to_html</b>(commit) - - <a href="../classes/CommitsHelper.html#method-i-commit_to_html" name="method-i-commit_to_html" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-commit_to_html_source')" id="l_method-i-commit_to_html_source">show</a> - - </p> - <div id="method-i-commit_to_html_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/commits_helper.rb, line 68</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commit_to_html</span> <span class="ruby-identifier">commit</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">commit</span>.<span class="ruby-identifier">model</span> - <span class="ruby-identifier">escape_javascript</span>(<span class="ruby-identifier">render</span> <span class="ruby-string">'commits/commit'</span>, <span class="ruby-identifier">commit</span><span class="ruby-operator">:</span> <span class="ruby-identifier">commit</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-diff_line_content"> - - <b>diff_line_content</b>(line) - - <a href="../classes/CommitsHelper.html#method-i-diff_line_content" name="method-i-diff_line_content" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-diff_line_content_source')" id="l_method-i-diff_line_content_source">show</a> - - </p> - <div id="method-i-diff_line_content_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/commits_helper.rb, line 74</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">diff_line_content</span>(<span class="ruby-identifier">line</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">blank?</span> - <span class="ruby-string">" &nbsp;"</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">line</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-each_diff_line"> - - <b>each_diff_line</b>(diff_arr, index) - - <a href="../classes/CommitsHelper.html#method-i-each_diff_line" name="method-i-each_diff_line" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-each_diff_line_source')" id="l_method-i-each_diff_line_source">show</a> - - </p> - <div id="method-i-each_diff_line_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/commits_helper.rb, line 16</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">each_diff_line</span>(<span class="ruby-identifier">diff_arr</span>, <span class="ruby-identifier">index</span>) - <span class="ruby-identifier">line_old</span> = <span class="ruby-number">1</span> - <span class="ruby-identifier">line_new</span> = <span class="ruby-number">1</span> - <span class="ruby-identifier">type</span> = <span class="ruby-keyword">nil</span> - - <span class="ruby-identifier">lines_arr</span> = <span class="ruby-operator">::</span><span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">InlineDiff</span>.<span class="ruby-identifier">processing</span> <span class="ruby-identifier">diff_arr</span> - <span class="ruby-identifier">lines_arr</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> - <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp">%r^\-\-\- \/dev\/null/</span>) - <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp">%r^\+\+\+ \/dev\/null/</span>) - <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp">%r^\-\-\- a/</span>) - <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp">%r^\+\+\+ b/</span>) - - <span class="ruby-identifier">full_line</span> = <span class="ruby-identifier">html_escape</span>(<span class="ruby-identifier">line</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp">%r\n/</span>, <span class="ruby-string">''</span>)) - <span class="ruby-identifier">full_line</span> = <span class="ruby-operator">::</span><span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">InlineDiff</span>.<span class="ruby-identifier">replace_markers</span> <span class="ruby-identifier">full_line</span> - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp">%r^@@ -/</span>) - <span class="ruby-identifier">type</span> = <span class="ruby-string">"match"</span> - - <span class="ruby-identifier">line_old</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp">%r\-[0-9]*/</span>)[<span class="ruby-number">0</span>].<span class="ruby-identifier">to_i</span>.<span class="ruby-identifier">abs</span> <span class="ruby-keyword">rescue</span> <span class="ruby-number">0</span> - <span class="ruby-identifier">line_new</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp">%r\+[0-9]*/</span>)[<span class="ruby-number">0</span>].<span class="ruby-identifier">to_i</span>.<span class="ruby-identifier">abs</span> <span class="ruby-keyword">rescue</span> <span class="ruby-number">0</span> - - <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">line_old</span> <span class="ruby-operator">==</span> <span class="ruby-number">1</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">line_new</span> <span class="ruby-operator">==</span> <span class="ruby-number">1</span> <span class="ruby-comment">#top of file</span> - <span class="ruby-keyword">yield</span>(<span class="ruby-identifier">full_line</span>, <span class="ruby-identifier">type</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-keyword">nil</span>) - <span class="ruby-keyword">next</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">type</span> = <span class="ruby-identifier">identification_type</span>(<span class="ruby-identifier">line</span>) - <span class="ruby-identifier">line_code</span> = <span class="ruby-identifier">build_line_anchor</span>(<span class="ruby-identifier">index</span>, <span class="ruby-identifier">line_new</span>, <span class="ruby-identifier">line_old</span>) - <span class="ruby-keyword">yield</span>(<span class="ruby-identifier">full_line</span>, <span class="ruby-identifier">type</span>, <span class="ruby-identifier">line_code</span>, <span class="ruby-identifier">line_new</span>, <span class="ruby-identifier">line_old</span>) - <span class="ruby-keyword">end</span> - - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">line</span>[<span class="ruby-number">0</span>] <span class="ruby-operator">==</span> <span class="ruby-string">"+"</span> - <span class="ruby-identifier">line_new</span> <span class="ruby-operator">+=</span> <span class="ruby-number">1</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">line</span>[<span class="ruby-number">0</span>] <span class="ruby-operator">==</span> <span class="ruby-string">"-"</span> - <span class="ruby-identifier">line_old</span> <span class="ruby-operator">+=</span> <span class="ruby-number">1</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">line_new</span> <span class="ruby-operator">+=</span> <span class="ruby-number">1</span> - <span class="ruby-identifier">line_old</span> <span class="ruby-operator">+=</span> <span class="ruby-number">1</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-identification_type"> - - <b>identification_type</b>(line) - - <a href="../classes/CommitsHelper.html#method-i-identification_type" name="method-i-identification_type" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-identification_type_source')" id="l_method-i-identification_type_source">show</a> - - </p> - <div id="method-i-identification_type_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/commits_helper.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">identification_type</span>(<span class="ruby-identifier">line</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">line</span>[<span class="ruby-number">0</span>] <span class="ruby-operator">==</span> <span class="ruby-string">"+"</span> - <span class="ruby-string">"new"</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">line</span>[<span class="ruby-number">0</span>] <span class="ruby-operator">==</span> <span class="ruby-string">"-"</span> - <span class="ruby-string">"old"</span> - <span class="ruby-keyword">else</span> - <span class="ruby-keyword">nil</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-image_diff_class"> - - <b>image_diff_class</b>(diff) - - <a href="../classes/CommitsHelper.html#method-i-image_diff_class" name="method-i-image_diff_class" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-image_diff_class_source')" id="l_method-i-image_diff_class_source">show</a> - - </p> - <div id="method-i-image_diff_class_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/commits_helper.rb, line 58</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">image_diff_class</span>(<span class="ruby-identifier">diff</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">diff</span>.<span class="ruby-identifier">deleted_file</span> - <span class="ruby-string">"diff_removed"</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">diff</span>.<span class="ruby-identifier">new_file</span> - <span class="ruby-string">"diff_added"</span> - <span class="ruby-keyword">else</span> - <span class="ruby-keyword">nil</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/CompareController.html b/doc/code/classes/CompareController.html deleted file mode 100644 index 3db60f969f4..00000000000 --- a/doc/code/classes/CompareController.html +++ /dev/null @@ -1,232 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>CompareController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - CompareController - - <span class="parent">< - - <a href="ProjectResourceController.html">ProjectResourceController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/compare_controller_rb.html">app/controllers/compare_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-create">create</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-index">index</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-show">show</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-create"> - - <b>create</b>() - - <a href="../classes/CompareController.html#method-i-create" name="method-i-create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-create_source')" id="l_method-i-create_source">show</a> - - </p> - <div id="method-i-create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/compare_controller.rb, line 22</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">create</span> - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">project_compare_path</span>(<span class="ruby-ivar">@project</span>, <span class="ruby-identifier">params</span>[<span class="ruby-value">:from</span>], <span class="ruby-identifier">params</span>[<span class="ruby-value">:to</span>]) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-index"> - - <b>index</b>() - - <a href="../classes/CompareController.html#method-i-index" name="method-i-index" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-index_source')" id="l_method-i-index_source">show</a> - - </p> - <div id="method-i-index_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/compare_controller.rb, line 7</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">index</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-show"> - - <b>show</b>() - - <a href="../classes/CompareController.html#method-i-show" name="method-i-show" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a> - - </p> - <div id="method-i-show_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/compare_controller.rb, line 10</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span> - <span class="ruby-identifier">result</span> = <span class="ruby-constant">Commit</span>.<span class="ruby-identifier">compare</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">params</span>[<span class="ruby-value">:from</span>], <span class="ruby-identifier">params</span>[<span class="ruby-value">:to</span>]) - - <span class="ruby-ivar">@commits</span> = <span class="ruby-identifier">result</span>[<span class="ruby-value">:commits</span>] - <span class="ruby-ivar">@commit</span> = <span class="ruby-identifier">result</span>[<span class="ruby-value">:commit</span>] - <span class="ruby-ivar">@diffs</span> = <span class="ruby-identifier">result</span>[<span class="ruby-value">:diffs</span>] - <span class="ruby-ivar">@refs_are_same</span> = <span class="ruby-identifier">result</span>[<span class="ruby-value">:same</span>] - <span class="ruby-ivar">@line_notes</span> = [] - - <span class="ruby-ivar">@commits</span> = <span class="ruby-constant">CommitDecorator</span>.<span class="ruby-identifier">decorate</span>(<span class="ruby-ivar">@commits</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/DashboardController.html b/doc/code/classes/DashboardController.html deleted file mode 100644 index ae8b126da1c..00000000000 --- a/doc/code/classes/DashboardController.html +++ /dev/null @@ -1,411 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>DashboardController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - DashboardController - - <span class="parent">< - - <a href="ApplicationController.html">ApplicationController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/dashboard_controller_rb.html">app/controllers/dashboard_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-dashboard_filter">dashboard_filter</a> - </li> - - </ul> - </dd> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-event_filter">event_filter</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-index">index</a>, - </li> - - - <li> - <a href="#method-i-issues">issues</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-merge_requests">merge_requests</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-projects">projects</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-index"> - - <b>index</b>() - - <a href="../classes/DashboardController.html#method-i-index" name="method-i-index" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-index_source')" id="l_method-i-index_source">show</a> - - </p> - <div id="method-i-index_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/dashboard_controller.rb, line 7</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">index</span> - <span class="ruby-ivar">@groups</span> = <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">authorized_groups</span> - - <span class="ruby-ivar">@has_authorized_projects</span> = <span class="ruby-ivar">@projects</span>.<span class="ruby-identifier">count</span> <span class="ruby-operator">></span> <span class="ruby-number">0</span> - - <span class="ruby-ivar">@projects</span> = <span class="ruby-keyword">case</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:scope</span>] - <span class="ruby-keyword">when</span> <span class="ruby-string">'personal'</span> <span class="ruby-keyword">then</span> - <span class="ruby-ivar">@projects</span>.<span class="ruby-identifier">personal</span>(<span class="ruby-identifier">current_user</span>) - <span class="ruby-keyword">when</span> <span class="ruby-string">'joined'</span> <span class="ruby-keyword">then</span> - <span class="ruby-ivar">@projects</span>.<span class="ruby-identifier">joined</span>(<span class="ruby-identifier">current_user</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-ivar">@projects</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-ivar">@projects</span> = <span class="ruby-ivar">@projects</span>.<span class="ruby-identifier">page</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:page</span>]).<span class="ruby-identifier">per</span>(<span class="ruby-number">30</span>) - - <span class="ruby-ivar">@events</span> = <span class="ruby-constant">Event</span>.<span class="ruby-identifier">in_projects</span>(<span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">project_ids</span>) - <span class="ruby-ivar">@events</span> = <span class="ruby-ivar">@event_filter</span>.<span class="ruby-identifier">apply_filter</span>(<span class="ruby-ivar">@events</span>) - <span class="ruby-ivar">@events</span> = <span class="ruby-ivar">@events</span>.<span class="ruby-identifier">limit</span>(<span class="ruby-number">20</span>).<span class="ruby-identifier">offset</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:offset</span>] <span class="ruby-operator">||</span> <span class="ruby-number">0</span>) - - <span class="ruby-ivar">@last_push</span> = <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">recent_push</span> - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">atom</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">layout</span><span class="ruby-operator">:</span> <span class="ruby-keyword">false</span> } - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-issues"> - - <b>issues</b>() - - <a href="../classes/DashboardController.html#method-i-issues" name="method-i-issues" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Get only assigned issues</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-issues_source')" id="l_method-i-issues_source">show</a> - - </p> - <div id="method-i-issues_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/dashboard_controller.rb, line 44</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">issues</span> - <span class="ruby-ivar">@issues</span> = <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">assigned_issues</span> - <span class="ruby-ivar">@issues</span> = <span class="ruby-identifier">dashboard_filter</span>(<span class="ruby-ivar">@issues</span>) - <span class="ruby-ivar">@issues</span> = <span class="ruby-ivar">@issues</span>.<span class="ruby-identifier">recent</span>.<span class="ruby-identifier">page</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:page</span>]).<span class="ruby-identifier">per</span>(<span class="ruby-number">20</span>) - <span class="ruby-ivar">@issues</span> = <span class="ruby-ivar">@issues</span>.<span class="ruby-identifier">includes</span>(<span class="ruby-value">:author</span>, <span class="ruby-value">:project</span>) - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">atom</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">layout</span><span class="ruby-operator">:</span> <span class="ruby-keyword">false</span> } - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-merge_requests"> - - <b>merge_requests</b>() - - <a href="../classes/DashboardController.html#method-i-merge_requests" name="method-i-merge_requests" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Get authored or assigned open merge requests</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-merge_requests_source')" id="l_method-i-merge_requests_source">show</a> - - </p> - <div id="method-i-merge_requests_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/dashboard_controller.rb, line 37</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">merge_requests</span> - <span class="ruby-ivar">@merge_requests</span> = <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">cared_merge_requests</span> - <span class="ruby-ivar">@merge_requests</span> = <span class="ruby-identifier">dashboard_filter</span>(<span class="ruby-ivar">@merge_requests</span>) - <span class="ruby-ivar">@merge_requests</span> = <span class="ruby-ivar">@merge_requests</span>.<span class="ruby-identifier">recent</span>.<span class="ruby-identifier">page</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:page</span>]).<span class="ruby-identifier">per</span>(<span class="ruby-number">20</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-dashboard_filter"> - - <b>dashboard_filter</b>(items) - - <a href="../classes/DashboardController.html#method-i-dashboard_filter" name="method-i-dashboard_filter" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-dashboard_filter_source')" id="l_method-i-dashboard_filter_source">show</a> - - </p> - <div id="method-i-dashboard_filter_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/dashboard_controller.rb, line 66</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">dashboard_filter</span> <span class="ruby-identifier">items</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:project_id</span>] - <span class="ruby-identifier">items</span> = <span class="ruby-identifier">items</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">project_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:project_id</span>]) - <span class="ruby-keyword">end</span> - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:search</span>].<span class="ruby-identifier">present?</span> - <span class="ruby-identifier">items</span> = <span class="ruby-identifier">items</span>.<span class="ruby-identifier">search</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:search</span>]) - <span class="ruby-keyword">end</span> - - <span class="ruby-keyword">case</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:status</span>] - <span class="ruby-keyword">when</span> <span class="ruby-string">'closed'</span> - <span class="ruby-identifier">items</span>.<span class="ruby-identifier">closed</span> - <span class="ruby-keyword">when</span> <span class="ruby-string">'all'</span> - <span class="ruby-identifier">items</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">items</span>.<span class="ruby-identifier">opened</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-event_filter"> - - <b>event_filter</b>() - - <a href="../classes/DashboardController.html#method-i-event_filter" name="method-i-event_filter" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-event_filter_source')" id="l_method-i-event_filter_source">show</a> - - </p> - <div id="method-i-event_filter_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/dashboard_controller.rb, line 62</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">event_filter</span> - <span class="ruby-ivar">@event_filter</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">EventFilter</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:event_filter</span>]) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-projects"> - - <b>projects</b>() - - <a href="../classes/DashboardController.html#method-i-projects" name="method-i-projects" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-projects_source')" id="l_method-i-projects_source">show</a> - - </p> - <div id="method-i-projects_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/dashboard_controller.rb, line 58</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">projects</span> - <span class="ruby-ivar">@projects</span> = <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">authorized_projects</span>.<span class="ruby-identifier">sorted_by_activity</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/DashboardHelper.html b/doc/code/classes/DashboardHelper.html deleted file mode 100644 index 6fcb426cf13..00000000000 --- a/doc/code/classes/DashboardHelper.html +++ /dev/null @@ -1,195 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>DashboardHelper</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - DashboardHelper - - </h1> - <ul class="files"> - - <li><a href="../files/app/helpers/dashboard_helper_rb.html">app/helpers/dashboard_helper.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-dashboard_filter_path">dashboard_filter_path</a> - </li> - - </ul> - </dd> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-entities_per_project">entities_per_project</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-dashboard_filter_path"> - - <b>dashboard_filter_path</b>(entity, options={}) - - <a href="../classes/DashboardHelper.html#method-i-dashboard_filter_path" name="method-i-dashboard_filter_path" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-dashboard_filter_path_source')" id="l_method-i-dashboard_filter_path_source">show</a> - - </p> - <div id="method-i-dashboard_filter_path_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/dashboard_helper.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">dashboard_filter_path</span>(<span class="ruby-identifier">entity</span>, <span class="ruby-identifier">options</span>={}) - <span class="ruby-identifier">exist_opts</span> = { - <span class="ruby-identifier">status</span><span class="ruby-operator">:</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:status</span>], - <span class="ruby-identifier">project_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:project_id</span>], - } - - <span class="ruby-identifier">options</span> = <span class="ruby-identifier">exist_opts</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">options</span>) - - <span class="ruby-keyword">case</span> <span class="ruby-identifier">entity</span> - <span class="ruby-keyword">when</span> <span class="ruby-string">'issue'</span> <span class="ruby-keyword">then</span> - <span class="ruby-identifier">dashboard_issues_path</span>(<span class="ruby-identifier">options</span>) - <span class="ruby-keyword">when</span> <span class="ruby-string">'merge_request'</span> - <span class="ruby-identifier">dashboard_merge_requests_path</span>(<span class="ruby-identifier">options</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-entities_per_project"> - - <b>entities_per_project</b>(project, entity) - - <a href="../classes/DashboardHelper.html#method-i-entities_per_project" name="method-i-entities_per_project" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-entities_per_project_source')" id="l_method-i-entities_per_project_source">show</a> - - </p> - <div id="method-i-entities_per_project_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/dashboard_helper.rb, line 18</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">entities_per_project</span> <span class="ruby-identifier">project</span>, <span class="ruby-identifier">entity</span> - <span class="ruby-identifier">items</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">items_for</span>(<span class="ruby-identifier">entity</span>) - - <span class="ruby-identifier">items</span> = <span class="ruby-keyword">case</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:status</span>] - <span class="ruby-keyword">when</span> <span class="ruby-string">'closed'</span> - <span class="ruby-identifier">items</span>.<span class="ruby-identifier">closed</span> - <span class="ruby-keyword">when</span> <span class="ruby-string">'all'</span> - <span class="ruby-identifier">items</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">items</span>.<span class="ruby-identifier">opened</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">items</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">assignee_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">id</span>).<span class="ruby-identifier">count</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/DeployKeysController.html b/doc/code/classes/DeployKeysController.html deleted file mode 100644 index 952d295cded..00000000000 --- a/doc/code/classes/DeployKeysController.html +++ /dev/null @@ -1,332 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>DeployKeysController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - DeployKeysController - - <span class="parent">< - - <a href="ProjectResourceController.html">ProjectResourceController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/deploy_keys_controller_rb.html">app/controllers/deploy_keys_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-create">create</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-destroy">destroy</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-index">index</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-new">new</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-show">show</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-create"> - - <b>create</b>() - - <a href="../classes/DeployKeysController.html#method-i-create" name="method-i-create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-create_source')" id="l_method-i-create_source">show</a> - - </p> - <div id="method-i-create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/deploy_keys_controller.rb, line 21</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">create</span> - <span class="ruby-ivar">@key</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">deploy_keys</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:key</span>]) - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@key</span>.<span class="ruby-identifier">save</span> - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">project_deploy_keys_path</span>(<span class="ruby-ivar">@project</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">render</span> <span class="ruby-string">"new"</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-destroy"> - - <b>destroy</b>() - - <a href="../classes/DeployKeysController.html#method-i-destroy" name="method-i-destroy" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-destroy_source')" id="l_method-i-destroy_source">show</a> - - </p> - <div id="method-i-destroy_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/deploy_keys_controller.rb, line 30</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">destroy</span> - <span class="ruby-ivar">@key</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">deploy_keys</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) - <span class="ruby-ivar">@key</span>.<span class="ruby-identifier">destroy</span> - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> { <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">project_deploy_keys_url</span> } - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">nothing</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span> } - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-index"> - - <b>index</b>() - - <a href="../classes/DeployKeysController.html#method-i-index" name="method-i-index" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-index_source')" id="l_method-i-index_source">show</a> - - </p> - <div id="method-i-index_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/deploy_keys_controller.rb, line 7</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">index</span> - <span class="ruby-ivar">@keys</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">deploy_keys</span>.<span class="ruby-identifier">all</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-new"> - - <b>new</b>() - - <a href="../classes/DeployKeysController.html#method-i-new" name="method-i-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-new_source')" id="l_method-i-new_source">show</a> - - </p> - <div id="method-i-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/deploy_keys_controller.rb, line 15</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">new</span> - <span class="ruby-ivar">@key</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">deploy_keys</span>.<span class="ruby-identifier">new</span> - - <span class="ruby-identifier">respond_with</span>(<span class="ruby-ivar">@key</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-show"> - - <b>show</b>() - - <a href="../classes/DeployKeysController.html#method-i-show" name="method-i-show" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a> - - </p> - <div id="method-i-show_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/deploy_keys_controller.rb, line 11</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span> - <span class="ruby-ivar">@key</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">deploy_keys</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ErrorsController.html b/doc/code/classes/ErrorsController.html deleted file mode 100644 index b03cc04c9bd..00000000000 --- a/doc/code/classes/ErrorsController.html +++ /dev/null @@ -1,131 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ErrorsController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - ErrorsController - - <span class="parent">< - - <a href="ApplicationController.html">ApplicationController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/errors_controller_rb.html">app/controllers/errors_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>G</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-githost">githost</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-githost"> - - <b>githost</b>() - - <a href="../classes/ErrorsController.html#method-i-githost" name="method-i-githost" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-githost_source')" id="l_method-i-githost_source">show</a> - - </p> - <div id="method-i-githost_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/errors_controller.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">githost</span> - <span class="ruby-identifier">render</span> <span class="ruby-string">"errors/gitolite"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Event.html b/doc/code/classes/Event.html deleted file mode 100644 index 608db59979c..00000000000 --- a/doc/code/classes/Event.html +++ /dev/null @@ -1,1266 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Event</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Event - - <span class="parent">< - - ActiveRecord::Base - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/models/event_rb.html">app/models/event.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<h2 id="label-Schema+Information">Schema Information</h2> - -<p>Table name: events</p> - -<pre>id :integer not null, primary key -target_type :string(255) -target_id :integer -title :string(255) -data :text -project_id :integer -created_at :datetime not null -updated_at :datetime not null -action :integer -author_id :integer</pre> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-action_name">action_name</a>, - </li> - - - <li> - <a href="#method-i-author">author</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-changed_issue-3F">changed_issue?</a>, - </li> - - - <li> - <a href="#method-i-changed_merge_request-3F">changed_merge_request?</a>, - </li> - - - <li> - <a href="#method-i-closed-3F">closed?</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-determine_action">determine_action</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-issue">issue</a>, - </li> - - - <li> - <a href="#method-i-issue-3F">issue?</a> - </li> - - </ul> - </dd> - - <dt>J</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-joined-3F">joined?</a> - </li> - - </ul> - </dd> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-left-3F">left?</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-membership_changed-3F">membership_changed?</a>, - </li> - - - <li> - <a href="#method-i-merge_request">merge_request</a>, - </li> - - - <li> - <a href="#method-i-merge_request-3F">merge_request?</a>, - </li> - - - <li> - <a href="#method-i-merged-3F">merged?</a>, - </li> - - - <li> - <a href="#method-i-milestone-3F">milestone?</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-new_issue-3F">new_issue?</a>, - </li> - - - <li> - <a href="#method-i-new_merge_request-3F">new_merge_request?</a>, - </li> - - - <li> - <a href="#method-i-note-3F">note?</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-project_name">project_name</a>, - </li> - - - <li> - <a href="#method-i-proper-3F">proper?</a>, - </li> - - - <li> - <a href="#method-i-push-3F">push?</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-reopened-3F">reopened?</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-target_title">target_title</a> - </li> - - </ul> - </dd> - - </dl> - - - - <!-- Includes --> - <div class="sectiontitle">Included Modules</div> - <ul> - - <li> - - <a href="NoteEvent.html"> - NoteEvent - </a> - - </li> - - <li> - - <a href="PushEvent.html"> - PushEvent - </a> - - </li> - - </ul> - - - - - - - - - - - - <!-- Section constants --> - <div class="sectiontitle">Constants</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class="attr-name">Created</td> - <td>=</td> - <td class="attr-value">1</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">Updated</td> - <td>=</td> - <td class="attr-value">2</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">Closed</td> - <td>=</td> - <td class="attr-value">3</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">Reopened</td> - <td>=</td> - <td class="attr-value">4</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">Pushed</td> - <td>=</td> - <td class="attr-value">5</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">Commented</td> - <td>=</td> - <td class="attr-value">6</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">Merged</td> - <td>=</td> - <td class="attr-value">7</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">Joined</td> - <td>=</td> - <td class="attr-value">8</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">Left</td> - <td>=</td> - <td class="attr-value">9</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - </table> - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-determine_action"> - - <b>determine_action</b>(record) - - <a href="../classes/Event.html#method-c-determine_action" name="method-c-determine_action" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-determine_action_source')" id="l_method-c-determine_action_source">show</a> - - </p> - <div id="method-c-determine_action_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/event.rb, line 53</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">determine_action</span>(<span class="ruby-identifier">record</span>) - <span class="ruby-keyword">if</span> [<span class="ruby-constant">Issue</span>, <span class="ruby-constant">MergeRequest</span>].<span class="ruby-identifier">include?</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">class</span> - <span class="ruby-constant">Event</span><span class="ruby-operator">::</span><span class="ruby-constant">Created</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Note</span> - <span class="ruby-constant">Event</span><span class="ruby-operator">::</span><span class="ruby-constant">Commented</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-action_name"> - - <b>action_name</b>() - - <a href="../classes/Event.html#method-i-action_name" name="method-i-action_name" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-action_name_source')" id="l_method-i-action_name_source">show</a> - - </p> - <div id="method-i-action_name_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/event.rb, line 160</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">action_name</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">closed?</span> - <span class="ruby-string">"closed"</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">merged?</span> - <span class="ruby-string">"merged"</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">joined?</span> - <span class="ruby-string">'joined'</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">left?</span> - <span class="ruby-string">'left'</span> - <span class="ruby-keyword">else</span> - <span class="ruby-string">"opened"</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-author"> - - <b>author</b>() - - <a href="../classes/Event.html#method-i-author" name="method-i-author" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-author_source')" id="l_method-i-author_source">show</a> - - </p> - <div id="method-i-author_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/event.rb, line 156</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">author</span> - <span class="ruby-ivar">@author</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">User</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">author_id</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-changed_issue-3F"> - - <b>changed_issue?</b>() - - <a href="../classes/Event.html#method-i-changed_issue-3F" name="method-i-changed_issue-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-changed_issue-3F_source')" id="l_method-i-changed_issue-3F_source">show</a> - - </p> - <div id="method-i-changed_issue-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/event.rb, line 131</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">changed_issue?</span> - <span class="ruby-identifier">target_type</span> <span class="ruby-operator">==</span> <span class="ruby-string">"Issue"</span> <span class="ruby-operator">&&</span> - [<span class="ruby-constant">Closed</span>, <span class="ruby-constant">Reopened</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">action</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-changed_merge_request-3F"> - - <b>changed_merge_request?</b>() - - <a href="../classes/Event.html#method-i-changed_merge_request-3F" name="method-i-changed_merge_request-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-changed_merge_request-3F_source')" id="l_method-i-changed_merge_request-3F_source">show</a> - - </p> - <div id="method-i-changed_merge_request-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/event.rb, line 126</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">changed_merge_request?</span> - <span class="ruby-identifier">target_type</span> <span class="ruby-operator">==</span> <span class="ruby-string">"MergeRequest"</span> <span class="ruby-operator">&&</span> - [<span class="ruby-constant">Closed</span>, <span class="ruby-constant">Reopened</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">action</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-closed-3F"> - - <b>closed?</b>() - - <a href="../classes/Event.html#method-i-closed-3F" name="method-i-closed-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-closed-3F_source')" id="l_method-i-closed-3F_source">show</a> - - </p> - <div id="method-i-closed-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/event.rb, line 92</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">closed?</span> - <span class="ruby-identifier">action</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span><span class="ruby-operator">::</span><span class="ruby-constant">Closed</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-issue"> - - <b>issue</b>() - - <a href="../classes/Event.html#method-i-issue" name="method-i-issue" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-issue_source')" id="l_method-i-issue_source">show</a> - - </p> - <div id="method-i-issue_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/event.rb, line 148</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">issue</span> - <span class="ruby-identifier">target</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">target_type</span> <span class="ruby-operator">==</span> <span class="ruby-string">"Issue"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-issue-3F"> - - <b>issue?</b>() - - <a href="../classes/Event.html#method-i-issue-3F" name="method-i-issue-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-issue-3F_source')" id="l_method-i-issue-3F_source">show</a> - - </p> - <div id="method-i-issue-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/event.rb, line 108</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">issue?</span> - <span class="ruby-identifier">target_type</span> <span class="ruby-operator">==</span> <span class="ruby-string">"Issue"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-joined-3F"> - - <b>joined?</b>() - - <a href="../classes/Event.html#method-i-joined-3F" name="method-i-joined-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-joined-3F_source')" id="l_method-i-joined-3F_source">show</a> - - </p> - <div id="method-i-joined-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/event.rb, line 136</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">joined?</span> - <span class="ruby-identifier">action</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Joined</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-left-3F"> - - <b>left?</b>() - - <a href="../classes/Event.html#method-i-left-3F" name="method-i-left-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-left-3F_source')" id="l_method-i-left-3F_source">show</a> - - </p> - <div id="method-i-left-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/event.rb, line 140</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">left?</span> - <span class="ruby-identifier">action</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Left</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-membership_changed-3F"> - - <b>membership_changed?</b>() - - <a href="../classes/Event.html#method-i-membership_changed-3F" name="method-i-membership_changed-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-membership_changed-3F_source')" id="l_method-i-membership_changed-3F_source">show</a> - - </p> - <div id="method-i-membership_changed-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/event.rb, line 144</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">membership_changed?</span> - <span class="ruby-identifier">joined?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">left?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-merge_request"> - - <b>merge_request</b>() - - <a href="../classes/Event.html#method-i-merge_request" name="method-i-merge_request" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-merge_request_source')" id="l_method-i-merge_request_source">show</a> - - </p> - <div id="method-i-merge_request_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/event.rb, line 152</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">merge_request</span> - <span class="ruby-identifier">target</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">target_type</span> <span class="ruby-operator">==</span> <span class="ruby-string">"MergeRequest"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-merge_request-3F"> - - <b>merge_request?</b>() - - <a href="../classes/Event.html#method-i-merge_request-3F" name="method-i-merge_request-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-merge_request-3F_source')" id="l_method-i-merge_request-3F_source">show</a> - - </p> - <div id="method-i-merge_request-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/event.rb, line 112</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">merge_request?</span> - <span class="ruby-identifier">target_type</span> <span class="ruby-operator">==</span> <span class="ruby-string">"MergeRequest"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-merged-3F"> - - <b>merged?</b>() - - <a href="../classes/Event.html#method-i-merged-3F" name="method-i-merged-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-merged-3F_source')" id="l_method-i-merged-3F_source">show</a> - - </p> - <div id="method-i-merged-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/event.rb, line 88</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">merged?</span> - <span class="ruby-identifier">action</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span><span class="ruby-operator">::</span><span class="ruby-constant">Merged</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-milestone-3F"> - - <b>milestone?</b>() - - <a href="../classes/Event.html#method-i-milestone-3F" name="method-i-milestone-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-milestone-3F_source')" id="l_method-i-milestone-3F_source">show</a> - - </p> - <div id="method-i-milestone-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/event.rb, line 100</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">milestone?</span> - <span class="ruby-identifier">target_type</span> <span class="ruby-operator">==</span> <span class="ruby-string">"Milestone"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-new_issue-3F"> - - <b>new_issue?</b>() - - <a href="../classes/Event.html#method-i-new_issue-3F" name="method-i-new_issue-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-new_issue-3F_source')" id="l_method-i-new_issue-3F_source">show</a> - - </p> - <div id="method-i-new_issue-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/event.rb, line 116</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">new_issue?</span> - <span class="ruby-identifier">target_type</span> <span class="ruby-operator">==</span> <span class="ruby-string">"Issue"</span> <span class="ruby-operator">&&</span> - <span class="ruby-identifier">action</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Created</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-new_merge_request-3F"> - - <b>new_merge_request?</b>() - - <a href="../classes/Event.html#method-i-new_merge_request-3F" name="method-i-new_merge_request-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-new_merge_request-3F_source')" id="l_method-i-new_merge_request-3F_source">show</a> - - </p> - <div id="method-i-new_merge_request-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/event.rb, line 121</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">new_merge_request?</span> - <span class="ruby-identifier">target_type</span> <span class="ruby-operator">==</span> <span class="ruby-string">"MergeRequest"</span> <span class="ruby-operator">&&</span> - <span class="ruby-identifier">action</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Created</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-note-3F"> - - <b>note?</b>() - - <a href="../classes/Event.html#method-i-note-3F" name="method-i-note-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-note-3F_source')" id="l_method-i-note-3F_source">show</a> - - </p> - <div id="method-i-note-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/event.rb, line 104</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">note?</span> - <span class="ruby-identifier">target_type</span> <span class="ruby-operator">==</span> <span class="ruby-string">"Note"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-project_name"> - - <b>project_name</b>() - - <a href="../classes/Event.html#method-i-project_name" name="method-i-project_name" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-project_name_source')" id="l_method-i-project_name_source">show</a> - - </p> - <div id="method-i-project_name_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/event.rb, line 72</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">project_name</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">project</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">name</span> - <span class="ruby-keyword">else</span> - <span class="ruby-string">"(deleted project)"</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-proper-3F"> - - <b>proper?</b>() - - <a href="../classes/Event.html#method-i-proper-3F" name="method-i-proper-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-proper-3F_source')" id="l_method-i-proper-3F_source">show</a> - - </p> - <div id="method-i-proper-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/event.rb, line 62</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">proper?</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">push?</span> - <span class="ruby-keyword">true</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">membership_changed?</span> - <span class="ruby-keyword">true</span> - <span class="ruby-keyword">else</span> - (<span class="ruby-identifier">issue?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">merge_request?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">note?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">milestone?</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">target</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-push-3F"> - - <b>push?</b>() - - <a href="../classes/Event.html#method-i-push-3F" name="method-i-push-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-push-3F_source')" id="l_method-i-push-3F_source">show</a> - - </p> - <div id="method-i-push-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/event.rb, line 84</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">push?</span> - <span class="ruby-identifier">action</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span><span class="ruby-operator">::</span><span class="ruby-constant">Pushed</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">valid_push?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-reopened-3F"> - - <b>reopened?</b>() - - <a href="../classes/Event.html#method-i-reopened-3F" name="method-i-reopened-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-reopened-3F_source')" id="l_method-i-reopened-3F_source">show</a> - - </p> - <div id="method-i-reopened-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/event.rb, line 96</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">reopened?</span> - <span class="ruby-identifier">action</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span><span class="ruby-operator">::</span><span class="ruby-constant">Reopened</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-target_title"> - - <b>target_title</b>() - - <a href="../classes/Event.html#method-i-target_title" name="method-i-target_title" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-target_title_source')" id="l_method-i-target_title_source">show</a> - - </p> - <div id="method-i-target_title_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/event.rb, line 80</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">target_title</span> - <span class="ruby-identifier">target</span>.<span class="ruby-identifier">try</span> <span class="ruby-value">:title</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/EventDecorator.html b/doc/code/classes/EventDecorator.html deleted file mode 100644 index 1fdf7f5c4e4..00000000000 --- a/doc/code/classes/EventDecorator.html +++ /dev/null @@ -1,240 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>EventDecorator</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - EventDecorator - - <span class="parent">< - - <a href="ApplicationDecorator.html">ApplicationDecorator</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/decorators/event_decorator_rb.html">app/decorators/event_decorator.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>F</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-feed_summary">feed_summary</a>, - </li> - - - <li> - <a href="#method-i-feed_title">feed_title</a>, - </li> - - - <li> - <a href="#method-i-feed_url">feed_url</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-feed_summary"> - - <b>feed_summary</b>() - - <a href="../classes/EventDecorator.html#method-i-feed_summary" name="method-i-feed_summary" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-feed_summary_source')" id="l_method-i-feed_summary_source">show</a> - - </p> - <div id="method-i-feed_summary_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/decorators/event_decorator.rb, line 37</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">feed_summary</span> - <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">issue?</span> - <span class="ruby-identifier">h</span>.<span class="ruby-identifier">render</span> <span class="ruby-string">"events/event_issue"</span>, <span class="ruby-identifier">issue</span><span class="ruby-operator">:</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">issue</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">push?</span> - <span class="ruby-identifier">h</span>.<span class="ruby-identifier">render</span> <span class="ruby-string">"events/event_push"</span>, <span class="ruby-identifier">event</span><span class="ruby-operator">:</span> <span class="ruby-keyword">self</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-feed_title"> - - <b>feed_title</b>() - - <a href="../classes/EventDecorator.html#method-i-feed_title" name="method-i-feed_title" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-feed_title_source')" id="l_method-i-feed_title_source">show</a> - - </p> - <div id="method-i-feed_title_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/decorators/event_decorator.rb, line 4</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">feed_title</span> - <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">issue?</span> - <span class="ruby-node">"#{self.author_name} #{self.action_name} issue ##{self.target_id}: #{self.issue_title} at #{self.project.name}"</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merge_request?</span> - <span class="ruby-node">"#{self.author_name} #{self.action_name} MR ##{self.target_id}: #{self.merge_request_title} at #{self.project.name}"</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">push?</span> - <span class="ruby-node">"#{self.author_name} #{self.push_action_name} #{self.ref_type} #{self.ref_name} at #{self.project.name}"</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">membership_changed?</span> - <span class="ruby-node">"#{self.author_name} #{self.action_name} #{self.project.name}"</span> - <span class="ruby-keyword">else</span> - <span class="ruby-string">""</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-feed_url"> - - <b>feed_url</b>() - - <a href="../classes/EventDecorator.html#method-i-feed_url" name="method-i-feed_url" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-feed_url_source')" id="l_method-i-feed_url_source">show</a> - - </p> - <div id="method-i-feed_url_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/decorators/event_decorator.rb, line 18</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">feed_url</span> - <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">issue?</span> - <span class="ruby-identifier">h</span>.<span class="ruby-identifier">project_issue_url</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">project</span>, <span class="ruby-keyword">self</span>.<span class="ruby-identifier">issue</span>) - <span class="ruby-keyword">elsif</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merge_request?</span> - <span class="ruby-identifier">h</span>.<span class="ruby-identifier">project_merge_request_url</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">project</span>, <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merge_request</span>) - - <span class="ruby-keyword">elsif</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">push?</span> - <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">push_with_commits?</span> - <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">commits_count</span> <span class="ruby-operator">></span> <span class="ruby-number">1</span> - <span class="ruby-identifier">h</span>.<span class="ruby-identifier">project_compare_url</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">project</span>, <span class="ruby-value">:from</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">parent_commit</span>.<span class="ruby-identifier">id</span>, <span class="ruby-value">:to</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">last_commit</span>.<span class="ruby-identifier">id</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">h</span>.<span class="ruby-identifier">project_commit_url</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">project</span>, <span class="ruby-value">:id</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">last_commit</span>.<span class="ruby-identifier">id</span>) - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">h</span>.<span class="ruby-identifier">project_commits_url</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">project</span>, <span class="ruby-keyword">self</span>.<span class="ruby-identifier">ref_name</span>) - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/EventFilter.html b/doc/code/classes/EventFilter.html deleted file mode 100644 index 5bf01133d6e..00000000000 --- a/doc/code/classes/EventFilter.html +++ /dev/null @@ -1,543 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>EventFilter</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - EventFilter - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/lib/event_filter_rb.html">lib/event_filter.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-active-3F">active?</a>, - </li> - - - <li> - <a href="#method-i-apply_filter">apply_filter</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-comments">comments</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-default_filter">default_filter</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-merged">merged</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-new">new</a> - </li> - - </ul> - </dd> - - <dt>O</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-options">options</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-push">push</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-team">team</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>params</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-comments"> - - <b>comments</b>() - - <a href="../classes/EventFilter.html#method-c-comments" name="method-c-comments" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-comments_source')" id="l_method-c-comments_source">show</a> - - </p> - <div id="method-c-comments_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/event_filter.rb, line 17</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">comments</span> - <span class="ruby-string">'comments'</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-default_filter"> - - <b>default_filter</b>() - - <a href="../classes/EventFilter.html#method-c-default_filter" name="method-c-default_filter" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-default_filter_source')" id="l_method-c-default_filter_source">show</a> - - </p> - <div id="method-c-default_filter_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/event_filter.rb, line 5</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">default_filter</span> - <span class="ruby-node">%w{ push issues merge_requests team}</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-merged"> - - <b>merged</b>() - - <a href="../classes/EventFilter.html#method-c-merged" name="method-c-merged" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-merged_source')" id="l_method-c-merged_source">show</a> - - </p> - <div id="method-c-merged_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/event_filter.rb, line 13</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">merged</span> - <span class="ruby-string">'merged'</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-new"> - - <b>new</b>(params) - - <a href="../classes/EventFilter.html#method-c-new" name="method-c-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a> - - </p> - <div id="method-c-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/event_filter.rb, line 26</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span> <span class="ruby-identifier">params</span> - <span class="ruby-ivar">@params</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span> - <span class="ruby-identifier">params</span>.<span class="ruby-identifier">dup</span> - <span class="ruby-keyword">else</span> - []<span class="ruby-comment">#EventFilter.default_filter</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-push"> - - <b>push</b>() - - <a href="../classes/EventFilter.html#method-c-push" name="method-c-push" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-push_source')" id="l_method-c-push_source">show</a> - - </p> - <div id="method-c-push_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/event_filter.rb, line 9</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">push</span> - <span class="ruby-string">'push'</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-team"> - - <b>team</b>() - - <a href="../classes/EventFilter.html#method-c-team" name="method-c-team" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-team_source')" id="l_method-c-team_source">show</a> - - </p> - <div id="method-c-team_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/event_filter.rb, line 21</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">team</span> - <span class="ruby-string">'team'</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-active-3F"> - - <b>active?</b>(key) - - <a href="../classes/EventFilter.html#method-i-active-3F" name="method-i-active-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-active-3F_source')" id="l_method-i-active-3F_source">show</a> - - </p> - <div id="method-i-active-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/event_filter.rb, line 65</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">active?</span> <span class="ruby-identifier">key</span> - <span class="ruby-identifier">params</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">key</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-apply_filter"> - - <b>apply_filter</b>(events) - - <a href="../classes/EventFilter.html#method-i-apply_filter" name="method-i-apply_filter" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-apply_filter_source')" id="l_method-i-apply_filter_source">show</a> - - </p> - <div id="method-i-apply_filter_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/event_filter.rb, line 34</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">apply_filter</span> <span class="ruby-identifier">events</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">events</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">params</span>.<span class="ruby-identifier">present?</span> - - <span class="ruby-identifier">filter</span> = <span class="ruby-identifier">params</span>.<span class="ruby-identifier">dup</span> - - <span class="ruby-identifier">actions</span> = [] - <span class="ruby-identifier">actions</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Event</span><span class="ruby-operator">::</span><span class="ruby-constant">Pushed</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">filter</span>.<span class="ruby-identifier">include?</span> <span class="ruby-string">'push'</span> - <span class="ruby-identifier">actions</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Event</span><span class="ruby-operator">::</span><span class="ruby-constant">Merged</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">filter</span>.<span class="ruby-identifier">include?</span> <span class="ruby-string">'merged'</span> - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">filter</span>.<span class="ruby-identifier">include?</span> <span class="ruby-string">'team'</span> - <span class="ruby-identifier">actions</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Event</span><span class="ruby-operator">::</span><span class="ruby-constant">Joined</span> - <span class="ruby-identifier">actions</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Event</span><span class="ruby-operator">::</span><span class="ruby-constant">Left</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">actions</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Event</span><span class="ruby-operator">::</span><span class="ruby-constant">Commented</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">filter</span>.<span class="ruby-identifier">include?</span> <span class="ruby-string">'comments'</span> - - <span class="ruby-identifier">events</span> = <span class="ruby-identifier">events</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-identifier">actions</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-options"> - - <b>options</b>(key) - - <a href="../classes/EventFilter.html#method-i-options" name="method-i-options" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-options_source')" id="l_method-i-options_source">show</a> - - </p> - <div id="method-i-options_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/event_filter.rb, line 53</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">options</span> <span class="ruby-identifier">key</span> - <span class="ruby-identifier">filter</span> = <span class="ruby-identifier">params</span>.<span class="ruby-identifier">dup</span> - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">filter</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">key</span> - <span class="ruby-identifier">filter</span>.<span class="ruby-identifier">delete</span> <span class="ruby-identifier">key</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">filter</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">key</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">filter</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/EventsHelper.html b/doc/code/classes/EventsHelper.html deleted file mode 100644 index 7c7041c6698..00000000000 --- a/doc/code/classes/EventsHelper.html +++ /dev/null @@ -1,289 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>EventsHelper</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - EventsHelper - - </h1> - <ul class="files"> - - <li><a href="../files/app/helpers/events_helper_rb.html">app/helpers/events_helper.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-event_action_name">event_action_name</a>, - </li> - - - <li> - <a href="#method-i-event_filter_link">event_filter_link</a>, - </li> - - - <li> - <a href="#method-i-event_image">event_image</a> - </li> - - </ul> - </dd> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-link_to_author">link_to_author</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-event_action_name"> - - <b>event_action_name</b>(event) - - <a href="../classes/EventsHelper.html#method-i-event_action_name" name="method-i-event_action_name" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-event_action_name_source')" id="l_method-i-event_action_name_source">show</a> - - </p> - <div id="method-i-event_action_name_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/events_helper.rb, line 13</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">event_action_name</span>(<span class="ruby-identifier">event</span>) - <span class="ruby-identifier">target</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">event</span>.<span class="ruby-identifier">target_type</span> - <span class="ruby-identifier">event</span>.<span class="ruby-identifier">target_type</span>.<span class="ruby-identifier">titleize</span>.<span class="ruby-identifier">downcase</span> - <span class="ruby-keyword">else</span> - <span class="ruby-string">'project'</span> - <span class="ruby-keyword">end</span> - - [<span class="ruby-identifier">event</span>.<span class="ruby-identifier">action_name</span>, <span class="ruby-identifier">target</span>].<span class="ruby-identifier">join</span>(<span class="ruby-string">" "</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-event_filter_link"> - - <b>event_filter_link</b>(key, tooltip) - - <a href="../classes/EventsHelper.html#method-i-event_filter_link" name="method-i-event_filter_link" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-event_filter_link_source')" id="l_method-i-event_filter_link_source">show</a> - - </p> - <div id="method-i-event_filter_link_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/events_helper.rb, line 37</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">event_filter_link</span> <span class="ruby-identifier">key</span>, <span class="ruby-identifier">tooltip</span> - <span class="ruby-identifier">key</span> = <span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span> - - <span class="ruby-identifier">filter</span> = <span class="ruby-ivar">@event_filter</span>.<span class="ruby-identifier">options</span> <span class="ruby-identifier">key</span> - - <span class="ruby-identifier">inactive</span> = <span class="ruby-keyword">if</span> <span class="ruby-ivar">@event_filter</span>.<span class="ruby-identifier">active?</span> <span class="ruby-identifier">key</span> - <span class="ruby-keyword">nil</span> - <span class="ruby-keyword">else</span> - <span class="ruby-string">'inactive'</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">content_tag</span> <span class="ruby-value">:div</span>, <span class="ruby-keyword">class</span><span class="ruby-operator">:</span> <span class="ruby-node">"filter_icon #{inactive}"</span> <span class="ruby-keyword ruby-title">do</span> - <span class="ruby-identifier">link_to</span> <span class="ruby-identifier">dashboard_path</span>(<span class="ruby-identifier">event_filter</span><span class="ruby-operator">:</span> <span class="ruby-identifier">filter</span>), <span class="ruby-keyword">class</span><span class="ruby-operator">:</span> <span class="ruby-string">'has_tooltip'</span>, <span class="ruby-string">'data-original-title'</span> =<span class="ruby-operator">></span> <span class="ruby-keyword ruby-title">tooltip</span> <span class="ruby-keyword">do</span> - <span class="ruby-identifier">image_tag</span> <span class="ruby-node">"event_filter_#{key}.png"</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-event_image"> - - <b>event_image</b>(event) - - <a href="../classes/EventsHelper.html#method-i-event_image" name="method-i-event_image" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-event_image_source')" id="l_method-i-event_image_source">show</a> - - </p> - <div id="method-i-event_image_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/events_helper.rb, line 23</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">event_image</span> <span class="ruby-identifier">event</span> - <span class="ruby-identifier">event_image_path</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">event</span>.<span class="ruby-identifier">push?</span> - <span class="ruby-string">"event_push.png"</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">event</span>.<span class="ruby-identifier">merged?</span> - <span class="ruby-string">"event_mr_merged.png"</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-keyword">return</span> <span class="ruby-keyword">nil</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">event_image_path</span> - - <span class="ruby-identifier">content_tag</span> <span class="ruby-value">:div</span>, <span class="ruby-keyword">class</span><span class="ruby-operator">:</span> <span class="ruby-string">'event_icon'</span> <span class="ruby-keyword ruby-title">do</span> - <span class="ruby-identifier">image_tag</span> <span class="ruby-identifier">event_image_path</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-link_to_author"> - - <b>link_to_author</b>(event) - - <a href="../classes/EventsHelper.html#method-i-link_to_author" name="method-i-link_to_author" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-link_to_author_source')" id="l_method-i-link_to_author_source">show</a> - - </p> - <div id="method-i-link_to_author_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/events_helper.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">link_to_author</span>(<span class="ruby-identifier">event</span>) - <span class="ruby-identifier">project</span> = <span class="ruby-identifier">event</span>.<span class="ruby-identifier">project</span> - <span class="ruby-identifier">tm</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">team_member_by_id</span>(<span class="ruby-identifier">event</span>.<span class="ruby-identifier">author_id</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">project</span> - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">tm</span> - <span class="ruby-identifier">link_to</span> <span class="ruby-identifier">event</span>.<span class="ruby-identifier">author_name</span>, <span class="ruby-identifier">project_team_member_path</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">tm</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">event</span>.<span class="ruby-identifier">author_name</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ExtractsPath.html b/doc/code/classes/ExtractsPath.html deleted file mode 100644 index 0b8c0c26f99..00000000000 --- a/doc/code/classes/ExtractsPath.html +++ /dev/null @@ -1,300 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ExtractsPath</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - ExtractsPath - - </h1> - <ul class="files"> - - <li><a href="../files/lib/extracts_path_rb.html">lib/extracts_path.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>Module providing methods for dealing with separating a tree-ish string and -a file path string when combined in a request parameter</p> - - </div> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">CLASS</span> - <a href="ExtractsPath/InvalidPathError.html">ExtractsPath::InvalidPathError</a> - </li> - - </ul> - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-assign_ref_vars">assign_ref_vars</a> - </li> - - </ul> - </dd> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-extract_ref">extract_ref</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-assign_ref_vars"> - - <b>assign_ref_vars</b>() - - <a href="../classes/ExtractsPath.html#method-i-assign_ref_vars" name="method-i-assign_ref_vars" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Assigns common instance variables for views working with Git tree-ish -objects</p> - -<p>Assignments are:</p> -<ul><li> -<p>@id - A string representing the joined ref and path</p> -</li><li> -<p>@ref - A string representing the ref (e.g., the branch, tag, or commit -SHA)</p> -</li><li> -<p>@path - A string representing the filesystem path</p> -</li><li> -<p>@commit - A <a href="CommitDecorator.html">CommitDecorator</a> representing -the commit from the given ref</p> -</li><li> -<p>@tree - A <a href="TreeDecorator.html">TreeDecorator</a> representing the -tree at the given ref/path</p> -</li></ul> - -<p>If the :id parameter appears to be requesting a specific response format, -that will be handled as well.</p> - -<p>Automatically renders `not_found!` if a valid tree path could not be -resolved (e.g., when a user inserts an invalid path or ref).</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-assign_ref_vars_source')" id="l_method-i-assign_ref_vars_source">show</a> - - </p> - <div id="method-i-assign_ref_vars_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/extracts_path.rb, line 104</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">assign_ref_vars</span> - <span class="ruby-comment"># Handle formats embedded in the id</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>].<span class="ruby-identifier">ends_with?</span>(<span class="ruby-string">'.atom'</span>) - <span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>].<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp">%r\.atom$/</span>, <span class="ruby-string">''</span>) - <span class="ruby-identifier">request</span>.<span class="ruby-identifier">format</span> = <span class="ruby-value">:atom</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-ivar">@ref</span>, <span class="ruby-ivar">@path</span> = <span class="ruby-identifier">extract_ref</span>(<span class="ruby-identifier">request</span>.<span class="ruby-identifier">fullpath</span>) - - <span class="ruby-ivar">@id</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-ivar">@ref</span>, <span class="ruby-ivar">@path</span>) - - <span class="ruby-ivar">@commit</span> = <span class="ruby-constant">CommitDecorator</span>.<span class="ruby-identifier">decorate</span>(<span class="ruby-ivar">@project</span>.<span class="ruby-identifier">commit</span>(<span class="ruby-ivar">@ref</span>)) - - <span class="ruby-ivar">@tree</span> = <span class="ruby-constant">Tree</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@commit</span>.<span class="ruby-identifier">tree</span>, <span class="ruby-ivar">@project</span>, <span class="ruby-ivar">@ref</span>, <span class="ruby-ivar">@path</span>) - <span class="ruby-ivar">@tree</span> = <span class="ruby-constant">TreeDecorator</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@tree</span>) - - <span class="ruby-identifier">raise</span> <span class="ruby-constant">InvalidPathError</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@tree</span>.<span class="ruby-identifier">invalid?</span> -<span class="ruby-keyword">rescue</span> <span class="ruby-constant">NoMethodError</span>, <span class="ruby-constant">InvalidPathError</span> - <span class="ruby-identifier">not_found!</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-extract_ref"> - - <b>extract_ref</b>(input) - - <a href="../classes/ExtractsPath.html#method-i-extract_ref" name="method-i-extract_ref" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Given a string containing both a Git tree-ish, such as a branch or tag, and -a filesystem path joined by forward slashes, attempts to separate the two.</p> - -<p>Expects a @project instance variable to contain the active project. This is -used to check the input against a list of valid repository refs.</p> - -<p>Examples</p> - -<pre class="ruby"><span class="ruby-comment"># No @project available</span> -<span class="ruby-identifier">extract_ref</span>(<span class="ruby-string">'master'</span>) -<span class="ruby-comment"># => ['', '']</span> - -<span class="ruby-identifier">extract_ref</span>(<span class="ruby-string">'master'</span>) -<span class="ruby-comment"># => ['master', '']</span> - -<span class="ruby-identifier">extract_ref</span>(<span class="ruby-string">"f4b14494ef6abf3d144c28e4af0c20143383e062/CHANGELOG"</span>) -<span class="ruby-comment"># => ['f4b14494ef6abf3d144c28e4af0c20143383e062', 'CHANGELOG']</span> - -<span class="ruby-identifier">extract_ref</span>(<span class="ruby-string">"v2.0.0/README.md"</span>) -<span class="ruby-comment"># => ['v2.0.0', 'README.md']</span> - -<span class="ruby-identifier">extract_ref</span>(<span class="ruby-string">'/gitlab/vagrant/tree/master/app/models/project.rb'</span>) -<span class="ruby-comment"># => ['master', 'app/models/project.rb']</span> - -<span class="ruby-identifier">extract_ref</span>(<span class="ruby-string">'issues/1234/app/models/project.rb'</span>) -<span class="ruby-comment"># => ['issues/1234', 'app/models/project.rb']</span> - -<span class="ruby-comment"># Given an invalid branch, we fall back to just splitting on the first slash</span> -<span class="ruby-identifier">extract_ref</span>(<span class="ruby-string">'non/existent/branch/README.md'</span>) -<span class="ruby-comment"># => ['non', 'existent/branch/README.md']</span> -</pre> - -<p>Returns an Array where the first value is the tree-ish and the second is -the path</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-extract_ref_source')" id="l_method-i-extract_ref_source">show</a> - - </p> - <div id="method-i-extract_ref_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/extracts_path.rb, line 48</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">extract_ref</span>(<span class="ruby-identifier">input</span>) - <span class="ruby-identifier">pair</span> = [<span class="ruby-string">''</span>, <span class="ruby-string">''</span>] - - <span class="ruby-keyword">return</span> <span class="ruby-identifier">pair</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@project</span> - - <span class="ruby-comment"># Remove project, actions and all other staff from path</span> - <span class="ruby-identifier">input</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-node">"/#{@project.path_with_namespace}"</span>, <span class="ruby-string">""</span>) - <span class="ruby-identifier">input</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp">%r^\/(tree|commits|blame|blob)\//</span>, <span class="ruby-string">""</span>) <span class="ruby-comment"># remove actions</span> - <span class="ruby-identifier">input</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp">%r\?.*$/</span>, <span class="ruby-string">""</span>) <span class="ruby-comment"># remove stamps suffix</span> - <span class="ruby-identifier">input</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp">%r.atom$/</span>, <span class="ruby-string">""</span>) <span class="ruby-comment"># remove rss feed</span> - <span class="ruby-identifier">input</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp">%r\/edit$/</span>, <span class="ruby-string">""</span>) <span class="ruby-comment"># remove edit route part</span> - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">input</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp">%r^([[:alnum:]]{40})(.+)/</span>) - <span class="ruby-comment"># If the ref appears to be a SHA, we're done, just split the string</span> - <span class="ruby-identifier">pair</span> = <span class="ruby-identifier">$~</span>.<span class="ruby-identifier">captures</span> - <span class="ruby-keyword">else</span> - <span class="ruby-comment"># Otherwise, attempt to detect the ref using a list of the project's</span> - <span class="ruby-comment"># branches and tags</span> - - <span class="ruby-comment"># Append a trailing slash if we only get a ref and no file path</span> - <span class="ruby-identifier">id</span> = <span class="ruby-identifier">input</span> - <span class="ruby-identifier">id</span> <span class="ruby-operator">+=</span> <span class="ruby-string">'/'</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">id</span>.<span class="ruby-identifier">ends_with?</span>(<span class="ruby-string">'/'</span>) - - <span class="ruby-identifier">valid_refs</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">ref_names</span> - <span class="ruby-identifier">valid_refs</span>.<span class="ruby-identifier">select!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">id</span>.<span class="ruby-identifier">start_with?</span>(<span class="ruby-node">"#{v}/"</span>) } - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">valid_refs</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">!=</span> <span class="ruby-number">1</span> - <span class="ruby-comment"># No exact ref match, so just try our best</span> - <span class="ruby-identifier">pair</span> = <span class="ruby-identifier">id</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp">%r([^\/]+)(.*)/</span>).<span class="ruby-identifier">captures</span> - <span class="ruby-keyword">else</span> - <span class="ruby-comment"># Partition the string into the ref and the path, ignoring the empty first value</span> - <span class="ruby-identifier">pair</span> = <span class="ruby-identifier">id</span>.<span class="ruby-identifier">partition</span>(<span class="ruby-identifier">valid_refs</span>.<span class="ruby-identifier">first</span>)[<span class="ruby-number">1</span><span class="ruby-operator">..</span><span class="ruby-number">-1</span>] - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-comment"># Remove ending slashes from path</span> - <span class="ruby-identifier">pair</span>[<span class="ruby-number">1</span>].<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp">%r^\/|\/$/</span>, <span class="ruby-string">''</span>) - - <span class="ruby-identifier">pair</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ExtractsPath/InvalidPathError.html b/doc/code/classes/ExtractsPath/InvalidPathError.html deleted file mode 100644 index 67632e3b9ea..00000000000 --- a/doc/code/classes/ExtractsPath/InvalidPathError.html +++ /dev/null @@ -1,82 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ExtractsPath::InvalidPathError</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - ExtractsPath::InvalidPathError - - <span class="parent">< - - StandardError - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/extracts_path_rb.html">lib/extracts_path.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>Raised when given an invalid file path</p> - - </div> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/FileSizeValidator.html b/doc/code/classes/FileSizeValidator.html deleted file mode 100644 index b1da2752f52..00000000000 --- a/doc/code/classes/FileSizeValidator.html +++ /dev/null @@ -1,376 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>FileSizeValidator</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - FileSizeValidator - - <span class="parent">< - - ActiveModel::EachValidator - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/lib/file_size_validator_rb.html">lib/file_size_validator.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">CLASS</span> - <a href="FileSizeValidator/Helper.html">FileSizeValidator::Helper</a> - </li> - - </ul> - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-check_validity-21">check_validity!</a> - </li> - - </ul> - </dd> - - <dt>H</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-help">help</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-new">new</a> - </li> - - </ul> - </dd> - - <dt>V</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-validate_each">validate_each</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - <!-- Section constants --> - <div class="sectiontitle">Constants</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class="attr-name">MESSAGES</td> - <td>=</td> - <td class="attr-value">{ is: :wrong_size, minimum: :size_too_small, maximum: :size_too_big }.freeze</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">CHECKS</td> - <td>=</td> - <td class="attr-value">{ is: :==, minimum: :>=, maximum: :<= }.freeze</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">DEFAULT_TOKENIZER</td> - <td>=</td> - <td class="attr-value">lambda { |value| value.split(//) }</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">RESERVED_OPTIONS</td> - <td>=</td> - <td class="attr-value">[:minimum, :maximum, :within, :is, :tokenizer, :too_short, :too_long]</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - </table> - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-new"> - - <b>new</b>(options) - - <a href="../classes/FileSizeValidator.html#method-c-new" name="method-c-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a> - - </p> - <div id="method-c-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/file_size_validator.rb, line 8</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span>(<span class="ruby-identifier">options</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">range</span> = (<span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:in</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:within</span>)) - <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">":in and :within must be a Range"</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">range</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Range</span>) - <span class="ruby-identifier">options</span>[<span class="ruby-value">:minimum</span>], <span class="ruby-identifier">options</span>[<span class="ruby-value">:maximum</span>] = <span class="ruby-identifier">range</span>.<span class="ruby-identifier">begin</span>, <span class="ruby-identifier">range</span>.<span class="ruby-identifier">end</span> - <span class="ruby-identifier">options</span>[<span class="ruby-value">:maximum</span>] <span class="ruby-operator">-=</span> <span class="ruby-number">1</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">range</span>.<span class="ruby-identifier">exclude_end?</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-keyword">super</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-check_validity-21"> - - <b>check_validity!</b>() - - <a href="../classes/FileSizeValidator.html#method-i-check_validity-21" name="method-i-check_validity-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-check_validity-21_source')" id="l_method-i-check_validity-21_source">show</a> - - </p> - <div id="method-i-check_validity-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/file_size_validator.rb, line 18</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">check_validity!</span> - <span class="ruby-identifier">keys</span> = <span class="ruby-constant">CHECKS</span>.<span class="ruby-identifier">keys</span> & <span class="ruby-identifier">options</span>.<span class="ruby-identifier">keys</span> - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">keys</span>.<span class="ruby-identifier">empty?</span> - <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">'Range unspecified. Specify the :within, :maximum, :minimum, or :is option.'</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">value</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">key</span>] - - <span class="ruby-keyword">unless</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Integer</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">value</span> <span class="ruby-operator">>=</span> <span class="ruby-number">0</span> - <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">":#{key} must be a nonnegative Integer"</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-help"> - - <b>help</b>() - - <a href="../classes/FileSizeValidator.html#method-i-help" name="method-i-help" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-help_source')" id="l_method-i-help_source">show</a> - - </p> - <div id="method-i-help_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/file_size_validator.rb, line 57</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">help</span> - <span class="ruby-constant">Helper</span>.<span class="ruby-identifier">instance</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-validate_each"> - - <b>validate_each</b>(record, attribute, value) - - <a href="../classes/FileSizeValidator.html#method-i-validate_each" name="method-i-validate_each" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-validate_each_source')" id="l_method-i-validate_each_source">show</a> - - </p> - <div id="method-i-validate_each_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/file_size_validator.rb, line 34</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">validate_each</span>(<span class="ruby-identifier">record</span>, <span class="ruby-identifier">attribute</span>, <span class="ruby-identifier">value</span>) - <span class="ruby-identifier">raise</span>(<span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">"A CarrierWave::Uploader::Base object was expected"</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">CarrierWave</span><span class="ruby-operator">::</span><span class="ruby-constant">Uploader</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span> - - <span class="ruby-identifier">value</span> = (<span class="ruby-identifier">options</span>[<span class="ruby-value">:tokenizer</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">DEFAULT_TOKENIZER</span>).<span class="ruby-identifier">call</span>(<span class="ruby-identifier">value</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">String</span>) - - <span class="ruby-constant">CHECKS</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">validity_check</span><span class="ruby-operator">|</span> - <span class="ruby-keyword">next</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">check_value</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">key</span>] - - <span class="ruby-identifier">value</span> <span class="ruby-operator">||=</span> [] <span class="ruby-keyword">if</span> <span class="ruby-identifier">key</span> <span class="ruby-operator">==</span> <span class="ruby-value">:maximum</span> - - <span class="ruby-identifier">value_size</span> = <span class="ruby-identifier">value</span>.<span class="ruby-identifier">size</span> - <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">value_size</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">validity_check</span>, <span class="ruby-identifier">check_value</span>) - - <span class="ruby-identifier">errors_options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">except</span>(*<span class="ruby-constant">RESERVED_OPTIONS</span>) - <span class="ruby-identifier">errors_options</span>[<span class="ruby-value">:file_size</span>] = <span class="ruby-identifier">help</span>.<span class="ruby-identifier">number_to_human_size</span> <span class="ruby-identifier">check_value</span> - - <span class="ruby-identifier">default_message</span> = <span class="ruby-identifier">options</span>[<span class="ruby-constant">MESSAGES</span>[<span class="ruby-identifier">key</span>]] - <span class="ruby-identifier">errors_options</span>[<span class="ruby-value">:message</span>] <span class="ruby-operator">||=</span> <span class="ruby-identifier">default_message</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">default_message</span> - - <span class="ruby-identifier">record</span>.<span class="ruby-identifier">errors</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">attribute</span>, <span class="ruby-constant">MESSAGES</span>[<span class="ruby-identifier">key</span>], <span class="ruby-identifier">errors_options</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/FileSizeValidator/Helper.html b/doc/code/classes/FileSizeValidator/Helper.html deleted file mode 100644 index c11d89b3f2c..00000000000 --- a/doc/code/classes/FileSizeValidator/Helper.html +++ /dev/null @@ -1,94 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>FileSizeValidator::Helper</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - FileSizeValidator::Helper - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/file_size_validator_rb.html">lib/file_size_validator.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - <!-- Includes --> - <div class="sectiontitle">Included Modules</div> - <ul> - - <li> - - Singleton - - </li> - - <li> - - ActionView::Helpers::NumberHelper - - </li> - - </ul> - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/GitHost.html b/doc/code/classes/GitHost.html deleted file mode 100644 index 52ea8b32d4f..00000000000 --- a/doc/code/classes/GitHost.html +++ /dev/null @@ -1,125 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>GitHost</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - GitHost - - </h1> - <ul class="files"> - - <li><a href="../files/app/roles/git_host_rb.html">app/roles/git_host.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>G</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-git_host">git_host</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-git_host"> - - <b>git_host</b>() - - <a href="../classes/GitHost.html#method-i-git_host" name="method-i-git_host" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-git_host_source')" id="l_method-i-git_host_source">show</a> - - </p> - <div id="method-i-git_host_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/git_host.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">git_host</span> - <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">Gitolite</span>.<span class="ruby-identifier">new</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab.html b/doc/code/classes/Gitlab.html deleted file mode 100644 index 5127be6e4db..00000000000 --- a/doc/code/classes/Gitlab.html +++ /dev/null @@ -1,265 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - Gitlab - - </h1> - <ul class="files"> - - <li><a href="../files/lib/gitlab/auth_rb.html">lib/gitlab/auth.rb</a></li> - - <li><a href="../files/lib/gitlab/regex_rb.html">lib/gitlab/regex.rb</a></li> - - <li><a href="../files/lib/gitlab/git_logger_rb.html">lib/gitlab/git_logger.rb</a></li> - - <li><a href="../files/lib/gitlab/satellite/merge_action_rb.html">lib/gitlab/satellite/merge_action.rb</a></li> - - <li><a href="../files/lib/gitlab/satellite/satellite_rb.html">lib/gitlab/satellite/satellite.rb</a></li> - - <li><a href="../files/lib/gitlab/satellite/edit_file_action_rb.html">lib/gitlab/satellite/edit_file_action.rb</a></li> - - <li><a href="../files/lib/gitlab/satellite/action_rb.html">lib/gitlab/satellite/action.rb</a></li> - - <li><a href="../files/lib/gitlab/backend/gitolite_config_rb.html">lib/gitlab/backend/gitolite_config.rb</a></li> - - <li><a href="../files/lib/gitlab/backend/gitolite_rb.html">lib/gitlab/backend/gitolite.rb</a></li> - - <li><a href="../files/lib/gitlab/logger_rb.html">lib/gitlab/logger.rb</a></li> - - <li><a href="../files/lib/gitlab/markdown_rb.html">lib/gitlab/markdown.rb</a></li> - - <li><a href="../files/lib/gitlab/app_logger_rb.html">lib/gitlab/app_logger.rb</a></li> - - <li><a href="../files/lib/gitlab/seeder_rb.html">lib/gitlab/seeder.rb</a></li> - - <li><a href="../files/lib/gitlab/git_stats_rb.html">lib/gitlab/git_stats.rb</a></li> - - <li><a href="../files/lib/gitlab/project_mover_rb.html">lib/gitlab/project_mover.rb</a></li> - - <li><a href="../files/lib/gitlab/graph/commit_rb.html">lib/gitlab/graph/commit.rb</a></li> - - <li><a href="../files/lib/gitlab/graph/json_builder_rb.html">lib/gitlab/graph/json_builder.rb</a></li> - - <li><a href="../files/lib/gitlab/theme_rb.html">lib/gitlab/theme.rb</a></li> - - <li><a href="../files/lib/gitlab/inline_diff_rb.html">lib/gitlab/inline_diff.rb</a></li> - - <li><a href="../files/lib/api/projects_rb.html">lib/api/projects.rb</a></li> - - <li><a href="../files/lib/api/merge_requests_rb.html">lib/api/merge_requests.rb</a></li> - - <li><a href="../files/lib/api/users_rb.html">lib/api/users.rb</a></li> - - <li><a href="../files/lib/api/session_rb.html">lib/api/session.rb</a></li> - - <li><a href="../files/lib/api/notes_rb.html">lib/api/notes.rb</a></li> - - <li><a href="../files/lib/api/helpers_rb.html">lib/api/helpers.rb</a></li> - - <li><a href="../files/lib/api/entities_rb.html">lib/api/entities.rb</a></li> - - <li><a href="../files/lib/api/milestones_rb.html">lib/api/milestones.rb</a></li> - - <li><a href="../files/lib/api/issues_rb.html">lib/api/issues.rb</a></li> - - <li><a href="../files/lib/api_rb.html">lib/api.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p><a href="Gitlab/ProjectMover.html">ProjectMover</a> class</p> - -<p>Used for moving project repositories from one subdir to another</p> - - </div> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">MODULE</span> - <a href="Gitlab/APIHelpers.html">Gitlab::APIHelpers</a> - </li> - - <li> - <span class="type">MODULE</span> - <a href="Gitlab/Entities.html">Gitlab::Entities</a> - </li> - - <li> - <span class="type">MODULE</span> - <a href="Gitlab/Graph.html">Gitlab::Graph</a> - </li> - - <li> - <span class="type">MODULE</span> - <a href="Gitlab/Markdown.html">Gitlab::Markdown</a> - </li> - - <li> - <span class="type">MODULE</span> - <a href="Gitlab/Regex.html">Gitlab::Regex</a> - </li> - - <li> - <span class="type">MODULE</span> - <a href="Gitlab/Satellite.html">Gitlab::Satellite</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Gitlab/API.html">Gitlab::API</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Gitlab/AppLogger.html">Gitlab::AppLogger</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Gitlab/Auth.html">Gitlab::Auth</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Gitlab/GitLogger.html">Gitlab::GitLogger</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Gitlab/GitStats.html">Gitlab::GitStats</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Gitlab/Gitolite.html">Gitlab::Gitolite</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Gitlab/GitoliteConfig.html">Gitlab::GitoliteConfig</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Gitlab/InlineDiff.html">Gitlab::InlineDiff</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Gitlab/Issues.html">Gitlab::Issues</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Gitlab/Logger.html">Gitlab::Logger</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Gitlab/MergeRequests.html">Gitlab::MergeRequests</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Gitlab/Milestones.html">Gitlab::Milestones</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Gitlab/Notes.html">Gitlab::Notes</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Gitlab/ProjectMover.html">Gitlab::ProjectMover</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Gitlab/Projects.html">Gitlab::Projects</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Gitlab/Seeder.html">Gitlab::Seeder</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Gitlab/Session.html">Gitlab::Session</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Gitlab/Theme.html">Gitlab::Theme</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Gitlab/Users.html">Gitlab::Users</a> - </li> - - </ul> - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/API.html b/doc/code/classes/Gitlab/API.html deleted file mode 100644 index fe2ccc76ebe..00000000000 --- a/doc/code/classes/Gitlab/API.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::API</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::API - - <span class="parent">< - - Grape::API - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/api_rb.html">lib/api.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/APIHelpers.html b/doc/code/classes/Gitlab/APIHelpers.html deleted file mode 100644 index 603443dda2b..00000000000 --- a/doc/code/classes/Gitlab/APIHelpers.html +++ /dev/null @@ -1,703 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::APIHelpers</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - Gitlab::APIHelpers - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/api/helpers_rb.html">lib/api/helpers.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-attributes_for_keys">attributes_for_keys</a>, - </li> - - - <li> - <a href="#method-i-authenticate-21">authenticate!</a>, - </li> - - - <li> - <a href="#method-i-authenticated_as_admin-21">authenticated_as_admin!</a>, - </li> - - - <li> - <a href="#method-i-authorize-21">authorize!</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-can-3F">can?</a>, - </li> - - - <li> - <a href="#method-i-current_user">current_user</a> - </li> - - </ul> - </dd> - - <dt>F</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-find_project">find_project</a>, - </li> - - - <li> - <a href="#method-i-forbidden-21">forbidden!</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-not_allowed-21">not_allowed!</a>, - </li> - - - <li> - <a href="#method-i-not_found-21">not_found!</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-paginate">paginate</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-render_api_error-21">render_api_error!</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-unauthorized-21">unauthorized!</a>, - </li> - - - <li> - <a href="#method-i-user_project">user_project</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-attributes_for_keys"> - - <b>attributes_for_keys</b>(keys) - - <a href="../../classes/Gitlab/APIHelpers.html#method-i-attributes_for_keys" name="method-i-attributes_for_keys" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-attributes_for_keys_source')" id="l_method-i-attributes_for_keys_source">show</a> - - </p> - <div id="method-i-attributes_for_keys_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/api/helpers.rb, line 44</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">attributes_for_keys</span>(<span class="ruby-identifier">keys</span>) - <span class="ruby-identifier">attrs</span> = {} - <span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">attrs</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">key</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">key</span>].<span class="ruby-identifier">present?</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">attrs</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-authenticate-21"> - - <b>authenticate!</b>() - - <a href="../../classes/Gitlab/APIHelpers.html#method-i-authenticate-21" name="method-i-authenticate-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-authenticate-21_source')" id="l_method-i-authenticate-21_source">show</a> - - </p> - <div id="method-i-authenticate-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/api/helpers.rb, line 26</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">authenticate!</span> - <span class="ruby-identifier">unauthorized!</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">current_user</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-authenticated_as_admin-21"> - - <b>authenticated_as_admin!</b>() - - <a href="../../classes/Gitlab/APIHelpers.html#method-i-authenticated_as_admin-21" name="method-i-authenticated_as_admin-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-authenticated_as_admin-21_source')" id="l_method-i-authenticated_as_admin-21_source">show</a> - - </p> - <div id="method-i-authenticated_as_admin-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/api/helpers.rb, line 30</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">authenticated_as_admin!</span> - <span class="ruby-identifier">forbidden!</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">is_admin?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-authorize-21"> - - <b>authorize!</b>(action, subject) - - <a href="../../classes/Gitlab/APIHelpers.html#method-i-authorize-21" name="method-i-authorize-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-authorize-21_source')" id="l_method-i-authorize-21_source">show</a> - - </p> - <div id="method-i-authorize-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/api/helpers.rb, line 34</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">authorize!</span> <span class="ruby-identifier">action</span>, <span class="ruby-identifier">subject</span> - <span class="ruby-keyword">unless</span> <span class="ruby-identifier">abilities</span>.<span class="ruby-identifier">allowed?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-identifier">action</span>, <span class="ruby-identifier">subject</span>) - <span class="ruby-identifier">forbidden!</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-can-3F"> - - <b>can?</b>(object, action, subject) - - <a href="../../classes/Gitlab/APIHelpers.html#method-i-can-3F" name="method-i-can-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-can-3F_source')" id="l_method-i-can-3F_source">show</a> - - </p> - <div id="method-i-can-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/api/helpers.rb, line 40</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">can?</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">action</span>, <span class="ruby-identifier">subject</span>) - <span class="ruby-identifier">abilities</span>.<span class="ruby-identifier">allowed?</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">action</span>, <span class="ruby-identifier">subject</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-current_user"> - - <b>current_user</b>() - - <a href="../../classes/Gitlab/APIHelpers.html#method-i-current_user" name="method-i-current_user" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-current_user_source')" id="l_method-i-current_user_source">show</a> - - </p> - <div id="method-i-current_user_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/api/helpers.rb, line 3</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">current_user</span> - <span class="ruby-ivar">@current_user</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">User</span>.<span class="ruby-identifier">find_by_authentication_token</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:private_token</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">env</span>[<span class="ruby-string">"HTTP_PRIVATE_TOKEN"</span>]) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-find_project"> - - <b>find_project</b>() - - <a href="../../classes/Gitlab/APIHelpers.html#method-i-find_project" name="method-i-find_project" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-find_project_source')" id="l_method-i-find_project_source">show</a> - - </p> - <div id="method-i-find_project_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/api/helpers.rb, line 12</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">find_project</span> - <span class="ruby-identifier">project</span> = <span class="ruby-constant">Project</span>.<span class="ruby-identifier">find_by_id</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) <span class="ruby-operator">||</span> <span class="ruby-constant">Project</span>.<span class="ruby-identifier">find_with_namespace</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">project</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-value">:read_project</span>, <span class="ruby-identifier">project</span>) - <span class="ruby-identifier">project</span> - <span class="ruby-keyword">else</span> - <span class="ruby-keyword">nil</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-forbidden-21"> - - <b>forbidden!</b>() - - <a href="../../classes/Gitlab/APIHelpers.html#method-i-forbidden-21" name="method-i-forbidden-21" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>error helpers</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-forbidden-21_source')" id="l_method-i-forbidden-21_source">show</a> - - </p> - <div id="method-i-forbidden-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/api/helpers.rb, line 54</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">forbidden!</span> - <span class="ruby-identifier">render_api_error!</span>(<span class="ruby-string">'403 Forbidden'</span>, <span class="ruby-number">403</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-not_allowed-21"> - - <b>not_allowed!</b>() - - <a href="../../classes/Gitlab/APIHelpers.html#method-i-not_allowed-21" name="method-i-not_allowed-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-not_allowed-21_source')" id="l_method-i-not_allowed-21_source">show</a> - - </p> - <div id="method-i-not_allowed-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/api/helpers.rb, line 69</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">not_allowed!</span> - <span class="ruby-identifier">render_api_error!</span>(<span class="ruby-string">'Method Not Allowed'</span>, <span class="ruby-number">405</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-not_found-21"> - - <b>not_found!</b>(resource = nil) - - <a href="../../classes/Gitlab/APIHelpers.html#method-i-not_found-21" name="method-i-not_found-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-not_found-21_source')" id="l_method-i-not_found-21_source">show</a> - - </p> - <div id="method-i-not_found-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/api/helpers.rb, line 58</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">not_found!</span>(<span class="ruby-identifier">resource</span> = <span class="ruby-keyword">nil</span>) - <span class="ruby-identifier">message</span> = [<span class="ruby-string">"404"</span>] - <span class="ruby-identifier">message</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">resource</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">resource</span> - <span class="ruby-identifier">message</span> <span class="ruby-operator"><<</span> <span class="ruby-string">"Not Found"</span> - <span class="ruby-identifier">render_api_error!</span>(<span class="ruby-identifier">message</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">' '</span>), <span class="ruby-number">404</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-paginate"> - - <b>paginate</b>(object) - - <a href="../../classes/Gitlab/APIHelpers.html#method-i-paginate" name="method-i-paginate" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-paginate_source')" id="l_method-i-paginate_source">show</a> - - </p> - <div id="method-i-paginate_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/api/helpers.rb, line 22</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">paginate</span>(<span class="ruby-identifier">object</span>) - <span class="ruby-identifier">object</span>.<span class="ruby-identifier">page</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:page</span>]).<span class="ruby-identifier">per</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:per_page</span>].<span class="ruby-identifier">to_i</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-render_api_error-21"> - - <b>render_api_error!</b>(message, status) - - <a href="../../classes/Gitlab/APIHelpers.html#method-i-render_api_error-21" name="method-i-render_api_error-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-render_api_error-21_source')" id="l_method-i-render_api_error-21_source">show</a> - - </p> - <div id="method-i-render_api_error-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/api/helpers.rb, line 73</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">render_api_error!</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">status</span>) - <span class="ruby-identifier">error!</span>({<span class="ruby-string">'message'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">message</span>}, <span class="ruby-identifier">status</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-unauthorized-21"> - - <b>unauthorized!</b>() - - <a href="../../classes/Gitlab/APIHelpers.html#method-i-unauthorized-21" name="method-i-unauthorized-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-unauthorized-21_source')" id="l_method-i-unauthorized-21_source">show</a> - - </p> - <div id="method-i-unauthorized-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/api/helpers.rb, line 65</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">unauthorized!</span> - <span class="ruby-identifier">render_api_error!</span>(<span class="ruby-string">'401 Unauthorized'</span>, <span class="ruby-number">401</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-user_project"> - - <b>user_project</b>() - - <a href="../../classes/Gitlab/APIHelpers.html#method-i-user_project" name="method-i-user_project" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-user_project_source')" id="l_method-i-user_project_source">show</a> - - </p> - <div id="method-i-user_project_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/api/helpers.rb, line 7</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">user_project</span> - <span class="ruby-ivar">@project</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">find_project</span> - <span class="ruby-ivar">@project</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">not_found!</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/AppLogger.html b/doc/code/classes/Gitlab/AppLogger.html deleted file mode 100644 index 2f4dc5349e3..00000000000 --- a/doc/code/classes/Gitlab/AppLogger.html +++ /dev/null @@ -1,173 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::AppLogger</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::AppLogger - - <span class="parent">< - - <a href="Logger.html">Gitlab::Logger</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/gitlab/app_logger_rb.html">lib/gitlab/app_logger.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>F</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-file_name">file_name</a>, - </li> - - - <li> - <a href="#method-i-format_message">format_message</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-file_name"> - - <b>file_name</b>() - - <a href="../../classes/Gitlab/AppLogger.html#method-c-file_name" name="method-c-file_name" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-file_name_source')" id="l_method-c-file_name_source">show</a> - - </p> - <div id="method-c-file_name_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/app_logger.rb, line 3</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">file_name</span> - <span class="ruby-string">'application.log'</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-format_message"> - - <b>format_message</b>(severity, timestamp, progname, msg) - - <a href="../../classes/Gitlab/AppLogger.html#method-i-format_message" name="method-i-format_message" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-format_message_source')" id="l_method-i-format_message_source">show</a> - - </p> - <div id="method-i-format_message_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/app_logger.rb, line 7</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">format_message</span>(<span class="ruby-identifier">severity</span>, <span class="ruby-identifier">timestamp</span>, <span class="ruby-identifier">progname</span>, <span class="ruby-identifier">msg</span>) - <span class="ruby-node">"#{timestamp.to_s(:long)}: #{msg}\n"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Application.html b/doc/code/classes/Gitlab/Application.html deleted file mode 100644 index c8a1e3c2698..00000000000 --- a/doc/code/classes/Gitlab/Application.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Application</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Application - - <span class="parent">< - - Rails::Application - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/config/application_rb.html">config/application.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Auth.html b/doc/code/classes/Gitlab/Auth.html deleted file mode 100644 index 4eeb3fecbc5..00000000000 --- a/doc/code/classes/Gitlab/Auth.html +++ /dev/null @@ -1,315 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Auth</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Auth - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/gitlab/auth_rb.html">lib/gitlab/auth.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-create_from_omniauth">create_from_omniauth</a> - </li> - - </ul> - </dd> - - <dt>F</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-find_for_ldap_auth">find_for_ldap_auth</a>, - </li> - - - <li> - <a href="#method-i-find_or_new_for_omniauth">find_or_new_for_omniauth</a> - </li> - - </ul> - </dd> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-log">log</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-create_from_omniauth"> - - <b>create_from_omniauth</b>(auth, ldap = false) - - <a href="../../classes/Gitlab/Auth.html#method-i-create_from_omniauth" name="method-i-create_from_omniauth" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-create_from_omniauth_source')" id="l_method-i-create_from_omniauth_source">show</a> - - </p> - <div id="method-i-create_from_omniauth_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/auth.rb, line 20</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">create_from_omniauth</span>(<span class="ruby-identifier">auth</span>, <span class="ruby-identifier">ldap</span> = <span class="ruby-keyword">false</span>) - <span class="ruby-identifier">provider</span> = <span class="ruby-identifier">auth</span>.<span class="ruby-identifier">provider</span> - <span class="ruby-identifier">uid</span> = <span class="ruby-identifier">auth</span>.<span class="ruby-identifier">info</span>.<span class="ruby-identifier">uid</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">auth</span>.<span class="ruby-identifier">uid</span> - <span class="ruby-identifier">name</span> = <span class="ruby-identifier">auth</span>.<span class="ruby-identifier">info</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">force_encoding</span>(<span class="ruby-string">"utf-8"</span>) - <span class="ruby-identifier">email</span> = <span class="ruby-identifier">auth</span>.<span class="ruby-identifier">info</span>.<span class="ruby-identifier">email</span>.<span class="ruby-identifier">downcase</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">auth</span>.<span class="ruby-identifier">info</span>.<span class="ruby-identifier">email</span>.<span class="ruby-identifier">nil?</span> - - <span class="ruby-identifier">ldap_prefix</span> = <span class="ruby-identifier">ldap</span> <span class="ruby-operator">?</span> <span class="ruby-string">'(LDAP) '</span> <span class="ruby-operator">:</span> <span class="ruby-string">''</span> - <span class="ruby-identifier">raise</span> <span class="ruby-constant">OmniAuth</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span>, <span class="ruby-node">"#{ldap_prefix}#{provider} does not provide an email"</span> <span class="ruby-string">" address"</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">auth</span>.<span class="ruby-identifier">info</span>.<span class="ruby-identifier">email</span>.<span class="ruby-identifier">blank?</span> - - <span class="ruby-identifier">log</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"#{ldap_prefix}Creating user from #{provider} login"</span> <span class="ruby-node">" {uid => #{uid}, name => #{name}, email => #{email}}"</span> - <span class="ruby-identifier">password</span> = <span class="ruby-constant">Devise</span>.<span class="ruby-identifier">friendly_token</span>[<span class="ruby-number">0</span>, <span class="ruby-number">8</span>].<span class="ruby-identifier">downcase</span> - <span class="ruby-ivar">@user</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">new</span>({ - <span class="ruby-identifier">extern_uid</span><span class="ruby-operator">:</span> <span class="ruby-identifier">uid</span>, - <span class="ruby-identifier">provider</span><span class="ruby-operator">:</span> <span class="ruby-identifier">provider</span>, - <span class="ruby-identifier">name</span><span class="ruby-operator">:</span> <span class="ruby-identifier">name</span>, - <span class="ruby-identifier">username</span><span class="ruby-operator">:</span> <span class="ruby-identifier">email</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp">%r^[^@]*/</span>)[<span class="ruby-number">0</span>], - <span class="ruby-identifier">email</span><span class="ruby-operator">:</span> <span class="ruby-identifier">email</span>, - <span class="ruby-identifier">password</span><span class="ruby-operator">:</span> <span class="ruby-identifier">password</span>, - <span class="ruby-identifier">password_confirmation</span><span class="ruby-operator">:</span> <span class="ruby-identifier">password</span>, - <span class="ruby-identifier">projects_limit</span><span class="ruby-operator">:</span> <span class="ruby-constant">Gitlab</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">gitlab</span>.<span class="ruby-identifier">default_projects_limit</span>, - }, <span class="ruby-identifier">as</span><span class="ruby-operator">:</span> <span class="ruby-value">:admin</span>) - <span class="ruby-keyword">if</span> <span class="ruby-constant">Gitlab</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">omniauth</span>[<span class="ruby-string">'block_auto_created_users'</span>] <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">ldap</span> - <span class="ruby-ivar">@user</span>.<span class="ruby-identifier">blocked</span> = <span class="ruby-keyword">true</span> - <span class="ruby-keyword">end</span> - <span class="ruby-ivar">@user</span>.<span class="ruby-identifier">save!</span> - <span class="ruby-ivar">@user</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-find_for_ldap_auth"> - - <b>find_for_ldap_auth</b>(auth, signed_in_resource = nil) - - <a href="../../classes/Gitlab/Auth.html#method-i-find_for_ldap_auth" name="method-i-find_for_ldap_auth" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-find_for_ldap_auth_source')" id="l_method-i-find_for_ldap_auth_source">show</a> - - </p> - <div id="method-i-find_for_ldap_auth_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/auth.rb, line 3</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">find_for_ldap_auth</span>(<span class="ruby-identifier">auth</span>, <span class="ruby-identifier">signed_in_resource</span> = <span class="ruby-keyword">nil</span>) - <span class="ruby-identifier">uid</span> = <span class="ruby-identifier">auth</span>.<span class="ruby-identifier">info</span>.<span class="ruby-identifier">uid</span> - <span class="ruby-identifier">provider</span> = <span class="ruby-identifier">auth</span>.<span class="ruby-identifier">provider</span> - <span class="ruby-identifier">email</span> = <span class="ruby-identifier">auth</span>.<span class="ruby-identifier">info</span>.<span class="ruby-identifier">email</span>.<span class="ruby-identifier">downcase</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">auth</span>.<span class="ruby-identifier">info</span>.<span class="ruby-identifier">email</span>.<span class="ruby-identifier">nil?</span> - <span class="ruby-identifier">raise</span> <span class="ruby-constant">OmniAuth</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span>, <span class="ruby-string">"LDAP accounts must provide an uid and email address"</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">uid</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">or</span> <span class="ruby-identifier">email</span>.<span class="ruby-identifier">nil?</span> - - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@user</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">find_by_extern_uid_and_provider</span>(<span class="ruby-identifier">uid</span>, <span class="ruby-identifier">provider</span>) - <span class="ruby-ivar">@user</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-ivar">@user</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">find_by_email</span>(<span class="ruby-identifier">email</span>) - <span class="ruby-identifier">log</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">"Updating legacy LDAP user #{email} with extern_uid => #{uid}"</span> - <span class="ruby-ivar">@user</span>.<span class="ruby-identifier">update_attributes</span>(<span class="ruby-value">:extern_uid</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">uid</span>, <span class="ruby-value">:provider</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">provider</span>) - <span class="ruby-ivar">@user</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">create_from_omniauth</span>(<span class="ruby-identifier">auth</span>, <span class="ruby-keyword">true</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-find_or_new_for_omniauth"> - - <b>find_or_new_for_omniauth</b>(auth) - - <a href="../../classes/Gitlab/Auth.html#method-i-find_or_new_for_omniauth" name="method-i-find_or_new_for_omniauth" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-find_or_new_for_omniauth_source')" id="l_method-i-find_or_new_for_omniauth_source">show</a> - - </p> - <div id="method-i-find_or_new_for_omniauth_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/auth.rb, line 50</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">find_or_new_for_omniauth</span>(<span class="ruby-identifier">auth</span>) - <span class="ruby-identifier">provider</span>, <span class="ruby-identifier">uid</span> = <span class="ruby-identifier">auth</span>.<span class="ruby-identifier">provider</span>, <span class="ruby-identifier">auth</span>.<span class="ruby-identifier">uid</span> - <span class="ruby-identifier">email</span> = <span class="ruby-identifier">auth</span>.<span class="ruby-identifier">info</span>.<span class="ruby-identifier">email</span>.<span class="ruby-identifier">downcase</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">auth</span>.<span class="ruby-identifier">info</span>.<span class="ruby-identifier">email</span>.<span class="ruby-identifier">nil?</span> - - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@user</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">find_by_provider_and_extern_uid</span>(<span class="ruby-identifier">provider</span>, <span class="ruby-identifier">uid</span>) - <span class="ruby-ivar">@user</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-ivar">@user</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">find_by_email</span>(<span class="ruby-identifier">email</span>) - <span class="ruby-ivar">@user</span>.<span class="ruby-identifier">update_attributes</span>(<span class="ruby-value">:extern_uid</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">uid</span>, <span class="ruby-value">:provider</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">provider</span>) - <span class="ruby-ivar">@user</span> - <span class="ruby-keyword">else</span> - <span class="ruby-keyword">if</span> <span class="ruby-constant">Gitlab</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">omniauth</span>[<span class="ruby-string">'allow_single_sign_on'</span>] - <span class="ruby-ivar">@user</span> = <span class="ruby-identifier">create_from_omniauth</span>(<span class="ruby-identifier">auth</span>) - <span class="ruby-ivar">@user</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-log"> - - <b>log</b>() - - <a href="../../classes/Gitlab/Auth.html#method-i-log" name="method-i-log" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-log_source')" id="l_method-i-log_source">show</a> - - </p> - <div id="method-i-log_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/auth.rb, line 67</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">log</span> - <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">AppLogger</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities.html b/doc/code/classes/Gitlab/Entities.html deleted file mode 100644 index 8cb9ed35679..00000000000 --- a/doc/code/classes/Gitlab/Entities.html +++ /dev/null @@ -1,151 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Entities</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - Gitlab::Entities - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/api/entities_rb.html">lib/api/entities.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">CLASS</span> - <a href="Entities/Hook.html">Gitlab::Entities::Hook</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Entities/Issue.html">Gitlab::Entities::Issue</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Entities/MRNote.html">Gitlab::Entities::MRNote</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Entities/MergeRequest.html">Gitlab::Entities::MergeRequest</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Entities/Milestone.html">Gitlab::Entities::Milestone</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Entities/Note.html">Gitlab::Entities::Note</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Entities/Project.html">Gitlab::Entities::Project</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Entities/ProjectMember.html">Gitlab::Entities::ProjectMember</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Entities/ProjectSnippet.html">Gitlab::Entities::ProjectSnippet</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Entities/RepoCommit.html">Gitlab::Entities::RepoCommit</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Entities/RepoObject.html">Gitlab::Entities::RepoObject</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Entities/SSHKey.html">Gitlab::Entities::SSHKey</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Entities/User.html">Gitlab::Entities::User</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Entities/UserBasic.html">Gitlab::Entities::UserBasic</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Entities/UserLogin.html">Gitlab::Entities::UserLogin</a> - </li> - - </ul> - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/Hook.html b/doc/code/classes/Gitlab/Entities/Hook.html deleted file mode 100644 index a42cc91d4a3..00000000000 --- a/doc/code/classes/Gitlab/Entities/Hook.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Entities::Hook</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Entities::Hook - - <span class="parent">< - - Grape::Entity - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/api/entities_rb.html">lib/api/entities.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/Issue.html b/doc/code/classes/Gitlab/Entities/Issue.html deleted file mode 100644 index 432c6f4bc14..00000000000 --- a/doc/code/classes/Gitlab/Entities/Issue.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Entities::Issue</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Entities::Issue - - <span class="parent">< - - Grape::Entity - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/api/entities_rb.html">lib/api/entities.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/MRNote.html b/doc/code/classes/Gitlab/Entities/MRNote.html deleted file mode 100644 index e05a43b8e54..00000000000 --- a/doc/code/classes/Gitlab/Entities/MRNote.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Entities::MRNote</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Entities::MRNote - - <span class="parent">< - - Grape::Entity - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/api/entities_rb.html">lib/api/entities.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/MergeRequest.html b/doc/code/classes/Gitlab/Entities/MergeRequest.html deleted file mode 100644 index e68077163e7..00000000000 --- a/doc/code/classes/Gitlab/Entities/MergeRequest.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Entities::MergeRequest</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Entities::MergeRequest - - <span class="parent">< - - Grape::Entity - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/api/entities_rb.html">lib/api/entities.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/Milestone.html b/doc/code/classes/Gitlab/Entities/Milestone.html deleted file mode 100644 index 3c375faa8fb..00000000000 --- a/doc/code/classes/Gitlab/Entities/Milestone.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Entities::Milestone</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Entities::Milestone - - <span class="parent">< - - Grape::Entity - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/api/entities_rb.html">lib/api/entities.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/Note.html b/doc/code/classes/Gitlab/Entities/Note.html deleted file mode 100644 index f0ba6567df5..00000000000 --- a/doc/code/classes/Gitlab/Entities/Note.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Entities::Note</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Entities::Note - - <span class="parent">< - - Grape::Entity - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/api/entities_rb.html">lib/api/entities.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/Project.html b/doc/code/classes/Gitlab/Entities/Project.html deleted file mode 100644 index a111b19ffd2..00000000000 --- a/doc/code/classes/Gitlab/Entities/Project.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Entities::Project</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Entities::Project - - <span class="parent">< - - Grape::Entity - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/api/entities_rb.html">lib/api/entities.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/ProjectMember.html b/doc/code/classes/Gitlab/Entities/ProjectMember.html deleted file mode 100644 index 151abf270d2..00000000000 --- a/doc/code/classes/Gitlab/Entities/ProjectMember.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Entities::ProjectMember</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Entities::ProjectMember - - <span class="parent">< - - <a href="UserBasic.html">Gitlab::Entities::UserBasic</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/api/entities_rb.html">lib/api/entities.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/ProjectSnippet.html b/doc/code/classes/Gitlab/Entities/ProjectSnippet.html deleted file mode 100644 index 61259d0c0d1..00000000000 --- a/doc/code/classes/Gitlab/Entities/ProjectSnippet.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Entities::ProjectSnippet</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Entities::ProjectSnippet - - <span class="parent">< - - Grape::Entity - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/api/entities_rb.html">lib/api/entities.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/RepoCommit.html b/doc/code/classes/Gitlab/Entities/RepoCommit.html deleted file mode 100644 index 3d181a6f268..00000000000 --- a/doc/code/classes/Gitlab/Entities/RepoCommit.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Entities::RepoCommit</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Entities::RepoCommit - - <span class="parent">< - - Grape::Entity - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/api/entities_rb.html">lib/api/entities.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/RepoObject.html b/doc/code/classes/Gitlab/Entities/RepoObject.html deleted file mode 100644 index ee6a10e7a6a..00000000000 --- a/doc/code/classes/Gitlab/Entities/RepoObject.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Entities::RepoObject</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Entities::RepoObject - - <span class="parent">< - - Grape::Entity - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/api/entities_rb.html">lib/api/entities.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/SSHKey.html b/doc/code/classes/Gitlab/Entities/SSHKey.html deleted file mode 100644 index cbc4d1a3a6b..00000000000 --- a/doc/code/classes/Gitlab/Entities/SSHKey.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Entities::SSHKey</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Entities::SSHKey - - <span class="parent">< - - Grape::Entity - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/api/entities_rb.html">lib/api/entities.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/User.html b/doc/code/classes/Gitlab/Entities/User.html deleted file mode 100644 index 5c29667639e..00000000000 --- a/doc/code/classes/Gitlab/Entities/User.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Entities::User</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Entities::User - - <span class="parent">< - - Grape::Entity - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/api/entities_rb.html">lib/api/entities.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/UserBasic.html b/doc/code/classes/Gitlab/Entities/UserBasic.html deleted file mode 100644 index a17b808def4..00000000000 --- a/doc/code/classes/Gitlab/Entities/UserBasic.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Entities::UserBasic</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Entities::UserBasic - - <span class="parent">< - - Grape::Entity - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/api/entities_rb.html">lib/api/entities.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Entities/UserLogin.html b/doc/code/classes/Gitlab/Entities/UserLogin.html deleted file mode 100644 index d73be2ca6ca..00000000000 --- a/doc/code/classes/Gitlab/Entities/UserLogin.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Entities::UserLogin</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Entities::UserLogin - - <span class="parent">< - - <a href="UserBasic.html">Gitlab::Entities::UserBasic</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/api/entities_rb.html">lib/api/entities.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/GitLogger.html b/doc/code/classes/Gitlab/GitLogger.html deleted file mode 100644 index 19018c0fc7c..00000000000 --- a/doc/code/classes/Gitlab/GitLogger.html +++ /dev/null @@ -1,173 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::GitLogger</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::GitLogger - - <span class="parent">< - - <a href="Logger.html">Gitlab::Logger</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/gitlab/git_logger_rb.html">lib/gitlab/git_logger.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>F</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-file_name">file_name</a>, - </li> - - - <li> - <a href="#method-i-format_message">format_message</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-file_name"> - - <b>file_name</b>() - - <a href="../../classes/Gitlab/GitLogger.html#method-c-file_name" name="method-c-file_name" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-file_name_source')" id="l_method-c-file_name_source">show</a> - - </p> - <div id="method-c-file_name_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/git_logger.rb, line 3</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">file_name</span> - <span class="ruby-string">'githost.log'</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-format_message"> - - <b>format_message</b>(severity, timestamp, progname, msg) - - <a href="../../classes/Gitlab/GitLogger.html#method-i-format_message" name="method-i-format_message" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-format_message_source')" id="l_method-i-format_message_source">show</a> - - </p> - <div id="method-i-format_message_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/git_logger.rb, line 7</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">format_message</span>(<span class="ruby-identifier">severity</span>, <span class="ruby-identifier">timestamp</span>, <span class="ruby-identifier">progname</span>, <span class="ruby-identifier">msg</span>) - <span class="ruby-node">"#{timestamp.to_s(:long)} -> #{severity} -> #{msg}\n"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/GitStats.html b/doc/code/classes/Gitlab/GitStats.html deleted file mode 100644 index fabe18bb4d7..00000000000 --- a/doc/code/classes/Gitlab/GitStats.html +++ /dev/null @@ -1,506 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::GitStats</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::GitStats - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/gitlab/git_stats_rb.html">lib/gitlab/git_stats.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-authors">authors</a>, - </li> - - - <li> - <a href="#method-i-authors_count">authors_count</a> - </li> - - </ul> - </dd> - - <dt>B</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-build_graph">build_graph</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-collect_authors">collect_authors</a>, - </li> - - - <li> - <a href="#method-i-commits_count">commits_count</a> - </li> - - </ul> - </dd> - - <dt>F</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-files_count">files_count</a> - </li> - - </ul> - </dd> - - <dt>G</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-graph">graph</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-new">new</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>ref</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>repo</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-new"> - - <b>new</b>(repo, ref) - - <a href="../../classes/Gitlab/GitStats.html#method-c-new" name="method-c-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a> - - </p> - <div id="method-c-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/git_stats.rb, line 5</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span> <span class="ruby-identifier">repo</span>, <span class="ruby-identifier">ref</span> - <span class="ruby-ivar">@repo</span>, <span class="ruby-ivar">@ref</span> = <span class="ruby-identifier">repo</span>, <span class="ruby-identifier">ref</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-authors"> - - <b>authors</b>() - - <a href="../../classes/Gitlab/GitStats.html#method-i-authors" name="method-i-authors" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-authors_source')" id="l_method-i-authors_source">show</a> - - </p> - <div id="method-i-authors_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/git_stats.rb, line 9</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">authors</span> - <span class="ruby-ivar">@authors</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">collect_authors</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-authors_count"> - - <b>authors_count</b>() - - <a href="../../classes/Gitlab/GitStats.html#method-i-authors_count" name="method-i-authors_count" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-authors_count_source')" id="l_method-i-authors_count_source">show</a> - - </p> - <div id="method-i-authors_count_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/git_stats.rb, line 22</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">authors_count</span> - <span class="ruby-identifier">authors</span>.<span class="ruby-identifier">size</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-commits_count"> - - <b>commits_count</b>() - - <a href="../../classes/Gitlab/GitStats.html#method-i-commits_count" name="method-i-commits_count" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-commits_count_source')" id="l_method-i-commits_count_source">show</a> - - </p> - <div id="method-i-commits_count_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/git_stats.rb, line 13</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commits_count</span> - <span class="ruby-ivar">@commits_count</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">commit_count</span>(<span class="ruby-identifier">ref</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-files_count"> - - <b>files_count</b>() - - <a href="../../classes/Gitlab/GitStats.html#method-i-files_count" name="method-i-files_count" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-files_count_source')" id="l_method-i-files_count_source">show</a> - - </p> - <div id="method-i-files_count_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/git_stats.rb, line 17</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">files_count</span> - <span class="ruby-identifier">args</span> = [<span class="ruby-identifier">ref</span>, <span class="ruby-string">'-r'</span>, <span class="ruby-string">'--name-only'</span> ] - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">git</span>.<span class="ruby-identifier">run</span>(<span class="ruby-keyword">nil</span>, <span class="ruby-string">'ls-tree'</span>, <span class="ruby-keyword">nil</span>, {}, <span class="ruby-identifier">args</span>).<span class="ruby-identifier">split</span>(<span class="ruby-string">"\n"</span>).<span class="ruby-identifier">count</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-graph"> - - <b>graph</b>() - - <a href="../../classes/Gitlab/GitStats.html#method-i-graph" name="method-i-graph" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-graph_source')" id="l_method-i-graph_source">show</a> - - </p> - <div id="method-i-graph_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/git_stats.rb, line 26</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">graph</span> - <span class="ruby-ivar">@graph</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">build_graph</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-build_graph"> - - <b>build_graph</b>(n = 4) - - <a href="../../classes/Gitlab/GitStats.html#method-i-build_graph" name="method-i-build_graph" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-build_graph_source')" id="l_method-i-build_graph_source">show</a> - - </p> - <div id="method-i-build_graph_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/git_stats.rb, line 54</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">build_graph</span> <span class="ruby-identifier">n</span> = <span class="ruby-number">4</span> - <span class="ruby-identifier">from</span>, <span class="ruby-identifier">to</span> = (<span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">weeks</span>), <span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span> - <span class="ruby-identifier">args</span> = [<span class="ruby-string">'--all'</span>, <span class="ruby-node">"--since=#{from.to_s(:date)}"</span>, <span class="ruby-string">'--format=%ad'</span> ] - <span class="ruby-identifier">rev_list</span> = <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">git</span>.<span class="ruby-identifier">run</span>(<span class="ruby-keyword">nil</span>, <span class="ruby-string">'rev-list'</span>, <span class="ruby-keyword">nil</span>, {}, <span class="ruby-identifier">args</span>).<span class="ruby-identifier">split</span>(<span class="ruby-string">"\n"</span>) - - <span class="ruby-identifier">commits_dates</span> = <span class="ruby-identifier">rev_list</span>.<span class="ruby-identifier">values_at</span>(* <span class="ruby-identifier">rev_list</span>.<span class="ruby-identifier">each_index</span>.<span class="ruby-identifier">select</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">i</span>.<span class="ruby-identifier">odd?</span>}) - <span class="ruby-identifier">commits_dates</span> = <span class="ruby-identifier">commits_dates</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">date_str</span><span class="ruby-operator">|</span> <span class="ruby-constant">Time</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">date_str</span>).<span class="ruby-identifier">to_date</span>.<span class="ruby-identifier">to_s</span>(<span class="ruby-value">:date</span>) } - - <span class="ruby-identifier">commits_per_day</span> = <span class="ruby-identifier">from</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-identifier">to</span>).<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">day</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">commits_dates</span>.<span class="ruby-identifier">count</span>(<span class="ruby-identifier">day</span>.<span class="ruby-identifier">to_date</span>.<span class="ruby-identifier">to_s</span>(<span class="ruby-value">:date</span>)) - <span class="ruby-keyword">end</span> - - <span class="ruby-constant">OpenStruct</span>.<span class="ruby-identifier">new</span>( - <span class="ruby-identifier">labels</span><span class="ruby-operator">:</span> <span class="ruby-identifier">from</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-identifier">to</span>).<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">day</span><span class="ruby-operator">|</span> <span class="ruby-identifier">day</span>.<span class="ruby-identifier">stamp</span>(<span class="ruby-string">'Aug 23'</span>) }, - <span class="ruby-identifier">commits</span><span class="ruby-operator">:</span> <span class="ruby-identifier">commits_per_day</span>, - <span class="ruby-identifier">weeks</span><span class="ruby-operator">:</span> <span class="ruby-identifier">n</span> - ) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-collect_authors"> - - <b>collect_authors</b>() - - <a href="../../classes/Gitlab/GitStats.html#method-i-collect_authors" name="method-i-collect_authors" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-collect_authors_source')" id="l_method-i-collect_authors_source">show</a> - - </p> - <div id="method-i-collect_authors_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/git_stats.rb, line 32</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">collect_authors</span> - <span class="ruby-identifier">shortlog</span> = <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">git</span>.<span class="ruby-identifier">shortlog</span>({<span class="ruby-identifier">e</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>, <span class="ruby-identifier">s</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span> }, <span class="ruby-identifier">ref</span>) - - <span class="ruby-identifier">authors</span> = [] - - <span class="ruby-identifier">lines</span> = <span class="ruby-identifier">shortlog</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">"\n"</span>) - - <span class="ruby-identifier">lines</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">data</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">"\t"</span>) - <span class="ruby-identifier">commits</span> = <span class="ruby-identifier">data</span>.<span class="ruby-identifier">first</span> - <span class="ruby-identifier">author</span> = <span class="ruby-constant">Grit</span><span class="ruby-operator">::</span><span class="ruby-constant">Actor</span>.<span class="ruby-identifier">from_string</span>(<span class="ruby-identifier">data</span>.<span class="ruby-identifier">last</span>) - - <span class="ruby-identifier">authors</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">OpenStruct</span>.<span class="ruby-identifier">new</span>( - <span class="ruby-identifier">name</span><span class="ruby-operator">:</span> <span class="ruby-identifier">author</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-identifier">email</span><span class="ruby-operator">:</span> <span class="ruby-identifier">author</span>.<span class="ruby-identifier">email</span>, - <span class="ruby-identifier">commits</span><span class="ruby-operator">:</span> <span class="ruby-identifier">commits</span>.<span class="ruby-identifier">to_i</span> - ) - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">authors</span>.<span class="ruby-identifier">sort_by</span>(&<span class="ruby-value">:commits</span>).<span class="ruby-identifier">reverse</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Gitolite.html b/doc/code/classes/Gitlab/Gitolite.html deleted file mode 100644 index 8cf9c58c375..00000000000 --- a/doc/code/classes/Gitlab/Gitolite.html +++ /dev/null @@ -1,536 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Gitolite</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Gitolite - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/gitlab/backend/gitolite_rb.html">lib/gitlab/backend/gitolite.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">CLASS</span> - <a href="Gitolite/AccessDenied.html">Gitlab::Gitolite::AccessDenied</a> - </li> - - </ul> - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-config">config</a>, - </li> - - - <li> - <a href="#method-i-create_repository">create_repository</a> - </li> - - </ul> - </dd> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-enable_automerge">enable_automerge</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-move_repository">move_repository</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-remove_key">remove_key</a>, - </li> - - - <li> - <a href="#method-i-remove_repository">remove_repository</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-set_key">set_key</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-update_repositories">update_repositories</a>, - </li> - - - <li> - <a href="#method-i-update_repository">update_repository</a>, - </li> - - - <li> - <a href="#method-i-url_to_repo">url_to_repo</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-config"> - - <b>config</b>() - - <a href="../../classes/Gitlab/Gitolite.html#method-i-config" name="method-i-config" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-config_source')" id="l_method-i-config_source">show</a> - - </p> - <div id="method-i-config_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/gitolite.rb, line 7</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">config</span> - <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">GitoliteConfig</span>.<span class="ruby-identifier">new</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-create_repository"> - - <b>create_repository</b>(project) - - <a href="../../classes/Gitlab/Gitolite.html#method-i-create_repository" name="method-i-create_repository" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-enable_automerge"> - - <b>enable_automerge</b>() - - <a href="../../classes/Gitlab/Gitolite.html#method-i-enable_automerge" name="method-i-enable_automerge" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-enable_automerge_source')" id="l_method-i-enable_automerge_source">show</a> - - </p> - <div id="method-i-enable_automerge_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/gitolite.rb, line 44</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">enable_automerge</span> - <span class="ruby-identifier">config</span>.<span class="ruby-identifier">admin_all_repo!</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-move_repository"> - - <b>move_repository</b>(old_repo, project) - - <a href="../../classes/Gitlab/Gitolite.html#method-i-move_repository" name="method-i-move_repository" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-move_repository_source')" id="l_method-i-move_repository_source">show</a> - - </p> - <div id="method-i-move_repository_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/gitolite.rb, line 29</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">move_repository</span>(<span class="ruby-identifier">old_repo</span>, <span class="ruby-identifier">project</span>) - <span class="ruby-identifier">config</span>.<span class="ruby-identifier">apply</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">config</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">config</span>.<span class="ruby-identifier">clean_repo</span>(<span class="ruby-identifier">old_repo</span>) - <span class="ruby-identifier">config</span>.<span class="ruby-identifier">update_project</span>(<span class="ruby-identifier">project</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-remove_key"> - - <b>remove_key</b>(key_id, projects) - - <a href="../../classes/Gitlab/Gitolite.html#method-i-remove_key" name="method-i-remove_key" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-remove_key_source')" id="l_method-i-remove_key_source">show</a> - - </p> - <div id="method-i-remove_key_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/gitolite.rb, line 18</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">remove_key</span> <span class="ruby-identifier">key_id</span>, <span class="ruby-identifier">projects</span> - <span class="ruby-identifier">config</span>.<span class="ruby-identifier">apply</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">config</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">config</span>.<span class="ruby-identifier">rm_key</span>(<span class="ruby-identifier">key_id</span>) - <span class="ruby-identifier">config</span>.<span class="ruby-identifier">update_projects</span>(<span class="ruby-identifier">projects</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-remove_repository"> - - <b>remove_repository</b>(project) - - <a href="../../classes/Gitlab/Gitolite.html#method-i-remove_repository" name="method-i-remove_repository" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-remove_repository_source')" id="l_method-i-remove_repository_source">show</a> - - </p> - <div id="method-i-remove_repository_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/gitolite.rb, line 36</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">remove_repository</span> <span class="ruby-identifier">project</span> - <span class="ruby-identifier">config</span>.<span class="ruby-identifier">destroy_project!</span>(<span class="ruby-identifier">project</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-set_key"> - - <b>set_key</b>(key_id, key_content, projects) - - <a href="../../classes/Gitlab/Gitolite.html#method-i-set_key" name="method-i-set_key" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-set_key_source')" id="l_method-i-set_key_source">show</a> - - </p> - <div id="method-i-set_key_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/gitolite.rb, line 11</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">set_key</span> <span class="ruby-identifier">key_id</span>, <span class="ruby-identifier">key_content</span>, <span class="ruby-identifier">projects</span> - <span class="ruby-identifier">config</span>.<span class="ruby-identifier">apply</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">config</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">config</span>.<span class="ruby-identifier">write_key</span>(<span class="ruby-identifier">key_id</span>, <span class="ruby-identifier">key_content</span>) - <span class="ruby-identifier">config</span>.<span class="ruby-identifier">update_projects</span>(<span class="ruby-identifier">projects</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update_repositories"> - - <b>update_repositories</b>(projects) - - <a href="../../classes/Gitlab/Gitolite.html#method-i-update_repositories" name="method-i-update_repositories" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_repositories_source')" id="l_method-i-update_repositories_source">show</a> - - </p> - <div id="method-i-update_repositories_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/gitolite.rb, line 48</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update_repositories</span> <span class="ruby-identifier">projects</span> - <span class="ruby-identifier">config</span>.<span class="ruby-identifier">apply</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">config</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">config</span>.<span class="ruby-identifier">update_projects</span>(<span class="ruby-identifier">projects</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update_repository"> - - <b>update_repository</b>(project) - - <a href="../../classes/Gitlab/Gitolite.html#method-i-update_repository" name="method-i-update_repository" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - <div class="aka"> - Also aliased as: <a href="Gitolite.html#method-i-create_repository">create_repository</a> - </div> - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_repository_source')" id="l_method-i-update_repository_source">show</a> - - </p> - <div id="method-i-update_repository_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/gitolite.rb, line 25</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update_repository</span> <span class="ruby-identifier">project</span> - <span class="ruby-identifier">config</span>.<span class="ruby-identifier">update_project!</span>(<span class="ruby-identifier">project</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-url_to_repo"> - - <b>url_to_repo</b>(path) - - <a href="../../classes/Gitlab/Gitolite.html#method-i-url_to_repo" name="method-i-url_to_repo" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-url_to_repo_source')" id="l_method-i-url_to_repo_source">show</a> - - </p> - <div id="method-i-url_to_repo_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/gitolite.rb, line 40</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">url_to_repo</span> <span class="ruby-identifier">path</span> - <span class="ruby-constant">Gitlab</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">gitolite</span>.<span class="ruby-identifier">ssh_path_prefix</span> <span class="ruby-operator">+</span> <span class="ruby-node">"#{path}.git"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Gitolite/AccessDenied.html b/doc/code/classes/Gitlab/Gitolite/AccessDenied.html deleted file mode 100644 index 8a45dae1ba2..00000000000 --- a/doc/code/classes/Gitlab/Gitolite/AccessDenied.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Gitolite::AccessDenied</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Gitolite::AccessDenied - - <span class="parent">< - - StandardError - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/gitlab/backend/gitolite_rb.html">lib/gitlab/backend/gitolite.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/GitoliteConfig.html b/doc/code/classes/Gitlab/GitoliteConfig.html deleted file mode 100644 index 11026f5ca44..00000000000 --- a/doc/code/classes/Gitlab/GitoliteConfig.html +++ /dev/null @@ -1,810 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::GitoliteConfig</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::GitoliteConfig - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/gitlab/backend/gitolite_config_rb.html">lib/gitlab/backend/gitolite_config.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">CLASS</span> - <a href="GitoliteConfig/PullError.html">Gitlab::GitoliteConfig::PullError</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="GitoliteConfig/PushError.html">Gitlab::GitoliteConfig::PushError</a> - </li> - - </ul> - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-admin_all_repo">admin_all_repo</a>, - </li> - - - <li> - <a href="#method-i-admin_all_repo-21">admin_all_repo!</a>, - </li> - - - <li> - <a href="#method-i-apply">apply</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-clean_repo">clean_repo</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-destroy_project">destroy_project</a>, - </li> - - - <li> - <a href="#method-i-destroy_project-21">destroy_project!</a> - </li> - - </ul> - </dd> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-log">log</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-rm_key">rm_key</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-update_project">update_project</a>, - </li> - - - <li> - <a href="#method-i-update_project-21">update_project!</a>, - </li> - - - <li> - <a href="#method-i-update_project_config">update_project_config</a>, - </li> - - - <li> - <a href="#method-i-update_projects">update_projects</a> - </li> - - </ul> - </dd> - - <dt>W</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-write_key">write_key</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [R] - </td> - <td class='attr-name'>conf</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [R] - </td> - <td class='attr-name'>config_tmp_dir</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [R] - </td> - <td class='attr-name'>ga_repo</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-admin_all_repo"> - - <b>admin_all_repo</b>() - - <a href="../../classes/Gitlab/GitoliteConfig.html#method-i-admin_all_repo" name="method-i-admin_all_repo" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Enable access to all repos for gitolite admin. We use it for accept merge -request feature</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-admin_all_repo_source')" id="l_method-i-admin_all_repo_source">show</a> - - </p> - <div id="method-i-admin_all_repo_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/gitolite_config.rb, line 169</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">admin_all_repo</span> - <span class="ruby-identifier">owner_name</span> = <span class="ruby-constant">Gitlab</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">gitolite</span>.<span class="ruby-identifier">admin_key</span> - - <span class="ruby-comment"># @ALL repos premission for gitolite owner</span> - <span class="ruby-identifier">repo_name</span> = <span class="ruby-string">"@all"</span> - <span class="ruby-identifier">repo</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">conf</span>.<span class="ruby-identifier">has_repo?</span>(<span class="ruby-identifier">repo_name</span>) - <span class="ruby-identifier">conf</span>.<span class="ruby-identifier">get_repo</span>(<span class="ruby-identifier">repo_name</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-operator">::</span><span class="ruby-constant">Gitolite</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span><span class="ruby-operator">::</span><span class="ruby-constant">Repo</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">repo_name</span>) - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">add_permission</span>(<span class="ruby-string">"RW+"</span>, <span class="ruby-string">""</span>, <span class="ruby-identifier">owner_name</span>) - <span class="ruby-identifier">conf</span>.<span class="ruby-identifier">add_repo</span>(<span class="ruby-identifier">repo</span>, <span class="ruby-keyword">true</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-admin_all_repo-21"> - - <b>admin_all_repo!</b>() - - <a href="../../classes/Gitlab/GitoliteConfig.html#method-i-admin_all_repo-21" name="method-i-admin_all_repo-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-admin_all_repo-21_source')" id="l_method-i-admin_all_repo-21_source">show</a> - - </p> - <div id="method-i-admin_all_repo-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/gitolite_config.rb, line 184</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">admin_all_repo!</span> - <span class="ruby-identifier">apply</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">config</span><span class="ruby-operator">|</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">admin_all_repo</span> } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-apply"> - - <b>apply</b>() - - <a href="../../classes/Gitlab/GitoliteConfig.html#method-i-apply" name="method-i-apply" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-apply_source')" id="l_method-i-apply_source">show</a> - - </p> - <div id="method-i-apply_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/gitolite_config.rb, line 23</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">apply</span> - <span class="ruby-constant">Timeout</span><span class="ruby-operator">::</span><span class="ruby-identifier">timeout</span>(<span class="ruby-number">30</span>) <span class="ruby-keyword">do</span> - <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-constant">Rails</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">'tmp'</span>, <span class="ruby-string">"gitlabhq-gitolite.lock"</span>), <span class="ruby-string">"w+"</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> - <span class="ruby-keyword">begin</span> - <span class="ruby-comment"># Set exclusive lock</span> - <span class="ruby-comment"># to prevent race condition</span> - <span class="ruby-identifier">f</span>.<span class="ruby-identifier">flock</span>(<span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">LOCK_EX</span>) - - <span class="ruby-comment"># Pull gitolite-admin repo</span> - <span class="ruby-comment"># in tmp dir before do any changes</span> - <span class="ruby-identifier">pull</span>(<span class="ruby-identifier">config_tmp_dir</span>) - - <span class="ruby-comment"># Build ga_repo object and @conf</span> - <span class="ruby-comment"># to access gitolite-admin configuration</span> - <span class="ruby-ivar">@conf</span> = <span class="ruby-identifier">ga_repo</span>.<span class="ruby-identifier">config</span> - - <span class="ruby-comment"># Do any changes</span> - <span class="ruby-comment"># in gitolite-admin</span> - <span class="ruby-comment"># config here</span> - <span class="ruby-keyword">yield</span>(<span class="ruby-keyword">self</span>) - - <span class="ruby-comment"># Save changes in</span> - <span class="ruby-comment"># gitolite-admin repo</span> - <span class="ruby-comment"># before push it</span> - <span class="ruby-identifier">ga_repo</span>.<span class="ruby-identifier">save</span> - - <span class="ruby-comment"># Push gitolite-admin repo</span> - <span class="ruby-comment"># to apply all changes</span> - <span class="ruby-identifier">push</span>(<span class="ruby-identifier">config_tmp_dir</span>) - <span class="ruby-keyword">ensure</span> - <span class="ruby-comment"># Remove tmp dir</span> - <span class="ruby-comment"># removing the gitolite folder first is important to avoid</span> - <span class="ruby-comment"># NFS issues.</span> - <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">config_tmp_dir</span>, <span class="ruby-string">'gitolite'</span>)) - - <span class="ruby-comment"># Remove parent tmp dir</span> - <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span>(<span class="ruby-identifier">config_tmp_dir</span>) - - <span class="ruby-comment"># Unlock so other task can access</span> - <span class="ruby-comment"># gitolite configuration</span> - <span class="ruby-identifier">f</span>.<span class="ruby-identifier">flock</span>(<span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">LOCK_UN</span>) - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">rescue</span> <span class="ruby-constant">PullError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span> - <span class="ruby-identifier">log</span>(<span class="ruby-string">"Pull error -> "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">ex</span>.<span class="ruby-identifier">message</span>) - <span class="ruby-identifier">raise</span> <span class="ruby-constant">Gitolite</span><span class="ruby-operator">::</span><span class="ruby-constant">AccessDenied</span>, <span class="ruby-identifier">ex</span>.<span class="ruby-identifier">message</span> - -<span class="ruby-keyword">rescue</span> <span class="ruby-constant">PushError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span> - <span class="ruby-identifier">log</span>(<span class="ruby-string">"Push error -> "</span> <span class="ruby-operator">+</span> <span class="ruby-string">" "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">ex</span>.<span class="ruby-identifier">message</span>) - <span class="ruby-identifier">raise</span> <span class="ruby-constant">Gitolite</span><span class="ruby-operator">::</span><span class="ruby-constant">AccessDenied</span>, <span class="ruby-identifier">ex</span>.<span class="ruby-identifier">message</span> - -<span class="ruby-keyword">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span> - <span class="ruby-identifier">log</span>(<span class="ruby-identifier">ex</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">+</span> <span class="ruby-string">" "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">ex</span>.<span class="ruby-identifier">message</span>) - <span class="ruby-identifier">raise</span> <span class="ruby-constant">Gitolite</span><span class="ruby-operator">::</span><span class="ruby-constant">AccessDenied</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">"gitolite timeout"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-clean_repo"> - - <b>clean_repo</b>(repo_name) - - <a href="../../classes/Gitlab/GitoliteConfig.html#method-i-clean_repo" name="method-i-clean_repo" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-clean_repo_source')" id="l_method-i-clean_repo_source">show</a> - - </p> - <div id="method-i-clean_repo_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/gitolite_config.rb, line 89</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">clean_repo</span> <span class="ruby-identifier">repo_name</span> - <span class="ruby-identifier">conf</span>.<span class="ruby-identifier">rm_repo</span>(<span class="ruby-identifier">repo_name</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-destroy_project"> - - <b>destroy_project</b>(project) - - <a href="../../classes/Gitlab/GitoliteConfig.html#method-i-destroy_project" name="method-i-destroy_project" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-destroy_project_source')" id="l_method-i-destroy_project_source">show</a> - - </p> - <div id="method-i-destroy_project_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/gitolite_config.rb, line 84</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">destroy_project</span>(<span class="ruby-identifier">project</span>) - <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span>(<span class="ruby-identifier">project</span>.<span class="ruby-identifier">path_to_repo</span>) - <span class="ruby-identifier">conf</span>.<span class="ruby-identifier">rm_repo</span>(<span class="ruby-identifier">project</span>.<span class="ruby-identifier">path_with_namespace</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-destroy_project-21"> - - <b>destroy_project!</b>(project) - - <a href="../../classes/Gitlab/GitoliteConfig.html#method-i-destroy_project-21" name="method-i-destroy_project-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-destroy_project-21_source')" id="l_method-i-destroy_project-21_source">show</a> - - </p> - <div id="method-i-destroy_project-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/gitolite_config.rb, line 93</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">destroy_project!</span>(<span class="ruby-identifier">project</span>) - <span class="ruby-identifier">apply</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">config</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">config</span>.<span class="ruby-identifier">destroy_project</span>(<span class="ruby-identifier">project</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-log"> - - <b>log</b>(message) - - <a href="../../classes/Gitlab/GitoliteConfig.html#method-i-log" name="method-i-log" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-log_source')" id="l_method-i-log_source">show</a> - - </p> - <div id="method-i-log_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/gitolite_config.rb, line 80</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">log</span> <span class="ruby-identifier">message</span> - <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">GitLogger</span>.<span class="ruby-identifier">error</span>(<span class="ruby-identifier">message</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-rm_key"> - - <b>rm_key</b>(user) - - <a href="../../classes/Gitlab/GitoliteConfig.html#method-i-rm_key" name="method-i-rm_key" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-rm_key_source')" id="l_method-i-rm_key_source">show</a> - - </p> - <div id="method-i-rm_key_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/gitolite_config.rb, line 105</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">rm_key</span>(<span class="ruby-identifier">user</span>) - <span class="ruby-identifier">key_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">config_tmp_dir</span>, <span class="ruby-string">'gitolite/keydir'</span>, <span class="ruby-node">"#{user}.pub"</span>) - <span class="ruby-identifier">ga_key</span> = <span class="ruby-operator">::</span><span class="ruby-constant">Gitolite</span><span class="ruby-operator">::</span><span class="ruby-constant">SSHKey</span>.<span class="ruby-identifier">from_file</span>(<span class="ruby-identifier">key_path</span>) - <span class="ruby-identifier">ga_repo</span>.<span class="ruby-identifier">rm_key</span>(<span class="ruby-identifier">ga_key</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update_project"> - - <b>update_project</b>(project) - - <a href="../../classes/Gitlab/GitoliteConfig.html#method-i-update_project" name="method-i-update_project" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>update or create</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_project_source')" id="l_method-i-update_project_source">show</a> - - </p> - <div id="method-i-update_project_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/gitolite_config.rb, line 112</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update_project</span>(<span class="ruby-identifier">project</span>) - <span class="ruby-identifier">repo</span> = <span class="ruby-identifier">update_project_config</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">conf</span>) - <span class="ruby-identifier">conf</span>.<span class="ruby-identifier">add_repo</span>(<span class="ruby-identifier">repo</span>, <span class="ruby-keyword">true</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update_project-21"> - - <b>update_project!</b>( project) - - <a href="../../classes/Gitlab/GitoliteConfig.html#method-i-update_project-21" name="method-i-update_project-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_project-21_source')" id="l_method-i-update_project-21_source">show</a> - - </p> - <div id="method-i-update_project-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/gitolite_config.rb, line 117</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update_project!</span>( <span class="ruby-identifier">project</span>) - <span class="ruby-identifier">apply</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">config</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">config</span>.<span class="ruby-identifier">update_project</span>(<span class="ruby-identifier">project</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update_project_config"> - - <b>update_project_config</b>(project, conf) - - <a href="../../classes/Gitlab/GitoliteConfig.html#method-i-update_project_config" name="method-i-update_project_config" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_project_config_source')" id="l_method-i-update_project_config_source">show</a> - - </p> - <div id="method-i-update_project_config_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/gitolite_config.rb, line 132</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update_project_config</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">conf</span>) - <span class="ruby-identifier">repo_name</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">path_with_namespace</span> - - <span class="ruby-identifier">repo</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">conf</span>.<span class="ruby-identifier">has_repo?</span>(<span class="ruby-identifier">repo_name</span>) - <span class="ruby-identifier">conf</span>.<span class="ruby-identifier">get_repo</span>(<span class="ruby-identifier">repo_name</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-operator">::</span><span class="ruby-constant">Gitolite</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span><span class="ruby-operator">::</span><span class="ruby-constant">Repo</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">repo_name</span>) - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">name_readers</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">repository_readers</span> - <span class="ruby-identifier">name_writers</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">repository_writers</span> - <span class="ruby-identifier">name_masters</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">repository_masters</span> - - <span class="ruby-identifier">pr_br</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">protected_branches</span>.<span class="ruby-identifier">map</span>(&<span class="ruby-value">:name</span>).<span class="ruby-identifier">join</span>(<span class="ruby-string">"$ "</span>) - - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">clean_permissions</span> - - <span class="ruby-comment"># Deny access to protected branches for writers</span> - <span class="ruby-keyword">unless</span> <span class="ruby-identifier">name_writers</span>.<span class="ruby-identifier">blank?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">pr_br</span>.<span class="ruby-identifier">blank?</span> - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">add_permission</span>(<span class="ruby-string">"-"</span>, <span class="ruby-identifier">pr_br</span>.<span class="ruby-identifier">strip</span> <span class="ruby-operator">+</span> <span class="ruby-string">"$ "</span>, <span class="ruby-identifier">name_writers</span>) - <span class="ruby-keyword">end</span> - - <span class="ruby-comment"># Add read permissions</span> - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">add_permission</span>(<span class="ruby-string">"R"</span>, <span class="ruby-string">""</span>, <span class="ruby-identifier">name_readers</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">name_readers</span>.<span class="ruby-identifier">blank?</span> - - <span class="ruby-comment"># Add write permissions</span> - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">add_permission</span>(<span class="ruby-string">"RW+"</span>, <span class="ruby-string">""</span>, <span class="ruby-identifier">name_writers</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">name_writers</span>.<span class="ruby-identifier">blank?</span> - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">add_permission</span>(<span class="ruby-string">"RW+"</span>, <span class="ruby-string">""</span>, <span class="ruby-identifier">name_masters</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">name_masters</span>.<span class="ruby-identifier">blank?</span> - - <span class="ruby-comment"># Add sharedRepository config</span> - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">set_git_config</span>(<span class="ruby-string">"core.sharedRepository"</span>, <span class="ruby-string">"0660"</span>) - - <span class="ruby-identifier">repo</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update_projects"> - - <b>update_projects</b>(projects) - - <a href="../../classes/Gitlab/GitoliteConfig.html#method-i-update_projects" name="method-i-update_projects" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Updates many projects and uses project.path_with_namespace as the repo path -An order of magnitude faster than <a -href="GitoliteConfig.html#method-i-update_project">#update_project</a></p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_projects_source')" id="l_method-i-update_projects_source">show</a> - - </p> - <div id="method-i-update_projects_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/gitolite_config.rb, line 125</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update_projects</span>(<span class="ruby-identifier">projects</span>) - <span class="ruby-identifier">projects</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">project</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">repo</span> = <span class="ruby-identifier">update_project_config</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">conf</span>) - <span class="ruby-identifier">conf</span>.<span class="ruby-identifier">add_repo</span>(<span class="ruby-identifier">repo</span>, <span class="ruby-keyword">true</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-write_key"> - - <b>write_key</b>(id, key) - - <a href="../../classes/Gitlab/GitoliteConfig.html#method-i-write_key" name="method-i-write_key" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-write_key_source')" id="l_method-i-write_key_source">show</a> - - </p> - <div id="method-i-write_key_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/gitolite_config.rb, line 99</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">write_key</span>(<span class="ruby-identifier">id</span>, <span class="ruby-identifier">key</span>) - <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">config_tmp_dir</span>, <span class="ruby-string">'gitolite/keydir'</span>,<span class="ruby-node">"#{id}.pub"</span>), <span class="ruby-string">'w'</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp">%r\n/</span>,<span class="ruby-string">''</span>)) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/GitoliteConfig/PullError.html b/doc/code/classes/Gitlab/GitoliteConfig/PullError.html deleted file mode 100644 index 35c46f38642..00000000000 --- a/doc/code/classes/Gitlab/GitoliteConfig/PullError.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::GitoliteConfig::PullError</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::GitoliteConfig::PullError - - <span class="parent">< - - StandardError - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/gitlab/backend/gitolite_config_rb.html">lib/gitlab/backend/gitolite_config.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/GitoliteConfig/PushError.html b/doc/code/classes/Gitlab/GitoliteConfig/PushError.html deleted file mode 100644 index 53efe1e8a7d..00000000000 --- a/doc/code/classes/Gitlab/GitoliteConfig/PushError.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::GitoliteConfig::PushError</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::GitoliteConfig::PushError - - <span class="parent">< - - StandardError - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/gitlab/backend/gitolite_config_rb.html">lib/gitlab/backend/gitolite_config.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Graph.html b/doc/code/classes/Gitlab/Graph.html deleted file mode 100644 index e0827c84594..00000000000 --- a/doc/code/classes/Gitlab/Graph.html +++ /dev/null @@ -1,88 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Graph</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - Gitlab::Graph - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/gitlab/graph/commit_rb.html">lib/gitlab/graph/commit.rb</a></li> - - <li><a href="../../files/lib/gitlab/graph/json_builder_rb.html">lib/gitlab/graph/json_builder.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">CLASS</span> - <a href="Graph/Commit.html">Gitlab::Graph::Commit</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Graph/JsonBuilder.html">Gitlab::Graph::JsonBuilder</a> - </li> - - </ul> - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Graph/Commit.html b/doc/code/classes/Gitlab/Graph/Commit.html deleted file mode 100644 index 0198b3f0e3c..00000000000 --- a/doc/code/classes/Gitlab/Graph/Commit.html +++ /dev/null @@ -1,337 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Graph::Commit</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Graph::Commit - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/gitlab/graph/commit_rb.html">lib/gitlab/graph/commit.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-add_refs">add_refs</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-method_missing">method_missing</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-new">new</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_graph_hash">to_graph_hash</a> - </li> - - </ul> - </dd> - - </dl> - - - - <!-- Includes --> - <div class="sectiontitle">Included Modules</div> - <ul> - - <li> - - ActionView::Helpers::TagHelper - - </li> - - </ul> - - - - - - - - - - - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>refs</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>space</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>time</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-new"> - - <b>new</b>(commit) - - <a href="../../../classes/Gitlab/Graph/Commit.html#method-c-new" name="method-c-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a> - - </p> - <div id="method-c-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/graph/commit.rb, line 10</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span>(<span class="ruby-identifier">commit</span>) - <span class="ruby-ivar">@_commit</span> = <span class="ruby-identifier">commit</span> - <span class="ruby-ivar">@time</span> = <span class="ruby-number">-1</span> - <span class="ruby-ivar">@space</span> = <span class="ruby-number">0</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-add_refs"> - - <b>add_refs</b>(ref_cache, repo) - - <a href="../../../classes/Gitlab/Graph/Commit.html#method-i-add_refs" name="method-i-add_refs" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-add_refs_source')" id="l_method-i-add_refs_source">show</a> - - </p> - <div id="method-i-add_refs_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/graph/commit.rb, line 36</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">add_refs</span>(<span class="ruby-identifier">ref_cache</span>, <span class="ruby-identifier">repo</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">ref_cache</span>.<span class="ruby-identifier">empty?</span> - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">refs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ref</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">ref_cache</span>[<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">commit</span>.<span class="ruby-identifier">id</span>] <span class="ruby-operator">||=</span> [] - <span class="ruby-identifier">ref_cache</span>[<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">commit</span>.<span class="ruby-identifier">id</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">ref</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - <span class="ruby-ivar">@refs</span> = <span class="ruby-identifier">ref_cache</span>[<span class="ruby-ivar">@_commit</span>.<span class="ruby-identifier">id</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">ref_cache</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-ivar">@_commit</span>.<span class="ruby-identifier">id</span>) - <span class="ruby-ivar">@refs</span> <span class="ruby-operator">||=</span> [] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-method_missing"> - - <b>method_missing</b>(m, *args, &block) - - <a href="../../../classes/Gitlab/Graph/Commit.html#method-i-method_missing" name="method-i-method_missing" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-method_missing_source')" id="l_method-i-method_missing_source">show</a> - - </p> - <div id="method-i-method_missing_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/graph/commit.rb, line 16</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">method_missing</span>(<span class="ruby-identifier">m</span>, *<span class="ruby-identifier">args</span>, &<span class="ruby-identifier">block</span>) - <span class="ruby-ivar">@_commit</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">m</span>, *<span class="ruby-identifier">args</span>, &<span class="ruby-identifier">block</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_graph_hash"> - - <b>to_graph_hash</b>() - - <a href="../../../classes/Gitlab/Graph/Commit.html#method-i-to_graph_hash" name="method-i-to_graph_hash" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_graph_hash_source')" id="l_method-i-to_graph_hash_source">show</a> - - </p> - <div id="method-i-to_graph_hash_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/graph/commit.rb, line 20</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_graph_hash</span> - <span class="ruby-identifier">h</span> = {} - <span class="ruby-identifier">h</span>[<span class="ruby-value">:parents</span>] = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">parents</span>.<span class="ruby-identifier">collect</span> <span class="ruby-keyword">do</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">id</span>,<span class="ruby-number">0</span>,<span class="ruby-number">0</span>] - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">h</span>[<span class="ruby-value">:author</span>] = <span class="ruby-identifier">author</span>.<span class="ruby-identifier">name</span> - <span class="ruby-identifier">h</span>[<span class="ruby-value">:time</span>] = <span class="ruby-identifier">time</span> - <span class="ruby-identifier">h</span>[<span class="ruby-value">:space</span>] = <span class="ruby-identifier">space</span> - <span class="ruby-identifier">h</span>[<span class="ruby-value">:refs</span>] = <span class="ruby-identifier">refs</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span><span class="ruby-identifier">r</span>.<span class="ruby-identifier">name</span>}.<span class="ruby-identifier">join</span>(<span class="ruby-string">" "</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">refs</span>.<span class="ruby-identifier">nil?</span> - <span class="ruby-identifier">h</span>[<span class="ruby-value">:id</span>] = <span class="ruby-identifier">sha</span> - <span class="ruby-identifier">h</span>[<span class="ruby-value">:date</span>] = <span class="ruby-identifier">date</span> - <span class="ruby-identifier">h</span>[<span class="ruby-value">:message</span>] = <span class="ruby-identifier">message</span> - <span class="ruby-identifier">h</span>[<span class="ruby-value">:login</span>] = <span class="ruby-identifier">author</span>.<span class="ruby-identifier">email</span> - <span class="ruby-identifier">h</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Graph/JsonBuilder.html b/doc/code/classes/Gitlab/Graph/JsonBuilder.html deleted file mode 100644 index b410947bb85..00000000000 --- a/doc/code/classes/Gitlab/Graph/JsonBuilder.html +++ /dev/null @@ -1,707 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Graph::JsonBuilder</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Graph::JsonBuilder - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/gitlab/graph/json_builder_rb.html">lib/gitlab/graph/json_builder.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>B</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-base_space">base_space</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-collect_commits">collect_commits</a> - </li> - - </ul> - </dd> - - <dt>F</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-find_free_space">find_free_space</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-index_commits">index_commits</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-mark_reserved">mark_reserved</a>, - </li> - - - <li> - <a href="#method-c-max_count">max_count</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-new">new</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-place_chain">place_chain</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-take_left_leaves">take_left_leaves</a>, - </li> - - - <li> - <a href="#method-i-to_json">to_json</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>commits</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>days</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>ref_cache</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>repo</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-max_count"> - - <b>max_count</b>() - - <a href="../../../classes/Gitlab/Graph/JsonBuilder.html#method-c-max_count" name="method-c-max_count" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-max_count_source')" id="l_method-c-max_count_source">show</a> - - </p> - <div id="method-c-max_count_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/graph/json_builder.rb, line 8</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">max_count</span> - <span class="ruby-ivar">@max_count</span> <span class="ruby-operator">||=</span> <span class="ruby-number">650</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-new"> - - <b>new</b>(project) - - <a href="../../../classes/Gitlab/Graph/JsonBuilder.html#method-c-new" name="method-c-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a> - - </p> - <div id="method-c-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/graph/json_builder.rb, line 12</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span> <span class="ruby-identifier">project</span> - <span class="ruby-ivar">@project</span> = <span class="ruby-identifier">project</span> - <span class="ruby-ivar">@repo</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">repo</span> - <span class="ruby-ivar">@ref_cache</span> = {} - - <span class="ruby-ivar">@commits</span> = <span class="ruby-identifier">collect_commits</span> - <span class="ruby-ivar">@days</span> = <span class="ruby-identifier">index_commits</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-to_json"> - - <b>to_json</b>(*args) - - <a href="../../../classes/Gitlab/Graph/JsonBuilder.html#method-i-to_json" name="method-i-to_json" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_json_source')" id="l_method-i-to_json_source">show</a> - - </p> - <div id="method-i-to_json_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/graph/json_builder.rb, line 21</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_json</span>(*<span class="ruby-identifier">args</span>) - { - <span class="ruby-identifier">days</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@days</span>.<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> [<span class="ruby-identifier">d</span>.<span class="ruby-identifier">day</span>, <span class="ruby-identifier">d</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-string">"%b"</span>)] }, - <span class="ruby-identifier">commits</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@commits</span>.<span class="ruby-identifier">map</span>(&<span class="ruby-value">:to_graph_hash</span>) - }.<span class="ruby-identifier">to_json</span>(*<span class="ruby-identifier">args</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-base_space"> - - <b>base_space</b>(leaves, map) - - <a href="../../../classes/Gitlab/Graph/JsonBuilder.html#method-i-base_space" name="method-i-base_space" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-base_space_source')" id="l_method-i-base_space_source">show</a> - - </p> - <div id="method-i-base_space_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/graph/json_builder.rb, line 148</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">base_space</span>(<span class="ruby-identifier">leaves</span>, <span class="ruby-identifier">map</span>) - <span class="ruby-identifier">parents</span> = [] - <span class="ruby-identifier">leaves</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">parents</span>.<span class="ruby-identifier">concat</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">parents</span>.<span class="ruby-identifier">collect</span>.<span class="ruby-identifier">select</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span> <span class="ruby-identifier">map</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">p</span>.<span class="ruby-identifier">id</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">map</span>[<span class="ruby-identifier">p</span>.<span class="ruby-identifier">id</span>].<span class="ruby-identifier">space</span>.<span class="ruby-identifier">nonzero?</span>} - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">space</span> = <span class="ruby-identifier">parents</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">map</span>[<span class="ruby-identifier">p</span>.<span class="ruby-identifier">id</span>].<span class="ruby-identifier">space</span>}.<span class="ruby-identifier">max</span> <span class="ruby-operator">||</span> <span class="ruby-number">0</span> - <span class="ruby-identifier">space</span> <span class="ruby-operator">+=</span> <span class="ruby-number">1</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-collect_commits"> - - <b>collect_commits</b>() - - <a href="../../../classes/Gitlab/Graph/JsonBuilder.html#method-i-collect_commits" name="method-i-collect_commits" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Get commits from repository</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-collect_commits_source')" id="l_method-i-collect_commits_source">show</a> - - </p> - <div id="method-i-collect_commits_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/graph/json_builder.rb, line 32</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">collect_commits</span> - <span class="ruby-ivar">@commits</span> = <span class="ruby-constant">Grit</span><span class="ruby-operator">::</span><span class="ruby-constant">Commit</span>.<span class="ruby-identifier">find_all</span>(<span class="ruby-identifier">repo</span>, <span class="ruby-keyword">nil</span>, {<span class="ruby-identifier">max_count</span><span class="ruby-operator">:</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">max_count</span>}).<span class="ruby-identifier">dup</span> - - <span class="ruby-comment"># Decorate with app/models/commit.rb</span> - <span class="ruby-ivar">@commits</span>.<span class="ruby-identifier">map!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">commit</span><span class="ruby-operator">|</span> <span class="ruby-operator">::</span><span class="ruby-constant">Commit</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">commit</span>) } - - <span class="ruby-comment"># Decorate with lib/gitlab/graph/commit.rb</span> - <span class="ruby-ivar">@commits</span>.<span class="ruby-identifier">map!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">commit</span><span class="ruby-operator">|</span> <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">Graph</span><span class="ruby-operator">::</span><span class="ruby-constant">Commit</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">commit</span>) } - - <span class="ruby-comment"># add refs to each commit</span> - <span class="ruby-ivar">@commits</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">commit</span><span class="ruby-operator">|</span> <span class="ruby-identifier">commit</span>.<span class="ruby-identifier">add_refs</span>(<span class="ruby-identifier">ref_cache</span>, <span class="ruby-identifier">repo</span>) } - - <span class="ruby-ivar">@commits</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-find_free_space"> - - <b>find_free_space</b>(leaves, map) - - <a href="../../../classes/Gitlab/Graph/JsonBuilder.html#method-i-find_free_space" name="method-i-find_free_space" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-find_free_space_source')" id="l_method-i-find_free_space_source">show</a> - - </p> - <div id="method-i-find_free_space_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/graph/json_builder.rb, line 135</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">find_free_space</span>(<span class="ruby-identifier">leaves</span>, <span class="ruby-identifier">map</span>) - <span class="ruby-identifier">time_range</span> = <span class="ruby-identifier">leaves</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">time</span><span class="ruby-operator">..</span><span class="ruby-identifier">leaves</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">time</span> - <span class="ruby-identifier">reserved</span> = [] - <span class="ruby-keyword">for</span> <span class="ruby-identifier">day</span> <span class="ruby-keyword">in</span> <span class="ruby-identifier">time_range</span> - <span class="ruby-identifier">reserved</span> <span class="ruby-operator">+=</span> <span class="ruby-ivar">@_reserved</span>[<span class="ruby-identifier">day</span>] - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">space</span> = <span class="ruby-identifier">base_space</span>(<span class="ruby-identifier">leaves</span>, <span class="ruby-identifier">map</span>) - <span class="ruby-keyword">while</span> <span class="ruby-identifier">reserved</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">space</span> <span class="ruby-keyword">do</span> - <span class="ruby-identifier">space</span> <span class="ruby-operator">+=</span> <span class="ruby-number">1</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">space</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-index_commits"> - - <b>index_commits</b>() - - <a href="../../../classes/Gitlab/Graph/JsonBuilder.html#method-i-index_commits" name="method-i-index_commits" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Method is adding time and space on the list of commits. As well as returns -date list corelated with time set on commits.</p> - -<p>@param [Array<Graph::Commit>] comits to index</p> - -<p>@return [Array<TimeDate>] list of commit dates corelated with time on -commits</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-index_commits_source')" id="l_method-i-index_commits_source">show</a> - - </p> - <div id="method-i-index_commits_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/graph/json_builder.rb, line 54</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">index_commits</span> - <span class="ruby-identifier">days</span>, <span class="ruby-identifier">heads</span> = [], [] - <span class="ruby-identifier">map</span> = {} - - <span class="ruby-identifier">commits</span>.<span class="ruby-identifier">reverse</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span>,<span class="ruby-identifier">i</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">c</span>.<span class="ruby-identifier">time</span> = <span class="ruby-identifier">i</span> - <span class="ruby-identifier">days</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-identifier">c</span>.<span class="ruby-identifier">committed_date</span> - <span class="ruby-identifier">map</span>[<span class="ruby-identifier">c</span>.<span class="ruby-identifier">id</span>] = <span class="ruby-identifier">c</span> - <span class="ruby-identifier">heads</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">refs</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">refs</span>.<span class="ruby-identifier">nil?</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">heads</span>.<span class="ruby-identifier">select!</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">h</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Grit</span><span class="ruby-operator">::</span><span class="ruby-constant">Head</span> <span class="ruby-keyword">or</span> <span class="ruby-identifier">h</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Grit</span><span class="ruby-operator">::</span><span class="ruby-constant">Remote</span>} - <span class="ruby-comment"># sort heads so the master is top and current branches are closer</span> - <span class="ruby-identifier">heads</span>.<span class="ruby-identifier">sort!</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">a</span>,<span class="ruby-identifier">b</span><span class="ruby-operator">|</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-string">"master"</span> - <span class="ruby-number">-1</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-string">"master"</span> - <span class="ruby-number">1</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">b</span>.<span class="ruby-identifier">commit</span>.<span class="ruby-identifier">committed_date</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">commit</span>.<span class="ruby-identifier">committed_date</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-ivar">@_reserved</span> = {} - <span class="ruby-identifier">days</span>.<span class="ruby-identifier">each_index</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> - <span class="ruby-ivar">@_reserved</span>[<span class="ruby-identifier">i</span>] = [] - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">heads</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">h</span><span class="ruby-operator">|</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">map</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">h</span>.<span class="ruby-identifier">commit</span>.<span class="ruby-identifier">id</span> <span class="ruby-keyword">then</span> - <span class="ruby-identifier">place_chain</span>(<span class="ruby-identifier">map</span>[<span class="ruby-identifier">h</span>.<span class="ruby-identifier">commit</span>.<span class="ruby-identifier">id</span>], <span class="ruby-identifier">map</span>) - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">days</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-mark_reserved"> - - <b>mark_reserved</b>(time_range, space) - - <a href="../../../classes/Gitlab/Graph/JsonBuilder.html#method-i-mark_reserved" name="method-i-mark_reserved" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-mark_reserved_source')" id="l_method-i-mark_reserved_source">show</a> - - </p> - <div id="method-i-mark_reserved_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/graph/json_builder.rb, line 129</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">mark_reserved</span>(<span class="ruby-identifier">time_range</span>, <span class="ruby-identifier">space</span>) - <span class="ruby-keyword">for</span> <span class="ruby-identifier">day</span> <span class="ruby-keyword">in</span> <span class="ruby-identifier">time_range</span> - <span class="ruby-ivar">@_reserved</span>[<span class="ruby-identifier">day</span>].<span class="ruby-identifier">push</span>(<span class="ruby-identifier">space</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-place_chain"> - - <b>place_chain</b>(commit, map, parent_time = nil) - - <a href="../../../classes/Gitlab/Graph/JsonBuilder.html#method-i-place_chain" name="method-i-place_chain" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Add space mark on commit and its parents</p> - -<p>@param [Graph::Commit] the commit object. @param -[Hash<String,Graph::Commit>] map of commits</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-place_chain_source')" id="l_method-i-place_chain_source">show</a> - - </p> - <div id="method-i-place_chain_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/graph/json_builder.rb, line 95</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">place_chain</span>(<span class="ruby-identifier">commit</span>, <span class="ruby-identifier">map</span>, <span class="ruby-identifier">parent_time</span> = <span class="ruby-keyword">nil</span>) - <span class="ruby-identifier">leaves</span> = <span class="ruby-identifier">take_left_leaves</span>(<span class="ruby-identifier">commit</span>, <span class="ruby-identifier">map</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">leaves</span>.<span class="ruby-identifier">empty?</span> - <span class="ruby-keyword">return</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">space</span> = <span class="ruby-identifier">find_free_space</span>(<span class="ruby-identifier">leaves</span>, <span class="ruby-identifier">map</span>) - <span class="ruby-identifier">leaves</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">space</span> = <span class="ruby-identifier">space</span>} - <span class="ruby-comment"># and mark it as reserved</span> - <span class="ruby-identifier">min_time</span> = <span class="ruby-identifier">leaves</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">time</span> - <span class="ruby-identifier">parents</span> = <span class="ruby-identifier">leaves</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">parents</span>.<span class="ruby-identifier">collect</span> - <span class="ruby-identifier">parents</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">map</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">p</span>.<span class="ruby-identifier">id</span> - <span class="ruby-identifier">parent</span> = <span class="ruby-identifier">map</span>[<span class="ruby-identifier">p</span>.<span class="ruby-identifier">id</span>] - <span class="ruby-keyword">if</span> <span class="ruby-identifier">parent</span>.<span class="ruby-identifier">time</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">min_time</span> - <span class="ruby-identifier">min_time</span> = <span class="ruby-identifier">parent</span>.<span class="ruby-identifier">time</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">parent_time</span>.<span class="ruby-identifier">nil?</span> - <span class="ruby-identifier">max_time</span> = <span class="ruby-identifier">leaves</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">time</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">max_time</span> = <span class="ruby-identifier">parent_time</span> <span class="ruby-operator">-</span> <span class="ruby-number">1</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">mark_reserved</span>(<span class="ruby-identifier">min_time</span><span class="ruby-operator">..</span><span class="ruby-identifier">max_time</span>, <span class="ruby-identifier">space</span>) - - <span class="ruby-comment"># Visit branching chains</span> - <span class="ruby-identifier">leaves</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">parents</span> = <span class="ruby-identifier">l</span>.<span class="ruby-identifier">parents</span>.<span class="ruby-identifier">collect</span>.<span class="ruby-identifier">select</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span> <span class="ruby-identifier">map</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">p</span>.<span class="ruby-identifier">id</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">map</span>[<span class="ruby-identifier">p</span>.<span class="ruby-identifier">id</span>].<span class="ruby-identifier">space</span>.<span class="ruby-identifier">zero?</span>} - <span class="ruby-keyword">for</span> <span class="ruby-identifier">p</span> <span class="ruby-keyword">in</span> <span class="ruby-identifier">parents</span> - <span class="ruby-identifier">place_chain</span>(<span class="ruby-identifier">map</span>[<span class="ruby-identifier">p</span>.<span class="ruby-identifier">id</span>], <span class="ruby-identifier">map</span>, <span class="ruby-identifier">l</span>.<span class="ruby-identifier">time</span>) - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-take_left_leaves"> - - <b>take_left_leaves</b>(commit, map) - - <a href="../../../classes/Gitlab/Graph/JsonBuilder.html#method-i-take_left_leaves" name="method-i-take_left_leaves" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Takes most left subtree branch of commits which don’t have space mark yet.</p> - -<p>@param [Graph::Commit] the commit object. @param -[Hash<String,Graph::Commit>] map of commits</p> - -<p>@return [Array<Graph::Commit>] list of branch commits</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-take_left_leaves_source')" id="l_method-i-take_left_leaves_source">show</a> - - </p> - <div id="method-i-take_left_leaves_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/graph/json_builder.rb, line 165</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">take_left_leaves</span>(<span class="ruby-identifier">commit</span>, <span class="ruby-identifier">map</span>) - <span class="ruby-identifier">leaves</span> = [] - <span class="ruby-identifier">leaves</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">commit</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">commit</span>.<span class="ruby-identifier">space</span>.<span class="ruby-identifier">zero?</span> - - <span class="ruby-keyword">while</span> <span class="ruby-keyword">true</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">leaves</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">commit</span>.<span class="ruby-identifier">parents</span>.<span class="ruby-identifier">count</span>.<span class="ruby-identifier">zero?</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">leaves</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">map</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">commit</span>.<span class="ruby-identifier">parents</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">id</span> - - <span class="ruby-identifier">commit</span> = <span class="ruby-identifier">map</span>[<span class="ruby-identifier">commit</span>.<span class="ruby-identifier">parents</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">id</span>] - - <span class="ruby-keyword">return</span> <span class="ruby-identifier">leaves</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">commit</span>.<span class="ruby-identifier">space</span>.<span class="ruby-identifier">zero?</span> - - <span class="ruby-identifier">leaves</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">commit</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/InlineDiff.html b/doc/code/classes/Gitlab/InlineDiff.html deleted file mode 100644 index cd04b7d018d..00000000000 --- a/doc/code/classes/Gitlab/InlineDiff.html +++ /dev/null @@ -1,299 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::InlineDiff</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::InlineDiff - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/gitlab/inline_diff_rb.html">lib/gitlab/inline_diff.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>#</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-_indexes_of_changed_lines">_indexes_of_changed_lines</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-processing">processing</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-replace_markers">replace_markers</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - <!-- Section constants --> - <div class="sectiontitle">Constants</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class="attr-name">START</td> - <td>=</td> - <td class="attr-value">"#!idiff-start!#"</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">FINISH</td> - <td>=</td> - <td class="attr-value">"#!idiff-finish!#"</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - </table> - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-_indexes_of_changed_lines"> - - <b>_indexes_of_changed_lines</b>(diff_arr) - - <a href="../../classes/Gitlab/InlineDiff.html#method-c-_indexes_of_changed_lines" name="method-c-_indexes_of_changed_lines" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-_indexes_of_changed_lines_source')" id="l_method-c-_indexes_of_changed_lines_source">show</a> - - </p> - <div id="method-c-_indexes_of_changed_lines_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/inline_diff.rb, line 42</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">_indexes_of_changed_lines</span> <span class="ruby-identifier">diff_arr</span> - <span class="ruby-identifier">chain_of_first_symbols</span> = <span class="ruby-string">""</span> - <span class="ruby-identifier">diff_arr</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">chain_of_first_symbols</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">line</span>[<span class="ruby-number">0</span>] - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">chain_of_first_symbols</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp">%r[^\-\+]/</span>, <span class="ruby-node">"#"</span>) - - <span class="ruby-identifier">offset</span> = <span class="ruby-number">0</span> - <span class="ruby-identifier">indexes</span> = [] - <span class="ruby-keyword">while</span> <span class="ruby-identifier">index</span> = <span class="ruby-identifier">chain_of_first_symbols</span>.<span class="ruby-identifier">index</span>(<span class="ruby-node">"#-+#"</span>, <span class="ruby-identifier">offset</span>) - <span class="ruby-identifier">indexes</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">index</span> - <span class="ruby-identifier">offset</span> = <span class="ruby-identifier">index</span> <span class="ruby-operator">+</span> <span class="ruby-number">1</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">indexes</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-processing"> - - <b>processing</b>(diff_arr) - - <a href="../../classes/Gitlab/InlineDiff.html#method-c-processing" name="method-c-processing" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-processing_source')" id="l_method-c-processing_source">show</a> - - </p> - <div id="method-c-processing_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/inline_diff.rb, line 8</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">processing</span> <span class="ruby-identifier">diff_arr</span> - <span class="ruby-identifier">indexes</span> = <span class="ruby-identifier">_indexes_of_changed_lines</span> <span class="ruby-identifier">diff_arr</span> - - <span class="ruby-identifier">indexes</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">index</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">first_line</span> = <span class="ruby-identifier">diff_arr</span>[<span class="ruby-identifier">index</span><span class="ruby-operator">+</span><span class="ruby-number">1</span>] - <span class="ruby-identifier">second_line</span> = <span class="ruby-identifier">diff_arr</span>[<span class="ruby-identifier">index</span><span class="ruby-operator">+</span><span class="ruby-number">2</span>] - <span class="ruby-identifier">max_length</span> = [<span class="ruby-identifier">first_line</span>.<span class="ruby-identifier">size</span>, <span class="ruby-identifier">second_line</span>.<span class="ruby-identifier">size</span>].<span class="ruby-identifier">max</span> - - <span class="ruby-identifier">first_the_same_symbols</span> = <span class="ruby-number">0</span> - (<span class="ruby-number">0</span><span class="ruby-operator">..</span><span class="ruby-identifier">max_length</span> <span class="ruby-operator">+</span> <span class="ruby-number">1</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">first_the_same_symbols</span> = <span class="ruby-identifier">i</span> <span class="ruby-operator">-</span> <span class="ruby-number">1</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">first_line</span>[<span class="ruby-identifier">i</span>] <span class="ruby-operator">!=</span> <span class="ruby-identifier">second_line</span>[<span class="ruby-identifier">i</span>] <span class="ruby-operator">&&</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">></span> <span class="ruby-number">0</span> - <span class="ruby-keyword">break</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">first_token</span> = <span class="ruby-identifier">first_line</span>[<span class="ruby-number">0</span><span class="ruby-operator">..</span><span class="ruby-identifier">first_the_same_symbols</span>][<span class="ruby-number">1</span><span class="ruby-operator">..</span><span class="ruby-number">-1</span>] - <span class="ruby-identifier">diff_arr</span>[<span class="ruby-identifier">index</span><span class="ruby-operator">+</span><span class="ruby-number">1</span>].<span class="ruby-identifier">sub!</span>(<span class="ruby-identifier">first_token</span>, <span class="ruby-identifier">first_token</span> <span class="ruby-operator">+</span> <span class="ruby-constant">START</span>) - <span class="ruby-identifier">diff_arr</span>[<span class="ruby-identifier">index</span><span class="ruby-operator">+</span><span class="ruby-number">2</span>].<span class="ruby-identifier">sub!</span>(<span class="ruby-identifier">first_token</span>, <span class="ruby-identifier">first_token</span> <span class="ruby-operator">+</span> <span class="ruby-constant">START</span>) - <span class="ruby-identifier">last_the_same_symbols</span> = <span class="ruby-number">0</span> - (<span class="ruby-number">1</span><span class="ruby-operator">..</span><span class="ruby-identifier">max_length</span> <span class="ruby-operator">+</span> <span class="ruby-number">1</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">last_the_same_symbols</span> = <span class="ruby-operator">-</span><span class="ruby-identifier">i</span> - <span class="ruby-identifier">shortest_line</span> = <span class="ruby-identifier">second_line</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">></span> <span class="ruby-identifier">first_line</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">first_line</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">second_line</span> - <span class="ruby-keyword">if</span> ( <span class="ruby-identifier">first_line</span>[<span class="ruby-operator">-</span><span class="ruby-identifier">i</span>] <span class="ruby-operator">!=</span> <span class="ruby-identifier">second_line</span>[<span class="ruby-operator">-</span><span class="ruby-identifier">i</span>] ) <span class="ruby-operator">||</span> <span class="ruby-node">"#{first_token}#{START}"</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">shortest_line</span>[<span class="ruby-number">1</span><span class="ruby-operator">..</span><span class="ruby-operator">-</span><span class="ruby-identifier">i</span>].<span class="ruby-identifier">size</span> - <span class="ruby-keyword">break</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">last_the_same_symbols</span> <span class="ruby-operator">+=</span> <span class="ruby-number">1</span> - <span class="ruby-identifier">last_token</span> = <span class="ruby-identifier">first_line</span>[<span class="ruby-identifier">last_the_same_symbols</span><span class="ruby-operator">..</span><span class="ruby-number">-1</span>] - <span class="ruby-identifier">diff_arr</span>[<span class="ruby-identifier">index</span><span class="ruby-operator">+</span><span class="ruby-number">1</span>].<span class="ruby-identifier">sub!</span>(<span class="ruby-node">%r#{Regexp.escape(last_token)}$/</span>, <span class="ruby-constant">FINISH</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">last_token</span>) - <span class="ruby-identifier">diff_arr</span>[<span class="ruby-identifier">index</span><span class="ruby-operator">+</span><span class="ruby-number">2</span>].<span class="ruby-identifier">sub!</span>(<span class="ruby-node">%r#{Regexp.escape(last_token)}$/</span>, <span class="ruby-constant">FINISH</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">last_token</span>) - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">diff_arr</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-replace_markers"> - - <b>replace_markers</b>(line) - - <a href="../../classes/Gitlab/InlineDiff.html#method-c-replace_markers" name="method-c-replace_markers" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-replace_markers_source')" id="l_method-c-replace_markers_source">show</a> - - </p> - <div id="method-c-replace_markers_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/inline_diff.rb, line 58</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">replace_markers</span> <span class="ruby-identifier">line</span> - <span class="ruby-identifier">line</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-constant">START</span>, <span class="ruby-string">"<span class='idiff'>"</span>) - <span class="ruby-identifier">line</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-constant">FINISH</span>, <span class="ruby-string">"</span>"</span>) - <span class="ruby-identifier">line</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Issues.html b/doc/code/classes/Gitlab/Issues.html deleted file mode 100644 index 91c6dead2a6..00000000000 --- a/doc/code/classes/Gitlab/Issues.html +++ /dev/null @@ -1,82 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Issues</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Issues - - <span class="parent">< - - Grape::API - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/api/issues_rb.html">lib/api/issues.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p><a href="Issues.html">Issues</a> <a href="API.html">API</a></p> - - </div> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Logger.html b/doc/code/classes/Gitlab/Logger.html deleted file mode 100644 index 2c523c19219..00000000000 --- a/doc/code/classes/Gitlab/Logger.html +++ /dev/null @@ -1,315 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Logger</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Logger - - <span class="parent">< - - Logger - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/gitlab/logger_rb.html">lib/gitlab/logger.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>B</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-build">build</a> - </li> - - </ul> - </dd> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-error">error</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-info">info</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-read_latest">read_latest</a>, - </li> - - - <li> - <a href="#method-c-read_latest_for">read_latest_for</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-build"> - - <b>build</b>() - - <a href="../../classes/Gitlab/Logger.html#method-c-build" name="method-c-build" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-build_source')" id="l_method-c-build_source">show</a> - - </p> - <div id="method-c-build_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/logger.rb, line 22</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">build</span> - <span class="ruby-identifier">new</span>(<span class="ruby-constant">Rails</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">"log"</span>, <span class="ruby-identifier">file_name</span>)) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-error"> - - <b>error</b>(message) - - <a href="../../classes/Gitlab/Logger.html#method-c-error" name="method-c-error" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-error_source')" id="l_method-c-error_source">show</a> - - </p> - <div id="method-c-error_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/logger.rb, line 3</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">error</span>(<span class="ruby-identifier">message</span>) - <span class="ruby-identifier">build</span>.<span class="ruby-identifier">error</span>(<span class="ruby-identifier">message</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-info"> - - <b>info</b>(message) - - <a href="../../classes/Gitlab/Logger.html#method-c-info" name="method-c-info" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-info_source')" id="l_method-c-info_source">show</a> - - </p> - <div id="method-c-info_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/logger.rb, line 7</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">info</span>(<span class="ruby-identifier">message</span>) - <span class="ruby-identifier">build</span>.<span class="ruby-identifier">info</span>(<span class="ruby-identifier">message</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-read_latest"> - - <b>read_latest</b>() - - <a href="../../classes/Gitlab/Logger.html#method-c-read_latest" name="method-c-read_latest" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-read_latest_source')" id="l_method-c-read_latest_source">show</a> - - </p> - <div id="method-c-read_latest_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/logger.rb, line 11</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">read_latest</span> - <span class="ruby-identifier">path</span> = <span class="ruby-constant">Rails</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">"log"</span>, <span class="ruby-identifier">file_name</span>) - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">build</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">path</span>) - <span class="ruby-identifier">logs</span> = <span class="ruby-node">%xtail -n 2000 #{path}`</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">"\n"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-read_latest_for"> - - <b>read_latest_for</b>(filename) - - <a href="../../classes/Gitlab/Logger.html#method-c-read_latest_for" name="method-c-read_latest_for" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-read_latest_for_source')" id="l_method-c-read_latest_for_source">show</a> - - </p> - <div id="method-c-read_latest_for_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/logger.rb, line 17</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">read_latest_for</span> <span class="ruby-identifier">filename</span> - <span class="ruby-identifier">path</span> = <span class="ruby-constant">Rails</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">"log"</span>, <span class="ruby-identifier">filename</span>) - <span class="ruby-identifier">logs</span> = <span class="ruby-node">%xtail -n 2000 #{path}`</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">"\n"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Markdown.html b/doc/code/classes/Gitlab/Markdown.html deleted file mode 100644 index 45d853f3684..00000000000 --- a/doc/code/classes/Gitlab/Markdown.html +++ /dev/null @@ -1,258 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Markdown</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - Gitlab::Markdown - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/gitlab/markdown_rb.html">lib/gitlab/markdown.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>Custom parser for GitLab-flavored <a href="Markdown.html">Markdown</a></p> - -<p>It replaces references in the text with links to the appropriate items in -GitLab.</p> - -<p>Supported reference formats are:</p> - -<pre>* @foo for team members -* #123 for issues -* !123 for merge requests -* $123 for snippets -* 123456 for commits</pre> - -<p>It also parses Emoji codes to insert images. See <a -href="http://www.emoji-cheat-sheet.com/">www.emoji-cheat-sheet.com/</a> for -a list of the supported icons.</p> - -<p>Examples</p> - -<pre class="ruby"><span class="ruby-operator">>></span> <span class="ruby-identifier">gfm</span>(<span class="ruby-string">"Hey @david, can you fix this?"</span>) -=<span class="ruby-operator">></span> <span class="ruby-string">"Hey <a href="</span><span class="ruby-operator">/</span><span class="ruby-identifier">gitlab</span><span class="ruby-operator">/</span><span class="ruby-identifier">team_members</span><span class="ruby-operator">/</span><span class="ruby-value">1</span><span class="ruby-string">">@david</a>, can you fix this?"</span> - -<span class="ruby-operator">>></span> <span class="ruby-identifier">gfm</span>(<span class="ruby-node">"Commit 35d5f7c closes #1234"</span>) -=<span class="ruby-operator">></span> <span class="ruby-string">"Commit <a href="</span><span class="ruby-operator">/</span><span class="ruby-identifier">gitlab</span><span class="ruby-operator">/</span><span class="ruby-identifier">commits</span><span class="ruby-operator">/</span><span class="ruby-value">35</span><span class="ruby-identifier">d5f7c</span><span class="ruby-string">">35d5f7c</a> closes <a href="</span><span class="ruby-operator">/</span><span class="ruby-identifier">gitlab</span><span class="ruby-operator">/</span><span class="ruby-identifier">issues</span><span class="ruby-operator">/</span><span class="ruby-value">1234</span><span class="ruby-node">">#1234</a>"</span> - -<span class="ruby-operator">>></span> <span class="ruby-identifier">gfm</span>(<span class="ruby-string">":trollface:"</span>) -=<span class="ruby-operator">></span> <span class="ruby-string">"<img alt=\":trollface:\" class=\"emoji\" src=\"/images/trollface.png"</span> <span class="ruby-identifier">title</span>=\<span class="ruby-string">":trollface:\" /> -</span></pre> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>G</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-gfm">gfm</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - <!-- Section constants --> - <div class="sectiontitle">Constants</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class="attr-name">REFERENCE_PATTERN</td> - <td>=</td> - <td class="attr-value">%r{ -(?<prefix>\W)? # Prefix -( # Reference -@(?<user>[a-zA-Z][a-zA-Z0-9_\-\.]*) # User name -|\#(?<issue>\d+) # Issue ID -|!(?<merge_request>\d+) # MR ID -|\$(?<snippet>\d+) # Snippet ID -|(?<commit>[\h]{6,40}) # Commit ID -) -(?<suffix>\W)? # Suffix -}x.freeze</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">TYPES</td> - <td>=</td> - <td class="attr-value">[:user, :issue, :merge_request, :snippet, :commit].freeze</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">EMOJI_PATTERN</td> - <td>=</td> - <td class="attr-value">%r{(:(\S+):)}.freeze</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - </table> - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [R] - </td> - <td class='attr-name'>html_options</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-gfm"> - - <b>gfm</b>(text, html_options = {}) - - <a href="../../classes/Gitlab/Markdown.html#method-i-gfm" name="method-i-gfm" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Public: Parse the provided text with GitLab-Flavored <a -href="Markdown.html">Markdown</a></p> - -<p>text - the source text <a -href="Markdown.html#attribute-i-html_options">#html_options</a> - extra -options for the reference links as given to link_to</p> - -<p>Note: reference links will only be generated if @project is set</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-gfm_source')" id="l_method-i-gfm_source">show</a> - - </p> - <div id="method-i-gfm_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/markdown.rb, line 52</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">gfm</span>(<span class="ruby-identifier">text</span>, <span class="ruby-identifier">html_options</span> = {}) - <span class="ruby-keyword">return</span> <span class="ruby-identifier">text</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">nil?</span> - - <span class="ruby-comment"># Duplicate the string so we don't alter the original, then call to_str</span> - <span class="ruby-comment"># to cast it back to a String instead of a SafeBuffer. This is required</span> - <span class="ruby-comment"># for gsub calls to work as we need them to.</span> - <span class="ruby-identifier">text</span> = <span class="ruby-identifier">text</span>.<span class="ruby-identifier">dup</span>.<span class="ruby-identifier">to_str</span> - - <span class="ruby-ivar">@html_options</span> = <span class="ruby-identifier">html_options</span> - - <span class="ruby-comment"># Extract pre blocks so they are not altered</span> - <span class="ruby-comment"># from http://github.github.com/github-flavored-markdown/</span> - <span class="ruby-identifier">extractions</span> = {} - <span class="ruby-identifier">text</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp">%r{<pre>.*?</pre>|<code>.*?</code>}</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">match</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">md5</span> = <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">MD5</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-identifier">match</span>) - <span class="ruby-identifier">extractions</span>[<span class="ruby-identifier">md5</span>] = <span class="ruby-identifier">match</span> - <span class="ruby-node">"{gfm-extraction-#{md5}}"</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-comment"># TODO: add popups with additional information</span> - - <span class="ruby-identifier">text</span> = <span class="ruby-identifier">parse</span>(<span class="ruby-identifier">text</span>) - - <span class="ruby-comment"># Insert pre block extractions</span> - <span class="ruby-identifier">text</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp">%r\{gfm-extraction-(\h{32})\}/</span>) <span class="ruby-keyword">do</span> - <span class="ruby-identifier">extractions</span>[<span class="ruby-node">$1</span>] - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">sanitize</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">html_safe</span>, <span class="ruby-identifier">attributes</span><span class="ruby-operator">:</span> <span class="ruby-constant">ActionView</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">sanitized_allowed_attributes</span> <span class="ruby-operator">+</span> <span class="ruby-node">%w(id class)</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/MergeRequests.html b/doc/code/classes/Gitlab/MergeRequests.html deleted file mode 100644 index 556f2b01604..00000000000 --- a/doc/code/classes/Gitlab/MergeRequests.html +++ /dev/null @@ -1,82 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::MergeRequests</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::MergeRequests - - <span class="parent">< - - Grape::API - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/api/merge_requests_rb.html">lib/api/merge_requests.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p><a href="../MergeRequest.html">MergeRequest</a> <a href="API.html">API</a></p> - - </div> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Milestones.html b/doc/code/classes/Gitlab/Milestones.html deleted file mode 100644 index 4226dab3d56..00000000000 --- a/doc/code/classes/Gitlab/Milestones.html +++ /dev/null @@ -1,82 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Milestones</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Milestones - - <span class="parent">< - - Grape::API - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/api/milestones_rb.html">lib/api/milestones.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p><a href="Milestones.html">Milestones</a> <a href="API.html">API</a></p> - - </div> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Notes.html b/doc/code/classes/Gitlab/Notes.html deleted file mode 100644 index 90d3e7af53a..00000000000 --- a/doc/code/classes/Gitlab/Notes.html +++ /dev/null @@ -1,100 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Notes</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Notes - - <span class="parent">< - - Grape::API - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/api/notes_rb.html">lib/api/notes.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p><a href="Notes.html">Notes</a> <a href="API.html">API</a></p> - - </div> - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Section constants --> - <div class="sectiontitle">Constants</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class="attr-name">NOTEABLE_TYPES</td> - <td>=</td> - <td class="attr-value">[Issue, Snippet]</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - </table> - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/ProjectMover.html b/doc/code/classes/Gitlab/ProjectMover.html deleted file mode 100644 index d13cf13d375..00000000000 --- a/doc/code/classes/Gitlab/ProjectMover.html +++ /dev/null @@ -1,290 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::ProjectMover</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::ProjectMover - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/gitlab/project_mover_rb.html">lib/gitlab/project_mover.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">CLASS</span> - <a href="ProjectMover/ProjectMoveError.html">Gitlab::ProjectMover::ProjectMoveError</a> - </li> - - </ul> - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-execute">execute</a> - </li> - - </ul> - </dd> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-log_info">log_info</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-new">new</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [R] - </td> - <td class='attr-name'>new_dir</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [R] - </td> - <td class='attr-name'>old_dir</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [R] - </td> - <td class='attr-name'>project</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-new"> - - <b>new</b>(project, old_dir, new_dir) - - <a href="../../classes/Gitlab/ProjectMover.html#method-c-new" name="method-c-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a> - - </p> - <div id="method-c-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/project_mover.rb, line 10</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">old_dir</span>, <span class="ruby-identifier">new_dir</span>) - <span class="ruby-ivar">@project</span> = <span class="ruby-identifier">project</span> - <span class="ruby-ivar">@old_dir</span> = <span class="ruby-identifier">old_dir</span> - <span class="ruby-ivar">@new_dir</span> = <span class="ruby-identifier">new_dir</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-execute"> - - <b>execute</b>() - - <a href="../../classes/Gitlab/ProjectMover.html#method-i-execute" name="method-i-execute" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-execute_source')" id="l_method-i-execute_source">show</a> - - </p> - <div id="method-i-execute_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/project_mover.rb, line 16</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">execute</span> - <span class="ruby-comment"># Create new dir if missing</span> - <span class="ruby-identifier">new_dir_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">Gitlab</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">gitolite</span>.<span class="ruby-identifier">repos_path</span>, <span class="ruby-identifier">new_dir</span>) - <span class="ruby-identifier">system</span>(<span class="ruby-node">"mkdir -m 770 #{new_dir_path}"</span>) <span class="ruby-keyword">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">new_dir_path</span>) - - <span class="ruby-identifier">old_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">Gitlab</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">gitolite</span>.<span class="ruby-identifier">repos_path</span>, <span class="ruby-identifier">old_dir</span>, <span class="ruby-node">"#{project.path}.git"</span>) - <span class="ruby-identifier">new_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">new_dir_path</span>, <span class="ruby-node">"#{project.path}.git"</span>) - - <span class="ruby-keyword">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span> <span class="ruby-identifier">new_path</span> - <span class="ruby-identifier">raise</span> <span class="ruby-constant">ProjectMoveError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"Destination #{new_path} already exists"</span>) - <span class="ruby-keyword">end</span> - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">system</span>(<span class="ruby-node">"mv #{old_path} #{new_path}"</span>) - <span class="ruby-identifier">log_info</span> <span class="ruby-node">"Project #{project.name} was moved from #{old_path} to #{new_path}"</span> - <span class="ruby-keyword">true</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">message</span> = <span class="ruby-node">"Project #{project.name} cannot be moved from #{old_path} to #{new_path}"</span> - <span class="ruby-identifier">log_info</span> <span class="ruby-node">"Error! #{message}"</span> - <span class="ruby-identifier">raise</span> <span class="ruby-constant">ProjectMoveError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">message</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-log_info"> - - <b>log_info</b>(message) - - <a href="../../classes/Gitlab/ProjectMover.html#method-i-log_info" name="method-i-log_info" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-log_info_source')" id="l_method-i-log_info_source">show</a> - - </p> - <div id="method-i-log_info_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/project_mover.rb, line 40</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">log_info</span> <span class="ruby-identifier">message</span> - <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">AppLogger</span>.<span class="ruby-identifier">info</span> <span class="ruby-identifier">message</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/ProjectMover/ProjectMoveError.html b/doc/code/classes/Gitlab/ProjectMover/ProjectMoveError.html deleted file mode 100644 index 0071ba0c636..00000000000 --- a/doc/code/classes/Gitlab/ProjectMover/ProjectMoveError.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::ProjectMover::ProjectMoveError</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::ProjectMover::ProjectMoveError - - <span class="parent">< - - StandardError - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/gitlab/project_mover_rb.html">lib/gitlab/project_mover.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Projects.html b/doc/code/classes/Gitlab/Projects.html deleted file mode 100644 index 9005134ee6c..00000000000 --- a/doc/code/classes/Gitlab/Projects.html +++ /dev/null @@ -1,82 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Projects</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Projects - - <span class="parent">< - - Grape::API - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/api/projects_rb.html">lib/api/projects.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p><a href="Projects.html">Projects</a> <a href="API.html">API</a></p> - - </div> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Regex.html b/doc/code/classes/Gitlab/Regex.html deleted file mode 100644 index 674df3227af..00000000000 --- a/doc/code/classes/Gitlab/Regex.html +++ /dev/null @@ -1,261 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Regex</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - Gitlab::Regex - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/gitlab/regex_rb.html">lib/gitlab/regex.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-default_regex">default_regex</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-path_regex">path_regex</a>, - </li> - - - <li> - <a href="#method-i-project_name_regex">project_name_regex</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-username_regex">username_regex</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-path_regex"> - - <b>path_regex</b>() - - <a href="../../classes/Gitlab/Regex.html#method-i-path_regex" name="method-i-path_regex" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-path_regex_source')" id="l_method-i-path_regex_source">show</a> - - </p> - <div id="method-i-path_regex_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/regex.rb, line 13</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">path_regex</span> - <span class="ruby-identifier">default_regex</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-project_name_regex"> - - <b>project_name_regex</b>() - - <a href="../../classes/Gitlab/Regex.html#method-i-project_name_regex" name="method-i-project_name_regex" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-project_name_regex_source')" id="l_method-i-project_name_regex_source">show</a> - - </p> - <div id="method-i-project_name_regex_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/regex.rb, line 9</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">project_name_regex</span> - <span class="ruby-regexp">%r\A[a-zA-Z][a-zA-Z0-9_\-\. ]*\z/</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-username_regex"> - - <b>username_regex</b>() - - <a href="../../classes/Gitlab/Regex.html#method-i-username_regex" name="method-i-username_regex" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-username_regex_source')" id="l_method-i-username_regex_source">show</a> - - </p> - <div id="method-i-username_regex_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/regex.rb, line 5</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">username_regex</span> - <span class="ruby-identifier">default_regex</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-default_regex"> - - <b>default_regex</b>() - - <a href="../../classes/Gitlab/Regex.html#method-i-default_regex" name="method-i-default_regex" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-default_regex_source')" id="l_method-i-default_regex_source">show</a> - - </p> - <div id="method-i-default_regex_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/regex.rb, line 19</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">default_regex</span> - <span class="ruby-regexp">%r\A[a-zA-Z][a-zA-Z0-9_\-\.]*\z/</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Satellite.html b/doc/code/classes/Gitlab/Satellite.html deleted file mode 100644 index 943bbf8eeab..00000000000 --- a/doc/code/classes/Gitlab/Satellite.html +++ /dev/null @@ -1,102 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Satellite</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - Gitlab::Satellite - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/gitlab/satellite/merge_action_rb.html">lib/gitlab/satellite/merge_action.rb</a></li> - - <li><a href="../../files/lib/gitlab/satellite/satellite_rb.html">lib/gitlab/satellite/satellite.rb</a></li> - - <li><a href="../../files/lib/gitlab/satellite/edit_file_action_rb.html">lib/gitlab/satellite/edit_file_action.rb</a></li> - - <li><a href="../../files/lib/gitlab/satellite/action_rb.html">lib/gitlab/satellite/action.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">CLASS</span> - <a href="Satellite/Action.html">Gitlab::Satellite::Action</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Satellite/EditFileAction.html">Gitlab::Satellite::EditFileAction</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Satellite/MergeAction.html">Gitlab::Satellite::MergeAction</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Satellite/Satellite.html">Gitlab::Satellite::Satellite</a> - </li> - - </ul> - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Satellite/Action.html b/doc/code/classes/Gitlab/Satellite/Action.html deleted file mode 100644 index abe7411ef1f..00000000000 --- a/doc/code/classes/Gitlab/Satellite/Action.html +++ /dev/null @@ -1,305 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Satellite::Action</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Satellite::Action - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/gitlab/satellite/action_rb.html">lib/gitlab/satellite/action.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-in_locked_and_timed_satellite">in_locked_and_timed_satellite</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-new">new</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-prepare_satellite-21">prepare_satellite!</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - <!-- Section constants --> - <div class="sectiontitle">Constants</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class="attr-name">DEFAULT_OPTIONS</td> - <td>=</td> - <td class="attr-value">{ git_timeout: 30.seconds }</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - </table> - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>options</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>project</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>user</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-new"> - - <b>new</b>(user, project, options = {}) - - <a href="../../../classes/Gitlab/Satellite/Action.html#method-c-new" name="method-c-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a> - - </p> - <div id="method-c-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/satellite/action.rb, line 8</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span>(<span class="ruby-identifier">user</span>, <span class="ruby-identifier">project</span>, <span class="ruby-identifier">options</span> = {}) - <span class="ruby-ivar">@options</span> = <span class="ruby-constant">DEFAULT_OPTIONS</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">options</span>) - <span class="ruby-ivar">@project</span> = <span class="ruby-identifier">project</span> - <span class="ruby-ivar">@user</span> = <span class="ruby-identifier">user</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-in_locked_and_timed_satellite"> - - <b>in_locked_and_timed_satellite</b>() - - <a href="../../../classes/Gitlab/Satellite/Action.html#method-i-in_locked_and_timed_satellite" name="method-i-in_locked_and_timed_satellite" class="permalink">Link</a> - </div> - - - <div class="description"> - <ul><li> -<p>Sets a 30s timeout for Git</p> -</li><li> -<p>Locks the satellite repo</p> -</li><li> -<p>Yields the prepared satellite repo</p> -</li></ul> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-in_locked_and_timed_satellite_source')" id="l_method-i-in_locked_and_timed_satellite_source">show</a> - - </p> - <div id="method-i-in_locked_and_timed_satellite_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/satellite/action.rb, line 19</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">in_locked_and_timed_satellite</span> - <span class="ruby-constant">Grit</span><span class="ruby-operator">::</span><span class="ruby-constant">Git</span>.<span class="ruby-identifier">with_timeout</span>(<span class="ruby-identifier">options</span>[<span class="ruby-value">:git_timeout</span>]) <span class="ruby-keyword">do</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">satellite</span>.<span class="ruby-identifier">lock</span> <span class="ruby-keyword">do</span> - <span class="ruby-keyword">return</span> <span class="ruby-keyword">yield</span> <span class="ruby-identifier">project</span>.<span class="ruby-identifier">satellite</span>.<span class="ruby-identifier">repo</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOMEM</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span> - <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">GitLogger</span>.<span class="ruby-identifier">error</span>(<span class="ruby-identifier">ex</span>.<span class="ruby-identifier">message</span>) - <span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span> -<span class="ruby-keyword">rescue</span> <span class="ruby-constant">Grit</span><span class="ruby-operator">::</span><span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">GitTimeout</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span> - <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">GitLogger</span>.<span class="ruby-identifier">error</span>(<span class="ruby-identifier">ex</span>.<span class="ruby-identifier">message</span>) - <span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-prepare_satellite-21"> - - <b>prepare_satellite!</b>(repo) - - <a href="../../../classes/Gitlab/Satellite/Action.html#method-i-prepare_satellite-21" name="method-i-prepare_satellite-21" class="permalink">Link</a> - </div> - - - <div class="description"> - <ul><li> -<p>Clears the satellite</p> -</li><li> -<p>Updates the satellite from <a href="../Gitolite.html">Gitolite</a></p> -</li><li> -<p>Sets up Git variables for the user</p> -</li></ul> - -<p>Note: use this within <a -href="Action.html#method-i-in_locked_and_timed_satellite">in_locked_and_timed_satellite</a></p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-prepare_satellite-21_source')" id="l_method-i-prepare_satellite-21_source">show</a> - - </p> - <div id="method-i-prepare_satellite-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/satellite/action.rb, line 38</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">prepare_satellite!</span>(<span class="ruby-identifier">repo</span>) - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">satellite</span>.<span class="ruby-identifier">clear_and_update!</span> - - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">git</span>.<span class="ruby-identifier">config</span>({}, <span class="ruby-string">"user.name"</span>, <span class="ruby-identifier">user</span>.<span class="ruby-identifier">name</span>) - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">git</span>.<span class="ruby-identifier">config</span>({}, <span class="ruby-string">"user.email"</span>, <span class="ruby-identifier">user</span>.<span class="ruby-identifier">email</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Satellite/EditFileAction.html b/doc/code/classes/Gitlab/Satellite/EditFileAction.html deleted file mode 100644 index 3a35aa22632..00000000000 --- a/doc/code/classes/Gitlab/Satellite/EditFileAction.html +++ /dev/null @@ -1,284 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Satellite::EditFileAction</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Satellite::EditFileAction - - <span class="parent">< - - Action - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/gitlab/satellite/edit_file_action_rb.html">lib/gitlab/satellite/edit_file_action.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>GitLab server-side file update and commit</p> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-can_edit-3F">can_edit?</a>, - </li> - - - <li> - <a href="#method-i-commit-21">commit!</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-new">new</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>file_path</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>ref</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-new"> - - <b>new</b>(user, project, ref, file_path) - - <a href="../../../classes/Gitlab/Satellite/EditFileAction.html#method-c-new" name="method-c-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a> - - </p> - <div id="method-c-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/satellite/edit_file_action.rb, line 7</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span>(<span class="ruby-identifier">user</span>, <span class="ruby-identifier">project</span>, <span class="ruby-identifier">ref</span>, <span class="ruby-identifier">file_path</span>) - <span class="ruby-keyword">super</span> <span class="ruby-identifier">user</span>, <span class="ruby-identifier">project</span>, <span class="ruby-identifier">git_timeout</span><span class="ruby-operator">:</span> <span class="ruby-number">10</span>.<span class="ruby-identifier">seconds</span> - <span class="ruby-ivar">@file_path</span> = <span class="ruby-identifier">file_path</span> - <span class="ruby-ivar">@ref</span> = <span class="ruby-identifier">ref</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-commit-21"> - - <b>commit!</b>(content, commit_message, last_commit) - - <a href="../../../classes/Gitlab/Satellite/EditFileAction.html#method-i-commit-21" name="method-i-commit-21" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Updates the files content and creates a new commit for it</p> - -<p>Returns false if the ref has been updated while editing the file Returns -false if commiting the change fails Returns false if pushing from the -satellite to <a href="../Gitolite.html">Gitolite</a> failed or was rejected -Returns true otherwise</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-commit-21_source')" id="l_method-i-commit-21_source">show</a> - - </p> - <div id="method-i-commit-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/satellite/edit_file_action.rb, line 19</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commit!</span>(<span class="ruby-identifier">content</span>, <span class="ruby-identifier">commit_message</span>, <span class="ruby-identifier">last_commit</span>) - <span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">can_edit?</span>(<span class="ruby-identifier">last_commit</span>) - - <span class="ruby-identifier">in_locked_and_timed_satellite</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">repo</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">prepare_satellite!</span>(<span class="ruby-identifier">repo</span>) - - <span class="ruby-comment"># create target branch in satellite at the corresponding commit from Gitolite</span> - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">git</span>.<span class="ruby-identifier">checkout</span>({<span class="ruby-identifier">raise</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>, <span class="ruby-identifier">timeout</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>, <span class="ruby-identifier">b</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>}, <span class="ruby-identifier">ref</span>, <span class="ruby-node">"origin/#{ref}"</span>) - - <span class="ruby-comment"># update the file in the satellite's working dir</span> - <span class="ruby-identifier">file_path_in_satellite</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">repo</span>.<span class="ruby-identifier">working_dir</span>, <span class="ruby-identifier">file_path</span>) - <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">file_path_in_satellite</span>, <span class="ruby-string">'w'</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">content</span>) } - - <span class="ruby-comment"># commit the changes</span> - <span class="ruby-comment"># will raise CommandFailed when commit fails</span> - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">git</span>.<span class="ruby-identifier">commit</span>(<span class="ruby-identifier">raise</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>, <span class="ruby-identifier">timeout</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>, <span class="ruby-identifier">a</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>, <span class="ruby-identifier">m</span><span class="ruby-operator">:</span> <span class="ruby-identifier">commit_message</span>) - - - <span class="ruby-comment"># push commit back to Gitolite</span> - <span class="ruby-comment"># will raise CommandFailed when push fails</span> - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">git</span>.<span class="ruby-identifier">push</span>({<span class="ruby-identifier">raise</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>, <span class="ruby-identifier">timeout</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>}, <span class="ruby-value">:origin</span>, <span class="ruby-identifier">ref</span>) - - <span class="ruby-comment"># everything worked</span> - <span class="ruby-keyword">true</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">rescue</span> <span class="ruby-constant">Grit</span><span class="ruby-operator">::</span><span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">CommandFailed</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span> - <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">GitLogger</span>.<span class="ruby-identifier">error</span>(<span class="ruby-identifier">ex</span>.<span class="ruby-identifier">message</span>) - <span class="ruby-keyword">false</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-can_edit-3F"> - - <b>can_edit?</b>(last_commit) - - <a href="../../../classes/Gitlab/Satellite/EditFileAction.html#method-i-can_edit-3F" name="method-i-can_edit-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-can_edit-3F_source')" id="l_method-i-can_edit-3F_source">show</a> - - </p> - <div id="method-i-can_edit-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/satellite/edit_file_action.rb, line 51</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">can_edit?</span>(<span class="ruby-identifier">last_commit</span>) - <span class="ruby-identifier">current_last_commit</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">last_commit_for</span>(<span class="ruby-identifier">ref</span>, <span class="ruby-identifier">file_path</span>).<span class="ruby-identifier">sha</span> - <span class="ruby-identifier">last_commit</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">current_last_commit</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Satellite/MergeAction.html b/doc/code/classes/Gitlab/Satellite/MergeAction.html deleted file mode 100644 index 064c4f06e60..00000000000 --- a/doc/code/classes/Gitlab/Satellite/MergeAction.html +++ /dev/null @@ -1,274 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Satellite::MergeAction</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Satellite::MergeAction - - <span class="parent">< - - Action - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/gitlab/satellite/merge_action_rb.html">lib/gitlab/satellite/merge_action.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>GitLab server-side merge</p> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-can_be_merged-3F">can_be_merged?</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-merge-21">merge!</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-new">new</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>merge_request</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-new"> - - <b>new</b>(user, merge_request) - - <a href="../../../classes/Gitlab/Satellite/MergeAction.html#method-c-new" name="method-c-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a> - - </p> - <div id="method-c-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/satellite/merge_action.rb, line 7</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span>(<span class="ruby-identifier">user</span>, <span class="ruby-identifier">merge_request</span>) - <span class="ruby-keyword">super</span> <span class="ruby-identifier">user</span>, <span class="ruby-identifier">merge_request</span>.<span class="ruby-identifier">project</span> - <span class="ruby-ivar">@merge_request</span> = <span class="ruby-identifier">merge_request</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-can_be_merged-3F"> - - <b>can_be_merged?</b>() - - <a href="../../../classes/Gitlab/Satellite/MergeAction.html#method-i-can_be_merged-3F" name="method-i-can_be_merged-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Checks if a merge request can be executed without user interaction</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-can_be_merged-3F_source')" id="l_method-i-can_be_merged-3F_source">show</a> - - </p> - <div id="method-i-can_be_merged-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/satellite/merge_action.rb, line 13</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">can_be_merged?</span> - <span class="ruby-identifier">in_locked_and_timed_satellite</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">merge_repo</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">merge_in_satellite!</span>(<span class="ruby-identifier">merge_repo</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-merge-21"> - - <b>merge!</b>() - - <a href="../../../classes/Gitlab/Satellite/MergeAction.html#method-i-merge-21" name="method-i-merge-21" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Merges the source branch into the target branch in the satellite and pushes -it back to <a href="../Gitolite.html">Gitolite</a>. It also removes the -source branch if requested in the merge request.</p> - -<p>Returns false if the merge produced conflicts Returns false if pushing from -the satellite to <a href="../Gitolite.html">Gitolite</a> failed or was -rejected Returns true otherwise</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-merge-21_source')" id="l_method-i-merge-21_source">show</a> - - </p> - <div id="method-i-merge-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/satellite/merge_action.rb, line 26</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">merge!</span> - <span class="ruby-identifier">in_locked_and_timed_satellite</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">merge_repo</span><span class="ruby-operator">|</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">merge_in_satellite!</span>(<span class="ruby-identifier">merge_repo</span>) - <span class="ruby-comment"># push merge back to Gitolite</span> - <span class="ruby-comment"># will raise CommandFailed when push fails</span> - <span class="ruby-identifier">merge_repo</span>.<span class="ruby-identifier">git</span>.<span class="ruby-identifier">push</span>({<span class="ruby-identifier">raise</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>, <span class="ruby-identifier">timeout</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>}, <span class="ruby-value">:origin</span>, <span class="ruby-identifier">merge_request</span>.<span class="ruby-identifier">target_branch</span>) - - <span class="ruby-comment"># remove source branch</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">merge_request</span>.<span class="ruby-identifier">should_remove_source_branch</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">project</span>.<span class="ruby-identifier">root_ref?</span>(<span class="ruby-identifier">merge_request</span>.<span class="ruby-identifier">source_branch</span>) - <span class="ruby-comment"># will raise CommandFailed when push fails</span> - <span class="ruby-identifier">merge_repo</span>.<span class="ruby-identifier">git</span>.<span class="ruby-identifier">push</span>({<span class="ruby-identifier">raise</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>, <span class="ruby-identifier">timeout</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>}, <span class="ruby-value">:origin</span>, <span class="ruby-node">":#{merge_request.source_branch}"</span>) - <span class="ruby-keyword">end</span> - - <span class="ruby-comment"># merge, push and branch removal successful</span> - <span class="ruby-keyword">true</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">rescue</span> <span class="ruby-constant">Grit</span><span class="ruby-operator">::</span><span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">CommandFailed</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span> - <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">GitLogger</span>.<span class="ruby-identifier">error</span>(<span class="ruby-identifier">ex</span>.<span class="ruby-identifier">message</span>) - <span class="ruby-keyword">false</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Satellite/Satellite.html b/doc/code/classes/Gitlab/Satellite/Satellite.html deleted file mode 100644 index 86d82e6ab33..00000000000 --- a/doc/code/classes/Gitlab/Satellite/Satellite.html +++ /dev/null @@ -1,506 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Satellite::Satellite</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Satellite::Satellite - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/gitlab/satellite/satellite_rb.html">lib/gitlab/satellite/satellite.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-clear_and_update-21">clear_and_update!</a>, - </li> - - - <li> - <a href="#method-i-create">create</a> - </li> - - </ul> - </dd> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-exists-3F">exists?</a> - </li> - - </ul> - </dd> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-lock">lock</a>, - </li> - - - <li> - <a href="#method-i-lock_file">lock_file</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-new">new</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-path">path</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-repo">repo</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - <!-- Section constants --> - <div class="sectiontitle">Constants</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class="attr-name">PARKING_BRANCH</td> - <td>=</td> - <td class="attr-value">"__parking_branch"</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - </table> - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>project</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-new"> - - <b>new</b>(project) - - <a href="../../../classes/Gitlab/Satellite/Satellite.html#method-c-new" name="method-c-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a> - - </p> - <div id="method-c-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/satellite/satellite.rb, line 8</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span>(<span class="ruby-identifier">project</span>) - <span class="ruby-ivar">@project</span> = <span class="ruby-identifier">project</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-clear_and_update-21"> - - <b>clear_and_update!</b>() - - <a href="../../../classes/Gitlab/Satellite/Satellite.html#method-i-clear_and_update-21" name="method-i-clear_and_update-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-clear_and_update-21_source')" id="l_method-i-clear_and_update-21_source">show</a> - - </p> - <div id="method-i-clear_and_update-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/satellite/satellite.rb, line 12</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">clear_and_update!</span> - <span class="ruby-identifier">raise</span> <span class="ruby-string">"Satellite doesn't exist"</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">exists?</span> - - <span class="ruby-identifier">delete_heads!</span> - <span class="ruby-identifier">clear_working_dir!</span> - <span class="ruby-identifier">update_from_source!</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-create"> - - <b>create</b>() - - <a href="../../../classes/Gitlab/Satellite/Satellite.html#method-i-create" name="method-i-create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-create_source')" id="l_method-i-create_source">show</a> - - </p> - <div id="method-i-create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/satellite/satellite.rb, line 20</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">create</span> - <span class="ruby-identifier">create_cmd</span> = <span class="ruby-node">"git clone #{project.url_to_repo} #{path}"</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">system</span>(<span class="ruby-identifier">create_cmd</span>) - <span class="ruby-keyword">true</span> - <span class="ruby-keyword">else</span> - <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">GitLogger</span>.<span class="ruby-identifier">error</span>(<span class="ruby-node">"Failed to create satellite for #{project.name_with_namespace}"</span>) - <span class="ruby-keyword">false</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-exists-3F"> - - <b>exists?</b>() - - <a href="../../../classes/Gitlab/Satellite/Satellite.html#method-i-exists-3F" name="method-i-exists-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-exists-3F_source')" id="l_method-i-exists-3F_source">show</a> - - </p> - <div id="method-i-exists-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/satellite/satellite.rb, line 30</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">exists?</span> - <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span> <span class="ruby-identifier">path</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-lock"> - - <b>lock</b>() - - <a href="../../../classes/Gitlab/Satellite/Satellite.html#method-i-lock" name="method-i-lock" class="permalink">Link</a> - </div> - - - <div class="description"> - <ul><li> -<p>Locks the satellite</p> -</li><li> -<p>Changes the current directory to the satellite’s working dir</p> -</li><li> -<p>Yields</p> -</li></ul> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-lock_source')" id="l_method-i-lock_source">show</a> - - </p> - <div id="method-i-lock_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/satellite/satellite.rb, line 37</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">lock</span> - <span class="ruby-identifier">raise</span> <span class="ruby-string">"Satellite doesn't exist"</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">exists?</span> - - <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">lock_file</span>, <span class="ruby-string">"w+"</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">f</span>.<span class="ruby-identifier">flock</span>(<span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">LOCK_EX</span>) - - <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">path</span>) <span class="ruby-keyword">do</span> - <span class="ruby-keyword">return</span> <span class="ruby-keyword">yield</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-lock_file"> - - <b>lock_file</b>() - - <a href="../../../classes/Gitlab/Satellite/Satellite.html#method-i-lock_file" name="method-i-lock_file" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-lock_file_source')" id="l_method-i-lock_file_source">show</a> - - </p> - <div id="method-i-lock_file_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/satellite/satellite.rb, line 49</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">lock_file</span> - <span class="ruby-constant">Rails</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">"tmp"</span>, <span class="ruby-node">"satellite_#{project.id}.lock"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-path"> - - <b>path</b>() - - <a href="../../../classes/Gitlab/Satellite/Satellite.html#method-i-path" name="method-i-path" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-path_source')" id="l_method-i-path_source">show</a> - - </p> - <div id="method-i-path_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/satellite/satellite.rb, line 53</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">path</span> - <span class="ruby-constant">Rails</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">"tmp"</span>, <span class="ruby-string">"repo_satellites"</span>, <span class="ruby-identifier">project</span>.<span class="ruby-identifier">path_with_namespace</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-repo"> - - <b>repo</b>() - - <a href="../../../classes/Gitlab/Satellite/Satellite.html#method-i-repo" name="method-i-repo" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-repo_source')" id="l_method-i-repo_source">show</a> - - </p> - <div id="method-i-repo_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/satellite/satellite.rb, line 57</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">repo</span> - <span class="ruby-identifier">raise</span> <span class="ruby-string">"Satellite doesn't exist"</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">exists?</span> - - <span class="ruby-ivar">@repo</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Grit</span><span class="ruby-operator">::</span><span class="ruby-constant">Repo</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">path</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Seeder.html b/doc/code/classes/Gitlab/Seeder.html deleted file mode 100644 index a62c96a5526..00000000000 --- a/doc/code/classes/Gitlab/Seeder.html +++ /dev/null @@ -1,134 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Seeder</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Seeder - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/gitlab/seeder_rb.html">lib/gitlab/seeder.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>Q</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-quiet">quiet</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-quiet"> - - <b>quiet</b>() - - <a href="../../classes/Gitlab/Seeder.html#method-c-quiet" name="method-c-quiet" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-quiet_source')" id="l_method-c-quiet_source">show</a> - - </p> - <div id="method-c-quiet_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/seeder.rb, line 3</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">quiet</span> - <span class="ruby-constant">SeedFu</span>.<span class="ruby-identifier">quiet</span> = <span class="ruby-keyword">true</span> - <span class="ruby-keyword">yield</span> - <span class="ruby-constant">SeedFu</span>.<span class="ruby-identifier">quiet</span> = <span class="ruby-keyword">false</span> - <span class="ruby-identifier">puts</span> <span class="ruby-string">"\nOK"</span>.<span class="ruby-identifier">green</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Session.html b/doc/code/classes/Gitlab/Session.html deleted file mode 100644 index ad14adc0d50..00000000000 --- a/doc/code/classes/Gitlab/Session.html +++ /dev/null @@ -1,82 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Session</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Session - - <span class="parent">< - - Grape::API - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/api/session_rb.html">lib/api/session.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p><a href="Users.html">Users</a> <a href="API.html">API</a></p> - - </div> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Theme.html b/doc/code/classes/Gitlab/Theme.html deleted file mode 100644 index 8f918b35ce4..00000000000 --- a/doc/code/classes/Gitlab/Theme.html +++ /dev/null @@ -1,141 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Theme</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Theme - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/gitlab/theme_rb.html">lib/gitlab/theme.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-css_class_by_id">css_class_by_id</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-css_class_by_id"> - - <b>css_class_by_id</b>(id) - - <a href="../../classes/Gitlab/Theme.html#method-c-css_class_by_id" name="method-c-css_class_by_id" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-css_class_by_id_source')" id="l_method-c-css_class_by_id_source">show</a> - - </p> - <div id="method-c-css_class_by_id_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/theme.rb, line 3</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">css_class_by_id</span>(<span class="ruby-identifier">id</span>) - <span class="ruby-identifier">themes</span> = { - <span class="ruby-number">1</span> =<span class="ruby-operator">></span> <span class="ruby-string">"ui_basic"</span>, - <span class="ruby-number">2</span> =<span class="ruby-operator">></span> <span class="ruby-string">"ui_mars"</span>, - <span class="ruby-number">3</span> =<span class="ruby-operator">></span> <span class="ruby-string">"ui_modern"</span>, - <span class="ruby-number">4</span> =<span class="ruby-operator">></span> <span class="ruby-string">"ui_gray"</span>, - <span class="ruby-number">5</span> =<span class="ruby-operator">></span> <span class="ruby-string">"ui_color"</span> - } - - <span class="ruby-identifier">id</span> <span class="ruby-operator">||=</span> <span class="ruby-number">1</span> - - <span class="ruby-keyword">return</span> <span class="ruby-identifier">themes</span>[<span class="ruby-identifier">id</span>] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Gitlab/Users.html b/doc/code/classes/Gitlab/Users.html deleted file mode 100644 index 50ba3131240..00000000000 --- a/doc/code/classes/Gitlab/Users.html +++ /dev/null @@ -1,82 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Gitlab::Users</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Gitlab::Users - - <span class="parent">< - - Grape::API - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/api/users_rb.html">lib/api/users.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p><a href="Users.html">Users</a> <a href="API.html">API</a></p> - - </div> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/GitlabCiService.html b/doc/code/classes/GitlabCiService.html deleted file mode 100644 index a56f614f772..00000000000 --- a/doc/code/classes/GitlabCiService.html +++ /dev/null @@ -1,371 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>GitlabCiService</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - GitlabCiService - - <span class="parent">< - - <a href="Service.html">Service</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/models/gitlab_ci_service_rb.html">app/models/gitlab_ci_service.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<h2 id="label-Schema+Information">Schema Information</h2> - -<p>Table name: services</p> - -<pre>id :integer not null, primary key -type :string(255) -title :string(255) -token :string(255) -project_id :integer not null -created_at :datetime not null -updated_at :datetime not null -active :boolean default(FALSE), not null -project_url :string(255)</pre> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-activated-3F">activated?</a> - </li> - - </ul> - </dd> - - <dt>B</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-build_page">build_page</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-commit_badge_path">commit_badge_path</a>, - </li> - - - <li> - <a href="#method-i-commit_status">commit_status</a>, - </li> - - - <li> - <a href="#method-i-commit_status_path">commit_status_path</a>, - </li> - - - <li> - <a href="#method-i-compose_service_hook">compose_service_hook</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-activated-3F"> - - <b>activated?</b>() - - <a href="../classes/GitlabCiService.html#method-i-activated-3F" name="method-i-activated-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-activated-3F_source')" id="l_method-i-activated-3F_source">show</a> - - </p> - <div id="method-i-activated-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/gitlab_ci_service.rb, line 26</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">activated?</span> - <span class="ruby-identifier">active</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-build_page"> - - <b>build_page</b>(sha) - - <a href="../classes/GitlabCiService.html#method-i-build_page" name="method-i-build_page" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-build_page_source')" id="l_method-i-build_page_source">show</a> - - </p> - <div id="method-i-build_page_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/gitlab_ci_service.rb, line 54</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">build_page</span> <span class="ruby-identifier">sha</span> - <span class="ruby-identifier">project_url</span> <span class="ruby-operator">+</span> <span class="ruby-node">"/builds/#{sha}"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-commit_badge_path"> - - <b>commit_badge_path</b>(sha) - - <a href="../classes/GitlabCiService.html#method-i-commit_badge_path" name="method-i-commit_badge_path" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-commit_badge_path_source')" id="l_method-i-commit_badge_path_source">show</a> - - </p> - <div id="method-i-commit_badge_path_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/gitlab_ci_service.rb, line 36</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commit_badge_path</span> <span class="ruby-identifier">sha</span> - <span class="ruby-identifier">project_url</span> <span class="ruby-operator">+</span> <span class="ruby-node">"/status?sha=#{sha}"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-commit_status"> - - <b>commit_status</b>(sha) - - <a href="../classes/GitlabCiService.html#method-i-commit_status" name="method-i-commit_status" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-commit_status_source')" id="l_method-i-commit_status_source">show</a> - - </p> - <div id="method-i-commit_status_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/gitlab_ci_service.rb, line 44</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commit_status</span> <span class="ruby-identifier">sha</span> - <span class="ruby-identifier">response</span> = <span class="ruby-constant">HTTParty</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">commit_status_path</span>(<span class="ruby-identifier">sha</span>)) - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">code</span> <span class="ruby-operator">==</span> <span class="ruby-number">200</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">response</span>[<span class="ruby-string">"status"</span>] - <span class="ruby-identifier">response</span>[<span class="ruby-string">"status"</span>] - <span class="ruby-keyword">else</span> - <span class="ruby-value">:error</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-commit_status_path"> - - <b>commit_status_path</b>(sha) - - <a href="../classes/GitlabCiService.html#method-i-commit_status_path" name="method-i-commit_status_path" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-commit_status_path_source')" id="l_method-i-commit_status_path_source">show</a> - - </p> - <div id="method-i-commit_status_path_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/gitlab_ci_service.rb, line 40</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commit_status_path</span> <span class="ruby-identifier">sha</span> - <span class="ruby-identifier">project_url</span> <span class="ruby-operator">+</span> <span class="ruby-node">"/builds/#{sha}/status.json?token=#{token}"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-compose_service_hook"> - - <b>compose_service_hook</b>() - - <a href="../classes/GitlabCiService.html#method-i-compose_service_hook" name="method-i-compose_service_hook" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-compose_service_hook_source')" id="l_method-i-compose_service_hook_source">show</a> - - </p> - <div id="method-i-compose_service_hook_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/gitlab_ci_service.rb, line 30</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">compose_service_hook</span> - <span class="ruby-identifier">hook</span> = <span class="ruby-identifier">service_hook</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">build_service_hook</span> - <span class="ruby-identifier">hook</span>.<span class="ruby-identifier">url</span> = [<span class="ruby-identifier">project_url</span>, <span class="ruby-string">"/build"</span>, <span class="ruby-node">"?token=#{token}"</span>].<span class="ruby-identifier">join</span>(<span class="ruby-string">""</span>) - <span class="ruby-identifier">hook</span>.<span class="ruby-identifier">save</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/GitlabMarkdownHelper.html b/doc/code/classes/GitlabMarkdownHelper.html deleted file mode 100644 index 32ae5f822b5..00000000000 --- a/doc/code/classes/GitlabMarkdownHelper.html +++ /dev/null @@ -1,222 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>GitlabMarkdownHelper</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - GitlabMarkdownHelper - - </h1> - <ul class="files"> - - <li><a href="../files/app/helpers/gitlab_markdown_helper_rb.html">app/helpers/gitlab_markdown_helper.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-link_to_gfm">link_to_gfm</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-markdown">markdown</a> - </li> - - </ul> - </dd> - - </dl> - - - - <!-- Includes --> - <div class="sectiontitle">Included Modules</div> - <ul> - - <li> - - <a href="Gitlab/Markdown.html"> - Gitlab::Markdown - </a> - - </li> - - </ul> - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-link_to_gfm"> - - <b>link_to_gfm</b>(body, url, html_options = {}) - - <a href="../classes/GitlabMarkdownHelper.html#method-i-link_to_gfm" name="method-i-link_to_gfm" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Use this in places where you would normally use link_to(gfm(…), …).</p> - -<p>It solves a problem occurring with nested links (i.e. “<a>outer text -<a>gfm ref</a> more outer text</a>”). This will not be -interpreted as intended. Browsers will parse something like “<a>outer -text </a><a>gfm ref</a> more outer text” (notice the last -part is not linked any more). <a -href="GitlabMarkdownHelper.html#method-i-link_to_gfm">#link_to_gfm</a> -corrects that. It wraps all parts to explicitly produce the correct linking -behavior (i.e. “<a>outer text </a><a>gfm -ref</a><a> more outer text</a>”).</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-link_to_gfm_source')" id="l_method-i-link_to_gfm_source">show</a> - - </p> - <div id="method-i-link_to_gfm_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/gitlab_markdown_helper.rb, line 13</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">link_to_gfm</span>(<span class="ruby-identifier">body</span>, <span class="ruby-identifier">url</span>, <span class="ruby-identifier">html_options</span> = {}) - <span class="ruby-keyword">return</span> <span class="ruby-string">""</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">body</span>.<span class="ruby-identifier">blank?</span> - - <span class="ruby-identifier">gfm_body</span> = <span class="ruby-identifier">gfm</span>(<span class="ruby-identifier">escape_once</span>(<span class="ruby-identifier">body</span>), <span class="ruby-identifier">html_options</span>) - - <span class="ruby-identifier">gfm_body</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp">%r{<a.*?>.*?</a>}</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">match</span><span class="ruby-operator">|</span> - <span class="ruby-node">"</a>#{match}#{link_to("", url, html_options)[0..-5]}"</span> <span class="ruby-comment"># "</a>".length +1</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">link_to</span>(<span class="ruby-identifier">gfm_body</span>.<span class="ruby-identifier">html_safe</span>, <span class="ruby-identifier">url</span>, <span class="ruby-identifier">html_options</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-markdown"> - - <b>markdown</b>(text) - - <a href="../classes/GitlabMarkdownHelper.html#method-i-markdown" name="method-i-markdown" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-markdown_source')" id="l_method-i-markdown_source">show</a> - - </p> - <div id="method-i-markdown_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/gitlab_markdown_helper.rb, line 25</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">markdown</span>(<span class="ruby-identifier">text</span>) - <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@markdown</span> - <span class="ruby-identifier">gitlab_renderer</span> = <span class="ruby-constant">Redcarpet</span><span class="ruby-operator">::</span><span class="ruby-constant">Render</span><span class="ruby-operator">::</span><span class="ruby-constant">GitlabHTML</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword">self</span>, - <span class="ruby-comment"># see https://github.com/vmg/redcarpet#darling-i-packed-you-a-couple-renderers-for-lunch-</span> - <span class="ruby-identifier">filter_html</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>, - <span class="ruby-identifier">with_toc_data</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>, - <span class="ruby-identifier">hard_wrap</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>) - <span class="ruby-ivar">@markdown</span> = <span class="ruby-constant">Redcarpet</span><span class="ruby-operator">::</span><span class="ruby-constant">Markdown</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">gitlab_renderer</span>, - <span class="ruby-comment"># see https://github.com/vmg/redcarpet#and-its-like-really-simple-to-use</span> - <span class="ruby-identifier">no_intra_emphasis</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>, - <span class="ruby-identifier">tables</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>, - <span class="ruby-identifier">fenced_code_blocks</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>, - <span class="ruby-identifier">autolink</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>, - <span class="ruby-identifier">strikethrough</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>, - <span class="ruby-identifier">lax_html_blocks</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>, - <span class="ruby-identifier">space_after_headers</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>, - <span class="ruby-identifier">superscript</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>) - <span class="ruby-keyword">end</span> - - <span class="ruby-ivar">@markdown</span>.<span class="ruby-identifier">render</span>(<span class="ruby-identifier">text</span>).<span class="ruby-identifier">html_safe</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Grack.html b/doc/code/classes/Grack.html deleted file mode 100644 index 9261c356602..00000000000 --- a/doc/code/classes/Grack.html +++ /dev/null @@ -1,81 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Grack</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - Grack - - </h1> - <ul class="files"> - - <li><a href="../files/lib/gitlab/backend/grack_auth_rb.html">lib/gitlab/backend/grack_auth.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">CLASS</span> - <a href="Grack/Auth.html">Grack::Auth</a> - </li> - - </ul> - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Grack/Auth.html b/doc/code/classes/Grack/Auth.html deleted file mode 100644 index a1350e2fa26..00000000000 --- a/doc/code/classes/Grack/Auth.html +++ /dev/null @@ -1,419 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Grack::Auth</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Grack::Auth - - <span class="parent">< - - Rack::Auth::Basic - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/lib/gitlab/backend/grack_auth_rb.html">lib/gitlab/backend/grack_auth.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-abilities">abilities</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-can-3F">can?</a>, - </li> - - - <li> - <a href="#method-i-current_ref">current_ref</a> - </li> - - </ul> - </dd> - - <dt>V</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-valid-3F">valid?</a>, - </li> - - - <li> - <a href="#method-i-validate_get_request">validate_get_request</a>, - </li> - - - <li> - <a href="#method-i-validate_post_request">validate_post_request</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>project</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>user</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-can-3F"> - - <b>can?</b>(object, action, subject) - - <a href="../../classes/Grack/Auth.html#method-i-can-3F" name="method-i-can-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-can-3F_source')" id="l_method-i-can-3F_source">show</a> - - </p> - <div id="method-i-can-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/grack_auth.rb, line 56</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">can?</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">action</span>, <span class="ruby-identifier">subject</span>) - <span class="ruby-identifier">abilities</span>.<span class="ruby-identifier">allowed?</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">action</span>, <span class="ruby-identifier">subject</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-current_ref"> - - <b>current_ref</b>() - - <a href="../../classes/Grack/Auth.html#method-i-current_ref" name="method-i-current_ref" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-current_ref_source')" id="l_method-i-current_ref_source">show</a> - - </p> - <div id="method-i-current_ref_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/grack_auth.rb, line 60</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">current_ref</span> - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@env</span>[<span class="ruby-string">"HTTP_CONTENT_ENCODING"</span>] <span class="ruby-operator">=~</span> <span class="ruby-regexp">%rgzip/</span> - <span class="ruby-identifier">input</span> = <span class="ruby-constant">Zlib</span><span class="ruby-operator">::</span><span class="ruby-constant">GzipReader</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@request</span>.<span class="ruby-identifier">body</span>).<span class="ruby-identifier">read</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">input</span> = <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">read</span> - <span class="ruby-keyword">end</span> - <span class="ruby-comment"># Need to reset seek point</span> - <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">rewind</span> - <span class="ruby-regexp">%rrefs\/heads\/([\w\.-]+)/</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">input</span>).<span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">first</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-valid-3F"> - - <b>valid?</b>() - - <a href="../../classes/Grack/Auth.html#method-i-valid-3F" name="method-i-valid-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-valid-3F_source')" id="l_method-i-valid-3F_source">show</a> - - </p> - <div id="method-i-valid-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/grack_auth.rb, line 5</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">valid?</span> - <span class="ruby-comment"># Authentication with username and password</span> - <span class="ruby-identifier">login</span>, <span class="ruby-identifier">password</span> = <span class="ruby-ivar">@auth</span>.<span class="ruby-identifier">credentials</span> - - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">user</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">find_by_email</span>(<span class="ruby-identifier">login</span>) <span class="ruby-operator">||</span> <span class="ruby-constant">User</span>.<span class="ruby-identifier">find_by_username</span>(<span class="ruby-identifier">login</span>) - - <span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">user</span>.<span class="ruby-identifier">try</span>(<span class="ruby-value">:valid_password?</span>, <span class="ruby-identifier">password</span>) - - <span class="ruby-identifier">email</span> = <span class="ruby-identifier">user</span>.<span class="ruby-identifier">email</span> - - <span class="ruby-comment"># Set GL_USER env variable</span> - <span class="ruby-constant">ENV</span>[<span class="ruby-string">'GL_USER'</span>] = <span class="ruby-identifier">email</span> - <span class="ruby-comment"># Pass Gitolite update hook</span> - <span class="ruby-constant">ENV</span>[<span class="ruby-string">'GL_BYPASS_UPDATE_HOOK'</span>] = <span class="ruby-string">"true"</span> - - <span class="ruby-comment"># Find project by PATH_INFO from env</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">m</span> = <span class="ruby-regexp">%r^\/([\w\.\/-]+)\.git/</span>.<span class="ruby-identifier">match</span>(<span class="ruby-ivar">@request</span>.<span class="ruby-identifier">path_info</span>).<span class="ruby-identifier">to_a</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">project</span> = <span class="ruby-constant">Project</span>.<span class="ruby-identifier">find_with_namespace</span>(<span class="ruby-identifier">m</span>.<span class="ruby-identifier">last</span>) - <span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">project</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-comment"># Git upload and receive</span> - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">get?</span> - <span class="ruby-identifier">validate_get_request</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">post?</span> - <span class="ruby-identifier">validate_post_request</span> - <span class="ruby-keyword">else</span> - <span class="ruby-keyword">false</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-validate_get_request"> - - <b>validate_get_request</b>() - - <a href="../../classes/Grack/Auth.html#method-i-validate_get_request" name="method-i-validate_get_request" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-validate_get_request_source')" id="l_method-i-validate_get_request_source">show</a> - - </p> - <div id="method-i-validate_get_request_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/grack_auth.rb, line 36</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">validate_get_request</span> - <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">user</span>, <span class="ruby-value">:download_code</span>, <span class="ruby-identifier">project</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-validate_post_request"> - - <b>validate_post_request</b>() - - <a href="../../classes/Grack/Auth.html#method-i-validate_post_request" name="method-i-validate_post_request" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-validate_post_request_source')" id="l_method-i-validate_post_request_source">show</a> - - </p> - <div id="method-i-validate_post_request_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/grack_auth.rb, line 40</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">validate_post_request</span> - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">path_info</span>.<span class="ruby-identifier">end_with?</span>(<span class="ruby-string">'git-upload-pack'</span>) - <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">user</span>, <span class="ruby-value">:download_code</span>, <span class="ruby-identifier">project</span>) - <span class="ruby-keyword">elsif</span> <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">path_info</span>.<span class="ruby-identifier">end_with?</span>(<span class="ruby-string">'git-receive-pack'</span>) - <span class="ruby-identifier">action</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">project</span>.<span class="ruby-identifier">protected_branch?</span>(<span class="ruby-identifier">current_ref</span>) - <span class="ruby-value">:push_code_to_protected_branches</span> - <span class="ruby-keyword">else</span> - <span class="ruby-value">:push_code</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">user</span>, <span class="ruby-identifier">action</span>, <span class="ruby-identifier">project</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-keyword">false</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-abilities"> - - <b>abilities</b>() - - <a href="../../classes/Grack/Auth.html#method-i-abilities" name="method-i-abilities" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-abilities_source')" id="l_method-i-abilities_source">show</a> - - </p> - <div id="method-i-abilities_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/gitlab/backend/grack_auth.rb, line 73</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">abilities</span> - <span class="ruby-ivar">@abilities</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span> - <span class="ruby-identifier">abilities</span> = <span class="ruby-constant">Six</span>.<span class="ruby-identifier">new</span> - <span class="ruby-identifier">abilities</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Ability</span> - <span class="ruby-identifier">abilities</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Group.html b/doc/code/classes/Group.html deleted file mode 100644 index cf61c3ea354..00000000000 --- a/doc/code/classes/Group.html +++ /dev/null @@ -1,294 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Group</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Group - - <span class="parent">< - - <a href="Namespace.html">Namespace</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/models/group_rb.html">app/models/group.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<h2 id="label-Schema+Information">Schema Information</h2> - -<p>Table name: namespaces</p> - -<pre>id :integer not null, primary key -name :string(255) not null -path :string(255) not null -owner_id :integer not null -created_at :datetime not null -updated_at :datetime not null -type :string(255)</pre> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-add_users_to_project_teams">add_users_to_project_teams</a> - </li> - - </ul> - </dd> - - <dt>H</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-human_name">human_name</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-truncate_teams">truncate_teams</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-users">users</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-add_users_to_project_teams"> - - <b>add_users_to_project_teams</b>(user_ids, project_access) - - <a href="../classes/Group.html#method-i-add_users_to_project_teams" name="method-i-add_users_to_project_teams" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-add_users_to_project_teams_source')" id="l_method-i-add_users_to_project_teams_source">show</a> - - </p> - <div id="method-i-add_users_to_project_teams_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/group.rb, line 15</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">add_users_to_project_teams</span>(<span class="ruby-identifier">user_ids</span>, <span class="ruby-identifier">project_access</span>) - <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">add_users_into_projects</span>( - <span class="ruby-identifier">projects</span>.<span class="ruby-identifier">map</span>(&<span class="ruby-value">:id</span>), - <span class="ruby-identifier">user_ids</span>, - <span class="ruby-identifier">project_access</span> - ) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-human_name"> - - <b>human_name</b>() - - <a href="../classes/Group.html#method-i-human_name" name="method-i-human_name" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-human_name_source')" id="l_method-i-human_name_source">show</a> - - </p> - <div id="method-i-human_name_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/group.rb, line 29</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">human_name</span> - <span class="ruby-identifier">name</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-truncate_teams"> - - <b>truncate_teams</b>() - - <a href="../classes/Group.html#method-i-truncate_teams" name="method-i-truncate_teams" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-truncate_teams_source')" id="l_method-i-truncate_teams_source">show</a> - - </p> - <div id="method-i-truncate_teams_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/group.rb, line 33</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">truncate_teams</span> - <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">truncate_teams</span>(<span class="ruby-identifier">project_ids</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-users"> - - <b>users</b>() - - <a href="../classes/Group.html#method-i-users" name="method-i-users" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-users_source')" id="l_method-i-users_source">show</a> - - </p> - <div id="method-i-users_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/group.rb, line 23</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">users</span> - <span class="ruby-identifier">users</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">joins</span>(<span class="ruby-value">:users_projects</span>).<span class="ruby-identifier">where</span>(<span class="ruby-identifier">users_projects</span><span class="ruby-operator">:</span> {<span class="ruby-identifier">project_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">project_ids</span>}) - <span class="ruby-identifier">users</span> = <span class="ruby-identifier">users</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">owner</span> - <span class="ruby-identifier">users</span>.<span class="ruby-identifier">uniq</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/GroupsController.html b/doc/code/classes/GroupsController.html deleted file mode 100644 index dbca1708bf0..00000000000 --- a/doc/code/classes/GroupsController.html +++ /dev/null @@ -1,566 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>GroupsController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - GroupsController - - <span class="parent">< - - <a href="ApplicationController.html">ApplicationController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/groups_controller_rb.html">app/controllers/groups_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-authorize_read_group-21">authorize_read_group!</a> - </li> - - </ul> - </dd> - - <dt>G</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-group">group</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-issues">issues</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-merge_requests">merge_requests</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-people">people</a>, - </li> - - - <li> - <a href="#method-i-project_ids">project_ids</a>, - </li> - - - <li> - <a href="#method-i-projects">projects</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-search">search</a>, - </li> - - - <li> - <a href="#method-i-show">show</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-team_members">team_members</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-issues"> - - <b>issues</b>() - - <a href="../classes/GroupsController.html#method-i-issues" name="method-i-issues" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Get only assigned issues</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-issues_source')" id="l_method-i-issues_source">show</a> - - </p> - <div id="method-i-issues_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/groups_controller.rb, line 29</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">issues</span> - <span class="ruby-ivar">@user</span> = <span class="ruby-identifier">current_user</span> - <span class="ruby-ivar">@issues</span> = <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">assigned_issues</span>.<span class="ruby-identifier">opened</span> - <span class="ruby-ivar">@issues</span> = <span class="ruby-ivar">@issues</span>.<span class="ruby-identifier">of_group</span>(<span class="ruby-ivar">@group</span>).<span class="ruby-identifier">recent</span>.<span class="ruby-identifier">page</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:page</span>]).<span class="ruby-identifier">per</span>(<span class="ruby-number">20</span>) - <span class="ruby-ivar">@issues</span> = <span class="ruby-ivar">@issues</span>.<span class="ruby-identifier">includes</span>(<span class="ruby-value">:author</span>, <span class="ruby-value">:project</span>) - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">atom</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">layout</span><span class="ruby-operator">:</span> <span class="ruby-keyword">false</span> } - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-merge_requests"> - - <b>merge_requests</b>() - - <a href="../classes/GroupsController.html#method-i-merge_requests" name="method-i-merge_requests" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Get authored or assigned open merge requests</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-merge_requests_source')" id="l_method-i-merge_requests_source">show</a> - - </p> - <div id="method-i-merge_requests_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/groups_controller.rb, line 23</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">merge_requests</span> - <span class="ruby-ivar">@merge_requests</span> = <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">cared_merge_requests</span>.<span class="ruby-identifier">opened</span> - <span class="ruby-ivar">@merge_requests</span> = <span class="ruby-ivar">@merge_requests</span>.<span class="ruby-identifier">of_group</span>(<span class="ruby-ivar">@group</span>).<span class="ruby-identifier">recent</span>.<span class="ruby-identifier">page</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:page</span>]).<span class="ruby-identifier">per</span>(<span class="ruby-number">20</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-people"> - - <b>people</b>() - - <a href="../classes/GroupsController.html#method-i-people" name="method-i-people" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-people_source')" id="l_method-i-people_source">show</a> - - </p> - <div id="method-i-people_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/groups_controller.rb, line 49</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">people</span> - <span class="ruby-ivar">@project</span> = <span class="ruby-identifier">group</span>.<span class="ruby-identifier">projects</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:project_id</span>]) <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:project_id</span>] - <span class="ruby-ivar">@users</span> = <span class="ruby-ivar">@project</span> <span class="ruby-operator">?</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">users</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">group</span>.<span class="ruby-identifier">users</span> - <span class="ruby-ivar">@users</span>.<span class="ruby-identifier">sort_by!</span>(&<span class="ruby-value">:name</span>) - - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@project</span> - <span class="ruby-ivar">@team_member</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">users_projects</span>.<span class="ruby-identifier">new</span> - <span class="ruby-keyword">else</span> - <span class="ruby-ivar">@team_member</span> = <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">new</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-search"> - - <b>search</b>() - - <a href="../classes/GroupsController.html#method-i-search" name="method-i-search" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-search_source')" id="l_method-i-search_source">show</a> - - </p> - <div id="method-i-search_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/groups_controller.rb, line 41</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">search</span> - <span class="ruby-identifier">result</span> = <span class="ruby-constant">SearchContext</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">project_ids</span>, <span class="ruby-identifier">params</span>).<span class="ruby-identifier">execute</span> - - <span class="ruby-ivar">@projects</span> = <span class="ruby-identifier">result</span>[<span class="ruby-value">:projects</span>] - <span class="ruby-ivar">@merge_requests</span> = <span class="ruby-identifier">result</span>[<span class="ruby-value">:merge_requests</span>] - <span class="ruby-ivar">@issues</span> = <span class="ruby-identifier">result</span>[<span class="ruby-value">:issues</span>] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-show"> - - <b>show</b>() - - <a href="../classes/GroupsController.html#method-i-show" name="method-i-show" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a> - - </p> - <div id="method-i-show_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/groups_controller.rb, line 11</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span> - <span class="ruby-ivar">@events</span> = <span class="ruby-constant">Event</span>.<span class="ruby-identifier">in_projects</span>(<span class="ruby-identifier">project_ids</span>).<span class="ruby-identifier">limit</span>(<span class="ruby-number">20</span>).<span class="ruby-identifier">offset</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:offset</span>] <span class="ruby-operator">||</span> <span class="ruby-number">0</span>) - <span class="ruby-ivar">@last_push</span> = <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">recent_push</span> - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">atom</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">layout</span><span class="ruby-operator">:</span> <span class="ruby-keyword">false</span> } - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-team_members"> - - <b>team_members</b>() - - <a href="../classes/GroupsController.html#method-i-team_members" name="method-i-team_members" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-team_members_source')" id="l_method-i-team_members_source">show</a> - - </p> - <div id="method-i-team_members_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/groups_controller.rb, line 61</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">team_members</span> - <span class="ruby-ivar">@group</span>.<span class="ruby-identifier">add_users_to_project_teams</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:user_ids</span>], <span class="ruby-identifier">params</span>[<span class="ruby-value">:project_access</span>]) - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">people_group_path</span>(<span class="ruby-ivar">@group</span>), <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">'Users was successfully added.'</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-authorize_read_group-21"> - - <b>authorize_read_group!</b>() - - <a href="../classes/GroupsController.html#method-i-authorize_read_group-21" name="method-i-authorize_read_group-21" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Dont allow unauthorized access to group</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-authorize_read_group-21_source')" id="l_method-i-authorize_read_group-21_source">show</a> - - </p> - <div id="method-i-authorize_read_group-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/groups_controller.rb, line 81</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">authorize_read_group!</span> - <span class="ruby-keyword">unless</span> <span class="ruby-identifier">projects</span>.<span class="ruby-identifier">present?</span> <span class="ruby-keyword">or</span> <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-value">:manage_group</span>, <span class="ruby-ivar">@group</span>) - <span class="ruby-keyword">return</span> <span class="ruby-identifier">render_404</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-group"> - - <b>group</b>() - - <a href="../classes/GroupsController.html#method-i-group" name="method-i-group" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-group_source')" id="l_method-i-group_source">show</a> - - </p> - <div id="method-i-group_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/groups_controller.rb, line 68</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">group</span> - <span class="ruby-ivar">@group</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Group</span>.<span class="ruby-identifier">find_by_path</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-project_ids"> - - <b>project_ids</b>() - - <a href="../classes/GroupsController.html#method-i-project_ids" name="method-i-project_ids" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-project_ids_source')" id="l_method-i-project_ids_source">show</a> - - </p> - <div id="method-i-project_ids_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/groups_controller.rb, line 76</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">project_ids</span> - <span class="ruby-identifier">projects</span>.<span class="ruby-identifier">map</span>(&<span class="ruby-value">:id</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-projects"> - - <b>projects</b>() - - <a href="../classes/GroupsController.html#method-i-projects" name="method-i-projects" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-projects_source')" id="l_method-i-projects_source">show</a> - - </p> - <div id="method-i-projects_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/groups_controller.rb, line 72</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">projects</span> - <span class="ruby-ivar">@projects</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">group</span>.<span class="ruby-identifier">projects</span>.<span class="ruby-identifier">authorized_for</span>(<span class="ruby-identifier">current_user</span>).<span class="ruby-identifier">sorted_by_activity</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/HelpController.html b/doc/code/classes/HelpController.html deleted file mode 100644 index fbb76563389..00000000000 --- a/doc/code/classes/HelpController.html +++ /dev/null @@ -1,130 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>HelpController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - HelpController - - <span class="parent">< - - <a href="ApplicationController.html">ApplicationController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/help_controller_rb.html">app/controllers/help_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-index">index</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-index"> - - <b>index</b>() - - <a href="../classes/HelpController.html#method-i-index" name="method-i-index" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-index_source')" id="l_method-i-index_source">show</a> - - </p> - <div id="method-i-index_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/help_controller.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">index</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/HooksController.html b/doc/code/classes/HooksController.html deleted file mode 100644 index 511e05f0da9..00000000000 --- a/doc/code/classes/HooksController.html +++ /dev/null @@ -1,286 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>HooksController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - HooksController - - <span class="parent">< - - <a href="ProjectResourceController.html">ProjectResourceController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/hooks_controller_rb.html">app/controllers/hooks_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-create">create</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-destroy">destroy</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-index">index</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-test">test</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-create"> - - <b>create</b>() - - <a href="../classes/HooksController.html#method-i-create" name="method-i-create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-create_source')" id="l_method-i-create_source">show</a> - - </p> - <div id="method-i-create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/hooks_controller.rb, line 13</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">create</span> - <span class="ruby-ivar">@hook</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">hooks</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:hook</span>]) - <span class="ruby-ivar">@hook</span>.<span class="ruby-identifier">save</span> - - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@hook</span>.<span class="ruby-identifier">valid?</span> - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">project_hooks_path</span>(<span class="ruby-ivar">@project</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-ivar">@hooks</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">hooks</span>.<span class="ruby-identifier">all</span> - <span class="ruby-identifier">render</span> <span class="ruby-value">:index</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-destroy"> - - <b>destroy</b>() - - <a href="../classes/HooksController.html#method-i-destroy" name="method-i-destroy" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-destroy_source')" id="l_method-i-destroy_source">show</a> - - </p> - <div id="method-i-destroy_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/hooks_controller.rb, line 31</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">destroy</span> - <span class="ruby-ivar">@hook</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">hooks</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) - <span class="ruby-ivar">@hook</span>.<span class="ruby-identifier">destroy</span> - - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">project_hooks_path</span>(<span class="ruby-ivar">@project</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-index"> - - <b>index</b>() - - <a href="../classes/HooksController.html#method-i-index" name="method-i-index" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-index_source')" id="l_method-i-index_source">show</a> - - </p> - <div id="method-i-index_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/hooks_controller.rb, line 8</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">index</span> - <span class="ruby-ivar">@hooks</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">hooks</span>.<span class="ruby-identifier">all</span> - <span class="ruby-ivar">@hook</span> = <span class="ruby-constant">ProjectHook</span>.<span class="ruby-identifier">new</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-test"> - - <b>test</b>() - - <a href="../classes/HooksController.html#method-i-test" name="method-i-test" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-test_source')" id="l_method-i-test_source">show</a> - - </p> - <div id="method-i-test_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/hooks_controller.rb, line 25</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">test</span> - <span class="ruby-constant">TestHookContext</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">current_user</span>, <span class="ruby-identifier">params</span>).<span class="ruby-identifier">execute</span> - - <span class="ruby-identifier">redirect_to</span> <span class="ruby-value">:back</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Issue.html b/doc/code/classes/Issue.html deleted file mode 100644 index 6f71ea72eb4..00000000000 --- a/doc/code/classes/Issue.html +++ /dev/null @@ -1,174 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Issue</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Issue - - <span class="parent">< - - ActiveRecord::Base - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/models/issue_rb.html">app/models/issue.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<h2 id="label-Schema+Information">Schema Information</h2> - -<p>Table name: issues</p> - -<pre>id :integer not null, primary key -title :string(255) -assignee_id :integer -author_id :integer -project_id :integer -created_at :datetime not null -updated_at :datetime not null -closed :boolean default(FALSE), not null -position :integer default(0) -branch_name :string(255) -description :text -milestone_id :integer</pre> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>O</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-open_for">open_for</a> - </li> - - </ul> - </dd> - - </dl> - - - - <!-- Includes --> - <div class="sectiontitle">Included Modules</div> - <ul> - - <li> - - <a href="IssueCommonality.html"> - IssueCommonality - </a> - - </li> - - <li> - - <a href="Votes.html"> - Votes - </a> - - </li> - - </ul> - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-open_for"> - - <b>open_for</b>(user) - - <a href="../classes/Issue.html#method-c-open_for" name="method-c-open_for" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-open_for_source')" id="l_method-c-open_for_source">show</a> - - </p> - <div id="method-c-open_for_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/issue.rb, line 30</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">open_for</span>(<span class="ruby-identifier">user</span>) - <span class="ruby-identifier">opened</span>.<span class="ruby-identifier">assigned</span>(<span class="ruby-identifier">user</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/IssueCommonality.html b/doc/code/classes/IssueCommonality.html deleted file mode 100644 index 7398308a176..00000000000 --- a/doc/code/classes/IssueCommonality.html +++ /dev/null @@ -1,356 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>IssueCommonality</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - IssueCommonality - - </h1> - <ul class="files"> - - <li><a href="../files/app/roles/issue_commonality_rb.html">app/roles/issue_commonality.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>Contains common functionality shared between Issues and MergeRequests</p> - - </div> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">MODULE</span> - <a href="IssueCommonality/ClassMethods.html">IssueCommonality::ClassMethods</a> - </li> - - </ul> - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-is_assigned-3F">is_assigned?</a>, - </li> - - - <li> - <a href="#method-i-is_being_closed-3F">is_being_closed?</a>, - </li> - - - <li> - <a href="#method-i-is_being_reassigned-3F">is_being_reassigned?</a>, - </li> - - - <li> - <a href="#method-i-is_being_reopened-3F">is_being_reopened?</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-new-3F">new?</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-today-3F">today?</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-is_assigned-3F"> - - <b>is_assigned?</b>() - - <a href="../classes/IssueCommonality.html#method-i-is_assigned-3F" name="method-i-is_assigned-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-is_assigned-3F_source')" id="l_method-i-is_assigned-3F_source">show</a> - - </p> - <div id="method-i-is_assigned-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/issue_commonality.rb, line 51</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">is_assigned?</span> - <span class="ruby-operator">!</span><span class="ruby-operator">!</span><span class="ruby-identifier">assignee_id</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-is_being_closed-3F"> - - <b>is_being_closed?</b>() - - <a href="../classes/IssueCommonality.html#method-i-is_being_closed-3F" name="method-i-is_being_closed-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-is_being_closed-3F_source')" id="l_method-i-is_being_closed-3F_source">show</a> - - </p> - <div id="method-i-is_being_closed-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/issue_commonality.rb, line 59</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">is_being_closed?</span> - <span class="ruby-identifier">closed_changed?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">closed</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-is_being_reassigned-3F"> - - <b>is_being_reassigned?</b>() - - <a href="../classes/IssueCommonality.html#method-i-is_being_reassigned-3F" name="method-i-is_being_reassigned-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-is_being_reassigned-3F_source')" id="l_method-i-is_being_reassigned-3F_source">show</a> - - </p> - <div id="method-i-is_being_reassigned-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/issue_commonality.rb, line 55</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">is_being_reassigned?</span> - <span class="ruby-identifier">assignee_id_changed?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-is_being_reopened-3F"> - - <b>is_being_reopened?</b>() - - <a href="../classes/IssueCommonality.html#method-i-is_being_reopened-3F" name="method-i-is_being_reopened-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-is_being_reopened-3F_source')" id="l_method-i-is_being_reopened-3F_source">show</a> - - </p> - <div id="method-i-is_being_reopened-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/issue_commonality.rb, line 63</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">is_being_reopened?</span> - <span class="ruby-identifier">closed_changed?</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">closed</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-new-3F"> - - <b>new?</b>() - - <a href="../classes/IssueCommonality.html#method-i-new-3F" name="method-i-new-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-new-3F_source')" id="l_method-i-new-3F_source">show</a> - - </p> - <div id="method-i-new-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/issue_commonality.rb, line 47</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">new?</span> - <span class="ruby-identifier">today?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">created_at</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">updated_at</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-today-3F"> - - <b>today?</b>() - - <a href="../classes/IssueCommonality.html#method-i-today-3F" name="method-i-today-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-today-3F_source')" id="l_method-i-today-3F_source">show</a> - - </p> - <div id="method-i-today-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/issue_commonality.rb, line 43</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">today?</span> - <span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">created_at</span>.<span class="ruby-identifier">to_date</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/IssueCommonality/ClassMethods.html b/doc/code/classes/IssueCommonality/ClassMethods.html deleted file mode 100644 index 5c3ca9b2add..00000000000 --- a/doc/code/classes/IssueCommonality/ClassMethods.html +++ /dev/null @@ -1,125 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>IssueCommonality::ClassMethods</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - IssueCommonality::ClassMethods - - </h1> - <ul class="files"> - - <li><a href="../../files/app/roles/issue_commonality_rb.html">app/roles/issue_commonality.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-search">search</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-search"> - - <b>search</b>(query) - - <a href="../../classes/IssueCommonality/ClassMethods.html#method-i-search" name="method-i-search" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-search_source')" id="l_method-i-search_source">show</a> - - </p> - <div id="method-i-search_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/issue_commonality.rb, line 38</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">search</span>(<span class="ruby-identifier">query</span>) - <span class="ruby-identifier">where</span>(<span class="ruby-string">"title like :query"</span>, <span class="ruby-identifier">query</span><span class="ruby-operator">:</span> <span class="ruby-node">"%#{query}%"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/IssueObserver.html b/doc/code/classes/IssueObserver.html deleted file mode 100644 index 1600c0f08ac..00000000000 --- a/doc/code/classes/IssueObserver.html +++ /dev/null @@ -1,236 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>IssueObserver</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - IssueObserver - - <span class="parent">< - - ActiveRecord::Observer - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/observers/issue_observer_rb.html">app/observers/issue_observer.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-after_create">after_create</a>, - </li> - - - <li> - <a href="#method-i-after_update">after_update</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-send_reassigned_email">send_reassigned_email</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-after_create"> - - <b>after_create</b>(issue) - - <a href="../classes/IssueObserver.html#method-i-after_create" name="method-i-after_create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-after_create_source')" id="l_method-i-after_create_source">show</a> - - </p> - <div id="method-i-after_create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/issue_observer.rb, line 4</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">after_create</span>(<span class="ruby-identifier">issue</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">issue</span>.<span class="ruby-identifier">assignee</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">issue</span>.<span class="ruby-identifier">assignee</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">current_user</span> - <span class="ruby-constant">Notify</span>.<span class="ruby-identifier">new_issue_email</span>(<span class="ruby-identifier">issue</span>.<span class="ruby-identifier">id</span>).<span class="ruby-identifier">deliver</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-after_update"> - - <b>after_update</b>(issue) - - <a href="../classes/IssueObserver.html#method-i-after_update" name="method-i-after_update" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-after_update_source')" id="l_method-i-after_update_source">show</a> - - </p> - <div id="method-i-after_update_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/issue_observer.rb, line 10</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">after_update</span>(<span class="ruby-identifier">issue</span>) - <span class="ruby-identifier">send_reassigned_email</span>(<span class="ruby-identifier">issue</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">issue</span>.<span class="ruby-identifier">is_being_reassigned?</span> - - <span class="ruby-identifier">status</span> = <span class="ruby-keyword">nil</span> - <span class="ruby-identifier">status</span> = <span class="ruby-string">'closed'</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">issue</span>.<span class="ruby-identifier">is_being_closed?</span> - <span class="ruby-identifier">status</span> = <span class="ruby-string">'reopened'</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">issue</span>.<span class="ruby-identifier">is_being_reopened?</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">status</span> - <span class="ruby-constant">Note</span>.<span class="ruby-identifier">create_status_change_note</span>(<span class="ruby-identifier">issue</span>, <span class="ruby-identifier">current_user</span>, <span class="ruby-identifier">status</span>) - [<span class="ruby-identifier">issue</span>.<span class="ruby-identifier">author</span>, <span class="ruby-identifier">issue</span>.<span class="ruby-identifier">assignee</span>].<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">recipient</span><span class="ruby-operator">|</span> - <span class="ruby-constant">Notify</span>.<span class="ruby-identifier">issue_status_changed_email</span>(<span class="ruby-identifier">recipient</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">issue</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">status</span>, <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">id</span>).<span class="ruby-identifier">deliver</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-send_reassigned_email"> - - <b>send_reassigned_email</b>(issue) - - <a href="../classes/IssueObserver.html#method-i-send_reassigned_email" name="method-i-send_reassigned_email" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-send_reassigned_email_source')" id="l_method-i-send_reassigned_email_source">show</a> - - </p> - <div id="method-i-send_reassigned_email_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/issue_observer.rb, line 26</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">send_reassigned_email</span>(<span class="ruby-identifier">issue</span>) - <span class="ruby-identifier">recipient_ids</span> = [<span class="ruby-identifier">issue</span>.<span class="ruby-identifier">assignee_id</span>, <span class="ruby-identifier">issue</span>.<span class="ruby-identifier">assignee_id_was</span>].<span class="ruby-identifier">keep_if</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">id</span><span class="ruby-operator">|</span> <span class="ruby-identifier">id</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">id</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">id</span> } - - <span class="ruby-identifier">recipient_ids</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">recipient_id</span><span class="ruby-operator">|</span> - <span class="ruby-constant">Notify</span>.<span class="ruby-identifier">reassigned_issue_email</span>(<span class="ruby-identifier">recipient_id</span>, <span class="ruby-identifier">issue</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">issue</span>.<span class="ruby-identifier">assignee_id_was</span>).<span class="ruby-identifier">deliver</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/IssuesBulkUpdateContext.html b/doc/code/classes/IssuesBulkUpdateContext.html deleted file mode 100644 index 0214d217e19..00000000000 --- a/doc/code/classes/IssuesBulkUpdateContext.html +++ /dev/null @@ -1,149 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>IssuesBulkUpdateContext</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - IssuesBulkUpdateContext - - <span class="parent">< - - <a href="BaseContext.html">BaseContext</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/contexts/issues_bulk_update_context_rb.html">app/contexts/issues_bulk_update_context.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-execute">execute</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-execute"> - - <b>execute</b>() - - <a href="../classes/IssuesBulkUpdateContext.html#method-i-execute" name="method-i-execute" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-execute_source')" id="l_method-i-execute_source">show</a> - - </p> - <div id="method-i-execute_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/contexts/issues_bulk_update_context.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">execute</span> - <span class="ruby-identifier">update_data</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:update</span>] - - <span class="ruby-identifier">issues_ids</span> = <span class="ruby-identifier">update_data</span>[<span class="ruby-value">:issues_ids</span>].<span class="ruby-identifier">split</span>(<span class="ruby-string">","</span>) - <span class="ruby-identifier">milestone_id</span> = <span class="ruby-identifier">update_data</span>[<span class="ruby-value">:milestone_id</span>] - <span class="ruby-identifier">assignee_id</span> = <span class="ruby-identifier">update_data</span>[<span class="ruby-value">:assignee_id</span>] - <span class="ruby-identifier">status</span> = <span class="ruby-identifier">update_data</span>[<span class="ruby-value">:status</span>] - - <span class="ruby-identifier">opts</span> = {} - <span class="ruby-identifier">opts</span>[<span class="ruby-value">:milestone_id</span>] = <span class="ruby-identifier">milestone_id</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">milestone_id</span>.<span class="ruby-identifier">present?</span> - <span class="ruby-identifier">opts</span>[<span class="ruby-value">:assignee_id</span>] = <span class="ruby-identifier">assignee_id</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">assignee_id</span>.<span class="ruby-identifier">present?</span> - <span class="ruby-identifier">opts</span>[<span class="ruby-value">:closed</span>] = (<span class="ruby-identifier">status</span> <span class="ruby-operator">==</span> <span class="ruby-string">"closed"</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">status</span>.<span class="ruby-identifier">present?</span> - - <span class="ruby-identifier">issues</span> = <span class="ruby-constant">Issue</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">issues_ids</span>).<span class="ruby-identifier">all</span> - <span class="ruby-identifier">issues</span> = <span class="ruby-identifier">issues</span>.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">issue</span><span class="ruby-operator">|</span> <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-value">:modify_issue</span>, <span class="ruby-identifier">issue</span>) } - <span class="ruby-identifier">issues</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">issue</span><span class="ruby-operator">|</span> <span class="ruby-identifier">issue</span>.<span class="ruby-identifier">update_attributes</span>(<span class="ruby-identifier">opts</span>) } - { - <span class="ruby-identifier">count</span><span class="ruby-operator">:</span> <span class="ruby-identifier">issues</span>.<span class="ruby-identifier">count</span>, - <span class="ruby-identifier">success</span><span class="ruby-operator">:</span> <span class="ruby-operator">!</span><span class="ruby-identifier">issues</span>.<span class="ruby-identifier">count</span>.<span class="ruby-identifier">zero?</span> - } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/IssuesController.html b/doc/code/classes/IssuesController.html deleted file mode 100644 index 1e18d7a8826..00000000000 --- a/doc/code/classes/IssuesController.html +++ /dev/null @@ -1,761 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>IssuesController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - IssuesController - - <span class="parent">< - - <a href="ProjectResourceController.html">ProjectResourceController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/issues_controller_rb.html">app/controllers/issues_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-authorize_admin_issue-21">authorize_admin_issue!</a>, - </li> - - - <li> - <a href="#method-i-authorize_modify_issue-21">authorize_modify_issue!</a> - </li> - - </ul> - </dd> - - <dt>B</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-bulk_update">bulk_update</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-create">create</a> - </li> - - </ul> - </dd> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-edit">edit</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-index">index</a>, - </li> - - - <li> - <a href="#method-i-issue">issue</a>, - </li> - - - <li> - <a href="#method-i-issues_filtered">issues_filtered</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-module_enabled">module_enabled</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-new">new</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-search">search</a>, - </li> - - - <li> - <a href="#method-i-show">show</a>, - </li> - - - <li> - <a href="#method-i-sort">sort</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-update">update</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-bulk_update"> - - <b>bulk_update</b>() - - <a href="../classes/IssuesController.html#method-i-bulk_update" name="method-i-bulk_update" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-bulk_update_source')" id="l_method-i-bulk_update_source">show</a> - - </p> - <div id="method-i-bulk_update_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/issues_controller.rb, line 99</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">bulk_update</span> - <span class="ruby-identifier">result</span> = <span class="ruby-constant">IssuesBulkUpdateContext</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">current_user</span>, <span class="ruby-identifier">params</span>).<span class="ruby-identifier">execute</span> - <span class="ruby-identifier">redirect_to</span> <span class="ruby-value">:back</span>, <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-node">"#{result[:count]} issues updated"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-create"> - - <b>create</b>() - - <a href="../classes/IssuesController.html#method-i-create" name="method-i-create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-create_source')" id="l_method-i-create_source">show</a> - - </p> - <div id="method-i-create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/issues_controller.rb, line 45</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">create</span> - <span class="ruby-ivar">@issue</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">issues</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:issue</span>]) - <span class="ruby-ivar">@issue</span>.<span class="ruby-identifier">author</span> = <span class="ruby-identifier">current_user</span> - <span class="ruby-ivar">@issue</span>.<span class="ruby-identifier">save</span> - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> <span class="ruby-keyword">do</span> - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@issue</span>.<span class="ruby-identifier">valid?</span> - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">project_issue_path</span>(<span class="ruby-ivar">@project</span>, <span class="ruby-ivar">@issue</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">render</span> <span class="ruby-value">:new</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-edit"> - - <b>edit</b>() - - <a href="../classes/IssuesController.html#method-i-edit" name="method-i-edit" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-edit_source')" id="l_method-i-edit_source">show</a> - - </p> - <div id="method-i-edit_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/issues_controller.rb, line 32</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">edit</span> - <span class="ruby-identifier">respond_with</span>(<span class="ruby-ivar">@issue</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-index"> - - <b>index</b>() - - <a href="../classes/IssuesController.html#method-i-index" name="method-i-index" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-index_source')" id="l_method-i-index_source">show</a> - - </p> - <div id="method-i-index_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/issues_controller.rb, line 16</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">index</span> - <span class="ruby-ivar">@issues</span> = <span class="ruby-identifier">issues_filtered</span> - <span class="ruby-ivar">@issues</span> = <span class="ruby-ivar">@issues</span>.<span class="ruby-identifier">page</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:page</span>]).<span class="ruby-identifier">per</span>(<span class="ruby-number">20</span>) - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> <span class="ruby-comment"># index.html.erb</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">atom</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">layout</span><span class="ruby-operator">:</span> <span class="ruby-keyword">false</span> } - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-new"> - - <b>new</b>() - - <a href="../classes/IssuesController.html#method-i-new" name="method-i-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-new_source')" id="l_method-i-new_source">show</a> - - </p> - <div id="method-i-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/issues_controller.rb, line 27</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">new</span> - <span class="ruby-ivar">@issue</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">issues</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:issue</span>]) - <span class="ruby-identifier">respond_with</span>(<span class="ruby-ivar">@issue</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-search"> - - <b>search</b>() - - <a href="../classes/IssuesController.html#method-i-search" name="method-i-search" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-search_source')" id="l_method-i-search_source">show</a> - - </p> - <div id="method-i-search_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/issues_controller.rb, line 89</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">search</span> - <span class="ruby-identifier">terms</span> = <span class="ruby-identifier">params</span>[<span class="ruby-string">'terms'</span>] - - <span class="ruby-ivar">@issues</span> = <span class="ruby-identifier">issues_filtered</span> - <span class="ruby-ivar">@issues</span> = <span class="ruby-ivar">@issues</span>.<span class="ruby-identifier">where</span>(<span class="ruby-string">"title LIKE ?"</span>, <span class="ruby-node">"%#{terms}%"</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">terms</span>.<span class="ruby-identifier">blank?</span> - <span class="ruby-ivar">@issues</span> = <span class="ruby-ivar">@issues</span>.<span class="ruby-identifier">page</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:page</span>]).<span class="ruby-identifier">per</span>(<span class="ruby-number">100</span>) - - <span class="ruby-identifier">render</span> <span class="ruby-identifier">partial</span><span class="ruby-operator">:</span> <span class="ruby-string">'issues'</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-show"> - - <b>show</b>() - - <a href="../classes/IssuesController.html#method-i-show" name="method-i-show" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a> - - </p> - <div id="method-i-show_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/issues_controller.rb, line 36</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span> - <span class="ruby-ivar">@note</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">notes</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">noteable</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@issue</span>) - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-sort"> - - <b>sort</b>() - - <a href="../classes/IssuesController.html#method-i-sort" name="method-i-sort" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-sort_source')" id="l_method-i-sort_source">show</a> - - </p> - <div id="method-i-sort_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/issues_controller.rb, line 77</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">sort</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">render_404</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-value">:admin_issue</span>, <span class="ruby-ivar">@project</span>) - - <span class="ruby-ivar">@issues</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">issues</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">params</span>[<span class="ruby-string">'issue'</span>]) - <span class="ruby-ivar">@issues</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">issue</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">issue</span>.<span class="ruby-identifier">position</span> = <span class="ruby-identifier">params</span>[<span class="ruby-string">'issue'</span>].<span class="ruby-identifier">index</span>(<span class="ruby-identifier">issue</span>.<span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_s</span>) <span class="ruby-operator">+</span> <span class="ruby-number">1</span> - <span class="ruby-identifier">issue</span>.<span class="ruby-identifier">save</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">render</span> <span class="ruby-identifier">nothing</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update"> - - <b>update</b>() - - <a href="../classes/IssuesController.html#method-i-update" name="method-i-update" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_source')" id="l_method-i-update_source">show</a> - - </p> - <div id="method-i-update_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/issues_controller.rb, line 62</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update</span> - <span class="ruby-ivar">@issue</span>.<span class="ruby-identifier">update_attributes</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:issue</span>].<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">author_id_of_changes</span><span class="ruby-operator">:</span> <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">id</span>)) - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> <span class="ruby-keyword">do</span> - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@issue</span>.<span class="ruby-identifier">valid?</span> - <span class="ruby-identifier">redirect_to</span> [<span class="ruby-ivar">@project</span>, <span class="ruby-ivar">@issue</span>] - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">render</span> <span class="ruby-value">:edit</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-authorize_admin_issue-21"> - - <b>authorize_admin_issue!</b>() - - <a href="../classes/IssuesController.html#method-i-authorize_admin_issue-21" name="method-i-authorize_admin_issue-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-authorize_admin_issue-21_source')" id="l_method-i-authorize_admin_issue-21_source">show</a> - - </p> - <div id="method-i-authorize_admin_issue-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/issues_controller.rb, line 114</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">authorize_admin_issue!</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">render_404</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-value">:admin_issue</span>, <span class="ruby-ivar">@issue</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-authorize_modify_issue-21"> - - <b>authorize_modify_issue!</b>() - - <a href="../classes/IssuesController.html#method-i-authorize_modify_issue-21" name="method-i-authorize_modify_issue-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-authorize_modify_issue-21_source')" id="l_method-i-authorize_modify_issue-21_source">show</a> - - </p> - <div id="method-i-authorize_modify_issue-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/issues_controller.rb, line 110</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">authorize_modify_issue!</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">render_404</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-value">:modify_issue</span>, <span class="ruby-ivar">@issue</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-issue"> - - <b>issue</b>() - - <a href="../classes/IssuesController.html#method-i-issue" name="method-i-issue" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-issue_source')" id="l_method-i-issue_source">show</a> - - </p> - <div id="method-i-issue_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/issues_controller.rb, line 106</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">issue</span> - <span class="ruby-ivar">@issue</span> <span class="ruby-operator">||=</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">issues</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-issues_filtered"> - - <b>issues_filtered</b>() - - <a href="../classes/IssuesController.html#method-i-issues_filtered" name="method-i-issues_filtered" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-issues_filtered_source')" id="l_method-i-issues_filtered_source">show</a> - - </p> - <div id="method-i-issues_filtered_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/issues_controller.rb, line 122</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">issues_filtered</span> - <span class="ruby-ivar">@issues</span> = <span class="ruby-constant">IssuesListContext</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">current_user</span>, <span class="ruby-identifier">params</span>).<span class="ruby-identifier">execute</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-module_enabled"> - - <b>module_enabled</b>() - - <a href="../classes/IssuesController.html#method-i-module_enabled" name="method-i-module_enabled" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-module_enabled_source')" id="l_method-i-module_enabled_source">show</a> - - </p> - <div id="method-i-module_enabled_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/issues_controller.rb, line 118</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">module_enabled</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">render_404</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">issues_enabled</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/IssuesHelper.html b/doc/code/classes/IssuesHelper.html deleted file mode 100644 index 7b7510451b1..00000000000 --- a/doc/code/classes/IssuesHelper.html +++ /dev/null @@ -1,401 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>IssuesHelper</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - IssuesHelper - - </h1> - <ul class="files"> - - <li><a href="../files/app/helpers/issues_helper_rb.html">app/helpers/issues_helper.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-issue_css_classes">issue_css_classes</a>, - </li> - - - <li> - <a href="#method-i-issue_tags">issue_tags</a>, - </li> - - - <li> - <a href="#method-i-issues_active_milestones">issues_active_milestones</a>, - </li> - - - <li> - <a href="#method-i-issues_filter">issues_filter</a> - </li> - - </ul> - </dd> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-labels_autocomplete_source">labels_autocomplete_source</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-project_issues_filter_path">project_issues_filter_path</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-unassigned_filter">unassigned_filter</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-issue_css_classes"> - - <b>issue_css_classes</b>(issue) - - <a href="../classes/IssuesHelper.html#method-i-issue_css_classes" name="method-i-issue_css_classes" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-issue_css_classes_source')" id="l_method-i-issue_css_classes_source">show</a> - - </p> - <div id="method-i-issue_css_classes_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/issues_helper.rb, line 7</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">issue_css_classes</span> <span class="ruby-identifier">issue</span> - <span class="ruby-identifier">classes</span> = <span class="ruby-string">"issue"</span> - <span class="ruby-identifier">classes</span> <span class="ruby-operator"><<</span> <span class="ruby-string">" closed"</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">issue</span>.<span class="ruby-identifier">closed</span> - <span class="ruby-identifier">classes</span> <span class="ruby-operator"><<</span> <span class="ruby-string">" today"</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">issue</span>.<span class="ruby-identifier">today?</span> - <span class="ruby-identifier">classes</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-issue_tags"> - - <b>issue_tags</b>() - - <a href="../classes/IssuesHelper.html#method-i-issue_tags" name="method-i-issue_tags" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-issue_tags_source')" id="l_method-i-issue_tags_source">show</a> - - </p> - <div id="method-i-issue_tags_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/issues_helper.rb, line 14</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">issue_tags</span> - <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">issues</span>.<span class="ruby-identifier">tag_counts_on</span>(<span class="ruby-value">:labels</span>).<span class="ruby-identifier">map</span>(&<span class="ruby-value">:name</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-issues_active_milestones"> - - <b>issues_active_milestones</b>() - - <a href="../classes/IssuesHelper.html#method-i-issues_active_milestones" name="method-i-issues_active_milestones" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-issues_active_milestones_source')" id="l_method-i-issues_active_milestones_source">show</a> - - </p> - <div id="method-i-issues_active_milestones_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/issues_helper.rb, line 40</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">issues_active_milestones</span> - <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">milestones</span>.<span class="ruby-identifier">active</span>.<span class="ruby-identifier">order</span>(<span class="ruby-string">"id desc"</span>).<span class="ruby-identifier">all</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-issues_filter"> - - <b>issues_filter</b>() - - <a href="../classes/IssuesHelper.html#method-i-issues_filter" name="method-i-issues_filter" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-issues_filter_source')" id="l_method-i-issues_filter_source">show</a> - - </p> - <div id="method-i-issues_filter_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/issues_helper.rb, line 25</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">issues_filter</span> - { - <span class="ruby-identifier">all</span><span class="ruby-operator">:</span> <span class="ruby-string">"all"</span>, - <span class="ruby-identifier">closed</span><span class="ruby-operator">:</span> <span class="ruby-string">"closed"</span>, - <span class="ruby-identifier">to_me</span><span class="ruby-operator">:</span> <span class="ruby-string">"assigned-to-me"</span>, - <span class="ruby-identifier">open</span><span class="ruby-operator">:</span> <span class="ruby-string">"open"</span> - } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-labels_autocomplete_source"> - - <b>labels_autocomplete_source</b>() - - <a href="../classes/IssuesHelper.html#method-i-labels_autocomplete_source" name="method-i-labels_autocomplete_source" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-labels_autocomplete_source_source')" id="l_method-i-labels_autocomplete_source_source">show</a> - - </p> - <div id="method-i-labels_autocomplete_source_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/issues_helper.rb, line 34</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">labels_autocomplete_source</span> - <span class="ruby-identifier">labels</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">issues_labels</span>.<span class="ruby-identifier">order</span>(<span class="ruby-string">'count DESC'</span>) - <span class="ruby-identifier">labels</span> = <span class="ruby-identifier">labels</span>.<span class="ruby-identifier">map</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> { <span class="ruby-identifier">label</span><span class="ruby-operator">:</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">:</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">name</span> } } - <span class="ruby-identifier">labels</span>.<span class="ruby-identifier">to_json</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-project_issues_filter_path"> - - <b>project_issues_filter_path</b>(project, params = {}) - - <a href="../classes/IssuesHelper.html#method-i-project_issues_filter_path" name="method-i-project_issues_filter_path" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-project_issues_filter_path_source')" id="l_method-i-project_issues_filter_path_source">show</a> - - </p> - <div id="method-i-project_issues_filter_path_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/issues_helper.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">project_issues_filter_path</span> <span class="ruby-identifier">project</span>, <span class="ruby-identifier">params</span> = {} - <span class="ruby-identifier">params</span>[<span class="ruby-value">:f</span>] <span class="ruby-operator">||=</span> <span class="ruby-identifier">cookies</span>[<span class="ruby-string">'issue_filter'</span>] - <span class="ruby-identifier">project_issues_path</span> <span class="ruby-identifier">project</span>, <span class="ruby-identifier">params</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-unassigned_filter"> - - <b>unassigned_filter</b>() - - <a href="../classes/IssuesHelper.html#method-i-unassigned_filter" name="method-i-unassigned_filter" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Returns an OpenStruct object suitable for use by -<code>options_from_collection_for_select</code> to allow filtering issues -by an unassigned <a href="User.html">User</a> or <a -href="Milestone.html">Milestone</a></p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-unassigned_filter_source')" id="l_method-i-unassigned_filter_source">show</a> - - </p> - <div id="method-i-unassigned_filter_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/issues_helper.rb, line 20</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">unassigned_filter</span> - <span class="ruby-comment"># Milestone uses :title, Issue uses :name</span> - <span class="ruby-constant">OpenStruct</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">id</span><span class="ruby-operator">:</span> <span class="ruby-number">0</span>, <span class="ruby-identifier">title</span><span class="ruby-operator">:</span> <span class="ruby-string">'Unspecified'</span>, <span class="ruby-identifier">name</span><span class="ruby-operator">:</span> <span class="ruby-string">'Unassigned'</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/IssuesListContext.html b/doc/code/classes/IssuesListContext.html deleted file mode 100644 index 0298ec75f13..00000000000 --- a/doc/code/classes/IssuesListContext.html +++ /dev/null @@ -1,179 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>IssuesListContext</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - IssuesListContext - - <span class="parent">< - - <a href="BaseContext.html">BaseContext</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/contexts/issues_list_context_rb.html">app/contexts/issues_list_context.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-execute">execute</a> - </li> - - </ul> - </dd> - - </dl> - - - - <!-- Includes --> - <div class="sectiontitle">Included Modules</div> - <ul> - - <li> - - <a href="IssuesHelper.html"> - IssuesHelper - </a> - - </li> - - </ul> - - - - - - - - - - - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>issues</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-execute"> - - <b>execute</b>() - - <a href="../classes/IssuesListContext.html#method-i-execute" name="method-i-execute" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-execute_source')" id="l_method-i-execute_source">show</a> - - </p> - <div id="method-i-execute_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/contexts/issues_list_context.rb, line 6</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">execute</span> - <span class="ruby-ivar">@issues</span> = <span class="ruby-keyword">case</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:f</span>] - <span class="ruby-keyword">when</span> <span class="ruby-identifier">issues_filter</span>[<span class="ruby-value">:all</span>] <span class="ruby-keyword">then</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">issues</span> - <span class="ruby-keyword">when</span> <span class="ruby-identifier">issues_filter</span>[<span class="ruby-value">:closed</span>] <span class="ruby-keyword">then</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">issues</span>.<span class="ruby-identifier">closed</span> - <span class="ruby-keyword">when</span> <span class="ruby-identifier">issues_filter</span>[<span class="ruby-value">:to_me</span>] <span class="ruby-keyword">then</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">issues</span>.<span class="ruby-identifier">opened</span>.<span class="ruby-identifier">assigned</span>(<span class="ruby-identifier">current_user</span>) - <span class="ruby-keyword">else</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">issues</span>.<span class="ruby-identifier">opened</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-ivar">@issues</span> = <span class="ruby-ivar">@issues</span>.<span class="ruby-identifier">tagged_with</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:label_name</span>]) <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:label_name</span>].<span class="ruby-identifier">present?</span> - <span class="ruby-ivar">@issues</span> = <span class="ruby-ivar">@issues</span>.<span class="ruby-identifier">includes</span>(<span class="ruby-value">:author</span>, <span class="ruby-value">:project</span>).<span class="ruby-identifier">order</span>(<span class="ruby-string">"updated_at"</span>) - - <span class="ruby-comment"># Filter by specific assignee_id (or lack thereof)?</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:assignee_id</span>].<span class="ruby-identifier">present?</span> - <span class="ruby-ivar">@issues</span> = <span class="ruby-ivar">@issues</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">assignee_id</span><span class="ruby-operator">:</span> (<span class="ruby-identifier">params</span>[<span class="ruby-value">:assignee_id</span>] <span class="ruby-operator">==</span> <span class="ruby-string">'0'</span> <span class="ruby-operator">?</span> <span class="ruby-keyword">nil</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:assignee_id</span>])) - <span class="ruby-keyword">end</span> - - <span class="ruby-comment"># Filter by specific milestone_id (or lack thereof)?</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:milestone_id</span>].<span class="ruby-identifier">present?</span> - <span class="ruby-ivar">@issues</span> = <span class="ruby-ivar">@issues</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">milestone_id</span><span class="ruby-operator">:</span> (<span class="ruby-identifier">params</span>[<span class="ruby-value">:milestone_id</span>] <span class="ruby-operator">==</span> <span class="ruby-string">'0'</span> <span class="ruby-operator">?</span> <span class="ruby-keyword">nil</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:milestone_id</span>])) - <span class="ruby-keyword">end</span> - - <span class="ruby-ivar">@issues</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Key.html b/doc/code/classes/Key.html deleted file mode 100644 index 0935e4862ef..00000000000 --- a/doc/code/classes/Key.html +++ /dev/null @@ -1,429 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Key</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Key - - <span class="parent">< - - ActiveRecord::Base - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/models/key_rb.html">app/models/key.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>F</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-fingerprintable_key">fingerprintable_key</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-is_deploy_key">is_deploy_key</a> - </li> - - </ul> - </dd> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-last_deploy-3F">last_deploy?</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-projects">projects</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-set_identifier">set_identifier</a>, - </li> - - - <li> - <a href="#method-i-strip_white_space">strip_white_space</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-unique_key">unique_key</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-fingerprintable_key"> - - <b>fingerprintable_key</b>() - - <a href="../classes/Key.html#method-i-fingerprintable_key" name="method-i-fingerprintable_key" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-fingerprintable_key_source')" id="l_method-i-fingerprintable_key_source">show</a> - - </p> - <div id="method-i-fingerprintable_key_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/key.rb, line 44</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">fingerprintable_key</span> - <span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">key</span> <span class="ruby-comment"># Don't test if there is no key.</span> - <span class="ruby-comment"># `ssh-keygen -lf /dev/stdin <<< "#{key}"` errors with: redirection unexpected</span> - <span class="ruby-identifier">file</span> = <span class="ruby-constant">Tempfile</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">'key_file'</span>) - <span class="ruby-keyword">begin</span> - <span class="ruby-identifier">file</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">key</span> - <span class="ruby-identifier">file</span>.<span class="ruby-identifier">rewind</span> - <span class="ruby-identifier">fingerprint_output</span> = <span class="ruby-node">%xssh-keygen -lf #{file.path} 2>&1`</span> <span class="ruby-comment"># Catch stderr.</span> - <span class="ruby-keyword">ensure</span> - <span class="ruby-identifier">file</span>.<span class="ruby-identifier">close</span> - <span class="ruby-identifier">file</span>.<span class="ruby-identifier">unlink</span> <span class="ruby-comment"># deletes the temp file</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">errors</span>.<span class="ruby-identifier">add</span>(<span class="ruby-value">:key</span>, <span class="ruby-string">"can't be fingerprinted"</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">fingerprint_output</span>.<span class="ruby-identifier">match</span>(<span class="ruby-string">"failed"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-is_deploy_key"> - - <b>is_deploy_key</b>() - - <a href="../classes/Key.html#method-i-is_deploy_key" name="method-i-is_deploy_key" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-is_deploy_key_source')" id="l_method-i-is_deploy_key_source">show</a> - - </p> - <div id="method-i-is_deploy_key_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/key.rb, line 67</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">is_deploy_key</span> - <span class="ruby-keyword">true</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">project_id</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-last_deploy-3F"> - - <b>last_deploy?</b>() - - <a href="../classes/Key.html#method-i-last_deploy-3F" name="method-i-last_deploy-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-last_deploy-3F_source')" id="l_method-i-last_deploy-3F_source">show</a> - - </p> - <div id="method-i-last_deploy-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/key.rb, line 80</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">last_deploy?</span> - <span class="ruby-constant">Key</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">identifier</span><span class="ruby-operator">:</span> <span class="ruby-identifier">identifier</span>).<span class="ruby-identifier">count</span> <span class="ruby-operator">==</span> <span class="ruby-number">0</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-projects"> - - <b>projects</b>() - - <a href="../classes/Key.html#method-i-projects" name="method-i-projects" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>projects that has this key</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-projects_source')" id="l_method-i-projects_source">show</a> - - </p> - <div id="method-i-projects_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/key.rb, line 72</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">projects</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">is_deploy_key</span> - [<span class="ruby-identifier">project</span>] - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">user</span>.<span class="ruby-identifier">projects</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-set_identifier"> - - <b>set_identifier</b>() - - <a href="../classes/Key.html#method-i-set_identifier" name="method-i-set_identifier" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-set_identifier_source')" id="l_method-i-set_identifier_source">show</a> - - </p> - <div id="method-i-set_identifier_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/key.rb, line 59</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">set_identifier</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">is_deploy_key</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">identifier</span> = <span class="ruby-node">"deploy_#{Digest::MD5.hexdigest(key)}"</span> - <span class="ruby-keyword">else</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">identifier</span> = <span class="ruby-node">"#{user.identifier}_#{Time.now.to_i}"</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-strip_white_space"> - - <b>strip_white_space</b>() - - <a href="../classes/Key.html#method-i-strip_white_space" name="method-i-strip_white_space" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-strip_white_space_source')" id="l_method-i-strip_white_space_source">show</a> - - </p> - <div id="method-i-strip_white_space_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/key.rb, line 32</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">strip_white_space</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">key</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">key</span>.<span class="ruby-identifier">strip</span> <span class="ruby-keyword">unless</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">key</span>.<span class="ruby-identifier">blank?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-unique_key"> - - <b>unique_key</b>() - - <a href="../classes/Key.html#method-i-unique_key" name="method-i-unique_key" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-unique_key_source')" id="l_method-i-unique_key_source">show</a> - - </p> - <div id="method-i-unique_key_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/key.rb, line 36</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">unique_key</span> - <span class="ruby-identifier">query</span> = <span class="ruby-constant">Key</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">key</span><span class="ruby-operator">:</span> <span class="ruby-identifier">key</span>) - <span class="ruby-identifier">query</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">where</span>(<span class="ruby-string">'(project_id IS NULL OR project_id = ?)'</span>, <span class="ruby-identifier">project_id</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">project_id</span> - <span class="ruby-keyword">if</span> (<span class="ruby-identifier">query</span>.<span class="ruby-identifier">count</span> <span class="ruby-operator">></span> <span class="ruby-number">0</span>) - <span class="ruby-identifier">errors</span>.<span class="ruby-identifier">add</span> <span class="ruby-value">:key</span>, <span class="ruby-string">'already exist.'</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/KeyObserver.html b/doc/code/classes/KeyObserver.html deleted file mode 100644 index 1044ea2f7f9..00000000000 --- a/doc/code/classes/KeyObserver.html +++ /dev/null @@ -1,186 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>KeyObserver</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - KeyObserver - - <span class="parent">< - - ActiveRecord::Observer - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/observers/key_observer_rb.html">app/observers/key_observer.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-after_destroy">after_destroy</a>, - </li> - - - <li> - <a href="#method-i-after_save">after_save</a> - </li> - - </ul> - </dd> - - </dl> - - - - <!-- Includes --> - <div class="sectiontitle">Included Modules</div> - <ul> - - <li> - - <a href="GitHost.html"> - GitHost - </a> - - </li> - - </ul> - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-after_destroy"> - - <b>after_destroy</b>(key) - - <a href="../classes/KeyObserver.html#method-i-after_destroy" name="method-i-after_destroy" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-after_destroy_source')" id="l_method-i-after_destroy_source">show</a> - - </p> - <div id="method-i-after_destroy_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/key_observer.rb, line 8</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">after_destroy</span>(<span class="ruby-identifier">key</span>) - <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">key</span>.<span class="ruby-identifier">is_deploy_key</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">key</span>.<span class="ruby-identifier">last_deploy?</span> - <span class="ruby-identifier">git_host</span>.<span class="ruby-identifier">remove_key</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">identifier</span>, <span class="ruby-identifier">key</span>.<span class="ruby-identifier">projects</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-after_save"> - - <b>after_save</b>(key) - - <a href="../classes/KeyObserver.html#method-i-after_save" name="method-i-after_save" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-after_save_source')" id="l_method-i-after_save_source">show</a> - - </p> - <div id="method-i-after_save_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/key_observer.rb, line 4</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">after_save</span>(<span class="ruby-identifier">key</span>) - <span class="ruby-identifier">git_host</span>.<span class="ruby-identifier">set_key</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">identifier</span>, <span class="ruby-identifier">key</span>.<span class="ruby-identifier">key</span>, <span class="ruby-identifier">key</span>.<span class="ruby-identifier">projects</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/KeysController.html b/doc/code/classes/KeysController.html deleted file mode 100644 index 9caccb753f2..00000000000 --- a/doc/code/classes/KeysController.html +++ /dev/null @@ -1,330 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>KeysController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - KeysController - - <span class="parent">< - - <a href="ApplicationController.html">ApplicationController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/keys_controller_rb.html">app/controllers/keys_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-create">create</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-destroy">destroy</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-index">index</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-new">new</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-show">show</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-create"> - - <b>create</b>() - - <a href="../classes/KeysController.html#method-i-create" name="method-i-create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-create_source')" id="l_method-i-create_source">show</a> - - </p> - <div id="method-i-create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/keys_controller.rb, line 19</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">create</span> - <span class="ruby-ivar">@key</span> = <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:key</span>]) - <span class="ruby-ivar">@key</span>.<span class="ruby-identifier">save</span> - - <span class="ruby-identifier">respond_with</span>(<span class="ruby-ivar">@key</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-destroy"> - - <b>destroy</b>() - - <a href="../classes/KeysController.html#method-i-destroy" name="method-i-destroy" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-destroy_source')" id="l_method-i-destroy_source">show</a> - - </p> - <div id="method-i-destroy_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/keys_controller.rb, line 26</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">destroy</span> - <span class="ruby-ivar">@key</span> = <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) - <span class="ruby-ivar">@key</span>.<span class="ruby-identifier">destroy</span> - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> { <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">keys_url</span> } - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">nothing</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span> } - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-index"> - - <b>index</b>() - - <a href="../classes/KeysController.html#method-i-index" name="method-i-index" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-index_source')" id="l_method-i-index_source">show</a> - - </p> - <div id="method-i-index_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/keys_controller.rb, line 5</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">index</span> - <span class="ruby-ivar">@keys</span> = <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">all</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-new"> - - <b>new</b>() - - <a href="../classes/KeysController.html#method-i-new" name="method-i-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-new_source')" id="l_method-i-new_source">show</a> - - </p> - <div id="method-i-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/keys_controller.rb, line 13</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">new</span> - <span class="ruby-ivar">@key</span> = <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">new</span> - - <span class="ruby-identifier">respond_with</span>(<span class="ruby-ivar">@key</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-show"> - - <b>show</b>() - - <a href="../classes/KeysController.html#method-i-show" name="method-i-show" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a> - - </p> - <div id="method-i-show_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/keys_controller.rb, line 9</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span> - <span class="ruby-ivar">@key</span> = <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/LabelsController.html b/doc/code/classes/LabelsController.html deleted file mode 100644 index 53d54c6bbb0..00000000000 --- a/doc/code/classes/LabelsController.html +++ /dev/null @@ -1,180 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>LabelsController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - LabelsController - - <span class="parent">< - - <a href="ProjectResourceController.html">ProjectResourceController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/labels_controller_rb.html">app/controllers/labels_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-index">index</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-module_enabled">module_enabled</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-index"> - - <b>index</b>() - - <a href="../classes/LabelsController.html#method-i-index" name="method-i-index" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-index_source')" id="l_method-i-index_source">show</a> - - </p> - <div id="method-i-index_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/labels_controller.rb, line 9</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">index</span> - <span class="ruby-ivar">@labels</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">issues_labels</span>.<span class="ruby-identifier">order</span>(<span class="ruby-string">'count DESC'</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-module_enabled"> - - <b>module_enabled</b>() - - <a href="../classes/LabelsController.html#method-i-module_enabled" name="method-i-module_enabled" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-module_enabled_source')" id="l_method-i-module_enabled_source">show</a> - - </p> - <div id="method-i-module_enabled_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/labels_controller.rb, line 15</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">module_enabled</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">render_404</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">issues_enabled</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/MergeRequest.html b/doc/code/classes/MergeRequest.html deleted file mode 100644 index cd4046095b0..00000000000 --- a/doc/code/classes/MergeRequest.html +++ /dev/null @@ -1,1569 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>MergeRequest</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - MergeRequest - - <span class="parent">< - - ActiveRecord::Base - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/models/merge_request_rb.html">app/models/merge_request.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-automerge-21">automerge!</a> - </li> - - </ul> - </dd> - - <dt>B</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-broken_diffs-3F">broken_diffs?</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-can_be_merged-3F">can_be_merged?</a>, - </li> - - - <li> - <a href="#method-i-check_if_can_be_merged">check_if_can_be_merged</a>, - </li> - - - <li> - <a href="#method-i-closed_event">closed_event</a>, - </li> - - - <li> - <a href="#method-i-commits">commits</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-diffs">diffs</a> - </li> - - </ul> - </dd> - - <dt>F</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-find_all_by_branch">find_all_by_branch</a>, - </li> - - - <li> - <a href="#method-c-find_all_by_milestone">find_all_by_milestone</a> - </li> - - </ul> - </dd> - - <dt>H</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-human_state">human_state</a> - </li> - - </ul> - </dd> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-last_commit">last_commit</a>, - </li> - - - <li> - <a href="#method-i-last_commit_short_sha">last_commit_short_sha</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-mark_as_merged-21">mark_as_merged!</a>, - </li> - - - <li> - <a href="#method-i-mark_as_unchecked">mark_as_unchecked</a>, - </li> - - - <li> - <a href="#method-i-mark_as_unmergable">mark_as_unmergable</a>, - </li> - - - <li> - <a href="#method-i-merge-21">merge!</a>, - </li> - - - <li> - <a href="#method-i-merge_event">merge_event</a>, - </li> - - - <li> - <a href="#method-i-merged-3F">merged?</a>, - </li> - - - <li> - <a href="#method-i-mr_and_commit_notes">mr_and_commit_notes</a> - </li> - - </ul> - </dd> - - <dt>O</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-open-3F">open?</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-probably_merged-3F">probably_merged?</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-reload_code">reload_code</a>, - </li> - - - <li> - <a href="#method-i-reloaded_commits">reloaded_commits</a>, - </li> - - - <li> - <a href="#method-i-reloaded_diffs">reloaded_diffs</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_diff">to_diff</a>, - </li> - - - <li> - <a href="#method-i-to_patch">to_patch</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-unchecked-3F">unchecked?</a>, - </li> - - - <li> - <a href="#method-i-unmerged_commits">unmerged_commits</a>, - </li> - - - <li> - <a href="#method-i-unmerged_diffs">unmerged_diffs</a> - </li> - - </ul> - </dd> - - <dt>V</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-valid_diffs-3F">valid_diffs?</a>, - </li> - - - <li> - <a href="#method-i-validate_branches">validate_branches</a> - </li> - - </ul> - </dd> - - </dl> - - - - <!-- Includes --> - <div class="sectiontitle">Included Modules</div> - <ul> - - <li> - - <a href="IssueCommonality.html"> - IssueCommonality - </a> - - </li> - - <li> - - <a href="Votes.html"> - Votes - </a> - - </li> - - </ul> - - - - - - - - - - - - <!-- Section constants --> - <div class="sectiontitle">Constants</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class="attr-name">BROKEN_DIFF</td> - <td>=</td> - <td class="attr-value">"--broken-diff"</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">UNCHECKED</td> - <td>=</td> - <td class="attr-value">1</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">CAN_BE_MERGED</td> - <td>=</td> - <td class="attr-value">2</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">CANNOT_BE_MERGED</td> - <td>=</td> - <td class="attr-value">3</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - </table> - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>should_remove_source_branch</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-find_all_by_branch"> - - <b>find_all_by_branch</b>(branch_name) - - <a href="../classes/MergeRequest.html#method-c-find_all_by_branch" name="method-c-find_all_by_branch" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-find_all_by_branch_source')" id="l_method-c-find_all_by_branch_source">show</a> - - </p> - <div id="method-c-find_all_by_branch_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 47</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">find_all_by_branch</span>(<span class="ruby-identifier">branch_name</span>) - <span class="ruby-identifier">where</span>(<span class="ruby-string">"source_branch LIKE :branch OR target_branch LIKE :branch"</span>, <span class="ruby-identifier">branch</span><span class="ruby-operator">:</span> <span class="ruby-identifier">branch_name</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-find_all_by_milestone"> - - <b>find_all_by_milestone</b>(milestone) - - <a href="../classes/MergeRequest.html#method-c-find_all_by_milestone" name="method-c-find_all_by_milestone" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-find_all_by_milestone_source')" id="l_method-c-find_all_by_milestone_source">show</a> - - </p> - <div id="method-c-find_all_by_milestone_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 51</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">find_all_by_milestone</span>(<span class="ruby-identifier">milestone</span>) - <span class="ruby-identifier">where</span>(<span class="ruby-string">"milestone_id = :milestone_id"</span>, <span class="ruby-identifier">milestone_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">milestone</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-automerge-21"> - - <b>automerge!</b>(current_user) - - <a href="../classes/MergeRequest.html#method-i-automerge-21" name="method-i-automerge-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-automerge-21_source')" id="l_method-i-automerge-21_source">show</a> - - </p> - <div id="method-i-automerge-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 195</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">automerge!</span>(<span class="ruby-identifier">current_user</span>) - <span class="ruby-keyword">if</span> <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">Satellite</span><span class="ruby-operator">::</span><span class="ruby-constant">MergeAction</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-keyword">self</span>).<span class="ruby-identifier">merge!</span> <span class="ruby-operator">&&</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">unmerged_commits</span>.<span class="ruby-identifier">empty?</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">id</span>) - <span class="ruby-keyword">true</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">rescue</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">mark_as_unmergable</span> - <span class="ruby-keyword">false</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-broken_diffs-3F"> - - <b>broken_diffs?</b>() - - <a href="../classes/MergeRequest.html#method-i-broken_diffs-3F" name="method-i-broken_diffs-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-broken_diffs-3F_source')" id="l_method-i-broken_diffs-3F_source">show</a> - - </p> - <div id="method-i-broken_diffs-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 112</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">broken_diffs?</span> - <span class="ruby-identifier">diffs</span> <span class="ruby-operator">==</span> [<span class="ruby-constant">BROKEN_DIFF</span>] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-can_be_merged-3F"> - - <b>can_be_merged?</b>() - - <a href="../classes/MergeRequest.html#method-i-can_be_merged-3F" name="method-i-can_be_merged-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-can_be_merged-3F_source')" id="l_method-i-can_be_merged-3F_source">show</a> - - </p> - <div id="method-i-can_be_merged-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 84</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">can_be_merged?</span> - <span class="ruby-identifier">state</span> <span class="ruby-operator">==</span> <span class="ruby-constant">CAN_BE_MERGED</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-check_if_can_be_merged"> - - <b>check_if_can_be_merged</b>() - - <a href="../classes/MergeRequest.html#method-i-check_if_can_be_merged" name="method-i-check_if_can_be_merged" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-check_if_can_be_merged_source')" id="l_method-i-check_if_can_be_merged_source">show</a> - - </p> - <div id="method-i-check_if_can_be_merged_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 88</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">check_if_can_be_merged</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">state</span> = <span class="ruby-keyword">if</span> <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">Satellite</span><span class="ruby-operator">::</span><span class="ruby-constant">MergeAction</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">author</span>, <span class="ruby-keyword">self</span>).<span class="ruby-identifier">can_be_merged?</span> - <span class="ruby-constant">CAN_BE_MERGED</span> - <span class="ruby-keyword">else</span> - <span class="ruby-constant">CANNOT_BE_MERGED</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">save</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-closed_event"> - - <b>closed_event</b>() - - <a href="../classes/MergeRequest.html#method-i-closed_event" name="method-i-closed_event" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-closed_event_source')" id="l_method-i-closed_event_source">show</a> - - </p> - <div id="method-i-closed_event_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 140</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">closed_event</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">project</span>.<span class="ruby-identifier">events</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">target_id</span><span class="ruby-operator">:</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">target_type</span><span class="ruby-operator">:</span> <span class="ruby-string">"MergeRequest"</span>, <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-constant">Event</span><span class="ruby-operator">::</span><span class="ruby-constant">Closed</span>).<span class="ruby-identifier">last</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-commits"> - - <b>commits</b>() - - <a href="../classes/MergeRequest.html#method-i-commits" name="method-i-commits" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-commits_source')" id="l_method-i-commits_source">show</a> - - </p> - <div id="method-i-commits_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 144</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commits</span> - <span class="ruby-identifier">st_commits</span> <span class="ruby-operator">||</span> [] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-diffs"> - - <b>diffs</b>() - - <a href="../classes/MergeRequest.html#method-i-diffs" name="method-i-diffs" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-diffs_source')" id="l_method-i-diffs_source">show</a> - - </p> - <div id="method-i-diffs_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 97</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">diffs</span> - <span class="ruby-identifier">st_diffs</span> <span class="ruby-operator">||</span> [] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-human_state"> - - <b>human_state</b>() - - <a href="../classes/MergeRequest.html#method-i-human_state" name="method-i-human_state" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-human_state_source')" id="l_method-i-human_state_source">show</a> - - </p> - <div id="method-i-human_state_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 55</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">human_state</span> - <span class="ruby-identifier">states</span> = { - <span class="ruby-constant">CAN_BE_MERGED</span> =<span class="ruby-operator">></span> <span class="ruby-string">"can_be_merged"</span>, - <span class="ruby-constant">CANNOT_BE_MERGED</span> =<span class="ruby-operator">></span> <span class="ruby-string">"cannot_be_merged"</span>, - <span class="ruby-constant">UNCHECKED</span> =<span class="ruby-operator">></span> <span class="ruby-string">"unchecked"</span> - } - <span class="ruby-identifier">states</span>[<span class="ruby-keyword">self</span>.<span class="ruby-identifier">state</span>] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-last_commit"> - - <b>last_commit</b>() - - <a href="../classes/MergeRequest.html#method-i-last_commit" name="method-i-last_commit" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-last_commit_source')" id="l_method-i-last_commit_source">show</a> - - </p> - <div id="method-i-last_commit_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 128</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">last_commit</span> - <span class="ruby-identifier">commits</span>.<span class="ruby-identifier">first</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-last_commit_short_sha"> - - <b>last_commit_short_sha</b>() - - <a href="../classes/MergeRequest.html#method-i-last_commit_short_sha" name="method-i-last_commit_short_sha" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-last_commit_short_sha_source')" id="l_method-i-last_commit_short_sha_source">show</a> - - </p> - <div id="method-i-last_commit_short_sha_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 224</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">last_commit_short_sha</span> - <span class="ruby-ivar">@last_commit_short_sha</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">last_commit</span>.<span class="ruby-identifier">sha</span>[<span class="ruby-number">0</span><span class="ruby-operator">..</span><span class="ruby-number">10</span>] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-mark_as_merged-21"> - - <b>mark_as_merged!</b>() - - <a href="../classes/MergeRequest.html#method-i-mark_as_merged-21" name="method-i-mark_as_merged-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-mark_as_merged-21_source')" id="l_method-i-mark_as_merged-21_source">show</a> - - </p> - <div id="method-i-mark_as_merged-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 157</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">mark_as_merged!</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merged</span> = <span class="ruby-keyword">true</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">closed</span> = <span class="ruby-keyword">true</span> - <span class="ruby-identifier">save</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-mark_as_unchecked"> - - <b>mark_as_unchecked</b>() - - <a href="../classes/MergeRequest.html#method-i-mark_as_unchecked" name="method-i-mark_as_unchecked" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-mark_as_unchecked_source')" id="l_method-i-mark_as_unchecked_source">show</a> - - </p> - <div id="method-i-mark_as_unchecked_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 79</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">mark_as_unchecked</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">state</span> = <span class="ruby-constant">UNCHECKED</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">save</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-mark_as_unmergable"> - - <b>mark_as_unmergable</b>() - - <a href="../classes/MergeRequest.html#method-i-mark_as_unmergable" name="method-i-mark_as_unmergable" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-mark_as_unmergable_source')" id="l_method-i-mark_as_unmergable_source">show</a> - - </p> - <div id="method-i-mark_as_unmergable_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 163</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">mark_as_unmergable</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">state</span> = <span class="ruby-constant">CANNOT_BE_MERGED</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">save</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-merge-21"> - - <b>merge!</b>(user_id) - - <a href="../classes/MergeRequest.html#method-i-merge-21" name="method-i-merge-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-merge-21_source')" id="l_method-i-merge-21_source">show</a> - - </p> - <div id="method-i-merge-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 184</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">merge!</span>(<span class="ruby-identifier">user_id</span>) - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">mark_as_merged!</span> - <span class="ruby-constant">Event</span>.<span class="ruby-identifier">create</span>( - <span class="ruby-identifier">project</span><span class="ruby-operator">:</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">project</span>, - <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-constant">Event</span><span class="ruby-operator">::</span><span class="ruby-constant">Merged</span>, - <span class="ruby-identifier">target_id</span><span class="ruby-operator">:</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">id</span>, - <span class="ruby-identifier">target_type</span><span class="ruby-operator">:</span> <span class="ruby-string">"MergeRequest"</span>, - <span class="ruby-identifier">author_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">user_id</span> - ) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-merge_event"> - - <b>merge_event</b>() - - <a href="../classes/MergeRequest.html#method-i-merge_event" name="method-i-merge_event" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-merge_event_source')" id="l_method-i-merge_event_source">show</a> - - </p> - <div id="method-i-merge_event_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 136</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">merge_event</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">project</span>.<span class="ruby-identifier">events</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">target_id</span><span class="ruby-operator">:</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">target_type</span><span class="ruby-operator">:</span> <span class="ruby-string">"MergeRequest"</span>, <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-constant">Event</span><span class="ruby-operator">::</span><span class="ruby-constant">Merged</span>).<span class="ruby-identifier">last</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-merged-3F"> - - <b>merged?</b>() - - <a href="../classes/MergeRequest.html#method-i-merged-3F" name="method-i-merged-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-merged-3F_source')" id="l_method-i-merged-3F_source">show</a> - - </p> - <div id="method-i-merged-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 132</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">merged?</span> - <span class="ruby-identifier">merged</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">merge_event</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-mr_and_commit_notes"> - - <b>mr_and_commit_notes</b>() - - <a href="../classes/MergeRequest.html#method-i-mr_and_commit_notes" name="method-i-mr_and_commit_notes" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-mr_and_commit_notes_source')" id="l_method-i-mr_and_commit_notes_source">show</a> - - </p> - <div id="method-i-mr_and_commit_notes_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 205</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">mr_and_commit_notes</span> - <span class="ruby-identifier">commit_ids</span> = <span class="ruby-identifier">commits</span>.<span class="ruby-identifier">map</span>(&<span class="ruby-value">:id</span>) - <span class="ruby-constant">Note</span>.<span class="ruby-identifier">where</span>(<span class="ruby-string">"(noteable_type = 'MergeRequest' AND noteable_id = :mr_id) OR (noteable_type = 'Commit' AND commit_id IN (:commit_ids))"</span>, <span class="ruby-identifier">mr_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">id</span>, <span class="ruby-identifier">commit_ids</span><span class="ruby-operator">:</span> <span class="ruby-identifier">commit_ids</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-open-3F"> - - <b>open?</b>() - - <a href="../classes/MergeRequest.html#method-i-open-3F" name="method-i-open-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-open-3F_source')" id="l_method-i-open-3F_source">show</a> - - </p> - <div id="method-i-open-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 153</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">open?</span> - <span class="ruby-operator">!</span><span class="ruby-identifier">closed</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-probably_merged-3F"> - - <b>probably_merged?</b>() - - <a href="../classes/MergeRequest.html#method-i-probably_merged-3F" name="method-i-probably_merged-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-probably_merged-3F_source')" id="l_method-i-probably_merged-3F_source">show</a> - - </p> - <div id="method-i-probably_merged-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 148</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">probably_merged?</span> - <span class="ruby-identifier">unmerged_commits</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">&&</span> - <span class="ruby-identifier">commits</span>.<span class="ruby-identifier">any?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">open?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-reload_code"> - - <b>reload_code</b>() - - <a href="../classes/MergeRequest.html#method-i-reload_code" name="method-i-reload_code" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-reload_code_source')" id="l_method-i-reload_code_source">show</a> - - </p> - <div id="method-i-reload_code_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 70</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">reload_code</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">reloaded_commits</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">reloaded_diffs</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-reloaded_commits"> - - <b>reloaded_commits</b>() - - <a href="../classes/MergeRequest.html#method-i-reloaded_commits" name="method-i-reloaded_commits" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-reloaded_commits_source')" id="l_method-i-reloaded_commits_source">show</a> - - </p> - <div id="method-i-reloaded_commits_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 168</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">reloaded_commits</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">open?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">unmerged_commits</span>.<span class="ruby-identifier">any?</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">st_commits</span> = <span class="ruby-identifier">unmerged_commits</span> - <span class="ruby-identifier">save</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">commits</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-reloaded_diffs"> - - <b>reloaded_diffs</b>() - - <a href="../classes/MergeRequest.html#method-i-reloaded_diffs" name="method-i-reloaded_diffs" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-reloaded_diffs_source')" id="l_method-i-reloaded_diffs_source">show</a> - - </p> - <div id="method-i-reloaded_diffs_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 101</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">reloaded_diffs</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">open?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">unmerged_diffs</span>.<span class="ruby-identifier">any?</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">st_diffs</span> = <span class="ruby-identifier">unmerged_diffs</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">save</span> - <span class="ruby-keyword">end</span> - -<span class="ruby-keyword">rescue</span> <span class="ruby-constant">Grit</span><span class="ruby-operator">::</span><span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">GitTimeout</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">st_diffs</span> = [<span class="ruby-constant">BROKEN_DIFF</span>] - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">save</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_diff"> - - <b>to_diff</b>() - - <a href="../classes/MergeRequest.html#method-i-to_diff" name="method-i-to_diff" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Returns the raw diff for this merge request</p> - -<p>see “git diff”</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_diff_source')" id="l_method-i-to_diff_source">show</a> - - </p> - <div id="method-i-to_diff_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 213</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_diff</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">repo</span>.<span class="ruby-identifier">git</span>.<span class="ruby-identifier">native</span>(<span class="ruby-value">:diff</span>, {<span class="ruby-identifier">timeout</span><span class="ruby-operator">:</span> <span class="ruby-number">30</span>, <span class="ruby-identifier">raise</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>}, <span class="ruby-node">"#{target_branch}...#{source_branch}"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_patch"> - - <b>to_patch</b>() - - <a href="../classes/MergeRequest.html#method-i-to_patch" name="method-i-to_patch" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Returns the commit as a series of email patches.</p> - -<p>see “git format-patch”</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_patch_source')" id="l_method-i-to_patch_source">show</a> - - </p> - <div id="method-i-to_patch_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 220</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_patch</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">repo</span>.<span class="ruby-identifier">git</span>.<span class="ruby-identifier">format_patch</span>({<span class="ruby-identifier">timeout</span><span class="ruby-operator">:</span> <span class="ruby-number">30</span>, <span class="ruby-identifier">raise</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>, <span class="ruby-identifier">stdout</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>}, <span class="ruby-node">"#{target_branch}..#{source_branch}"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-unchecked-3F"> - - <b>unchecked?</b>() - - <a href="../classes/MergeRequest.html#method-i-unchecked-3F" name="method-i-unchecked-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-unchecked-3F_source')" id="l_method-i-unchecked-3F_source">show</a> - - </p> - <div id="method-i-unchecked-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 75</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">unchecked?</span> - <span class="ruby-identifier">state</span> <span class="ruby-operator">==</span> <span class="ruby-constant">UNCHECKED</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-unmerged_commits"> - - <b>unmerged_commits</b>() - - <a href="../classes/MergeRequest.html#method-i-unmerged_commits" name="method-i-unmerged_commits" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-unmerged_commits_source')" id="l_method-i-unmerged_commits_source">show</a> - - </p> - <div id="method-i-unmerged_commits_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 176</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">unmerged_commits</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">project</span>.<span class="ruby-identifier">repo</span>. - <span class="ruby-identifier">commits_between</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">target_branch</span>, <span class="ruby-keyword">self</span>.<span class="ruby-identifier">source_branch</span>). - <span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-constant">Commit</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">c</span>)}. - <span class="ruby-identifier">sort_by</span>(&<span class="ruby-value">:created_at</span>). - <span class="ruby-identifier">reverse</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-unmerged_diffs"> - - <b>unmerged_diffs</b>() - - <a href="../classes/MergeRequest.html#method-i-unmerged_diffs" name="method-i-unmerged_diffs" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-unmerged_diffs_source')" id="l_method-i-unmerged_diffs_source">show</a> - - </p> - <div id="method-i-unmerged_diffs_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 120</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">unmerged_diffs</span> - <span class="ruby-comment"># Only show what is new in the source branch compared to the target branch, not the other way around.</span> - <span class="ruby-comment"># The linex below with merge_base is equivalent to diff with three dots (git diff branch1...branch2)</span> - <span class="ruby-comment"># From the git documentation: "git diff A...B" is equivalent to "git diff $(git-merge-base A B) B"</span> - <span class="ruby-identifier">common_commit</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">repo</span>.<span class="ruby-identifier">git</span>.<span class="ruby-identifier">native</span>(<span class="ruby-value">:merge_base</span>, {}, [<span class="ruby-identifier">target_branch</span>, <span class="ruby-identifier">source_branch</span>]).<span class="ruby-identifier">strip</span> - <span class="ruby-identifier">diffs</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">repo</span>.<span class="ruby-identifier">diff</span>(<span class="ruby-identifier">common_commit</span>, <span class="ruby-identifier">source_branch</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-valid_diffs-3F"> - - <b>valid_diffs?</b>() - - <a href="../classes/MergeRequest.html#method-i-valid_diffs-3F" name="method-i-valid_diffs-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-valid_diffs-3F_source')" id="l_method-i-valid_diffs-3F_source">show</a> - - </p> - <div id="method-i-valid_diffs-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 116</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">valid_diffs?</span> - <span class="ruby-operator">!</span><span class="ruby-identifier">broken_diffs?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-validate_branches"> - - <b>validate_branches</b>() - - <a href="../classes/MergeRequest.html#method-i-validate_branches" name="method-i-validate_branches" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-validate_branches_source')" id="l_method-i-validate_branches_source">show</a> - - </p> - <div id="method-i-validate_branches_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/merge_request.rb, line 64</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">validate_branches</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">target_branch</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">source_branch</span> - <span class="ruby-identifier">errors</span>.<span class="ruby-identifier">add</span> <span class="ruby-value">:base</span>, <span class="ruby-string">"You can not use same branch for source and target branches"</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/MergeRequestObserver.html b/doc/code/classes/MergeRequestObserver.html deleted file mode 100644 index 364e0346134..00000000000 --- a/doc/code/classes/MergeRequestObserver.html +++ /dev/null @@ -1,234 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>MergeRequestObserver</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - MergeRequestObserver - - <span class="parent">< - - ActiveRecord::Observer - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/observers/merge_request_observer_rb.html">app/observers/merge_request_observer.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-after_create">after_create</a>, - </li> - - - <li> - <a href="#method-i-after_update">after_update</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-send_reassigned_email">send_reassigned_email</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-after_create"> - - <b>after_create</b>(merge_request) - - <a href="../classes/MergeRequestObserver.html#method-i-after_create" name="method-i-after_create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-after_create_source')" id="l_method-i-after_create_source">show</a> - - </p> - <div id="method-i-after_create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/merge_request_observer.rb, line 4</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">after_create</span>(<span class="ruby-identifier">merge_request</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">merge_request</span>.<span class="ruby-identifier">assignee</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">merge_request</span>.<span class="ruby-identifier">assignee</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">current_user</span> - <span class="ruby-constant">Notify</span>.<span class="ruby-identifier">new_merge_request_email</span>(<span class="ruby-identifier">merge_request</span>.<span class="ruby-identifier">id</span>).<span class="ruby-identifier">deliver</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-after_update"> - - <b>after_update</b>(merge_request) - - <a href="../classes/MergeRequestObserver.html#method-i-after_update" name="method-i-after_update" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-after_update_source')" id="l_method-i-after_update_source">show</a> - - </p> - <div id="method-i-after_update_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/merge_request_observer.rb, line 10</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">after_update</span>(<span class="ruby-identifier">merge_request</span>) - <span class="ruby-identifier">send_reassigned_email</span>(<span class="ruby-identifier">merge_request</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">merge_request</span>.<span class="ruby-identifier">is_being_reassigned?</span> - - <span class="ruby-identifier">status</span> = <span class="ruby-keyword">nil</span> - <span class="ruby-identifier">status</span> = <span class="ruby-string">'closed'</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">merge_request</span>.<span class="ruby-identifier">is_being_closed?</span> - <span class="ruby-identifier">status</span> = <span class="ruby-string">'reopened'</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">merge_request</span>.<span class="ruby-identifier">is_being_reopened?</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">status</span> - <span class="ruby-constant">Note</span>.<span class="ruby-identifier">create_status_change_note</span>(<span class="ruby-identifier">merge_request</span>, <span class="ruby-identifier">current_user</span>, <span class="ruby-identifier">status</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-send_reassigned_email"> - - <b>send_reassigned_email</b>(merge_request) - - <a href="../classes/MergeRequestObserver.html#method-i-send_reassigned_email" name="method-i-send_reassigned_email" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-send_reassigned_email_source')" id="l_method-i-send_reassigned_email_source">show</a> - - </p> - <div id="method-i-send_reassigned_email_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/merge_request_observer.rb, line 23</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">send_reassigned_email</span>(<span class="ruby-identifier">merge_request</span>) - <span class="ruby-identifier">recipients_ids</span> = <span class="ruby-identifier">merge_request</span>.<span class="ruby-identifier">assignee_id_was</span>, <span class="ruby-identifier">merge_request</span>.<span class="ruby-identifier">assignee_id</span> - <span class="ruby-identifier">recipients_ids</span>.<span class="ruby-identifier">delete</span> <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">id</span> - - <span class="ruby-identifier">recipients_ids</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">recipient_id</span><span class="ruby-operator">|</span> - <span class="ruby-constant">Notify</span>.<span class="ruby-identifier">reassigned_merge_request_email</span>(<span class="ruby-identifier">recipient_id</span>, <span class="ruby-identifier">merge_request</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">merge_request</span>.<span class="ruby-identifier">assignee_id_was</span>).<span class="ruby-identifier">deliver</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/MergeRequestsController.html b/doc/code/classes/MergeRequestsController.html deleted file mode 100644 index 4cf181fa8d5..00000000000 --- a/doc/code/classes/MergeRequestsController.html +++ /dev/null @@ -1,932 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>MergeRequestsController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - MergeRequestsController - - <span class="parent">< - - <a href="ProjectResourceController.html">ProjectResourceController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/merge_requests_controller_rb.html">app/controllers/merge_requests_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-authorize_admin_merge_request-21">authorize_admin_merge_request!</a>, - </li> - - - <li> - <a href="#method-i-authorize_modify_merge_request-21">authorize_modify_merge_request!</a>, - </li> - - - <li> - <a href="#method-i-automerge">automerge</a>, - </li> - - - <li> - <a href="#method-i-automerge_check">automerge_check</a> - </li> - - </ul> - </dd> - - <dt>B</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-branch_from">branch_from</a>, - </li> - - - <li> - <a href="#method-i-branch_to">branch_to</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-ci_status">ci_status</a>, - </li> - - - <li> - <a href="#method-i-create">create</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-define_show_vars">define_show_vars</a>, - </li> - - - <li> - <a href="#method-i-diffs">diffs</a> - </li> - - </ul> - </dd> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-edit">edit</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-index">index</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-merge_request">merge_request</a>, - </li> - - - <li> - <a href="#method-i-module_enabled">module_enabled</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-new">new</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-show">show</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-update">update</a> - </li> - - </ul> - </dd> - - <dt>V</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-validates_merge_request">validates_merge_request</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-automerge"> - - <b>automerge</b>() - - <a href="../classes/MergeRequestsController.html#method-i-automerge" name="method-i-automerge" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-automerge_source')" id="l_method-i-automerge_source">show</a> - - </p> - <div id="method-i-automerge_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/merge_requests_controller.rb, line 74</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">automerge</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">access_denied!</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-value">:accept_mr</span>, <span class="ruby-ivar">@project</span>) - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">open?</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">can_be_merged?</span> - <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">should_remove_source_branch</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:should_remove_source_branch</span>] - <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">automerge!</span>(<span class="ruby-identifier">current_user</span>) - <span class="ruby-ivar">@status</span> = <span class="ruby-keyword">true</span> - <span class="ruby-keyword">else</span> - <span class="ruby-ivar">@status</span> = <span class="ruby-keyword">false</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-automerge_check"> - - <b>automerge_check</b>() - - <a href="../classes/MergeRequestsController.html#method-i-automerge_check" name="method-i-automerge_check" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-automerge_check_source')" id="l_method-i-automerge_check_source">show</a> - - </p> - <div id="method-i-automerge_check_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/merge_requests_controller.rb, line 67</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">automerge_check</span> - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">unchecked?</span> - <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">check_if_can_be_merged</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">render</span> <span class="ruby-identifier">json</span><span class="ruby-operator">:</span> {<span class="ruby-identifier">state</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">human_state</span>} -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-branch_from"> - - <b>branch_from</b>() - - <a href="../classes/MergeRequestsController.html#method-i-branch_from" name="method-i-branch_from" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-branch_from_source')" id="l_method-i-branch_from_source">show</a> - - </p> - <div id="method-i-branch_from_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/merge_requests_controller.rb, line 85</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">branch_from</span> - <span class="ruby-ivar">@commit</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">commit</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:ref</span>]) - <span class="ruby-ivar">@commit</span> = <span class="ruby-constant">CommitDecorator</span>.<span class="ruby-identifier">decorate</span>(<span class="ruby-ivar">@commit</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-branch_to"> - - <b>branch_to</b>() - - <a href="../classes/MergeRequestsController.html#method-i-branch_to" name="method-i-branch_to" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-branch_to_source')" id="l_method-i-branch_to_source">show</a> - - </p> - <div id="method-i-branch_to_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/merge_requests_controller.rb, line 90</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">branch_to</span> - <span class="ruby-ivar">@commit</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">commit</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:ref</span>]) - <span class="ruby-ivar">@commit</span> = <span class="ruby-constant">CommitDecorator</span>.<span class="ruby-identifier">decorate</span>(<span class="ruby-ivar">@commit</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-ci_status"> - - <b>ci_status</b>() - - <a href="../classes/MergeRequestsController.html#method-i-ci_status" name="method-i-ci_status" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-ci_status_source')" id="l_method-i-ci_status_source">show</a> - - </p> - <div id="method-i-ci_status_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/merge_requests_controller.rb, line 95</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">ci_status</span> - <span class="ruby-identifier">status</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">gitlab_ci_service</span>.<span class="ruby-identifier">commit_status</span>(<span class="ruby-identifier">merge_request</span>.<span class="ruby-identifier">last_commit</span>.<span class="ruby-identifier">sha</span>) - <span class="ruby-identifier">response</span> = { <span class="ruby-identifier">status</span><span class="ruby-operator">:</span> <span class="ruby-identifier">status</span> } - - <span class="ruby-identifier">render</span> <span class="ruby-identifier">json</span><span class="ruby-operator">:</span> <span class="ruby-identifier">response</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-create"> - - <b>create</b>() - - <a href="../classes/MergeRequestsController.html#method-i-create" name="method-i-create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-create_source')" id="l_method-i-create_source">show</a> - - </p> - <div id="method-i-create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/merge_requests_controller.rb, line 45</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">create</span> - <span class="ruby-ivar">@merge_request</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">merge_requests</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:merge_request</span>]) - <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">author</span> = <span class="ruby-identifier">current_user</span> - - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">save</span> - <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">reload_code</span> - <span class="ruby-identifier">redirect_to</span> [<span class="ruby-ivar">@project</span>, <span class="ruby-ivar">@merge_request</span>], <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">'Merge request was successfully created.'</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">render</span> <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">"new"</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-diffs"> - - <b>diffs</b>() - - <a href="../classes/MergeRequestsController.html#method-i-diffs" name="method-i-diffs" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-diffs_source')" id="l_method-i-diffs_source">show</a> - - </p> - <div id="method-i-diffs_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/merge_requests_controller.rb, line 30</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">diffs</span> - <span class="ruby-ivar">@diffs</span> = <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">diffs</span> - <span class="ruby-ivar">@commit</span> = <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">last_commit</span> - - <span class="ruby-ivar">@comments_allowed</span> = <span class="ruby-keyword">true</span> - <span class="ruby-ivar">@line_notes</span> = <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">notes</span>.<span class="ruby-identifier">where</span>(<span class="ruby-string">"line_code is not null"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-edit"> - - <b>edit</b>() - - <a href="../classes/MergeRequestsController.html#method-i-edit" name="method-i-edit" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-edit_source')" id="l_method-i-edit_source">show</a> - - </p> - <div id="method-i-edit_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/merge_requests_controller.rb, line 42</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">edit</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-index"> - - <b>index</b>() - - <a href="../classes/MergeRequestsController.html#method-i-index" name="method-i-index" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-index_source')" id="l_method-i-index_source">show</a> - - </p> - <div id="method-i-index_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/merge_requests_controller.rb, line 16</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">index</span> - <span class="ruby-ivar">@merge_requests</span> = <span class="ruby-constant">MergeRequestsLoadContext</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">current_user</span>, <span class="ruby-identifier">params</span>).<span class="ruby-identifier">execute</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-new"> - - <b>new</b>() - - <a href="../classes/MergeRequestsController.html#method-i-new" name="method-i-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-new_source')" id="l_method-i-new_source">show</a> - - </p> - <div id="method-i-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/merge_requests_controller.rb, line 38</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">new</span> - <span class="ruby-ivar">@merge_request</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">merge_requests</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:merge_request</span>]) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-show"> - - <b>show</b>() - - <a href="../classes/MergeRequestsController.html#method-i-show" name="method-i-show" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a> - - </p> - <div id="method-i-show_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/merge_requests_controller.rb, line 20</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span> - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> - - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">diff</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">text</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">to_diff</span> } - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">patch</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">text</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">to_patch</span> } - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update"> - - <b>update</b>() - - <a href="../classes/MergeRequestsController.html#method-i-update" name="method-i-update" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_source')" id="l_method-i-update_source">show</a> - - </p> - <div id="method-i-update_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/merge_requests_controller.rb, line 57</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update</span> - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">update_attributes</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:merge_request</span>].<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">author_id_of_changes</span><span class="ruby-operator">:</span> <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">id</span>)) - <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">reload_code</span> - <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">mark_as_unchecked</span> - <span class="ruby-identifier">redirect_to</span> [<span class="ruby-ivar">@project</span>, <span class="ruby-ivar">@merge_request</span>], <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">'Merge request was successfully updated.'</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">render</span> <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">"edit"</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-authorize_admin_merge_request-21"> - - <b>authorize_admin_merge_request!</b>() - - <a href="../classes/MergeRequestsController.html#method-i-authorize_admin_merge_request-21" name="method-i-authorize_admin_merge_request-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-authorize_admin_merge_request-21_source')" id="l_method-i-authorize_admin_merge_request-21_source">show</a> - - </p> - <div id="method-i-authorize_admin_merge_request-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/merge_requests_controller.rb, line 112</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">authorize_admin_merge_request!</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">render_404</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-value">:admin_merge_request</span>, <span class="ruby-ivar">@merge_request</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-authorize_modify_merge_request-21"> - - <b>authorize_modify_merge_request!</b>() - - <a href="../classes/MergeRequestsController.html#method-i-authorize_modify_merge_request-21" name="method-i-authorize_modify_merge_request-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-authorize_modify_merge_request-21_source')" id="l_method-i-authorize_modify_merge_request-21_source">show</a> - - </p> - <div id="method-i-authorize_modify_merge_request-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/merge_requests_controller.rb, line 108</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">authorize_modify_merge_request!</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">render_404</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-value">:modify_merge_request</span>, <span class="ruby-ivar">@merge_request</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-define_show_vars"> - - <b>define_show_vars</b>() - - <a href="../classes/MergeRequestsController.html#method-i-define_show_vars" name="method-i-define_show_vars" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-define_show_vars_source')" id="l_method-i-define_show_vars_source">show</a> - - </p> - <div id="method-i-define_show_vars_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/merge_requests_controller.rb, line 129</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">define_show_vars</span> - <span class="ruby-comment"># Build a note object for comment form</span> - <span class="ruby-ivar">@note</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">notes</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">noteable</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@merge_request</span>) - - <span class="ruby-comment"># Get commits from repository</span> - <span class="ruby-comment"># or from cache if already merged</span> - <span class="ruby-ivar">@commits</span> = <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">commits</span> - <span class="ruby-ivar">@commits</span> = <span class="ruby-constant">CommitDecorator</span>.<span class="ruby-identifier">decorate</span>(<span class="ruby-ivar">@commits</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-merge_request"> - - <b>merge_request</b>() - - <a href="../classes/MergeRequestsController.html#method-i-merge_request" name="method-i-merge_request" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-merge_request_source')" id="l_method-i-merge_request_source">show</a> - - </p> - <div id="method-i-merge_request_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/merge_requests_controller.rb, line 104</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">merge_request</span> - <span class="ruby-ivar">@merge_request</span> <span class="ruby-operator">||=</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">merge_requests</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-module_enabled"> - - <b>module_enabled</b>() - - <a href="../classes/MergeRequestsController.html#method-i-module_enabled" name="method-i-module_enabled" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-module_enabled_source')" id="l_method-i-module_enabled_source">show</a> - - </p> - <div id="method-i-module_enabled_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/merge_requests_controller.rb, line 116</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">module_enabled</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">render_404</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">merge_requests_enabled</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-validates_merge_request"> - - <b>validates_merge_request</b>() - - <a href="../classes/MergeRequestsController.html#method-i-validates_merge_request" name="method-i-validates_merge_request" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-validates_merge_request_source')" id="l_method-i-validates_merge_request_source">show</a> - - </p> - <div id="method-i-validates_merge_request_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/merge_requests_controller.rb, line 120</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">validates_merge_request</span> - <span class="ruby-comment"># Show git not found page if target branch doesnt exist</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">git_not_found!</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">repo</span>.<span class="ruby-identifier">heads</span>.<span class="ruby-identifier">map</span>(&<span class="ruby-value">:name</span>).<span class="ruby-identifier">include?</span>(<span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">target_branch</span>) - - <span class="ruby-comment"># Show git not found page if source branch doesnt exist</span> - <span class="ruby-comment"># and there is no saved commits between source & target branch</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">git_not_found!</span> <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@project</span>.<span class="ruby-identifier">repo</span>.<span class="ruby-identifier">heads</span>.<span class="ruby-identifier">map</span>(&<span class="ruby-value">:name</span>).<span class="ruby-identifier">include?</span>(<span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">source_branch</span>) <span class="ruby-operator">&&</span> <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">commits</span>.<span class="ruby-identifier">blank?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/MergeRequestsHelper.html b/doc/code/classes/MergeRequestsHelper.html deleted file mode 100644 index 33725cf7ac8..00000000000 --- a/doc/code/classes/MergeRequestsHelper.html +++ /dev/null @@ -1,229 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>MergeRequestsHelper</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - MergeRequestsHelper - - </h1> - <ul class="files"> - - <li><a href="../files/app/helpers/merge_requests_helper_rb.html">app/helpers/merge_requests_helper.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-ci_build_details_path">ci_build_details_path</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-mr_css_classes">mr_css_classes</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-new_mr_path_from_push_event">new_mr_path_from_push_event</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-ci_build_details_path"> - - <b>ci_build_details_path</b>(merge_request) - - <a href="../classes/MergeRequestsHelper.html#method-i-ci_build_details_path" name="method-i-ci_build_details_path" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-ci_build_details_path_source')" id="l_method-i-ci_build_details_path_source">show</a> - - </p> - <div id="method-i-ci_build_details_path_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/merge_requests_helper.rb, line 20</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">ci_build_details_path</span> <span class="ruby-identifier">merge_request</span> - <span class="ruby-identifier">merge_request</span>.<span class="ruby-identifier">project</span>.<span class="ruby-identifier">gitlab_ci_service</span>.<span class="ruby-identifier">build_page</span>(<span class="ruby-identifier">merge_request</span>.<span class="ruby-identifier">last_commit</span>.<span class="ruby-identifier">sha</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-mr_css_classes"> - - <b>mr_css_classes</b>(mr) - - <a href="../classes/MergeRequestsHelper.html#method-i-mr_css_classes" name="method-i-mr_css_classes" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-mr_css_classes_source')" id="l_method-i-mr_css_classes_source">show</a> - - </p> - <div id="method-i-mr_css_classes_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/merge_requests_helper.rb, line 13</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">mr_css_classes</span> <span class="ruby-identifier">mr</span> - <span class="ruby-identifier">classes</span> = <span class="ruby-string">"merge_request"</span> - <span class="ruby-identifier">classes</span> <span class="ruby-operator"><<</span> <span class="ruby-string">" closed"</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">mr</span>.<span class="ruby-identifier">closed</span> - <span class="ruby-identifier">classes</span> <span class="ruby-operator"><<</span> <span class="ruby-string">" merged"</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">mr</span>.<span class="ruby-identifier">merged?</span> - <span class="ruby-identifier">classes</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-new_mr_path_from_push_event"> - - <b>new_mr_path_from_push_event</b>(event) - - <a href="../classes/MergeRequestsHelper.html#method-i-new_mr_path_from_push_event" name="method-i-new_mr_path_from_push_event" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-new_mr_path_from_push_event_source')" id="l_method-i-new_mr_path_from_push_event_source">show</a> - - </p> - <div id="method-i-new_mr_path_from_push_event_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/merge_requests_helper.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">new_mr_path_from_push_event</span>(<span class="ruby-identifier">event</span>) - <span class="ruby-identifier">new_project_merge_request_path</span>( - <span class="ruby-identifier">event</span>.<span class="ruby-identifier">project</span>, - <span class="ruby-identifier">merge_request</span><span class="ruby-operator">:</span> { - <span class="ruby-identifier">source_branch</span><span class="ruby-operator">:</span> <span class="ruby-identifier">event</span>.<span class="ruby-identifier">branch_name</span>, - <span class="ruby-identifier">target_branch</span><span class="ruby-operator">:</span> <span class="ruby-identifier">event</span>.<span class="ruby-identifier">project</span>.<span class="ruby-identifier">root_ref</span>, - <span class="ruby-identifier">title</span><span class="ruby-operator">:</span> <span class="ruby-identifier">event</span>.<span class="ruby-identifier">branch_name</span>.<span class="ruby-identifier">titleize</span> - } - ) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/MergeRequestsLoadContext.html b/doc/code/classes/MergeRequestsLoadContext.html deleted file mode 100644 index 5e2501c70b5..00000000000 --- a/doc/code/classes/MergeRequestsLoadContext.html +++ /dev/null @@ -1,162 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>MergeRequestsLoadContext</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - MergeRequestsLoadContext - - <span class="parent">< - - <a href="BaseContext.html">BaseContext</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/contexts/merge_requests_load_context_rb.html">app/contexts/merge_requests_load_context.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>Build collection of Merge Requests based on filtering passed via params for -@project</p> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-execute">execute</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-execute"> - - <b>execute</b>() - - <a href="../classes/MergeRequestsLoadContext.html#method-i-execute" name="method-i-execute" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-execute_source')" id="l_method-i-execute_source">show</a> - - </p> - <div id="method-i-execute_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/contexts/merge_requests_load_context.rb, line 4</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">execute</span> - <span class="ruby-identifier">type</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:f</span>] - - <span class="ruby-identifier">merge_requests</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">merge_requests</span> - - <span class="ruby-identifier">merge_requests</span> = <span class="ruby-keyword">case</span> <span class="ruby-identifier">type</span> - <span class="ruby-keyword">when</span> <span class="ruby-string">'all'</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">merge_requests</span> - <span class="ruby-keyword">when</span> <span class="ruby-string">'closed'</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">merge_requests</span>.<span class="ruby-identifier">closed</span> - <span class="ruby-keyword">when</span> <span class="ruby-string">'assigned-to-me'</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">merge_requests</span>.<span class="ruby-identifier">opened</span>.<span class="ruby-identifier">assigned</span>(<span class="ruby-identifier">current_user</span>) - <span class="ruby-keyword">else</span> <span class="ruby-identifier">merge_requests</span>.<span class="ruby-identifier">opened</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">merge_requests</span> = <span class="ruby-identifier">merge_requests</span>.<span class="ruby-identifier">page</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:page</span>]).<span class="ruby-identifier">per</span>(<span class="ruby-number">20</span>) - <span class="ruby-identifier">merge_requests</span> = <span class="ruby-identifier">merge_requests</span>.<span class="ruby-identifier">includes</span>(<span class="ruby-value">:author</span>, <span class="ruby-value">:project</span>).<span class="ruby-identifier">order</span>(<span class="ruby-string">"closed, created_at desc"</span>) - - <span class="ruby-comment"># Filter by specific assignee_id (or lack thereof)?</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:assignee_id</span>].<span class="ruby-identifier">present?</span> - <span class="ruby-identifier">merge_requests</span> = <span class="ruby-identifier">merge_requests</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">assignee_id</span><span class="ruby-operator">:</span> (<span class="ruby-identifier">params</span>[<span class="ruby-value">:assignee_id</span>] <span class="ruby-operator">==</span> <span class="ruby-string">'0'</span> <span class="ruby-operator">?</span> <span class="ruby-keyword">nil</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:assignee_id</span>])) - <span class="ruby-keyword">end</span> - - <span class="ruby-comment"># Filter by specific milestone_id (or lack thereof)?</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:milestone_id</span>].<span class="ruby-identifier">present?</span> - <span class="ruby-identifier">merge_requests</span> = <span class="ruby-identifier">merge_requests</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">milestone_id</span><span class="ruby-operator">:</span> (<span class="ruby-identifier">params</span>[<span class="ruby-value">:milestone_id</span>] <span class="ruby-operator">==</span> <span class="ruby-string">'0'</span> <span class="ruby-operator">?</span> <span class="ruby-keyword">nil</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:milestone_id</span>])) - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">merge_requests</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Milestone.html b/doc/code/classes/Milestone.html deleted file mode 100644 index 5f275210da1..00000000000 --- a/doc/code/classes/Milestone.html +++ /dev/null @@ -1,616 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Milestone</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Milestone - - <span class="parent">< - - ActiveRecord::Base - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/models/milestone_rb.html">app/models/milestone.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<h2 id="label-Schema+Information">Schema Information</h2> - -<p>Table name: milestones</p> - -<pre>id :integer not null, primary key -title :string(255) not null -project_id :integer not null -description :text -due_date :date -closed :boolean default(FALSE), not null -created_at :datetime not null -updated_at :datetime not null</pre> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-author_id">author_id</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-can_be_closed-3F">can_be_closed?</a>, - </li> - - - <li> - <a href="#method-i-closed_items_count">closed_items_count</a> - </li> - - </ul> - </dd> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-expired-3F">expired?</a>, - </li> - - - <li> - <a href="#method-i-expires_at">expires_at</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-is_empty-3F">is_empty?</a> - </li> - - </ul> - </dd> - - <dt>O</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-open-3F">open?</a>, - </li> - - - <li> - <a href="#method-i-open_items_count">open_items_count</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-participants">participants</a>, - </li> - - - <li> - <a href="#method-i-percent_complete">percent_complete</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-total_items_count">total_items_count</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>author_id_of_changes</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-author_id"> - - <b>author_id</b>() - - <a href="../classes/Milestone.html#method-i-author_id" name="method-i-author_id" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-author_id_source')" id="l_method-i-author_id_source">show</a> - - </p> - <div id="method-i-author_id_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/milestone.rb, line 82</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">author_id</span> - <span class="ruby-identifier">author_id_of_changes</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-can_be_closed-3F"> - - <b>can_be_closed?</b>() - - <a href="../classes/Milestone.html#method-i-can_be_closed-3F" name="method-i-can_be_closed-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-can_be_closed-3F_source')" id="l_method-i-can_be_closed-3F_source">show</a> - - </p> - <div id="method-i-can_be_closed-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/milestone.rb, line 70</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">can_be_closed?</span> - <span class="ruby-identifier">open?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">issues</span>.<span class="ruby-identifier">opened</span>.<span class="ruby-identifier">count</span>.<span class="ruby-identifier">zero?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-closed_items_count"> - - <b>closed_items_count</b>() - - <a href="../classes/Milestone.html#method-i-closed_items_count" name="method-i-closed_items_count" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-closed_items_count_source')" id="l_method-i-closed_items_count_source">show</a> - - </p> - <div id="method-i-closed_items_count_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/milestone.rb, line 46</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">closed_items_count</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">issues</span>.<span class="ruby-identifier">closed</span>.<span class="ruby-identifier">count</span> <span class="ruby-operator">+</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merge_requests</span>.<span class="ruby-identifier">closed</span>.<span class="ruby-identifier">count</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-expired-3F"> - - <b>expired?</b>() - - <a href="../classes/Milestone.html#method-i-expired-3F" name="method-i-expired-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-expired-3F_source')" id="l_method-i-expired-3F_source">show</a> - - </p> - <div id="method-i-expired-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/milestone.rb, line 30</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">expired?</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">due_date</span> - <span class="ruby-identifier">due_date</span>.<span class="ruby-identifier">past?</span> - <span class="ruby-keyword">else</span> - <span class="ruby-keyword">false</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-expires_at"> - - <b>expires_at</b>() - - <a href="../classes/Milestone.html#method-i-expires_at" name="method-i-expires_at" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-expires_at_source')" id="l_method-i-expires_at_source">show</a> - - </p> - <div id="method-i-expires_at_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/milestone.rb, line 60</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">expires_at</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">due_date</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">due_date</span>.<span class="ruby-identifier">past?</span> - <span class="ruby-node">"expired at #{due_date.stamp("Aug 21, 2011")}"</span> - <span class="ruby-keyword">else</span> - <span class="ruby-node">"expires at #{due_date.stamp("Aug 21, 2011")}"</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-is_empty-3F"> - - <b>is_empty?</b>() - - <a href="../classes/Milestone.html#method-i-is_empty-3F" name="method-i-is_empty-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-is_empty-3F_source')" id="l_method-i-is_empty-3F_source">show</a> - - </p> - <div id="method-i-is_empty-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/milestone.rb, line 74</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">is_empty?</span> - <span class="ruby-identifier">total_items_count</span>.<span class="ruby-identifier">zero?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-open-3F"> - - <b>open?</b>() - - <a href="../classes/Milestone.html#method-i-open-3F" name="method-i-open-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-open-3F_source')" id="l_method-i-open-3F_source">show</a> - - </p> - <div id="method-i-open-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/milestone.rb, line 78</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">open?</span> - <span class="ruby-operator">!</span><span class="ruby-identifier">closed</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-open_items_count"> - - <b>open_items_count</b>() - - <a href="../classes/Milestone.html#method-i-open_items_count" name="method-i-open_items_count" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-open_items_count_source')" id="l_method-i-open_items_count_source">show</a> - - </p> - <div id="method-i-open_items_count_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/milestone.rb, line 42</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">open_items_count</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">issues</span>.<span class="ruby-identifier">opened</span>.<span class="ruby-identifier">count</span> <span class="ruby-operator">+</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merge_requests</span>.<span class="ruby-identifier">opened</span>.<span class="ruby-identifier">count</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-participants"> - - <b>participants</b>() - - <a href="../classes/Milestone.html#method-i-participants" name="method-i-participants" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-participants_source')" id="l_method-i-participants_source">show</a> - - </p> - <div id="method-i-participants_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/milestone.rb, line 38</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">participants</span> - <span class="ruby-constant">User</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">issues</span>.<span class="ruby-identifier">pluck</span>(<span class="ruby-value">:assignee_id</span>)) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-percent_complete"> - - <b>percent_complete</b>() - - <a href="../classes/Milestone.html#method-i-percent_complete" name="method-i-percent_complete" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-percent_complete_source')" id="l_method-i-percent_complete_source">show</a> - - </p> - <div id="method-i-percent_complete_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/milestone.rb, line 54</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">percent_complete</span> - ((<span class="ruby-identifier">closed_items_count</span> * <span class="ruby-number">100</span>) <span class="ruby-operator">/</span> <span class="ruby-identifier">total_items_count</span>).<span class="ruby-identifier">abs</span> -<span class="ruby-keyword">rescue</span> <span class="ruby-constant">ZeroDivisionError</span> - <span class="ruby-number">100</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-total_items_count"> - - <b>total_items_count</b>() - - <a href="../classes/Milestone.html#method-i-total_items_count" name="method-i-total_items_count" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-total_items_count_source')" id="l_method-i-total_items_count_source">show</a> - - </p> - <div id="method-i-total_items_count_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/milestone.rb, line 50</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">total_items_count</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">issues</span>.<span class="ruby-identifier">count</span> <span class="ruby-operator">+</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merge_requests</span>.<span class="ruby-identifier">count</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/MilestonesController.html b/doc/code/classes/MilestonesController.html deleted file mode 100644 index 48a3beb66a1..00000000000 --- a/doc/code/classes/MilestonesController.html +++ /dev/null @@ -1,589 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>MilestonesController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - MilestonesController - - <span class="parent">< - - <a href="ProjectResourceController.html">ProjectResourceController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/milestones_controller_rb.html">app/controllers/milestones_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-authorize_admin_milestone-21">authorize_admin_milestone!</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-create">create</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-destroy">destroy</a> - </li> - - </ul> - </dd> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-edit">edit</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-index">index</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-milestone">milestone</a>, - </li> - - - <li> - <a href="#method-i-module_enabled">module_enabled</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-new">new</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-show">show</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-update">update</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-create"> - - <b>create</b>() - - <a href="../classes/MilestonesController.html#method-i-create" name="method-i-create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-create_source')" id="l_method-i-create_source">show</a> - - </p> - <div id="method-i-create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/milestones_controller.rb, line 44</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">create</span> - <span class="ruby-ivar">@milestone</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">milestones</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:milestone</span>]) - <span class="ruby-ivar">@milestone</span>.<span class="ruby-identifier">author_id_of_changes</span> = <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">id</span> - - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@milestone</span>.<span class="ruby-identifier">save</span> - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">project_milestone_path</span>(<span class="ruby-ivar">@project</span>, <span class="ruby-ivar">@milestone</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">render</span> <span class="ruby-string">"new"</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-destroy"> - - <b>destroy</b>() - - <a href="../classes/MilestonesController.html#method-i-destroy" name="method-i-destroy" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-destroy_source')" id="l_method-i-destroy_source">show</a> - - </p> - <div id="method-i-destroy_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/milestones_controller.rb, line 70</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">destroy</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">access_denied!</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-value">:admin_milestone</span>, <span class="ruby-ivar">@milestone</span>) - - <span class="ruby-ivar">@milestone</span>.<span class="ruby-identifier">destroy</span> - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> { <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">project_milestones_path</span> } - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">nothing</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span> } - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-edit"> - - <b>edit</b>() - - <a href="../classes/MilestonesController.html#method-i-edit" name="method-i-edit" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-edit_source')" id="l_method-i-edit_source">show</a> - - </p> - <div id="method-i-edit_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/milestones_controller.rb, line 29</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">edit</span> - <span class="ruby-identifier">respond_with</span>(<span class="ruby-ivar">@milestone</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-index"> - - <b>index</b>() - - <a href="../classes/MilestonesController.html#method-i-index" name="method-i-index" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-index_source')" id="l_method-i-index_source">show</a> - - </p> - <div id="method-i-index_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/milestones_controller.rb, line 13</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">index</span> - <span class="ruby-ivar">@milestones</span> = <span class="ruby-keyword">case</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:f</span>] - <span class="ruby-keyword">when</span> <span class="ruby-string">'all'</span>; <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">milestones</span>.<span class="ruby-identifier">order</span>(<span class="ruby-string">"closed, due_date DESC"</span>) - <span class="ruby-keyword">when</span> <span class="ruby-string">'closed'</span>; <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">milestones</span>.<span class="ruby-identifier">closed</span>.<span class="ruby-identifier">order</span>(<span class="ruby-string">"due_date DESC"</span>) - <span class="ruby-keyword">else</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">milestones</span>.<span class="ruby-identifier">active</span>.<span class="ruby-identifier">order</span>(<span class="ruby-string">"due_date ASC"</span>) - <span class="ruby-keyword">end</span> - - <span class="ruby-ivar">@milestones</span> = <span class="ruby-ivar">@milestones</span>.<span class="ruby-identifier">includes</span>(<span class="ruby-value">:project</span>) - <span class="ruby-ivar">@milestones</span> = <span class="ruby-ivar">@milestones</span>.<span class="ruby-identifier">page</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:page</span>]).<span class="ruby-identifier">per</span>(<span class="ruby-number">20</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-new"> - - <b>new</b>() - - <a href="../classes/MilestonesController.html#method-i-new" name="method-i-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-new_source')" id="l_method-i-new_source">show</a> - - </p> - <div id="method-i-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/milestones_controller.rb, line 24</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">new</span> - <span class="ruby-ivar">@milestone</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">milestones</span>.<span class="ruby-identifier">new</span> - <span class="ruby-identifier">respond_with</span>(<span class="ruby-ivar">@milestone</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-show"> - - <b>show</b>() - - <a href="../classes/MilestonesController.html#method-i-show" name="method-i-show" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a> - - </p> - <div id="method-i-show_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/milestones_controller.rb, line 33</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span> - <span class="ruby-ivar">@issues</span> = <span class="ruby-ivar">@milestone</span>.<span class="ruby-identifier">issues</span> - <span class="ruby-ivar">@users</span> = <span class="ruby-constant">UserDecorator</span>.<span class="ruby-identifier">decorate</span>(<span class="ruby-ivar">@milestone</span>.<span class="ruby-identifier">participants</span>) - <span class="ruby-ivar">@merge_requests</span> = <span class="ruby-ivar">@milestone</span>.<span class="ruby-identifier">merge_requests</span> - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update"> - - <b>update</b>() - - <a href="../classes/MilestonesController.html#method-i-update" name="method-i-update" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_source')" id="l_method-i-update_source">show</a> - - </p> - <div id="method-i-update_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/milestones_controller.rb, line 55</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update</span> - <span class="ruby-ivar">@milestone</span>.<span class="ruby-identifier">update_attributes</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:milestone</span>].<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">author_id_of_changes</span><span class="ruby-operator">:</span> <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">id</span>)) - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> <span class="ruby-keyword">do</span> - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@milestone</span>.<span class="ruby-identifier">valid?</span> - <span class="ruby-identifier">redirect_to</span> [<span class="ruby-ivar">@project</span>, <span class="ruby-ivar">@milestone</span>] - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">render</span> <span class="ruby-value">:edit</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-authorize_admin_milestone-21"> - - <b>authorize_admin_milestone!</b>() - - <a href="../classes/MilestonesController.html#method-i-authorize_admin_milestone-21" name="method-i-authorize_admin_milestone-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-authorize_admin_milestone-21_source')" id="l_method-i-authorize_admin_milestone-21_source">show</a> - - </p> - <div id="method-i-authorize_admin_milestone-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/milestones_controller.rb, line 87</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">authorize_admin_milestone!</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">render_404</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-value">:admin_milestone</span>, <span class="ruby-ivar">@project</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-milestone"> - - <b>milestone</b>() - - <a href="../classes/MilestonesController.html#method-i-milestone" name="method-i-milestone" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-milestone_source')" id="l_method-i-milestone_source">show</a> - - </p> - <div id="method-i-milestone_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/milestones_controller.rb, line 83</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">milestone</span> - <span class="ruby-ivar">@milestone</span> <span class="ruby-operator">||=</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">milestones</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-module_enabled"> - - <b>module_enabled</b>() - - <a href="../classes/MilestonesController.html#method-i-module_enabled" name="method-i-module_enabled" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-module_enabled_source')" id="l_method-i-module_enabled_source">show</a> - - </p> - <div id="method-i-module_enabled_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/milestones_controller.rb, line 91</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">module_enabled</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">render_404</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">issues_enabled</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Namespace.html b/doc/code/classes/Namespace.html deleted file mode 100644 index 02c9b7e44ed..00000000000 --- a/doc/code/classes/Namespace.html +++ /dev/null @@ -1,629 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Namespace</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Namespace - - <span class="parent">< - - ActiveRecord::Base - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/models/namespace_rb.html">app/models/namespace.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<h2 id="label-Schema+Information">Schema Information</h2> - -<p>Table name: namespaces</p> - -<pre>id :integer not null, primary key -name :string(255) not null -path :string(255) not null -owner_id :integer not null -created_at :datetime not null -updated_at :datetime not null -type :string(255)</pre> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-dir_exists-3F">dir_exists?</a> - </li> - - </ul> - </dd> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-ensure_dir_exist">ensure_dir_exist</a> - </li> - - </ul> - </dd> - - <dt>G</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-global_id">global_id</a> - </li> - - </ul> - </dd> - - <dt>H</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-human_name">human_name</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-move_dir">move_dir</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-namespace_full_path">namespace_full_path</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-rm_dir">rm_dir</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-search">search</a>, - </li> - - - <li> - <a href="#method-i-send_update_instructions">send_update_instructions</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_param">to_param</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-update_gitolite">update_gitolite</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-global_id"> - - <b>global_id</b>() - - <a href="../classes/Namespace.html#method-c-global_id" name="method-c-global_id" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-global_id_source')" id="l_method-c-global_id_source">show</a> - - </p> - <div id="method-c-global_id_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/namespace.rb, line 41</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">global_id</span> - <span class="ruby-string">'GLN'</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-search"> - - <b>search</b>(query) - - <a href="../classes/Namespace.html#method-c-search" name="method-c-search" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-search_source')" id="l_method-c-search_source">show</a> - - </p> - <div id="method-c-search_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/namespace.rb, line 37</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">search</span> <span class="ruby-identifier">query</span> - <span class="ruby-identifier">where</span>(<span class="ruby-string">"name LIKE :query OR path LIKE :query"</span>, <span class="ruby-identifier">query</span><span class="ruby-operator">:</span> <span class="ruby-node">"%#{query}%"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-dir_exists-3F"> - - <b>dir_exists?</b>() - - <a href="../classes/Namespace.html#method-i-dir_exists-3F" name="method-i-dir_exists-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-dir_exists-3F_source')" id="l_method-i-dir_exists-3F_source">show</a> - - </p> - <div id="method-i-dir_exists-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/namespace.rb, line 59</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">dir_exists?</span> - <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">namespace_full_path</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-ensure_dir_exist"> - - <b>ensure_dir_exist</b>() - - <a href="../classes/Namespace.html#method-i-ensure_dir_exist" name="method-i-ensure_dir_exist" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-ensure_dir_exist_source')" id="l_method-i-ensure_dir_exist_source">show</a> - - </p> - <div id="method-i-ensure_dir_exist_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/namespace.rb, line 53</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">ensure_dir_exist</span> - <span class="ruby-keyword">unless</span> <span class="ruby-identifier">dir_exists?</span> - <span class="ruby-identifier">system</span>(<span class="ruby-node">"mkdir -m 770 #{namespace_full_path}"</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-human_name"> - - <b>human_name</b>() - - <a href="../classes/Namespace.html#method-i-human_name" name="method-i-human_name" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-human_name_source')" id="l_method-i-human_name_source">show</a> - - </p> - <div id="method-i-human_name_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/namespace.rb, line 49</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">human_name</span> - <span class="ruby-identifier">owner_name</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-move_dir"> - - <b>move_dir</b>() - - <a href="../classes/Namespace.html#method-i-move_dir" name="method-i-move_dir" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-move_dir_source')" id="l_method-i-move_dir_source">show</a> - - </p> - <div id="method-i-move_dir_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/namespace.rb, line 67</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">move_dir</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">path_changed?</span> - <span class="ruby-identifier">old_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">Gitlab</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">gitolite</span>.<span class="ruby-identifier">repos_path</span>, <span class="ruby-identifier">path_was</span>) - <span class="ruby-identifier">new_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">Gitlab</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">gitolite</span>.<span class="ruby-identifier">repos_path</span>, <span class="ruby-identifier">path</span>) - <span class="ruby-keyword">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">new_path</span>) - <span class="ruby-identifier">raise</span> <span class="ruby-string">"Already exists"</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">system</span>(<span class="ruby-node">"mv #{old_path} #{new_path}"</span>) - <span class="ruby-identifier">send_update_instructions</span> - <span class="ruby-ivar">@require_update_gitolite</span> = <span class="ruby-keyword">true</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">raise</span> <span class="ruby-node">"Namespace move error #{old_path} #{new_path}"</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-namespace_full_path"> - - <b>namespace_full_path</b>() - - <a href="../classes/Namespace.html#method-i-namespace_full_path" name="method-i-namespace_full_path" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-namespace_full_path_source')" id="l_method-i-namespace_full_path_source">show</a> - - </p> - <div id="method-i-namespace_full_path_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/namespace.rb, line 63</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">namespace_full_path</span> - <span class="ruby-ivar">@namespace_full_path</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">Gitlab</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">gitolite</span>.<span class="ruby-identifier">repos_path</span>, <span class="ruby-identifier">path</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-rm_dir"> - - <b>rm_dir</b>() - - <a href="../classes/Namespace.html#method-i-rm_dir" name="method-i-rm_dir" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-rm_dir_source')" id="l_method-i-rm_dir_source">show</a> - - </p> - <div id="method-i-rm_dir_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/namespace.rb, line 89</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">rm_dir</span> - <span class="ruby-identifier">dir_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">Gitlab</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">gitolite</span>.<span class="ruby-identifier">repos_path</span>, <span class="ruby-identifier">path</span>) - <span class="ruby-identifier">system</span>(<span class="ruby-node">"rm -rf #{dir_path}"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-send_update_instructions"> - - <b>send_update_instructions</b>() - - <a href="../classes/Namespace.html#method-i-send_update_instructions" name="method-i-send_update_instructions" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-send_update_instructions_source')" id="l_method-i-send_update_instructions_source">show</a> - - </p> - <div id="method-i-send_update_instructions_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/namespace.rb, line 94</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">send_update_instructions</span> - <span class="ruby-identifier">projects</span>.<span class="ruby-identifier">each</span>(&<span class="ruby-value">:send_move_instructions</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_param"> - - <b>to_param</b>() - - <a href="../classes/Namespace.html#method-i-to_param" name="method-i-to_param" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_param_source')" id="l_method-i-to_param_source">show</a> - - </p> - <div id="method-i-to_param_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/namespace.rb, line 45</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_param</span> - <span class="ruby-identifier">path</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update_gitolite"> - - <b>update_gitolite</b>() - - <a href="../classes/Namespace.html#method-i-update_gitolite" name="method-i-update_gitolite" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_gitolite_source')" id="l_method-i-update_gitolite_source">show</a> - - </p> - <div id="method-i-update_gitolite_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/namespace.rb, line 84</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update_gitolite</span> - <span class="ruby-ivar">@require_update_gitolite</span> = <span class="ruby-keyword">false</span> - <span class="ruby-identifier">projects</span>.<span class="ruby-identifier">each</span>(&<span class="ruby-value">:update_repository</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/NamespacedProject.html b/doc/code/classes/NamespacedProject.html deleted file mode 100644 index 976338e8810..00000000000 --- a/doc/code/classes/NamespacedProject.html +++ /dev/null @@ -1,344 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>NamespacedProject</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - NamespacedProject - - </h1> - <ul class="files"> - - <li><a href="../files/app/roles/namespaced_project_rb.html">app/roles/namespaced_project.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-chief">chief</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-name_with_namespace">name_with_namespace</a>, - </li> - - - <li> - <a href="#method-i-namespace_owner">namespace_owner</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-path_with_namespace">path_with_namespace</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-transfer">transfer</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-chief"> - - <b>chief</b>() - - <a href="../classes/NamespacedProject.html#method-i-chief" name="method-i-chief" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-chief_source')" id="l_method-i-chief_source">show</a> - - </p> - <div id="method-i-chief_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/namespaced_project.rb, line 44</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">chief</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">namespace</span> - <span class="ruby-identifier">namespace_owner</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">owner</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-name_with_namespace"> - - <b>name_with_namespace</b>() - - <a href="../classes/NamespacedProject.html#method-i-name_with_namespace" name="method-i-name_with_namespace" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-name_with_namespace_source')" id="l_method-i-name_with_namespace_source">show</a> - - </p> - <div id="method-i-name_with_namespace_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/namespaced_project.rb, line 30</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">name_with_namespace</span> - <span class="ruby-ivar">@name_with_namespace</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">namespace</span> - <span class="ruby-identifier">namespace</span>.<span class="ruby-identifier">human_name</span> <span class="ruby-operator">+</span> <span class="ruby-string">" / "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">name</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">name</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-namespace_owner"> - - <b>namespace_owner</b>() - - <a href="../classes/NamespacedProject.html#method-i-namespace_owner" name="method-i-namespace_owner" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-namespace_owner_source')" id="l_method-i-namespace_owner_source">show</a> - - </p> - <div id="method-i-namespace_owner_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/namespaced_project.rb, line 40</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">namespace_owner</span> - <span class="ruby-identifier">namespace</span>.<span class="ruby-identifier">try</span>(<span class="ruby-value">:owner</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-path_with_namespace"> - - <b>path_with_namespace</b>() - - <a href="../classes/NamespacedProject.html#method-i-path_with_namespace" name="method-i-path_with_namespace" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-path_with_namespace_source')" id="l_method-i-path_with_namespace_source">show</a> - - </p> - <div id="method-i-path_with_namespace_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/namespaced_project.rb, line 52</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">path_with_namespace</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">namespace</span> - <span class="ruby-identifier">namespace</span>.<span class="ruby-identifier">path</span> <span class="ruby-operator">+</span> <span class="ruby-string">'/'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">path</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">path</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-transfer"> - - <b>transfer</b>(new_namespace) - - <a href="../classes/NamespacedProject.html#method-i-transfer" name="method-i-transfer" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-transfer_source')" id="l_method-i-transfer_source">show</a> - - </p> - <div id="method-i-transfer_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/namespaced_project.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">transfer</span>(<span class="ruby-identifier">new_namespace</span>) - <span class="ruby-constant">Project</span>.<span class="ruby-identifier">transaction</span> <span class="ruby-keyword">do</span> - <span class="ruby-identifier">old_namespace</span> = <span class="ruby-identifier">namespace</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">namespace</span> = <span class="ruby-identifier">new_namespace</span> - - <span class="ruby-identifier">old_dir</span> = <span class="ruby-identifier">old_namespace</span>.<span class="ruby-identifier">try</span>(<span class="ruby-value">:path</span>) <span class="ruby-operator">||</span> <span class="ruby-string">''</span> - <span class="ruby-identifier">new_dir</span> = <span class="ruby-identifier">new_namespace</span>.<span class="ruby-identifier">try</span>(<span class="ruby-value">:path</span>) <span class="ruby-operator">||</span> <span class="ruby-string">''</span> - - <span class="ruby-identifier">old_repo</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">old_dir</span>.<span class="ruby-identifier">present?</span> - <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">old_dir</span>, <span class="ruby-keyword">self</span>.<span class="ruby-identifier">path</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">path</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-keyword">if</span> <span class="ruby-constant">Project</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">path</span><span class="ruby-operator">:</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">path</span>, <span class="ruby-identifier">namespace_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">new_namespace</span>.<span class="ruby-identifier">try</span>(<span class="ruby-value">:id</span>)).<span class="ruby-identifier">present?</span> - <span class="ruby-identifier">raise</span> <span class="ruby-constant">TransferError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">"Project with same path in target namespace already exists"</span>) - <span class="ruby-keyword">end</span> - - <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">ProjectMover</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword">self</span>, <span class="ruby-identifier">old_dir</span>, <span class="ruby-identifier">new_dir</span>).<span class="ruby-identifier">execute</span> - - <span class="ruby-identifier">git_host</span>.<span class="ruby-identifier">move_repository</span>(<span class="ruby-identifier">old_repo</span>, <span class="ruby-keyword">self</span>) - - <span class="ruby-identifier">save!</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">rescue</span> <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">ProjectMover</span><span class="ruby-operator">::</span><span class="ruby-constant">ProjectMoveError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span> - <span class="ruby-identifier">raise</span> <span class="ruby-constant">Project</span><span class="ruby-operator">::</span><span class="ruby-constant">TransferError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ex</span>.<span class="ruby-identifier">message</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/NamespacesHelper.html b/doc/code/classes/NamespacesHelper.html deleted file mode 100644 index 28d485d9ffb..00000000000 --- a/doc/code/classes/NamespacesHelper.html +++ /dev/null @@ -1,146 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>NamespacesHelper</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - NamespacesHelper - - </h1> - <ul class="files"> - - <li><a href="../files/app/helpers/namespaces_helper_rb.html">app/helpers/namespaces_helper.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-namespaces_options">namespaces_options</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-namespaces_options"> - - <b>namespaces_options</b>(selected = :current_user, scope = :default) - - <a href="../classes/NamespacesHelper.html#method-i-namespaces_options" name="method-i-namespaces_options" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-namespaces_options_source')" id="l_method-i-namespaces_options_source">show</a> - - </p> - <div id="method-i-namespaces_options_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/namespaces_helper.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">namespaces_options</span>(<span class="ruby-identifier">selected</span> = <span class="ruby-value">:current_user</span>, <span class="ruby-identifier">scope</span> = <span class="ruby-value">:default</span>) - <span class="ruby-identifier">groups</span> = <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">namespaces</span>.<span class="ruby-identifier">select</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span><span class="ruby-operator">|</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-string">'Group'</span>} - - <span class="ruby-identifier">users</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">scope</span> <span class="ruby-operator">==</span> <span class="ruby-value">:all</span> - <span class="ruby-constant">Namespace</span>.<span class="ruby-identifier">root</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">namespaces</span>.<span class="ruby-identifier">reject</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span><span class="ruby-operator">|</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-string">'Group'</span>} - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">global_opts</span> = [<span class="ruby-string">"Global"</span>, [[<span class="ruby-string">'/'</span>, <span class="ruby-constant">Namespace</span>.<span class="ruby-identifier">global_id</span>]] ] - <span class="ruby-identifier">group_opts</span> = [<span class="ruby-string">"Groups"</span>, <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">g</span><span class="ruby-operator">|</span> [<span class="ruby-identifier">g</span>.<span class="ruby-identifier">human_name</span>, <span class="ruby-identifier">g</span>.<span class="ruby-identifier">id</span>]} ] - <span class="ruby-identifier">users_opts</span> = [ <span class="ruby-string">"Users"</span>, <span class="ruby-identifier">users</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">u</span><span class="ruby-operator">|</span> [<span class="ruby-identifier">u</span>.<span class="ruby-identifier">human_name</span>, <span class="ruby-identifier">u</span>.<span class="ruby-identifier">id</span>]} ] - - <span class="ruby-identifier">options</span> = [] - <span class="ruby-identifier">options</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">global_opts</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">admin</span> - <span class="ruby-identifier">options</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">group_opts</span> - <span class="ruby-identifier">options</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">users_opts</span> - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">selected</span> <span class="ruby-operator">==</span> <span class="ruby-value">:current_user</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">namespace</span> - <span class="ruby-identifier">selected</span> = <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">namespace</span>.<span class="ruby-identifier">id</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">grouped_options_for_select</span>(<span class="ruby-identifier">options</span>, <span class="ruby-identifier">selected</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Note.html b/doc/code/classes/Note.html deleted file mode 100644 index 4ec1c4dcf79..00000000000 --- a/doc/code/classes/Note.html +++ /dev/null @@ -1,536 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Note</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Note - - <span class="parent">< - - ActiveRecord::Base - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/models/note_rb.html">app/models/note.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-commit_author">commit_author</a>, - </li> - - - <li> - <a href="#method-c-create_status_change_note">create_status_change_note</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-downvote-3F">downvote?</a> - </li> - - </ul> - </dd> - - <dt>F</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-for_commit-3F">for_commit?</a>, - </li> - - - <li> - <a href="#method-i-for_diff_line-3F">for_diff_line?</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-noteable">noteable</a>, - </li> - - - <li> - <a href="#method-i-noteable_type_name">noteable_type_name</a>, - </li> - - - <li> - <a href="#method-i-notify_only_author-3F">notify_only_author?</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-upvote-3F">upvote?</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>notify</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>notify_author</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-create_status_change_note"> - - <b>create_status_change_note</b>(noteable, author, status) - - <a href="../classes/Note.html#method-c-create_status_change_note" name="method-c-create_status_change_note" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-create_status_change_note_source')" id="l_method-c-create_status_change_note_source">show</a> - - </p> - <div id="method-c-create_status_change_note_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/note.rb, line 53</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">create_status_change_note</span>(<span class="ruby-identifier">noteable</span>, <span class="ruby-identifier">author</span>, <span class="ruby-identifier">status</span>) - <span class="ruby-identifier">create</span>({ - <span class="ruby-identifier">noteable</span><span class="ruby-operator">:</span> <span class="ruby-identifier">noteable</span>, - <span class="ruby-identifier">project</span><span class="ruby-operator">:</span> <span class="ruby-identifier">noteable</span>.<span class="ruby-identifier">project</span>, - <span class="ruby-identifier">author</span><span class="ruby-operator">:</span> <span class="ruby-identifier">author</span>, - <span class="ruby-identifier">note</span><span class="ruby-operator">:</span> <span class="ruby-node">"_Status changed to #{status}_"</span> - }, <span class="ruby-identifier">without_protection</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-commit_author"> - - <b>commit_author</b>() - - <a href="../classes/Note.html#method-i-commit_author" name="method-i-commit_author" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-commit_author_source')" id="l_method-i-commit_author_source">show</a> - - </p> - <div id="method-i-commit_author_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/note.rb, line 109</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commit_author</span> - <span class="ruby-ivar">@commit_author</span> <span class="ruby-operator">||=</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">users</span>.<span class="ruby-identifier">find_by_email</span>(<span class="ruby-identifier">noteable</span>.<span class="ruby-identifier">author_email</span>) <span class="ruby-operator">||</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">users</span>.<span class="ruby-identifier">find_by_name</span>(<span class="ruby-identifier">noteable</span>.<span class="ruby-identifier">author_name</span>) -<span class="ruby-keyword">rescue</span> - <span class="ruby-keyword">nil</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-downvote-3F"> - - <b>downvote?</b>() - - <a href="../classes/Note.html#method-i-downvote-3F" name="method-i-downvote-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Returns true if this is a downvote note, otherwise false is returned</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-downvote-3F_source')" id="l_method-i-downvote-3F_source">show</a> - - </p> - <div id="method-i-downvote-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/note.rb, line 125</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">downvote?</span> - <span class="ruby-identifier">note</span>.<span class="ruby-identifier">start_with?</span>(<span class="ruby-string">'-1'</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">note</span>.<span class="ruby-identifier">start_with?</span>(<span class="ruby-string">':-1:'</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-for_commit-3F"> - - <b>for_commit?</b>() - - <a href="../classes/Note.html#method-i-for_commit-3F" name="method-i-for_commit-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-for_commit-3F_source')" id="l_method-i-for_commit-3F_source">show</a> - - </p> - <div id="method-i-for_commit-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/note.rb, line 101</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">for_commit?</span> - <span class="ruby-identifier">noteable_type</span> <span class="ruby-operator">==</span> <span class="ruby-string">"Commit"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-for_diff_line-3F"> - - <b>for_diff_line?</b>() - - <a href="../classes/Note.html#method-i-for_diff_line-3F" name="method-i-for_diff_line-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-for_diff_line-3F_source')" id="l_method-i-for_diff_line-3F_source">show</a> - - </p> - <div id="method-i-for_diff_line-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/note.rb, line 105</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">for_diff_line?</span> - <span class="ruby-identifier">line_code</span>.<span class="ruby-identifier">present?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-noteable"> - - <b>noteable</b>() - - <a href="../classes/Note.html#method-i-noteable" name="method-i-noteable" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>override to return commits, which are not active record</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-noteable_source')" id="l_method-i-noteable_source">show</a> - - </p> - <div id="method-i-noteable_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/note.rb, line 71</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">noteable</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">for_commit?</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">commit</span>(<span class="ruby-identifier">commit_id</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-keyword">super</span> - <span class="ruby-keyword">end</span> -<span class="ruby-comment"># Temp fix to prevent app crash</span> -<span class="ruby-comment"># if note commit id doesnt exist</span> -<span class="ruby-keyword">rescue</span> - <span class="ruby-keyword">nil</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-noteable_type_name"> - - <b>noteable_type_name</b>() - - <a href="../classes/Note.html#method-i-noteable_type_name" name="method-i-noteable_type_name" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-noteable_type_name_source')" id="l_method-i-noteable_type_name_source">show</a> - - </p> - <div id="method-i-noteable_type_name_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/note.rb, line 129</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">noteable_type_name</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">noteable_type</span>.<span class="ruby-identifier">present?</span> - <span class="ruby-identifier">noteable_type</span>.<span class="ruby-identifier">downcase</span> - <span class="ruby-keyword">else</span> - <span class="ruby-string">"wall"</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-notify_only_author-3F"> - - <b>notify_only_author?</b>(user) - - <a href="../classes/Note.html#method-i-notify_only_author-3F" name="method-i-notify_only_author-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Check if we can notify commit author with email about our comment</p> - -<p>If commit author email exist in project and commit author is not passed -user we can send email to him</p> - -<p>params:</p> - -<pre>user - current user</pre> - -<p>return:</p> - -<pre>Boolean</pre> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-notify_only_author-3F_source')" id="l_method-i-notify_only_author-3F_source">show</a> - - </p> - <div id="method-i-notify_only_author-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/note.rb, line 96</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">notify_only_author?</span>(<span class="ruby-identifier">user</span>) - <span class="ruby-identifier">for_commit?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">commit_author</span> <span class="ruby-operator">&&</span> - <span class="ruby-identifier">commit_author</span>.<span class="ruby-identifier">email</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">user</span>.<span class="ruby-identifier">email</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-upvote-3F"> - - <b>upvote?</b>() - - <a href="../classes/Note.html#method-i-upvote-3F" name="method-i-upvote-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Returns true if this is an upvote note, otherwise false is returned</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-upvote-3F_source')" id="l_method-i-upvote-3F_source">show</a> - - </p> - <div id="method-i-upvote-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/note.rb, line 119</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">upvote?</span> - <span class="ruby-identifier">note</span>.<span class="ruby-identifier">start_with?</span>(<span class="ruby-string">'+1'</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">note</span>.<span class="ruby-identifier">start_with?</span>(<span class="ruby-string">':+1:'</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/NoteEvent.html b/doc/code/classes/NoteEvent.html deleted file mode 100644 index 0817d17018a..00000000000 --- a/doc/code/classes/NoteEvent.html +++ /dev/null @@ -1,380 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>NoteEvent</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - NoteEvent - - </h1> - <ul class="files"> - - <li><a href="../files/app/roles/note_event_rb.html">app/roles/note_event.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-note_commit-3F">note_commit?</a>, - </li> - - - <li> - <a href="#method-i-note_commit_id">note_commit_id</a>, - </li> - - - <li> - <a href="#method-i-note_short_commit_id">note_short_commit_id</a>, - </li> - - - <li> - <a href="#method-i-note_target">note_target</a>, - </li> - - - <li> - <a href="#method-i-note_target_id">note_target_id</a>, - </li> - - - <li> - <a href="#method-i-note_target_type">note_target_type</a> - </li> - - </ul> - </dd> - - <dt>W</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-wall_note-3F">wall_note?</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-note_commit-3F"> - - <b>note_commit?</b>() - - <a href="../classes/NoteEvent.html#method-i-note_commit-3F" name="method-i-note_commit-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-note_commit-3F_source')" id="l_method-i-note_commit-3F_source">show</a> - - </p> - <div id="method-i-note_commit-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/note_event.rb, line 10</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">note_commit?</span> - <span class="ruby-identifier">target</span>.<span class="ruby-identifier">noteable_type</span> <span class="ruby-operator">==</span> <span class="ruby-string">"Commit"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-note_commit_id"> - - <b>note_commit_id</b>() - - <a href="../classes/NoteEvent.html#method-i-note_commit_id" name="method-i-note_commit_id" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-note_commit_id_source')" id="l_method-i-note_commit_id_source">show</a> - - </p> - <div id="method-i-note_commit_id_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/note_event.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">note_commit_id</span> - <span class="ruby-identifier">target</span>.<span class="ruby-identifier">commit_id</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-note_short_commit_id"> - - <b>note_short_commit_id</b>() - - <a href="../classes/NoteEvent.html#method-i-note_short_commit_id" name="method-i-note_short_commit_id" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-note_short_commit_id_source')" id="l_method-i-note_short_commit_id_source">show</a> - - </p> - <div id="method-i-note_short_commit_id_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/note_event.rb, line 6</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">note_short_commit_id</span> - <span class="ruby-identifier">note_commit_id</span>[<span class="ruby-number">0</span><span class="ruby-operator">..</span><span class="ruby-number">8</span>] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-note_target"> - - <b>note_target</b>() - - <a href="../classes/NoteEvent.html#method-i-note_target" name="method-i-note_target" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-note_target_source')" id="l_method-i-note_target_source">show</a> - - </p> - <div id="method-i-note_target_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/note_event.rb, line 14</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">note_target</span> - <span class="ruby-identifier">target</span>.<span class="ruby-identifier">noteable</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-note_target_id"> - - <b>note_target_id</b>() - - <a href="../classes/NoteEvent.html#method-i-note_target_id" name="method-i-note_target_id" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-note_target_id_source')" id="l_method-i-note_target_id_source">show</a> - - </p> - <div id="method-i-note_target_id_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/note_event.rb, line 18</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">note_target_id</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">note_commit?</span> - <span class="ruby-identifier">target</span>.<span class="ruby-identifier">commit_id</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">target</span>.<span class="ruby-identifier">noteable_id</span>.<span class="ruby-identifier">to_s</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-note_target_type"> - - <b>note_target_type</b>() - - <a href="../classes/NoteEvent.html#method-i-note_target_type" name="method-i-note_target_type" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-note_target_type_source')" id="l_method-i-note_target_type_source">show</a> - - </p> - <div id="method-i-note_target_type_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/note_event.rb, line 30</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">note_target_type</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">target</span>.<span class="ruby-identifier">noteable_type</span>.<span class="ruby-identifier">present?</span> - <span class="ruby-identifier">target</span>.<span class="ruby-identifier">noteable_type</span>.<span class="ruby-identifier">titleize</span> - <span class="ruby-keyword">else</span> - <span class="ruby-string">"Wall"</span> - <span class="ruby-keyword">end</span>.<span class="ruby-identifier">downcase</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-wall_note-3F"> - - <b>wall_note?</b>() - - <a href="../classes/NoteEvent.html#method-i-wall_note-3F" name="method-i-wall_note-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-wall_note-3F_source')" id="l_method-i-wall_note-3F_source">show</a> - - </p> - <div id="method-i-wall_note-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/note_event.rb, line 26</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">wall_note?</span> - <span class="ruby-identifier">target</span>.<span class="ruby-identifier">noteable_type</span>.<span class="ruby-identifier">blank?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/NoteObserver.html b/doc/code/classes/NoteObserver.html deleted file mode 100644 index cc0e5156c44..00000000000 --- a/doc/code/classes/NoteObserver.html +++ /dev/null @@ -1,290 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>NoteObserver</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - NoteObserver - - <span class="parent">< - - ActiveRecord::Observer - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/observers/note_observer_rb.html">app/observers/note_observer.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-after_create">after_create</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-notify_team">notify_team</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-send_notify_mails">send_notify_mails</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-team_without_note_author">team_without_note_author</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-after_create"> - - <b>after_create</b>(note) - - <a href="../classes/NoteObserver.html#method-i-after_create" name="method-i-after_create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-after_create_source')" id="l_method-i-after_create_source">show</a> - - </p> - <div id="method-i-after_create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/note_observer.rb, line 3</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">after_create</span>(<span class="ruby-identifier">note</span>) - <span class="ruby-identifier">send_notify_mails</span>(<span class="ruby-identifier">note</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-notify_team"> - - <b>notify_team</b>(note) - - <a href="../classes/NoteObserver.html#method-i-notify_team" name="method-i-notify_team" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Notifies the whole team except the author of note</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-notify_team_source')" id="l_method-i-notify_team_source">show</a> - - </p> - <div id="method-i-notify_team_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/note_observer.rb, line 22</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">notify_team</span>(<span class="ruby-identifier">note</span>) - <span class="ruby-comment"># Note: wall posts are not "attached" to anything, so fall back to "Wall"</span> - <span class="ruby-identifier">noteable_type</span> = <span class="ruby-identifier">note</span>.<span class="ruby-identifier">noteable_type</span>.<span class="ruby-identifier">presence</span> <span class="ruby-operator">||</span> <span class="ruby-string">"Wall"</span> - <span class="ruby-identifier">notify_method</span> = <span class="ruby-node">"note_#{noteable_type.underscore}_email"</span>.<span class="ruby-identifier">to_sym</span> - - <span class="ruby-keyword">if</span> <span class="ruby-constant">Notify</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">notify_method</span> - <span class="ruby-identifier">team_without_note_author</span>(<span class="ruby-identifier">note</span>).<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">u</span><span class="ruby-operator">|</span> - <span class="ruby-constant">Notify</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">notify_method</span>, <span class="ruby-identifier">u</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">note</span>.<span class="ruby-identifier">id</span>).<span class="ruby-identifier">deliver</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-send_notify_mails"> - - <b>send_notify_mails</b>(note) - - <a href="../classes/NoteObserver.html#method-i-send_notify_mails" name="method-i-send_notify_mails" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-send_notify_mails_source')" id="l_method-i-send_notify_mails_source">show</a> - - </p> - <div id="method-i-send_notify_mails_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/note_observer.rb, line 9</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">send_notify_mails</span>(<span class="ruby-identifier">note</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">note</span>.<span class="ruby-identifier">notify</span> - <span class="ruby-identifier">notify_team</span>(<span class="ruby-identifier">note</span>) - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">note</span>.<span class="ruby-identifier">notify_author</span> - <span class="ruby-comment"># Notify only author of resource</span> - <span class="ruby-constant">Notify</span>.<span class="ruby-identifier">note_commit_email</span>(<span class="ruby-identifier">note</span>.<span class="ruby-identifier">commit_author</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">note</span>.<span class="ruby-identifier">id</span>).<span class="ruby-identifier">deliver</span> - <span class="ruby-keyword">else</span> - <span class="ruby-comment"># Otherwise ignore it</span> - <span class="ruby-keyword">nil</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-team_without_note_author"> - - <b>team_without_note_author</b>(note) - - <a href="../classes/NoteObserver.html#method-i-team_without_note_author" name="method-i-team_without_note_author" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-team_without_note_author_source')" id="l_method-i-team_without_note_author_source">show</a> - - </p> - <div id="method-i-team_without_note_author_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/note_observer.rb, line 34</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">team_without_note_author</span>(<span class="ruby-identifier">note</span>) - <span class="ruby-identifier">note</span>.<span class="ruby-identifier">project</span>.<span class="ruby-identifier">users</span>.<span class="ruby-identifier">reject</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">u</span><span class="ruby-operator">|</span> <span class="ruby-identifier">u</span>.<span class="ruby-identifier">id</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">note</span>.<span class="ruby-identifier">author</span>.<span class="ruby-identifier">id</span> } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Notes.html b/doc/code/classes/Notes.html deleted file mode 100644 index 19b8dd389e4..00000000000 --- a/doc/code/classes/Notes.html +++ /dev/null @@ -1,88 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Notes</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - Notes - - </h1> - <ul class="files"> - - <li><a href="../files/app/contexts/notes/create_context_rb.html">app/contexts/notes/create_context.rb</a></li> - - <li><a href="../files/app/contexts/notes/load_context_rb.html">app/contexts/notes/load_context.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">CLASS</span> - <a href="Notes/CreateContext.html">Notes::CreateContext</a> - </li> - - <li> - <span class="type">CLASS</span> - <a href="Notes/LoadContext.html">Notes::LoadContext</a> - </li> - - </ul> - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Notes/CreateContext.html b/doc/code/classes/Notes/CreateContext.html deleted file mode 100644 index adb3a46fab5..00000000000 --- a/doc/code/classes/Notes/CreateContext.html +++ /dev/null @@ -1,136 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Notes::CreateContext</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Notes::CreateContext - - <span class="parent">< - - <a href="../BaseContext.html">BaseContext</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/app/contexts/notes/create_context_rb.html">app/contexts/notes/create_context.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-execute">execute</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-execute"> - - <b>execute</b>() - - <a href="../../classes/Notes/CreateContext.html#method-i-execute" name="method-i-execute" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-execute_source')" id="l_method-i-execute_source">show</a> - - </p> - <div id="method-i-execute_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/contexts/notes/create_context.rb, line 3</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">execute</span> - <span class="ruby-identifier">note</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">notes</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:note</span>]) - <span class="ruby-identifier">note</span>.<span class="ruby-identifier">author</span> = <span class="ruby-identifier">current_user</span> - <span class="ruby-identifier">note</span>.<span class="ruby-identifier">notify</span> = <span class="ruby-keyword">true</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:notify</span>] <span class="ruby-operator">==</span> <span class="ruby-string">'1'</span> - <span class="ruby-identifier">note</span>.<span class="ruby-identifier">notify_author</span> = <span class="ruby-keyword">true</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:notify_author</span>] <span class="ruby-operator">==</span> <span class="ruby-string">'1'</span> - <span class="ruby-identifier">note</span>.<span class="ruby-identifier">save</span> - <span class="ruby-identifier">note</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Notes/LoadContext.html b/doc/code/classes/Notes/LoadContext.html deleted file mode 100644 index 24731bc4e7d..00000000000 --- a/doc/code/classes/Notes/LoadContext.html +++ /dev/null @@ -1,157 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Notes::LoadContext</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Notes::LoadContext - - <span class="parent">< - - <a href="../BaseContext.html">BaseContext</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/app/contexts/notes/load_context_rb.html">app/contexts/notes/load_context.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-execute">execute</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-execute"> - - <b>execute</b>() - - <a href="../../classes/Notes/LoadContext.html#method-i-execute" name="method-i-execute" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-execute_source')" id="l_method-i-execute_source">show</a> - - </p> - <div id="method-i-execute_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/contexts/notes/load_context.rb, line 3</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">execute</span> - <span class="ruby-identifier">target_type</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:target_type</span>] - <span class="ruby-identifier">target_id</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:target_id</span>] - <span class="ruby-identifier">after_id</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:after_id</span>] - <span class="ruby-identifier">before_id</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:before_id</span>] - - - <span class="ruby-ivar">@notes</span> = <span class="ruby-keyword">case</span> <span class="ruby-identifier">target_type</span> - <span class="ruby-keyword">when</span> <span class="ruby-string">"commit"</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">commit_notes</span>(<span class="ruby-identifier">project</span>.<span class="ruby-identifier">commit</span>(<span class="ruby-identifier">target_id</span>)).<span class="ruby-identifier">fresh</span>.<span class="ruby-identifier">limit</span>(<span class="ruby-number">20</span>) - <span class="ruby-keyword">when</span> <span class="ruby-string">"issue"</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">issues</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">target_id</span>).<span class="ruby-identifier">notes</span>.<span class="ruby-identifier">inc_author</span>.<span class="ruby-identifier">fresh</span>.<span class="ruby-identifier">limit</span>(<span class="ruby-number">20</span>) - <span class="ruby-keyword">when</span> <span class="ruby-string">"merge_request"</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">merge_requests</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">target_id</span>).<span class="ruby-identifier">mr_and_commit_notes</span>.<span class="ruby-identifier">inc_author</span>.<span class="ruby-identifier">fresh</span>.<span class="ruby-identifier">limit</span>(<span class="ruby-number">20</span>) - <span class="ruby-keyword">when</span> <span class="ruby-string">"snippet"</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">snippets</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">target_id</span>).<span class="ruby-identifier">notes</span>.<span class="ruby-identifier">fresh</span> - <span class="ruby-keyword">when</span> <span class="ruby-string">"wall"</span> - <span class="ruby-comment"># this is the only case, where the order is DESC</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">common_notes</span>.<span class="ruby-identifier">order</span>(<span class="ruby-string">"created_at DESC, id DESC"</span>).<span class="ruby-identifier">limit</span>(<span class="ruby-number">50</span>) - <span class="ruby-keyword">end</span> - - <span class="ruby-ivar">@notes</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">after_id</span> - <span class="ruby-ivar">@notes</span>.<span class="ruby-identifier">where</span>(<span class="ruby-string">"id > ?"</span>, <span class="ruby-identifier">after_id</span>) - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">before_id</span> - <span class="ruby-ivar">@notes</span>.<span class="ruby-identifier">where</span>(<span class="ruby-string">"id < ?"</span>, <span class="ruby-identifier">before_id</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-ivar">@notes</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/NotesController.html b/doc/code/classes/NotesController.html deleted file mode 100644 index 12cc98fa06f..00000000000 --- a/doc/code/classes/NotesController.html +++ /dev/null @@ -1,338 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>NotesController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - NotesController - - <span class="parent">< - - <a href="ProjectResourceController.html">ProjectResourceController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/notes_controller_rb.html">app/controllers/notes_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-create">create</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-destroy">destroy</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-index">index</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-notes">notes</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-preview">preview</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-create"> - - <b>create</b>() - - <a href="../classes/NotesController.html#method-i-create" name="method-i-create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-create_source')" id="l_method-i-create_source">show</a> - - </p> - <div id="method-i-create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/notes_controller.rb, line 18</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">create</span> - <span class="ruby-ivar">@note</span> = <span class="ruby-constant">Notes</span><span class="ruby-operator">::</span><span class="ruby-constant">CreateContext</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">current_user</span>, <span class="ruby-identifier">params</span>).<span class="ruby-identifier">execute</span> - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> {<span class="ruby-identifier">redirect_to</span> <span class="ruby-value">:back</span>} - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-destroy"> - - <b>destroy</b>() - - <a href="../classes/NotesController.html#method-i-destroy" name="method-i-destroy" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-destroy_source')" id="l_method-i-destroy_source">show</a> - - </p> - <div id="method-i-destroy_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/notes_controller.rb, line 27</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">destroy</span> - <span class="ruby-ivar">@note</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">notes</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) - <span class="ruby-keyword">return</span> <span class="ruby-identifier">access_denied!</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-value">:admin_note</span>, <span class="ruby-ivar">@note</span>) - <span class="ruby-ivar">@note</span>.<span class="ruby-identifier">destroy</span> - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">nothing</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span> } - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-index"> - - <b>index</b>() - - <a href="../classes/NotesController.html#method-i-index" name="method-i-index" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-index_source')" id="l_method-i-index_source">show</a> - - </p> - <div id="method-i-index_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/notes_controller.rb, line 8</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">index</span> - <span class="ruby-identifier">notes</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:target_type</span>] <span class="ruby-operator">==</span> <span class="ruby-string">"merge_request"</span> - <span class="ruby-ivar">@mixed_targets</span> = <span class="ruby-keyword">true</span> - <span class="ruby-ivar">@main_target_type</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:target_type</span>].<span class="ruby-identifier">camelize</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">respond_with</span>(<span class="ruby-ivar">@notes</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-preview"> - - <b>preview</b>() - - <a href="../classes/NotesController.html#method-i-preview" name="method-i-preview" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-preview_source')" id="l_method-i-preview_source">show</a> - - </p> - <div id="method-i-preview_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/notes_controller.rb, line 37</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">preview</span> - <span class="ruby-identifier">render</span> <span class="ruby-identifier">text</span><span class="ruby-operator">:</span> <span class="ruby-identifier">view_context</span>.<span class="ruby-identifier">markdown</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:note</span>]) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-notes"> - - <b>notes</b>() - - <a href="../classes/NotesController.html#method-i-notes" name="method-i-notes" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-notes_source')" id="l_method-i-notes_source">show</a> - - </p> - <div id="method-i-notes_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/notes_controller.rb, line 43</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">notes</span> - <span class="ruby-ivar">@notes</span> = <span class="ruby-constant">Notes</span><span class="ruby-operator">::</span><span class="ruby-constant">LoadContext</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">current_user</span>, <span class="ruby-identifier">params</span>).<span class="ruby-identifier">execute</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/NotesHelper.html b/doc/code/classes/NotesHelper.html deleted file mode 100644 index 39ff67948c7..00000000000 --- a/doc/code/classes/NotesHelper.html +++ /dev/null @@ -1,258 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>NotesHelper</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - NotesHelper - - </h1> - <ul class="files"> - - <li><a href="../files/app/helpers/notes_helper_rb.html">app/helpers/notes_helper.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-link_to_commit_diff_line_note">link_to_commit_diff_line_note</a>, - </li> - - - <li> - <a href="#method-i-loading_more_notes-3F">loading_more_notes?</a>, - </li> - - - <li> - <a href="#method-i-loading_new_notes-3F">loading_new_notes?</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-note_for_main_target-3F">note_for_main_target?</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-link_to_commit_diff_line_note"> - - <b>link_to_commit_diff_line_note</b>(note) - - <a href="../classes/NotesHelper.html#method-i-link_to_commit_diff_line_note" name="method-i-link_to_commit_diff_line_note" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-link_to_commit_diff_line_note_source')" id="l_method-i-link_to_commit_diff_line_note_source">show</a> - - </p> - <div id="method-i-link_to_commit_diff_line_note_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/notes_helper.rb, line 15</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">link_to_commit_diff_line_note</span>(<span class="ruby-identifier">note</span>) - <span class="ruby-identifier">commit</span> = <span class="ruby-identifier">note</span>.<span class="ruby-identifier">noteable</span> - <span class="ruby-identifier">diff_index</span>, <span class="ruby-identifier">diff_old_line</span>, <span class="ruby-identifier">diff_new_line</span> = <span class="ruby-identifier">note</span>.<span class="ruby-identifier">line_code</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">'_'</span>) - - <span class="ruby-identifier">link_file</span> = <span class="ruby-identifier">commit</span>.<span class="ruby-identifier">diffs</span>[<span class="ruby-identifier">diff_index</span>.<span class="ruby-identifier">to_i</span>].<span class="ruby-identifier">new_path</span> - <span class="ruby-identifier">link_line</span> = <span class="ruby-identifier">diff_new_line</span> - - <span class="ruby-identifier">link_to</span> <span class="ruby-node">"#{link_file}:L#{link_line}"</span>, <span class="ruby-identifier">project_commit_path</span>(<span class="ruby-ivar">@project</span>, <span class="ruby-identifier">commit</span>, <span class="ruby-identifier">anchor</span><span class="ruby-operator">:</span> <span class="ruby-identifier">note</span>.<span class="ruby-identifier">line_code</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-loading_more_notes-3F"> - - <b>loading_more_notes?</b>() - - <a href="../classes/NotesHelper.html#method-i-loading_more_notes-3F" name="method-i-loading_more_notes-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-loading_more_notes-3F_source')" id="l_method-i-loading_more_notes-3F_source">show</a> - - </p> - <div id="method-i-loading_more_notes-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/notes_helper.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">loading_more_notes?</span> - <span class="ruby-identifier">params</span>[<span class="ruby-value">:loading_more</span>].<span class="ruby-identifier">present?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-loading_new_notes-3F"> - - <b>loading_new_notes?</b>() - - <a href="../classes/NotesHelper.html#method-i-loading_new_notes-3F" name="method-i-loading_new_notes-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-loading_new_notes-3F_source')" id="l_method-i-loading_new_notes-3F_source">show</a> - - </p> - <div id="method-i-loading_new_notes-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/notes_helper.rb, line 6</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">loading_new_notes?</span> - <span class="ruby-identifier">params</span>[<span class="ruby-value">:loading_new</span>].<span class="ruby-identifier">present?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-note_for_main_target-3F"> - - <b>note_for_main_target?</b>(note) - - <a href="../classes/NotesHelper.html#method-i-note_for_main_target-3F" name="method-i-note_for_main_target-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Helps to distinguish e.g. commit notes in mr notes list</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-note_for_main_target-3F_source')" id="l_method-i-note_for_main_target-3F_source">show</a> - - </p> - <div id="method-i-note_for_main_target-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/notes_helper.rb, line 11</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">note_for_main_target?</span>(<span class="ruby-identifier">note</span>) - <span class="ruby-operator">!</span><span class="ruby-ivar">@mixed_targets</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@main_target_type</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">note</span>.<span class="ruby-identifier">noteable_type</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Notify.html b/doc/code/classes/Notify.html deleted file mode 100644 index ea7403812a6..00000000000 --- a/doc/code/classes/Notify.html +++ /dev/null @@ -1,639 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Notify</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Notify - - <span class="parent">< - - ActionMailer::Base - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/mailers/notify_rb.html">app/mailers/notify.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-issue_status_changed_email">issue_status_changed_email</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-new_issue_email">new_issue_email</a>, - </li> - - - <li> - <a href="#method-i-new_merge_request_email">new_merge_request_email</a>, - </li> - - - <li> - <a href="#method-i-new_user_email">new_user_email</a>, - </li> - - - <li> - <a href="#method-i-note_commit_email">note_commit_email</a>, - </li> - - - <li> - <a href="#method-i-note_issue_email">note_issue_email</a>, - </li> - - - <li> - <a href="#method-i-note_merge_request_email">note_merge_request_email</a>, - </li> - - - <li> - <a href="#method-i-note_wall_email">note_wall_email</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-project_access_granted_email">project_access_granted_email</a>, - </li> - - - <li> - <a href="#method-i-project_was_moved_email">project_was_moved_email</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-reassigned_issue_email">reassigned_issue_email</a>, - </li> - - - <li> - <a href="#method-i-reassigned_merge_request_email">reassigned_merge_request_email</a> - </li> - - </ul> - </dd> - - </dl> - - - - <!-- Includes --> - <div class="sectiontitle">Included Modules</div> - <ul> - - <li> - - Resque::Mailer - - </li> - - </ul> - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-issue_status_changed_email"> - - <b>issue_status_changed_email</b>(recipient_id, issue_id, status, updated_by_user_id) - - <a href="../classes/Notify.html#method-i-issue_status_changed_email" name="method-i-issue_status_changed_email" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-issue_status_changed_email_source')" id="l_method-i-issue_status_changed_email_source">show</a> - - </p> - <div id="method-i-issue_status_changed_email_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/mailers/notify.rb, line 32</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">issue_status_changed_email</span>(<span class="ruby-identifier">recipient_id</span>, <span class="ruby-identifier">issue_id</span>, <span class="ruby-identifier">status</span>, <span class="ruby-identifier">updated_by_user_id</span>) - <span class="ruby-ivar">@issue</span> = <span class="ruby-constant">Issue</span>.<span class="ruby-identifier">find</span> <span class="ruby-identifier">issue_id</span> - <span class="ruby-ivar">@issue_status</span> = <span class="ruby-identifier">status</span> - <span class="ruby-ivar">@project</span> = <span class="ruby-ivar">@issue</span>.<span class="ruby-identifier">project</span> - <span class="ruby-ivar">@updated_by</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">find</span> <span class="ruby-identifier">updated_by_user_id</span> - <span class="ruby-identifier">mail</span>(<span class="ruby-identifier">to</span><span class="ruby-operator">:</span> <span class="ruby-identifier">recipient</span>(<span class="ruby-identifier">recipient_id</span>), - <span class="ruby-identifier">subject</span><span class="ruby-operator">:</span> <span class="ruby-identifier">subject</span>(<span class="ruby-node">"changed issue ##{@issue.id}"</span>, <span class="ruby-ivar">@issue</span>.<span class="ruby-identifier">title</span>)) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-new_issue_email"> - - <b>new_issue_email</b>(issue_id) - - <a href="../classes/Notify.html#method-i-new_issue_email" name="method-i-new_issue_email" class="permalink">Link</a> - </div> - - - <div class="description"> - <p><a href="Issue.html">Issue</a></p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-new_issue_email_source')" id="l_method-i-new_issue_email_source">show</a> - - </p> - <div id="method-i-new_issue_email_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/mailers/notify.rb, line 19</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">new_issue_email</span>(<span class="ruby-identifier">issue_id</span>) - <span class="ruby-ivar">@issue</span> = <span class="ruby-constant">Issue</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">issue_id</span>) - <span class="ruby-ivar">@project</span> = <span class="ruby-ivar">@issue</span>.<span class="ruby-identifier">project</span> - <span class="ruby-identifier">mail</span>(<span class="ruby-identifier">to</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@issue</span>.<span class="ruby-identifier">assignee_email</span>, <span class="ruby-identifier">subject</span><span class="ruby-operator">:</span> <span class="ruby-identifier">subject</span>(<span class="ruby-node">"new issue ##{@issue.id}"</span>, <span class="ruby-ivar">@issue</span>.<span class="ruby-identifier">title</span>)) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-new_merge_request_email"> - - <b>new_merge_request_email</b>(merge_request_id) - - <a href="../classes/Notify.html#method-i-new_merge_request_email" name="method-i-new_merge_request_email" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Merge Request</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-new_merge_request_email_source')" id="l_method-i-new_merge_request_email_source">show</a> - - </p> - <div id="method-i-new_merge_request_email_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/mailers/notify.rb, line 47</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">new_merge_request_email</span>(<span class="ruby-identifier">merge_request_id</span>) - <span class="ruby-ivar">@merge_request</span> = <span class="ruby-constant">MergeRequest</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">merge_request_id</span>) - <span class="ruby-ivar">@project</span> = <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">project</span> - <span class="ruby-identifier">mail</span>(<span class="ruby-identifier">to</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">assignee_email</span>, <span class="ruby-identifier">subject</span><span class="ruby-operator">:</span> <span class="ruby-identifier">subject</span>(<span class="ruby-node">"new merge request !#{@merge_request.id}"</span>, <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">title</span>)) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-new_user_email"> - - <b>new_user_email</b>(user_id, password) - - <a href="../classes/Notify.html#method-i-new_user_email" name="method-i-new_user_email" class="permalink">Link</a> - </div> - - - <div class="description"> - <p><a href="User.html">User</a></p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-new_user_email_source')" id="l_method-i-new_user_email_source">show</a> - - </p> - <div id="method-i-new_user_email_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/mailers/notify.rb, line 118</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">new_user_email</span>(<span class="ruby-identifier">user_id</span>, <span class="ruby-identifier">password</span>) - <span class="ruby-ivar">@user</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">user_id</span>) - <span class="ruby-ivar">@password</span> = <span class="ruby-identifier">password</span> - <span class="ruby-identifier">mail</span>(<span class="ruby-identifier">to</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@user</span>.<span class="ruby-identifier">email</span>, <span class="ruby-identifier">subject</span><span class="ruby-operator">:</span> <span class="ruby-identifier">subject</span>(<span class="ruby-string">"Account was created for you"</span>)) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-note_commit_email"> - - <b>note_commit_email</b>(recipient_id, note_id) - - <a href="../classes/Notify.html#method-i-note_commit_email" name="method-i-note_commit_email" class="permalink">Link</a> - </div> - - - <div class="description"> - <p><a href="Note.html">Note</a></p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-note_commit_email_source')" id="l_method-i-note_commit_email_source">show</a> - - </p> - <div id="method-i-note_commit_email_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/mailers/notify.rb, line 66</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">note_commit_email</span>(<span class="ruby-identifier">recipient_id</span>, <span class="ruby-identifier">note_id</span>) - <span class="ruby-ivar">@note</span> = <span class="ruby-constant">Note</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">note_id</span>) - <span class="ruby-ivar">@commit</span> = <span class="ruby-ivar">@note</span>.<span class="ruby-identifier">noteable</span> - <span class="ruby-ivar">@commit</span> = <span class="ruby-constant">CommitDecorator</span>.<span class="ruby-identifier">decorate</span>(<span class="ruby-ivar">@commit</span>) - <span class="ruby-ivar">@project</span> = <span class="ruby-ivar">@note</span>.<span class="ruby-identifier">project</span> - <span class="ruby-identifier">mail</span>(<span class="ruby-identifier">to</span><span class="ruby-operator">:</span> <span class="ruby-identifier">recipient</span>(<span class="ruby-identifier">recipient_id</span>), <span class="ruby-identifier">subject</span><span class="ruby-operator">:</span> <span class="ruby-identifier">subject</span>(<span class="ruby-node">"note for commit #{@commit.short_id}"</span>, <span class="ruby-ivar">@commit</span>.<span class="ruby-identifier">title</span>)) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-note_issue_email"> - - <b>note_issue_email</b>(recipient_id, note_id) - - <a href="../classes/Notify.html#method-i-note_issue_email" name="method-i-note_issue_email" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-note_issue_email_source')" id="l_method-i-note_issue_email_source">show</a> - - </p> - <div id="method-i-note_issue_email_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/mailers/notify.rb, line 74</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">note_issue_email</span>(<span class="ruby-identifier">recipient_id</span>, <span class="ruby-identifier">note_id</span>) - <span class="ruby-ivar">@note</span> = <span class="ruby-constant">Note</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">note_id</span>) - <span class="ruby-ivar">@issue</span> = <span class="ruby-ivar">@note</span>.<span class="ruby-identifier">noteable</span> - <span class="ruby-ivar">@project</span> = <span class="ruby-ivar">@note</span>.<span class="ruby-identifier">project</span> - <span class="ruby-identifier">mail</span>(<span class="ruby-identifier">to</span><span class="ruby-operator">:</span> <span class="ruby-identifier">recipient</span>(<span class="ruby-identifier">recipient_id</span>), <span class="ruby-identifier">subject</span><span class="ruby-operator">:</span> <span class="ruby-identifier">subject</span>(<span class="ruby-node">"note for issue ##{@issue.id}"</span>)) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-note_merge_request_email"> - - <b>note_merge_request_email</b>(recipient_id, note_id) - - <a href="../classes/Notify.html#method-i-note_merge_request_email" name="method-i-note_merge_request_email" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-note_merge_request_email_source')" id="l_method-i-note_merge_request_email_source">show</a> - - </p> - <div id="method-i-note_merge_request_email_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/mailers/notify.rb, line 81</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">note_merge_request_email</span>(<span class="ruby-identifier">recipient_id</span>, <span class="ruby-identifier">note_id</span>) - <span class="ruby-ivar">@note</span> = <span class="ruby-constant">Note</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">note_id</span>) - <span class="ruby-ivar">@merge_request</span> = <span class="ruby-ivar">@note</span>.<span class="ruby-identifier">noteable</span> - <span class="ruby-ivar">@project</span> = <span class="ruby-ivar">@note</span>.<span class="ruby-identifier">project</span> - <span class="ruby-identifier">mail</span>(<span class="ruby-identifier">to</span><span class="ruby-operator">:</span> <span class="ruby-identifier">recipient</span>(<span class="ruby-identifier">recipient_id</span>), <span class="ruby-identifier">subject</span><span class="ruby-operator">:</span> <span class="ruby-identifier">subject</span>(<span class="ruby-node">"note for merge request !#{@merge_request.id}"</span>)) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-note_wall_email"> - - <b>note_wall_email</b>(recipient_id, note_id) - - <a href="../classes/Notify.html#method-i-note_wall_email" name="method-i-note_wall_email" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-note_wall_email_source')" id="l_method-i-note_wall_email_source">show</a> - - </p> - <div id="method-i-note_wall_email_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/mailers/notify.rb, line 88</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">note_wall_email</span>(<span class="ruby-identifier">recipient_id</span>, <span class="ruby-identifier">note_id</span>) - <span class="ruby-ivar">@note</span> = <span class="ruby-constant">Note</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">note_id</span>) - <span class="ruby-ivar">@project</span> = <span class="ruby-ivar">@note</span>.<span class="ruby-identifier">project</span> - <span class="ruby-identifier">mail</span>(<span class="ruby-identifier">to</span><span class="ruby-operator">:</span> <span class="ruby-identifier">recipient</span>(<span class="ruby-identifier">recipient_id</span>), <span class="ruby-identifier">subject</span><span class="ruby-operator">:</span> <span class="ruby-identifier">subject</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-project_access_granted_email"> - - <b>project_access_granted_email</b>(user_project_id) - - <a href="../classes/Notify.html#method-i-project_access_granted_email" name="method-i-project_access_granted_email" class="permalink">Link</a> - </div> - - - <div class="description"> - <p><a href="Project.html">Project</a></p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-project_access_granted_email_source')" id="l_method-i-project_access_granted_email_source">show</a> - - </p> - <div id="method-i-project_access_granted_email_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/mailers/notify.rb, line 99</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">project_access_granted_email</span>(<span class="ruby-identifier">user_project_id</span>) - <span class="ruby-ivar">@users_project</span> = <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">find</span> <span class="ruby-identifier">user_project_id</span> - <span class="ruby-ivar">@project</span> = <span class="ruby-ivar">@users_project</span>.<span class="ruby-identifier">project</span> - <span class="ruby-identifier">mail</span>(<span class="ruby-identifier">to</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@users_project</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">email</span>, - <span class="ruby-identifier">subject</span><span class="ruby-operator">:</span> <span class="ruby-identifier">subject</span>(<span class="ruby-string">"access to project was granted"</span>)) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-project_was_moved_email"> - - <b>project_was_moved_email</b>(user_project_id) - - <a href="../classes/Notify.html#method-i-project_was_moved_email" name="method-i-project_was_moved_email" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-project_was_moved_email_source')" id="l_method-i-project_was_moved_email_source">show</a> - - </p> - <div id="method-i-project_was_moved_email_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/mailers/notify.rb, line 107</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">project_was_moved_email</span>(<span class="ruby-identifier">user_project_id</span>) - <span class="ruby-ivar">@users_project</span> = <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">find</span> <span class="ruby-identifier">user_project_id</span> - <span class="ruby-ivar">@project</span> = <span class="ruby-ivar">@users_project</span>.<span class="ruby-identifier">project</span> - <span class="ruby-identifier">mail</span>(<span class="ruby-identifier">to</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@users_project</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">email</span>, - <span class="ruby-identifier">subject</span><span class="ruby-operator">:</span> <span class="ruby-identifier">subject</span>(<span class="ruby-string">"project was moved"</span>)) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-reassigned_issue_email"> - - <b>reassigned_issue_email</b>(recipient_id, issue_id, previous_assignee_id) - - <a href="../classes/Notify.html#method-i-reassigned_issue_email" name="method-i-reassigned_issue_email" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-reassigned_issue_email_source')" id="l_method-i-reassigned_issue_email_source">show</a> - - </p> - <div id="method-i-reassigned_issue_email_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/mailers/notify.rb, line 25</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">reassigned_issue_email</span>(<span class="ruby-identifier">recipient_id</span>, <span class="ruby-identifier">issue_id</span>, <span class="ruby-identifier">previous_assignee_id</span>) - <span class="ruby-ivar">@issue</span> = <span class="ruby-constant">Issue</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">issue_id</span>) - <span class="ruby-ivar">@previous_assignee</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">User</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">previous_assignee_id</span>) - <span class="ruby-ivar">@project</span> = <span class="ruby-ivar">@issue</span>.<span class="ruby-identifier">project</span> - <span class="ruby-identifier">mail</span>(<span class="ruby-identifier">to</span><span class="ruby-operator">:</span> <span class="ruby-identifier">recipient</span>(<span class="ruby-identifier">recipient_id</span>), <span class="ruby-identifier">subject</span><span class="ruby-operator">:</span> <span class="ruby-identifier">subject</span>(<span class="ruby-node">"changed issue ##{@issue.id}"</span>, <span class="ruby-ivar">@issue</span>.<span class="ruby-identifier">title</span>)) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-reassigned_merge_request_email"> - - <b>reassigned_merge_request_email</b>(recipient_id, merge_request_id, previous_assignee_id) - - <a href="../classes/Notify.html#method-i-reassigned_merge_request_email" name="method-i-reassigned_merge_request_email" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-reassigned_merge_request_email_source')" id="l_method-i-reassigned_merge_request_email_source">show</a> - - </p> - <div id="method-i-reassigned_merge_request_email_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/mailers/notify.rb, line 53</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">reassigned_merge_request_email</span>(<span class="ruby-identifier">recipient_id</span>, <span class="ruby-identifier">merge_request_id</span>, <span class="ruby-identifier">previous_assignee_id</span>) - <span class="ruby-ivar">@merge_request</span> = <span class="ruby-constant">MergeRequest</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">merge_request_id</span>) - <span class="ruby-ivar">@previous_assignee</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">User</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">previous_assignee_id</span>) - <span class="ruby-ivar">@project</span> = <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">project</span> - <span class="ruby-identifier">mail</span>(<span class="ruby-identifier">to</span><span class="ruby-operator">:</span> <span class="ruby-identifier">recipient</span>(<span class="ruby-identifier">recipient_id</span>), <span class="ruby-identifier">subject</span><span class="ruby-operator">:</span> <span class="ruby-identifier">subject</span>(<span class="ruby-node">"changed merge request !#{@merge_request.id}"</span>, <span class="ruby-ivar">@merge_request</span>.<span class="ruby-identifier">title</span>)) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Object.html b/doc/code/classes/Object.html deleted file mode 100644 index 5ebc2dcde50..00000000000 --- a/doc/code/classes/Object.html +++ /dev/null @@ -1,88 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Object</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Object - - <span class="parent">< - - BasicObject - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/config/initializers/3_grit_ext_rb.html">config/initializers/3_grit_ext.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - <!-- Includes --> - <div class="sectiontitle">Included Modules</div> - <ul> - - <li> - - Linguist::BlobHelper - - </li> - - </ul> - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/OmniauthCallbacksController.html b/doc/code/classes/OmniauthCallbacksController.html deleted file mode 100644 index 5f54fc02036..00000000000 --- a/doc/code/classes/OmniauthCallbacksController.html +++ /dev/null @@ -1,188 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>OmniauthCallbacksController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - OmniauthCallbacksController - - <span class="parent">< - - Devise::OmniauthCallbacksController - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/omniauth_callbacks_controller_rb.html">app/controllers/omniauth_callbacks_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>F</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-failure_message">failure_message</a> - </li> - - </ul> - </dd> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-ldap">ldap</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-failure_message"> - - <b>failure_message</b>() - - <a href="../classes/OmniauthCallbacksController.html#method-i-failure_message" name="method-i-failure_message" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Extend the standard message generation to accept our custom exception</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-failure_message_source')" id="l_method-i-failure_message_source">show</a> - - </p> - <div id="method-i-failure_message_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/omniauth_callbacks_controller.rb, line 9</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">failure_message</span> - <span class="ruby-identifier">exception</span> = <span class="ruby-identifier">env</span>[<span class="ruby-string">"omniauth.error"</span>] - <span class="ruby-identifier">error</span> = <span class="ruby-identifier">exception</span>.<span class="ruby-identifier">error_reason</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">exception</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:error_reason</span>) - <span class="ruby-identifier">error</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">exception</span>.<span class="ruby-identifier">error</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">exception</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:error</span>) - <span class="ruby-identifier">error</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">exception</span>.<span class="ruby-identifier">message</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">exception</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:message</span>) - <span class="ruby-identifier">error</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">env</span>[<span class="ruby-string">"omniauth.error.type"</span>].<span class="ruby-identifier">to_s</span> - <span class="ruby-identifier">error</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">humanize</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">error</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-ldap"> - - <b>ldap</b>() - - <a href="../classes/OmniauthCallbacksController.html#method-i-ldap" name="method-i-ldap" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-ldap_source')" id="l_method-i-ldap_source">show</a> - - </p> - <div id="method-i-ldap_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/omniauth_callbacks_controller.rb, line 18</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">ldap</span> - <span class="ruby-comment"># We only find ourselves here if the authentication to LDAP was successful.</span> - <span class="ruby-ivar">@user</span> = <span class="ruby-constant">User</span>.<span class="ruby-identifier">find_for_ldap_auth</span>(<span class="ruby-identifier">request</span>.<span class="ruby-identifier">env</span>[<span class="ruby-string">"omniauth.auth"</span>], <span class="ruby-identifier">current_user</span>) - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@user</span>.<span class="ruby-identifier">persisted?</span> - <span class="ruby-ivar">@user</span>.<span class="ruby-identifier">remember_me</span> = <span class="ruby-keyword">true</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">sign_in_and_redirect</span> <span class="ruby-ivar">@user</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/PostReceive.html b/doc/code/classes/PostReceive.html deleted file mode 100644 index d078e65eaf3..00000000000 --- a/doc/code/classes/PostReceive.html +++ /dev/null @@ -1,149 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>PostReceive</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - PostReceive - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/workers/post_receive_rb.html">app/workers/post_receive.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-perform">perform</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-perform"> - - <b>perform</b>(repo_path, oldrev, newrev, ref, identifier) - - <a href="../classes/PostReceive.html#method-c-perform" name="method-c-perform" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-perform_source')" id="l_method-c-perform_source">show</a> - - </p> - <div id="method-c-perform_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/workers/post_receive.rb, line 4</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">perform</span>(<span class="ruby-identifier">repo_path</span>, <span class="ruby-identifier">oldrev</span>, <span class="ruby-identifier">newrev</span>, <span class="ruby-identifier">ref</span>, <span class="ruby-identifier">identifier</span>) - <span class="ruby-identifier">repo_path</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-constant">Gitlab</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">gitolite</span>.<span class="ruby-identifier">repos_path</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-string">""</span>) - <span class="ruby-identifier">repo_path</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp">%r.git$/</span>, <span class="ruby-string">""</span>) - <span class="ruby-identifier">repo_path</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp">%r^\//</span>, <span class="ruby-string">""</span>) - - <span class="ruby-identifier">project</span> = <span class="ruby-constant">Project</span>.<span class="ruby-identifier">find_with_namespace</span>(<span class="ruby-identifier">repo_path</span>) - <span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">project</span>.<span class="ruby-identifier">nil?</span> - - <span class="ruby-comment"># Ignore push from non-gitlab users</span> - <span class="ruby-identifier">user</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">identifier</span>.<span class="ruby-identifier">eql?</span> <span class="ruby-constant">Gitlab</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">gitolite</span>.<span class="ruby-identifier">admin_key</span> - <span class="ruby-identifier">email</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">commit</span>(<span class="ruby-identifier">newrev</span>).<span class="ruby-identifier">author</span>.<span class="ruby-identifier">email</span> <span class="ruby-keyword">rescue</span> <span class="ruby-keyword">nil</span> - <span class="ruby-constant">User</span>.<span class="ruby-identifier">find_by_email</span>(<span class="ruby-identifier">email</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">email</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-regexp">%r^[A-Z0-9._%a-z\-]+@(?:[A-Z0-9a-z\-]+\.)+[A-Za-z]{2,4}$/</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">identifier</span>) - <span class="ruby-constant">User</span>.<span class="ruby-identifier">find_by_email</span>(<span class="ruby-identifier">identifier</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-constant">Key</span>.<span class="ruby-identifier">find_by_identifier</span>(<span class="ruby-identifier">identifier</span>).<span class="ruby-identifier">try</span>(<span class="ruby-value">:user</span>) - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">user</span> - - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">trigger_post_receive</span>(<span class="ruby-identifier">oldrev</span>, <span class="ruby-identifier">newrev</span>, <span class="ruby-identifier">ref</span>, <span class="ruby-identifier">user</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ProfileHelper.html b/doc/code/classes/ProfileHelper.html deleted file mode 100644 index edab69523e1..00000000000 --- a/doc/code/classes/ProfileHelper.html +++ /dev/null @@ -1,127 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ProfileHelper</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - ProfileHelper - - </h1> - <ul class="files"> - - <li><a href="../files/app/helpers/profile_helper_rb.html">app/helpers/profile_helper.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>O</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-oauth_active_class">oauth_active_class</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-oauth_active_class"> - - <b>oauth_active_class</b>(provider) - - <a href="../classes/ProfileHelper.html#method-i-oauth_active_class" name="method-i-oauth_active_class" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-oauth_active_class_source')" id="l_method-i-oauth_active_class_source">show</a> - - </p> - <div id="method-i-oauth_active_class_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/profile_helper.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">oauth_active_class</span> <span class="ruby-identifier">provider</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">provider</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">provider</span>.<span class="ruby-identifier">to_s</span> - <span class="ruby-string">'active'</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ProfilesController.html b/doc/code/classes/ProfilesController.html deleted file mode 100644 index faf4874ab45..00000000000 --- a/doc/code/classes/ProfilesController.html +++ /dev/null @@ -1,513 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ProfilesController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - ProfilesController - - <span class="parent">< - - <a href="ApplicationController.html">ApplicationController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/profiles_controller_rb.html">app/controllers/profiles_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-account">account</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-design">design</a> - </li> - - </ul> - </dd> - - <dt>H</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-history">history</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-reset_private_token">reset_private_token</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-show">show</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-token">token</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-update">update</a>, - </li> - - - <li> - <a href="#method-i-update_password">update_password</a>, - </li> - - - <li> - <a href="#method-i-update_username">update_username</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-account"> - - <b>account</b>() - - <a href="../classes/ProfilesController.html#method-i-account" name="method-i-account" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-account_source')" id="l_method-i-account_source">show</a> - - </p> - <div id="method-i-account_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/profiles_controller.rb, line 11</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">account</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-design"> - - <b>design</b>() - - <a href="../classes/ProfilesController.html#method-i-design" name="method-i-design" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-design_source')" id="l_method-i-design_source">show</a> - - </p> - <div id="method-i-design_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/profiles_controller.rb, line 8</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">design</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-history"> - - <b>history</b>() - - <a href="../classes/ProfilesController.html#method-i-history" name="method-i-history" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-history_source')" id="l_method-i-history_source">show</a> - - </p> - <div id="method-i-history_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/profiles_controller.rb, line 49</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">history</span> - <span class="ruby-ivar">@events</span> = <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">recent_events</span>.<span class="ruby-identifier">page</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:page</span>]).<span class="ruby-identifier">per</span>(<span class="ruby-number">20</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-reset_private_token"> - - <b>reset_private_token</b>() - - <a href="../classes/ProfilesController.html#method-i-reset_private_token" name="method-i-reset_private_token" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-reset_private_token_source')" id="l_method-i-reset_private_token_source">show</a> - - </p> - <div id="method-i-reset_private_token_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/profiles_controller.rb, line 41</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">reset_private_token</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">reset_authentication_token!</span> - <span class="ruby-identifier">flash</span>[<span class="ruby-value">:notice</span>] = <span class="ruby-string">"Token was successfully updated"</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">account_profile_path</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-show"> - - <b>show</b>() - - <a href="../classes/ProfilesController.html#method-i-show" name="method-i-show" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a> - - </p> - <div id="method-i-show_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/profiles_controller.rb, line 5</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-token"> - - <b>token</b>() - - <a href="../classes/ProfilesController.html#method-i-token" name="method-i-token" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-token_source')" id="l_method-i-token_source">show</a> - - </p> - <div id="method-i-token_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/profiles_controller.rb, line 27</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">token</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update"> - - <b>update</b>() - - <a href="../classes/ProfilesController.html#method-i-update" name="method-i-update" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_source')" id="l_method-i-update_source">show</a> - - </p> - <div id="method-i-update_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/profiles_controller.rb, line 14</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update</span> - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@user</span>.<span class="ruby-identifier">update_attributes</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:user</span>]) - <span class="ruby-identifier">flash</span>[<span class="ruby-value">:notice</span>] = <span class="ruby-string">"Profile was successfully updated"</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">flash</span>[<span class="ruby-value">:alert</span>] = <span class="ruby-string">"Failed to update profile"</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> { <span class="ruby-identifier">redirect_to</span> <span class="ruby-value">:back</span> } - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update_password"> - - <b>update_password</b>() - - <a href="../classes/ProfilesController.html#method-i-update_password" name="method-i-update_password" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_password_source')" id="l_method-i-update_password_source">show</a> - - </p> - <div id="method-i-update_password_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/profiles_controller.rb, line 30</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update_password</span> - <span class="ruby-identifier">params</span>[<span class="ruby-value">:user</span>].<span class="ruby-identifier">reject!</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">k</span> <span class="ruby-operator">!=</span> <span class="ruby-string">"password"</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">k</span> <span class="ruby-operator">!=</span> <span class="ruby-string">"password_confirmation"</span>} - - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@user</span>.<span class="ruby-identifier">update_attributes</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:user</span>]) - <span class="ruby-identifier">flash</span>[<span class="ruby-value">:notice</span>] = <span class="ruby-string">"Password was successfully updated. Please login with it"</span> - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">new_user_session_path</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">render</span> <span class="ruby-string">'account'</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update_username"> - - <b>update_username</b>() - - <a href="../classes/ProfilesController.html#method-i-update_username" name="method-i-update_username" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_username_source')" id="l_method-i-update_username_source">show</a> - - </p> - <div id="method-i-update_username_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/profiles_controller.rb, line 53</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update_username</span> - <span class="ruby-ivar">@user</span>.<span class="ruby-identifier">update_attributes</span>(<span class="ruby-identifier">username</span><span class="ruby-operator">:</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:user</span>][<span class="ruby-value">:username</span>]) - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Project.html b/doc/code/classes/Project.html deleted file mode 100644 index 004285485a1..00000000000 --- a/doc/code/classes/Project.html +++ /dev/null @@ -1,1392 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Project</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Project - - <span class="parent">< - - ActiveRecord::Base - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/models/project_rb.html">app/models/project.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">CLASS</span> - <a href="Project/TransferError.html">Project::TransferError</a> - </li> - - </ul> - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-access_options">access_options</a>, - </li> - - - <li> - <a href="#method-c-active">active</a>, - </li> - - - <li> - <a href="#method-c-authorized_for">authorized_for</a> - </li> - - </ul> - </dd> - - <dt>B</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-build_commit_note">build_commit_note</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-check_limit">check_limit</a>, - </li> - - - <li> - <a href="#method-i-code">code</a>, - </li> - - - <li> - <a href="#method-i-commit_line_notes">commit_line_notes</a>, - </li> - - - <li> - <a href="#method-i-commit_notes">commit_notes</a>, - </li> - - - <li> - <a href="#method-i-common_notes">common_notes</a>, - </li> - - - <li> - <a href="#method-c-create_by_user">create_by_user</a> - </li> - - </ul> - </dd> - - <dt>F</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-find_with_namespace">find_with_namespace</a> - </li> - - </ul> - </dd> - - <dt>G</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-git_error-3F">git_error?</a>, - </li> - - - <li> - <a href="#method-i-gitlab_ci-3F">gitlab_ci?</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-issues_labels">issues_labels</a>, - </li> - - - <li> - <a href="#method-i-items_for">items_for</a> - </li> - - </ul> - </dd> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-last_activity">last_activity</a>, - </li> - - - <li> - <a href="#method-i-last_activity_date">last_activity_date</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-private-3F">private?</a>, - </li> - - - <li> - <a href="#method-i-project_id">project_id</a>, - </li> - - - <li> - <a href="#method-i-public-3F">public?</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-repo_name">repo_name</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-saved-3F">saved?</a>, - </li> - - - <li> - <a href="#method-c-search">search</a>, - </li> - - - <li> - <a href="#method-i-send_move_instructions">send_move_instructions</a>, - </li> - - - <li> - <a href="#method-i-services">services</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_param">to_param</a> - </li> - - </ul> - </dd> - - <dt>W</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-web_url">web_url</a> - </li> - - </ul> - </dd> - - </dl> - - - - <!-- Includes --> - <div class="sectiontitle">Included Modules</div> - <ul> - - <li> - - <a href="Repository.html"> - Repository - </a> - - </li> - - <li> - - <a href="PushObserver.html"> - PushObserver - </a> - - </li> - - <li> - - <a href="Authority.html"> - Authority - </a> - - </li> - - <li> - - <a href="Team.html"> - Team - </a> - - </li> - - <li> - - <a href="NamespacedProject.html"> - NamespacedProject - </a> - - </li> - - </ul> - - - - - - - - - - - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>error_code</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-access_options"> - - <b>access_options</b>() - - <a href="../classes/Project.html#method-c-access_options" name="method-c-access_options" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-access_options_source')" id="l_method-c-access_options_source">show</a> - - </p> - <div id="method-c-access_options_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 163</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">access_options</span> - <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">access_roles</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-active"> - - <b>active</b>() - - <a href="../classes/Project.html#method-c-active" name="method-c-active" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-active_source')" id="l_method-c-active_source">show</a> - - </p> - <div id="method-c-active_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 96</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">active</span> - <span class="ruby-identifier">joins</span>(<span class="ruby-value">:issues</span>, <span class="ruby-value">:notes</span>, <span class="ruby-value">:merge_requests</span>).<span class="ruby-identifier">order</span>(<span class="ruby-string">"issues.created_at, notes.created_at, merge_requests.created_at DESC"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-authorized_for"> - - <b>authorized_for</b>(user) - - <a href="../classes/Project.html#method-c-authorized_for" name="method-c-authorized_for" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-authorized_for_source')" id="l_method-c-authorized_for_source">show</a> - - </p> - <div id="method-c-authorized_for_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 91</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">authorized_for</span> <span class="ruby-identifier">user</span> - <span class="ruby-identifier">projects</span> = <span class="ruby-identifier">includes</span>(<span class="ruby-value">:users_projects</span>, <span class="ruby-value">:namespace</span>) - <span class="ruby-identifier">projects</span> = <span class="ruby-identifier">projects</span>.<span class="ruby-identifier">where</span>(<span class="ruby-string">"users_projects.user_id = :user_id or projects.owner_id = :user_id or namespaces.owner_id = :user_id"</span>, <span class="ruby-identifier">user_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-create_by_user"> - - <b>create_by_user</b>(params, user) - - <a href="../classes/Project.html#method-c-create_by_user" name="method-c-create_by_user" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-create_by_user_source')" id="l_method-c-create_by_user_source">show</a> - - </p> - <div id="method-c-create_by_user_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 114</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">create_by_user</span>(<span class="ruby-identifier">params</span>, <span class="ruby-identifier">user</span>) - <span class="ruby-identifier">namespace_id</span> = <span class="ruby-identifier">params</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:namespace_id</span>) - - <span class="ruby-identifier">project</span> = <span class="ruby-constant">Project</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">params</span> - - <span class="ruby-constant">Project</span>.<span class="ruby-identifier">transaction</span> <span class="ruby-keyword">do</span> - - <span class="ruby-comment"># Parametrize path for project</span> - <span class="ruby-comment">#</span> - <span class="ruby-comment"># Ex.</span> - <span class="ruby-comment"># 'GitLab HQ'.parameterize => "gitlab-hq"</span> - <span class="ruby-comment">#</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">path</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">dup</span>.<span class="ruby-identifier">parameterize</span> - - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">owner</span> = <span class="ruby-identifier">user</span> - - <span class="ruby-comment"># Apply namespace if user has access to it</span> - <span class="ruby-comment"># else fallback to user namespace</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">namespace_id</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">Namespace</span>.<span class="ruby-identifier">global_id</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">namespace_id</span> = <span class="ruby-identifier">user</span>.<span class="ruby-identifier">namespace_id</span> - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">namespace_id</span> - <span class="ruby-identifier">group</span> = <span class="ruby-constant">Group</span>.<span class="ruby-identifier">find_by_id</span>(<span class="ruby-identifier">namespace_id</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">user</span>.<span class="ruby-identifier">can?</span> <span class="ruby-value">:manage_group</span>, <span class="ruby-identifier">group</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">namespace_id</span> = <span class="ruby-identifier">namespace_id</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">save!</span> - - <span class="ruby-comment"># Add user as project master</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">users_projects</span>.<span class="ruby-identifier">create!</span>(<span class="ruby-identifier">project_access</span><span class="ruby-operator">:</span> <span class="ruby-constant">UsersProject</span><span class="ruby-operator">::</span><span class="ruby-constant">MASTER</span>, <span class="ruby-identifier">user</span><span class="ruby-operator">:</span> <span class="ruby-identifier">user</span>) - - <span class="ruby-comment"># when project saved no team member exist so</span> - <span class="ruby-comment"># project repository should be updated after first user add</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">update_repository</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">project</span> -<span class="ruby-keyword">rescue</span> <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">Gitolite</span><span class="ruby-operator">::</span><span class="ruby-constant">AccessDenied</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">error_code</span> = <span class="ruby-value">:gitolite</span> - <span class="ruby-identifier">project</span> -<span class="ruby-keyword">rescue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">error_code</span> = <span class="ruby-value">:db</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">errors</span>.<span class="ruby-identifier">add</span>(<span class="ruby-value">:base</span>, <span class="ruby-string">"Can't save project. Please try again later"</span>) - <span class="ruby-identifier">project</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-find_with_namespace"> - - <b>find_with_namespace</b>(id) - - <a href="../classes/Project.html#method-c-find_with_namespace" name="method-c-find_with_namespace" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-find_with_namespace_source')" id="l_method-c-find_with_namespace_source">show</a> - - </p> - <div id="method-c-find_with_namespace_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 104</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">find_with_namespace</span>(<span class="ruby-identifier">id</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">id</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-string">"/"</span>) - <span class="ruby-identifier">id</span> = <span class="ruby-identifier">id</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">"/"</span>) - <span class="ruby-identifier">namespace_id</span> = <span class="ruby-constant">Namespace</span>.<span class="ruby-identifier">find_by_path</span>(<span class="ruby-identifier">id</span>.<span class="ruby-identifier">first</span>).<span class="ruby-identifier">id</span> - <span class="ruby-identifier">where</span>(<span class="ruby-identifier">namespace_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">namespace_id</span>).<span class="ruby-identifier">find_by_path</span>(<span class="ruby-identifier">id</span>.<span class="ruby-identifier">second</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">where</span>(<span class="ruby-identifier">path</span><span class="ruby-operator">:</span> <span class="ruby-identifier">id</span>, <span class="ruby-identifier">namespace_id</span><span class="ruby-operator">:</span> <span class="ruby-keyword">nil</span>).<span class="ruby-identifier">last</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-search"> - - <b>search</b>(query) - - <a href="../classes/Project.html#method-c-search" name="method-c-search" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-search_source')" id="l_method-c-search_source">show</a> - - </p> - <div id="method-c-search_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 100</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">search</span> <span class="ruby-identifier">query</span> - <span class="ruby-identifier">where</span>(<span class="ruby-string">"projects.name LIKE :query OR projects.path LIKE :query"</span>, <span class="ruby-identifier">query</span><span class="ruby-operator">:</span> <span class="ruby-node">"%#{query}%"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-build_commit_note"> - - <b>build_commit_note</b>(commit) - - <a href="../classes/Project.html#method-i-build_commit_note" name="method-i-build_commit_note" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-build_commit_note_source')" id="l_method-i-build_commit_note_source">show</a> - - </p> - <div id="method-i-build_commit_note_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 208</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">build_commit_note</span>(<span class="ruby-identifier">commit</span>) - <span class="ruby-identifier">notes</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">commit_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">commit</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">noteable_type</span><span class="ruby-operator">:</span> <span class="ruby-string">"Commit"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-check_limit"> - - <b>check_limit</b>() - - <a href="../classes/Project.html#method-i-check_limit" name="method-i-check_limit" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-check_limit_source')" id="l_method-i-check_limit_source">show</a> - - </p> - <div id="method-i-check_limit_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 176</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">check_limit</span> - <span class="ruby-keyword">unless</span> <span class="ruby-identifier">owner</span>.<span class="ruby-identifier">can_create_project?</span> - <span class="ruby-identifier">errors</span>[<span class="ruby-value">:base</span>] <span class="ruby-operator"><<</span> (<span class="ruby-node">"Your own projects limit is #{owner.projects_limit}! Please contact administrator to increase it"</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">rescue</span> - <span class="ruby-identifier">errors</span>[<span class="ruby-value">:base</span>] <span class="ruby-operator"><<</span> (<span class="ruby-string">"Can't check your ability to create project"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-code"> - - <b>code</b>() - - <a href="../classes/Project.html#method-i-code" name="method-i-code" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>For compatibility with old code</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-code_source')" id="l_method-i-code_source">show</a> - - </p> - <div id="method-i-code_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 253</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">code</span> - <span class="ruby-identifier">path</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-commit_line_notes"> - - <b>commit_line_notes</b>(commit) - - <a href="../classes/Project.html#method-i-commit_line_notes" name="method-i-commit_line_notes" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-commit_line_notes_source')" id="l_method-i-commit_line_notes_source">show</a> - - </p> - <div id="method-i-commit_line_notes_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 216</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commit_line_notes</span>(<span class="ruby-identifier">commit</span>) - <span class="ruby-identifier">notes</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">commit_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">commit</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">noteable_type</span><span class="ruby-operator">:</span> <span class="ruby-string">"Commit"</span>).<span class="ruby-identifier">where</span>(<span class="ruby-string">"line_code IS NOT NULL"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-commit_notes"> - - <b>commit_notes</b>(commit) - - <a href="../classes/Project.html#method-i-commit_notes" name="method-i-commit_notes" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-commit_notes_source')" id="l_method-i-commit_notes_source">show</a> - - </p> - <div id="method-i-commit_notes_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 212</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commit_notes</span>(<span class="ruby-identifier">commit</span>) - <span class="ruby-identifier">notes</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">commit_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">commit</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">noteable_type</span><span class="ruby-operator">:</span> <span class="ruby-string">"Commit"</span>, <span class="ruby-identifier">line_code</span><span class="ruby-operator">:</span> <span class="ruby-keyword">nil</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-common_notes"> - - <b>common_notes</b>() - - <a href="../classes/Project.html#method-i-common_notes" name="method-i-common_notes" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-common_notes_source')" id="l_method-i-common_notes_source">show</a> - - </p> - <div id="method-i-common_notes_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 204</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">common_notes</span> - <span class="ruby-identifier">notes</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">noteable_type</span><span class="ruby-operator">:</span> [<span class="ruby-string">""</span>, <span class="ruby-keyword">nil</span>]).<span class="ruby-identifier">inc_author_project</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-git_error-3F"> - - <b>git_error?</b>() - - <a href="../classes/Project.html#method-i-git_error-3F" name="method-i-git_error-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-git_error-3F_source')" id="l_method-i-git_error-3F_source">show</a> - - </p> - <div id="method-i-git_error-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 168</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">git_error?</span> - <span class="ruby-identifier">error_code</span> <span class="ruby-operator">==</span> <span class="ruby-value">:gitolite</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-gitlab_ci-3F"> - - <b>gitlab_ci?</b>() - - <a href="../classes/Project.html#method-i-gitlab_ci-3F" name="method-i-gitlab_ci-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-gitlab_ci-3F_source')" id="l_method-i-gitlab_ci-3F_source">show</a> - - </p> - <div id="method-i-gitlab_ci-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 248</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">gitlab_ci?</span> - <span class="ruby-identifier">gitlab_ci_service</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">gitlab_ci_service</span>.<span class="ruby-identifier">active</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-issues_labels"> - - <b>issues_labels</b>() - - <a href="../classes/Project.html#method-i-issues_labels" name="method-i-issues_labels" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-issues_labels_source')" id="l_method-i-issues_labels_source">show</a> - - </p> - <div id="method-i-issues_labels_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 240</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">issues_labels</span> - <span class="ruby-identifier">issues</span>.<span class="ruby-identifier">tag_counts_on</span>(<span class="ruby-value">:labels</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-items_for"> - - <b>items_for</b>(entity) - - <a href="../classes/Project.html#method-i-items_for" name="method-i-items_for" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-items_for_source')" id="l_method-i-items_for_source">show</a> - - </p> - <div id="method-i-items_for_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 257</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">items_for</span> <span class="ruby-identifier">entity</span> - <span class="ruby-keyword">case</span> <span class="ruby-identifier">entity</span> - <span class="ruby-keyword">when</span> <span class="ruby-string">'issue'</span> <span class="ruby-keyword">then</span> - <span class="ruby-identifier">issues</span> - <span class="ruby-keyword">when</span> <span class="ruby-string">'merge_request'</span> <span class="ruby-keyword">then</span> - <span class="ruby-identifier">merge_requests</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-last_activity"> - - <b>last_activity</b>() - - <a href="../classes/Project.html#method-i-last_activity" name="method-i-last_activity" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-last_activity_source')" id="l_method-i-last_activity_source">show</a> - - </p> - <div id="method-i-last_activity_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 228</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">last_activity</span> - <span class="ruby-identifier">last_event</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-last_activity_date"> - - <b>last_activity_date</b>() - - <a href="../classes/Project.html#method-i-last_activity_date" name="method-i-last_activity_date" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-last_activity_date_source')" id="l_method-i-last_activity_date_source">show</a> - - </p> - <div id="method-i-last_activity_date_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 232</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">last_activity_date</span> - <span class="ruby-identifier">last_event</span>.<span class="ruby-identifier">try</span>(<span class="ruby-value">:created_at</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">updated_at</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-private-3F"> - - <b>private?</b>() - - <a href="../classes/Project.html#method-i-private-3F" name="method-i-private-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-private-3F_source')" id="l_method-i-private-3F_source">show</a> - - </p> - <div id="method-i-private-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 224</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">private?</span> - <span class="ruby-identifier">private_flag</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-project_id"> - - <b>project_id</b>() - - <a href="../classes/Project.html#method-i-project_id" name="method-i-project_id" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-project_id_source')" id="l_method-i-project_id_source">show</a> - - </p> - <div id="method-i-project_id_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 236</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">project_id</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">id</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-public-3F"> - - <b>public?</b>() - - <a href="../classes/Project.html#method-i-public-3F" name="method-i-public-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-public-3F_source')" id="l_method-i-public-3F_source">show</a> - - </p> - <div id="method-i-public-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 220</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">public?</span> - <span class="ruby-operator">!</span><span class="ruby-identifier">private_flag</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-repo_name"> - - <b>repo_name</b>() - - <a href="../classes/Project.html#method-i-repo_name" name="method-i-repo_name" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-repo_name_source')" id="l_method-i-repo_name_source">show</a> - - </p> - <div id="method-i-repo_name_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 184</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">repo_name</span> - <span class="ruby-identifier">denied_paths</span> = <span class="ruby-node">%w(gitolite-admin admin dashboard groups help profile projects search)</span> - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">denied_paths</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">path</span>) - <span class="ruby-identifier">errors</span>.<span class="ruby-identifier">add</span>(<span class="ruby-value">:path</span>, <span class="ruby-node">"like #{path} is not allowed"</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-saved-3F"> - - <b>saved?</b>() - - <a href="../classes/Project.html#method-i-saved-3F" name="method-i-saved-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-saved-3F_source')" id="l_method-i-saved-3F_source">show</a> - - </p> - <div id="method-i-saved-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 172</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">saved?</span> - <span class="ruby-identifier">id</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">valid?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-send_move_instructions"> - - <b>send_move_instructions</b>() - - <a href="../classes/Project.html#method-i-send_move_instructions" name="method-i-send_move_instructions" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-send_move_instructions_source')" id="l_method-i-send_move_instructions_source">show</a> - - </p> - <div id="method-i-send_move_instructions_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 266</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">send_move_instructions</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">users_projects</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">member</span><span class="ruby-operator">|</span> - <span class="ruby-constant">Notify</span>.<span class="ruby-identifier">project_was_moved_email</span>(<span class="ruby-identifier">member</span>.<span class="ruby-identifier">id</span>).<span class="ruby-identifier">deliver</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-services"> - - <b>services</b>() - - <a href="../classes/Project.html#method-i-services" name="method-i-services" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-services_source')" id="l_method-i-services_source">show</a> - - </p> - <div id="method-i-services_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 244</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">services</span> - [<span class="ruby-identifier">gitlab_ci_service</span>].<span class="ruby-identifier">compact</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_param"> - - <b>to_param</b>() - - <a href="../classes/Project.html#method-i-to_param" name="method-i-to_param" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_param_source')" id="l_method-i-to_param_source">show</a> - - </p> - <div id="method-i-to_param_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 192</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_param</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">namespace</span> - <span class="ruby-identifier">namespace</span>.<span class="ruby-identifier">path</span> <span class="ruby-operator">+</span> <span class="ruby-string">"/"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">path</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">path</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-web_url"> - - <b>web_url</b>() - - <a href="../classes/Project.html#method-i-web_url" name="method-i-web_url" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-web_url_source')" id="l_method-i-web_url_source">show</a> - - </p> - <div id="method-i-web_url_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/project.rb, line 200</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">web_url</span> - [<span class="ruby-constant">Gitlab</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">gitlab</span>.<span class="ruby-identifier">url</span>, <span class="ruby-identifier">path_with_namespace</span>].<span class="ruby-identifier">join</span>(<span class="ruby-string">"/"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Project/TransferError.html b/doc/code/classes/Project/TransferError.html deleted file mode 100644 index 2d0be3a4a13..00000000000 --- a/doc/code/classes/Project/TransferError.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Project::TransferError</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Project::TransferError - - <span class="parent">< - - StandardError - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../files/app/models/project_rb.html">app/models/project.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ProjectHook.html b/doc/code/classes/ProjectHook.html deleted file mode 100644 index 3fa9c75921b..00000000000 --- a/doc/code/classes/ProjectHook.html +++ /dev/null @@ -1,92 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ProjectHook</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - ProjectHook - - <span class="parent">< - - <a href="WebHook.html">WebHook</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/models/project_hook_rb.html">app/models/project_hook.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<h2 id="label-Schema+Information">Schema Information</h2> - -<p>Table name: web_hooks</p> - -<pre>id :integer not null, primary key -url :string(255) -project_id :integer -created_at :datetime not null -updated_at :datetime not null -type :string(255) default("ProjectHook") -service_id :integer</pre> - - </div> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ProjectObserver.html b/doc/code/classes/ProjectObserver.html deleted file mode 100644 index bf2292a51f4..00000000000 --- a/doc/code/classes/ProjectObserver.html +++ /dev/null @@ -1,262 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ProjectObserver</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - ProjectObserver - - <span class="parent">< - - ActiveRecord::Observer - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/observers/project_observer_rb.html">app/observers/project_observer.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-after_create">after_create</a>, - </li> - - - <li> - <a href="#method-i-after_destroy">after_destroy</a>, - </li> - - - <li> - <a href="#method-i-after_update">after_update</a> - </li> - - </ul> - </dd> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-log_info">log_info</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-after_create"> - - <b>after_create</b>(project) - - <a href="../classes/ProjectObserver.html#method-i-after_create" name="method-i-after_create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-after_create_source')" id="l_method-i-after_create_source">show</a> - - </p> - <div id="method-i-after_create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/project_observer.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">after_create</span>(<span class="ruby-identifier">project</span>) - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">update_repository</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-after_destroy"> - - <b>after_destroy</b>(project) - - <a href="../classes/ProjectObserver.html#method-i-after_destroy" name="method-i-after_destroy" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-after_destroy_source')" id="l_method-i-after_destroy_source">show</a> - - </p> - <div id="method-i-after_destroy_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/project_observer.rb, line 10</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">after_destroy</span>(<span class="ruby-identifier">project</span>) - <span class="ruby-identifier">log_info</span>(<span class="ruby-node">"Project \"#{project.name}\" was removed"</span>) - - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">destroy_repository</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-after_update"> - - <b>after_update</b>(project) - - <a href="../classes/ProjectObserver.html#method-i-after_update" name="method-i-after_update" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-after_update_source')" id="l_method-i-after_update_source">show</a> - - </p> - <div id="method-i-after_update_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/project_observer.rb, line 6</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">after_update</span>(<span class="ruby-identifier">project</span>) - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">send_move_instructions</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">project</span>.<span class="ruby-identifier">namespace_id_changed?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-log_info"> - - <b>log_info</b>(message) - - <a href="../classes/ProjectObserver.html#method-i-log_info" name="method-i-log_info" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-log_info_source')" id="l_method-i-log_info_source">show</a> - - </p> - <div id="method-i-log_info_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/project_observer.rb, line 22</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">log_info</span> <span class="ruby-identifier">message</span> - <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">AppLogger</span>.<span class="ruby-identifier">info</span> <span class="ruby-identifier">message</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ProjectResourceController.html b/doc/code/classes/ProjectResourceController.html deleted file mode 100644 index 757055abbc1..00000000000 --- a/doc/code/classes/ProjectResourceController.html +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ProjectResourceController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - ProjectResourceController - - <span class="parent">< - - <a href="ApplicationController.html">ApplicationController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/project_resource_controller_rb.html">app/controllers/project_resource_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ProjectUpdateContext.html b/doc/code/classes/ProjectUpdateContext.html deleted file mode 100644 index 3fe3f4d68f8..00000000000 --- a/doc/code/classes/ProjectUpdateContext.html +++ /dev/null @@ -1,148 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ProjectUpdateContext</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - ProjectUpdateContext - - <span class="parent">< - - <a href="BaseContext.html">BaseContext</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/contexts/project_update_context_rb.html">app/contexts/project_update_context.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-execute">execute</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-execute"> - - <b>execute</b>(role = :default) - - <a href="../classes/ProjectUpdateContext.html#method-i-execute" name="method-i-execute" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-execute_source')" id="l_method-i-execute_source">show</a> - - </p> - <div id="method-i-execute_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/contexts/project_update_context.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">execute</span>(<span class="ruby-identifier">role</span> = <span class="ruby-value">:default</span>) - <span class="ruby-identifier">namespace_id</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:project</span>].<span class="ruby-identifier">delete</span>(<span class="ruby-value">:namespace_id</span>) - - <span class="ruby-identifier">allowed_transfer</span> = <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-value">:change_namespace</span>, <span class="ruby-identifier">project</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">role</span> <span class="ruby-operator">==</span> <span class="ruby-value">:admin</span> - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">allowed_transfer</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">namespace_id</span>.<span class="ruby-identifier">present?</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">namespace_id</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Namespace</span>.<span class="ruby-identifier">global_id</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">project</span>.<span class="ruby-identifier">namespace</span>.<span class="ruby-identifier">present?</span> - <span class="ruby-comment"># Transfer to global namespace from anyone</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">transfer</span>(<span class="ruby-keyword">nil</span>) - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">namespace_id</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">project</span>.<span class="ruby-identifier">namespace_id</span> - <span class="ruby-comment"># Transfer to someone namespace</span> - <span class="ruby-identifier">namespace</span> = <span class="ruby-constant">Namespace</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">namespace_id</span>) - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">transfer</span>(<span class="ruby-identifier">namespace</span>) - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">update_attributes</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:project</span>], <span class="ruby-identifier">as</span><span class="ruby-operator">:</span> <span class="ruby-identifier">role</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ProjectsController.html b/doc/code/classes/ProjectsController.html deleted file mode 100644 index 3cc6dd07a3e..00000000000 --- a/doc/code/classes/ProjectsController.html +++ /dev/null @@ -1,566 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ProjectsController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - ProjectsController - - <span class="parent">< - - <a href="ProjectResourceController.html">ProjectResourceController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/projects_controller_rb.html">app/controllers/projects_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-create">create</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-destroy">destroy</a> - </li> - - </ul> - </dd> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-edit">edit</a> - </li> - - </ul> - </dd> - - <dt>F</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-files">files</a> - </li> - - </ul> - </dd> - - <dt>G</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-graph">graph</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-new">new</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-show">show</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-update">update</a> - </li> - - </ul> - </dd> - - <dt>W</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-wall">wall</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-create"> - - <b>create</b>() - - <a href="../classes/ProjectsController.html#method-i-create" name="method-i-create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-create_source')" id="l_method-i-create_source">show</a> - - </p> - <div id="method-i-create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/projects_controller.rb, line 20</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">create</span> - <span class="ruby-ivar">@project</span> = <span class="ruby-constant">Project</span>.<span class="ruby-identifier">create_by_user</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:project</span>], <span class="ruby-identifier">current_user</span>) - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">flash</span>[<span class="ruby-value">:notice</span>] = <span class="ruby-string">'Project was successfully created.'</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">saved?</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> <span class="ruby-keyword">do</span> - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">saved?</span> - <span class="ruby-identifier">redirect_to</span> <span class="ruby-ivar">@project</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">render</span> <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">"new"</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-destroy"> - - <b>destroy</b>() - - <a href="../classes/ProjectsController.html#method-i-destroy" name="method-i-destroy" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-destroy_source')" id="l_method-i-destroy_source">show</a> - - </p> - <div id="method-i-destroy_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/projects_controller.rb, line 99</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">destroy</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">access_denied!</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-value">:remove_project</span>, <span class="ruby-identifier">project</span>) - - <span class="ruby-comment"># Delete team first in order to prevent multiple gitolite calls</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">truncate_team</span> - - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">destroy</span> - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> { <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">root_path</span> } - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-edit"> - - <b>edit</b>() - - <a href="../classes/ProjectsController.html#method-i-edit" name="method-i-edit" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-edit_source')" id="l_method-i-edit_source">show</a> - - </p> - <div id="method-i-edit_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/projects_controller.rb, line 17</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">edit</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-files"> - - <b>files</b>() - - <a href="../classes/ProjectsController.html#method-i-files" name="method-i-files" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-files_source')" id="l_method-i-files_source">show</a> - - </p> - <div id="method-i-files_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/projects_controller.rb, line 72</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">files</span> - <span class="ruby-ivar">@notes</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">notes</span>.<span class="ruby-identifier">where</span>(<span class="ruby-string">"attachment != 'NULL'"</span>).<span class="ruby-identifier">order</span>(<span class="ruby-string">"created_at DESC"</span>).<span class="ruby-identifier">limit</span>(<span class="ruby-number">100</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-graph"> - - <b>graph</b>() - - <a href="../classes/ProjectsController.html#method-i-graph" name="method-i-graph" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-graph_source')" id="l_method-i-graph_source">show</a> - - </p> - <div id="method-i-graph_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/projects_controller.rb, line 89</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">graph</span> - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">json</span> <span class="ruby-keyword">do</span> - <span class="ruby-identifier">graph</span> = <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">Graph</span><span class="ruby-operator">::</span><span class="ruby-constant">JsonBuilder</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">project</span>) - <span class="ruby-identifier">render</span> <span class="ruby-value">:json</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">graph</span>.<span class="ruby-identifier">to_json</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-new"> - - <b>new</b>() - - <a href="../classes/ProjectsController.html#method-i-new" name="method-i-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-new_source')" id="l_method-i-new_source">show</a> - - </p> - <div id="method-i-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/projects_controller.rb, line 13</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">new</span> - <span class="ruby-ivar">@project</span> = <span class="ruby-constant">Project</span>.<span class="ruby-identifier">new</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-show"> - - <b>show</b>() - - <a href="../classes/ProjectsController.html#method-i-show" name="method-i-show" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a> - - </p> - <div id="method-i-show_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/projects_controller.rb, line 55</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span> - <span class="ruby-identifier">limit</span> = (<span class="ruby-identifier">params</span>[<span class="ruby-value">:limit</span>] <span class="ruby-operator">||</span> <span class="ruby-number">20</span>).<span class="ruby-identifier">to_i</span> - <span class="ruby-ivar">@events</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">events</span>.<span class="ruby-identifier">recent</span>.<span class="ruby-identifier">limit</span>(<span class="ruby-identifier">limit</span>).<span class="ruby-identifier">offset</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:offset</span>] <span class="ruby-operator">||</span> <span class="ruby-number">0</span>) - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> <span class="ruby-keyword">do</span> - <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">empty_repo?</span> - <span class="ruby-ivar">@last_push</span> = <span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">recent_push</span>(<span class="ruby-ivar">@project</span>.<span class="ruby-identifier">id</span>) - <span class="ruby-identifier">render</span> <span class="ruby-value">:show</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">render</span> <span class="ruby-string">"projects/empty"</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update"> - - <b>update</b>() - - <a href="../classes/ProjectsController.html#method-i-update" name="method-i-update" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_source')" id="l_method-i-update_source">show</a> - - </p> - <div id="method-i-update_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/projects_controller.rb, line 36</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update</span> - <span class="ruby-identifier">status</span> = <span class="ruby-constant">ProjectUpdateContext</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">current_user</span>, <span class="ruby-identifier">params</span>).<span class="ruby-identifier">execute</span> - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">status</span> - <span class="ruby-identifier">flash</span>[<span class="ruby-value">:notice</span>] = <span class="ruby-string">'Project was successfully updated.'</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> { <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">edit_project_path</span>(<span class="ruby-identifier">project</span>), <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">'Project was successfully updated.'</span> } - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">"edit"</span> } - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - -<span class="ruby-keyword">rescue</span> <span class="ruby-constant">Project</span><span class="ruby-operator">::</span><span class="ruby-constant">TransferError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span> - <span class="ruby-ivar">@error</span> = <span class="ruby-identifier">ex</span> - <span class="ruby-identifier">render</span> <span class="ruby-value">:update_failed</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-wall"> - - <b>wall</b>() - - <a href="../classes/ProjectsController.html#method-i-wall" name="method-i-wall" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Wall</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-wall_source')" id="l_method-i-wall_source">show</a> - - </p> - <div id="method-i-wall_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/projects_controller.rb, line 80</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">wall</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">render_404</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">wall_enabled</span> - <span class="ruby-ivar">@note</span> = <span class="ruby-constant">Note</span>.<span class="ruby-identifier">new</span> - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ProjectsHelper.html b/doc/code/classes/ProjectsHelper.html deleted file mode 100644 index a2084279d25..00000000000 --- a/doc/code/classes/ProjectsHelper.html +++ /dev/null @@ -1,384 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ProjectsHelper</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - ProjectsHelper - - </h1> - <ul class="files"> - - <li><a href="../files/app/helpers/projects_helper_rb.html">app/helpers/projects_helper.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>G</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-grouper_project_members">grouper_project_members</a> - </li> - - </ul> - </dd> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-link_to_member">link_to_member</a>, - </li> - - - <li> - <a href="#method-i-link_to_project">link_to_project</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-project_title">project_title</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-remove_from_team_message">remove_from_team_message</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-tm_path">tm_path</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-grouper_project_members"> - - <b>grouper_project_members</b>(project) - - <a href="../classes/ProjectsHelper.html#method-i-grouper_project_members" name="method-i-grouper_project_members" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-grouper_project_members_source')" id="l_method-i-grouper_project_members_source">show</a> - - </p> - <div id="method-i-grouper_project_members_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/projects_helper.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">grouper_project_members</span>(<span class="ruby-identifier">project</span>) - <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">users_projects</span>.<span class="ruby-identifier">sort_by</span>(&<span class="ruby-value">:project_access</span>).<span class="ruby-identifier">reverse</span>.<span class="ruby-identifier">group_by</span>(&<span class="ruby-value">:project_access</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-link_to_member"> - - <b>link_to_member</b>(project, author) - - <a href="../classes/ProjectsHelper.html#method-i-link_to_member" name="method-i-link_to_member" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-link_to_member_source')" id="l_method-i-link_to_member_source">show</a> - - </p> - <div id="method-i-link_to_member_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/projects_helper.rb, line 23</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">link_to_member</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">author</span>) - <span class="ruby-keyword">return</span> <span class="ruby-string">"(deleted)"</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">author</span> - - <span class="ruby-comment"># Build avatar image tag</span> - <span class="ruby-identifier">avatar</span> = <span class="ruby-identifier">image_tag</span>(<span class="ruby-identifier">gravatar_icon</span>(<span class="ruby-identifier">author</span>.<span class="ruby-identifier">try</span>(<span class="ruby-value">:email</span>)), <span class="ruby-identifier">width</span><span class="ruby-operator">:</span> <span class="ruby-number">16</span>, <span class="ruby-keyword">class</span><span class="ruby-operator">:</span> <span class="ruby-string">"lil_av"</span>) - - <span class="ruby-comment"># Build name strong tag</span> - <span class="ruby-keyword ruby-title">name</span> = <span class="ruby-identifier">content_tag</span> <span class="ruby-value">:strong</span>, <span class="ruby-identifier">author</span>.<span class="ruby-identifier">name</span>, <span class="ruby-keyword">class</span><span class="ruby-operator">:</span> <span class="ruby-string">'author'</span> - - <span class="ruby-keyword ruby-title">author_html</span> = <span class="ruby-identifier">avatar</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">name</span> - - <span class="ruby-identifier">tm</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">team_member_by_id</span>(<span class="ruby-identifier">author</span>) - - <span class="ruby-identifier">content_tag</span> <span class="ruby-value">:span</span>, <span class="ruby-keyword">class</span><span class="ruby-operator">:</span> <span class="ruby-string">'member-link'</span> <span class="ruby-keyword ruby-title">do</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">tm</span> - <span class="ruby-identifier">link_to</span> <span class="ruby-identifier">author_html</span>, <span class="ruby-identifier">project_team_member_path</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">tm</span>), <span class="ruby-keyword">class</span><span class="ruby-operator">:</span> <span class="ruby-string">"author_link"</span> - <span class="ruby-keyword ruby-title">else</span> - <span class="ruby-identifier">author_html</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-link_to_project"> - - <b>link_to_project</b>(project) - - <a href="../classes/ProjectsHelper.html#method-i-link_to_project" name="method-i-link_to_project" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-link_to_project_source')" id="l_method-i-link_to_project_source">show</a> - - </p> - <div id="method-i-link_to_project_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/projects_helper.rb, line 10</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">link_to_project</span> <span class="ruby-identifier">project</span> - <span class="ruby-identifier">link_to</span> <span class="ruby-identifier">project</span> <span class="ruby-keyword">do</span> - <span class="ruby-identifier">title</span> = <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:strong</span>, <span class="ruby-identifier">project</span>.<span class="ruby-identifier">name</span>) - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">project</span>.<span class="ruby-identifier">namespace</span> - <span class="ruby-identifier">namespace</span> = <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:span</span>, <span class="ruby-node">"#{project.namespace.human_name} / "</span>, <span class="ruby-keyword">class</span><span class="ruby-operator">:</span> <span class="ruby-string">'tiny'</span>) - <span class="ruby-keyword ruby-title">title</span> = <span class="ruby-identifier">namespace</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">title</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">title</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-project_title"> - - <b>project_title</b>(project) - - <a href="../classes/ProjectsHelper.html#method-i-project_title" name="method-i-project_title" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-project_title_source')" id="l_method-i-project_title_source">show</a> - - </p> - <div id="method-i-project_title_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/projects_helper.rb, line 49</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">project_title</span> <span class="ruby-identifier">project</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">project</span>.<span class="ruby-identifier">group</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">name_with_namespace</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">name</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-remove_from_team_message"> - - <b>remove_from_team_message</b>(project, member) - - <a href="../classes/ProjectsHelper.html#method-i-remove_from_team_message" name="method-i-remove_from_team_message" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-remove_from_team_message_source')" id="l_method-i-remove_from_team_message_source">show</a> - - </p> - <div id="method-i-remove_from_team_message_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/projects_helper.rb, line 6</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">remove_from_team_message</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">member</span>) - <span class="ruby-node">"You are going to remove #{member.user_name} from #{project.name}. Are you sure?"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-tm_path"> - - <b>tm_path</b>(team_member) - - <a href="../classes/ProjectsHelper.html#method-i-tm_path" name="method-i-tm_path" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-tm_path_source')" id="l_method-i-tm_path_source">show</a> - - </p> - <div id="method-i-tm_path_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/projects_helper.rb, line 45</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">tm_path</span> <span class="ruby-identifier">team_member</span> - <span class="ruby-identifier">project_team_member_path</span>(<span class="ruby-ivar">@project</span>, <span class="ruby-identifier">team_member</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ProtectedBranch.html b/doc/code/classes/ProtectedBranch.html deleted file mode 100644 index c5399ed48ae..00000000000 --- a/doc/code/classes/ProtectedBranch.html +++ /dev/null @@ -1,206 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ProtectedBranch</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - ProtectedBranch - - <span class="parent">< - - ActiveRecord::Base - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/models/protected_branch_rb.html">app/models/protected_branch.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<h2 id="label-Schema+Information">Schema Information</h2> - -<p>Table name: protected_branches</p> - -<pre>id :integer not null, primary key -project_id :integer not null -name :string(255) not null -created_at :datetime not null -updated_at :datetime not null</pre> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-commit">commit</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-update_repository">update_repository</a> - </li> - - </ul> - </dd> - - </dl> - - - - <!-- Includes --> - <div class="sectiontitle">Included Modules</div> - <ul> - - <li> - - <a href="GitHost.html"> - GitHost - </a> - - </li> - - </ul> - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-commit"> - - <b>commit</b>() - - <a href="../classes/ProtectedBranch.html#method-i-commit" name="method-i-commit" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-commit_source')" id="l_method-i-commit_source">show</a> - - </p> - <div id="method-i-commit_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/protected_branch.rb, line 28</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commit</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">commit</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">name</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update_repository"> - - <b>update_repository</b>() - - <a href="../classes/ProtectedBranch.html#method-i-update_repository" name="method-i-update_repository" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_repository_source')" id="l_method-i-update_repository_source">show</a> - - </p> - <div id="method-i-update_repository_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/protected_branch.rb, line 24</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update_repository</span> - <span class="ruby-identifier">git_host</span>.<span class="ruby-identifier">update_repository</span>(<span class="ruby-identifier">project</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ProtectedBranchesController.html b/doc/code/classes/ProtectedBranchesController.html deleted file mode 100644 index f1175852f39..00000000000 --- a/doc/code/classes/ProtectedBranchesController.html +++ /dev/null @@ -1,232 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ProtectedBranchesController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - ProtectedBranchesController - - <span class="parent">< - - <a href="ProjectResourceController.html">ProjectResourceController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/protected_branches_controller_rb.html">app/controllers/protected_branches_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-create">create</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-destroy">destroy</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-index">index</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-create"> - - <b>create</b>() - - <a href="../classes/ProtectedBranchesController.html#method-i-create" name="method-i-create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-create_source')" id="l_method-i-create_source">show</a> - - </p> - <div id="method-i-create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/protected_branches_controller.rb, line 13</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">create</span> - <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">protected_branches</span>.<span class="ruby-identifier">create</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:protected_branch</span>]) - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">project_protected_branches_path</span>(<span class="ruby-ivar">@project</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-destroy"> - - <b>destroy</b>() - - <a href="../classes/ProtectedBranchesController.html#method-i-destroy" name="method-i-destroy" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-destroy_source')" id="l_method-i-destroy_source">show</a> - - </p> - <div id="method-i-destroy_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/protected_branches_controller.rb, line 18</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">destroy</span> - <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">protected_branches</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]).<span class="ruby-identifier">destroy</span> - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> { <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">project_protected_branches_path</span> } - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">nothing</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span> } - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-index"> - - <b>index</b>() - - <a href="../classes/ProtectedBranchesController.html#method-i-index" name="method-i-index" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-index_source')" id="l_method-i-index_source">show</a> - - </p> - <div id="method-i-index_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/protected_branches_controller.rb, line 8</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">index</span> - <span class="ruby-ivar">@branches</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">protected_branches</span>.<span class="ruby-identifier">all</span> - <span class="ruby-ivar">@protected_branch</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">protected_branches</span>.<span class="ruby-identifier">new</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/PushEvent.html b/doc/code/classes/PushEvent.html deleted file mode 100644 index 8b74ebeea7b..00000000000 --- a/doc/code/classes/PushEvent.html +++ /dev/null @@ -1,959 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>PushEvent</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - PushEvent - - </h1> - <ul class="files"> - - <li><a href="../files/app/roles/push_event_rb.html">app/roles/push_event.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>B</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-branch-3F">branch?</a>, - </li> - - - <li> - <a href="#method-i-branch_name">branch_name</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-commit_from">commit_from</a>, - </li> - - - <li> - <a href="#method-i-commit_to">commit_to</a>, - </li> - - - <li> - <a href="#method-i-commits">commits</a>, - </li> - - - <li> - <a href="#method-i-commits_count">commits_count</a> - </li> - - </ul> - </dd> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-last_commit">last_commit</a>, - </li> - - - <li> - <a href="#method-i-last_push_to_non_root-3F">last_push_to_non_root?</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-md_ref-3F">md_ref?</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-new_branch-3F">new_branch?</a>, - </li> - - - <li> - <a href="#method-i-new_ref-3F">new_ref?</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-parent_commit">parent_commit</a>, - </li> - - - <li> - <a href="#method-i-push_action_name">push_action_name</a>, - </li> - - - <li> - <a href="#method-i-push_with_commits-3F">push_with_commits?</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-ref_name">ref_name</a>, - </li> - - - <li> - <a href="#method-i-ref_type">ref_type</a>, - </li> - - - <li> - <a href="#method-i-rm_ref-3F">rm_ref?</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-tag-3F">tag?</a>, - </li> - - - <li> - <a href="#method-i-tag_name">tag_name</a> - </li> - - </ul> - </dd> - - <dt>V</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-valid_push-3F">valid_push?</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-branch-3F"> - - <b>branch?</b>() - - <a href="../classes/PushEvent.html#method-i-branch-3F" name="method-i-branch-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-branch-3F_source')" id="l_method-i-branch-3F_source">show</a> - - </p> - <div id="method-i-branch-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_event.rb, line 12</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">branch?</span> - <span class="ruby-identifier">data</span>[<span class="ruby-value">:ref</span>][<span class="ruby-string">"refs/heads"</span>] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-branch_name"> - - <b>branch_name</b>() - - <a href="../classes/PushEvent.html#method-i-branch_name" name="method-i-branch_name" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-branch_name_source')" id="l_method-i-branch_name_source">show</a> - - </p> - <div id="method-i-branch_name_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_event.rb, line 48</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">branch_name</span> - <span class="ruby-ivar">@branch_name</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">data</span>[<span class="ruby-value">:ref</span>].<span class="ruby-identifier">gsub</span>(<span class="ruby-string">"refs/heads/"</span>, <span class="ruby-string">""</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-commit_from"> - - <b>commit_from</b>() - - <a href="../classes/PushEvent.html#method-i-commit_from" name="method-i-commit_from" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-commit_from_source')" id="l_method-i-commit_from_source">show</a> - - </p> - <div id="method-i-commit_from_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_event.rb, line 32</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commit_from</span> - <span class="ruby-identifier">data</span>[<span class="ruby-value">:before</span>] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-commit_to"> - - <b>commit_to</b>() - - <a href="../classes/PushEvent.html#method-i-commit_to" name="method-i-commit_to" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-commit_to_source')" id="l_method-i-commit_to_source">show</a> - - </p> - <div id="method-i-commit_to_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_event.rb, line 36</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commit_to</span> - <span class="ruby-identifier">data</span>[<span class="ruby-value">:after</span>] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-commits"> - - <b>commits</b>() - - <a href="../classes/PushEvent.html#method-i-commits" name="method-i-commits" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Max 20 commits from push DESC</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-commits_source')" id="l_method-i-commits_source">show</a> - - </p> - <div id="method-i-commits_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_event.rb, line 57</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commits</span> - <span class="ruby-ivar">@commits</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">data</span>[<span class="ruby-value">:commits</span>].<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">commit</span><span class="ruby-operator">|</span> <span class="ruby-identifier">project</span>.<span class="ruby-identifier">commit</span>(<span class="ruby-identifier">commit</span>[<span class="ruby-value">:id</span>]) }.<span class="ruby-identifier">reverse</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-commits_count"> - - <b>commits_count</b>() - - <a href="../classes/PushEvent.html#method-i-commits_count" name="method-i-commits_count" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-commits_count_source')" id="l_method-i-commits_count_source">show</a> - - </p> - <div id="method-i-commits_count_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_event.rb, line 61</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commits_count</span> - <span class="ruby-identifier">data</span>[<span class="ruby-value">:total_commits_count</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">commits</span>.<span class="ruby-identifier">count</span> <span class="ruby-operator">||</span> <span class="ruby-number">0</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-last_commit"> - - <b>last_commit</b>() - - <a href="../classes/PushEvent.html#method-i-last_commit" name="method-i-last_commit" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-last_commit_source')" id="l_method-i-last_commit_source">show</a> - - </p> - <div id="method-i-last_commit_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_event.rb, line 85</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">last_commit</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">commit</span>(<span class="ruby-identifier">commit_to</span>) -<span class="ruby-keyword">rescue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span> - <span class="ruby-keyword">nil</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-last_push_to_non_root-3F"> - - <b>last_push_to_non_root?</b>() - - <a href="../classes/PushEvent.html#method-i-last_push_to_non_root-3F" name="method-i-last_push_to_non_root-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-last_push_to_non_root-3F_source')" id="l_method-i-last_push_to_non_root-3F_source">show</a> - - </p> - <div id="method-i-last_push_to_non_root-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_event.rb, line 97</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">last_push_to_non_root?</span> - <span class="ruby-identifier">branch?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">project</span>.<span class="ruby-identifier">default_branch</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">branch_name</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-md_ref-3F"> - - <b>md_ref?</b>() - - <a href="../classes/PushEvent.html#method-i-md_ref-3F" name="method-i-md_ref-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-md_ref-3F_source')" id="l_method-i-md_ref-3F_source">show</a> - - </p> - <div id="method-i-md_ref-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_event.rb, line 28</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">md_ref?</span> - <span class="ruby-operator">!</span>(<span class="ruby-identifier">rm_ref?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">new_ref?</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-new_branch-3F"> - - <b>new_branch?</b>() - - <a href="../classes/PushEvent.html#method-i-new_branch-3F" name="method-i-new_branch-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-new_branch-3F_source')" id="l_method-i-new_branch-3F_source">show</a> - - </p> - <div id="method-i-new_branch-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_event.rb, line 16</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">new_branch?</span> - <span class="ruby-identifier">commit_from</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">%r^00000/</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-new_ref-3F"> - - <b>new_ref?</b>() - - <a href="../classes/PushEvent.html#method-i-new_ref-3F" name="method-i-new_ref-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-new_ref-3F_source')" id="l_method-i-new_ref-3F_source">show</a> - - </p> - <div id="method-i-new_ref-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_event.rb, line 20</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">new_ref?</span> - <span class="ruby-identifier">commit_from</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">%r^00000/</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-parent_commit"> - - <b>parent_commit</b>() - - <a href="../classes/PushEvent.html#method-i-parent_commit" name="method-i-parent_commit" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-parent_commit_source')" id="l_method-i-parent_commit_source">show</a> - - </p> - <div id="method-i-parent_commit_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_event.rb, line 79</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">parent_commit</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">commit</span>(<span class="ruby-identifier">commit_from</span>) -<span class="ruby-keyword">rescue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span> - <span class="ruby-keyword">nil</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-push_action_name"> - - <b>push_action_name</b>() - - <a href="../classes/PushEvent.html#method-i-push_action_name" name="method-i-push_action_name" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-push_action_name_source')" id="l_method-i-push_action_name_source">show</a> - - </p> - <div id="method-i-push_action_name_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_event.rb, line 69</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">push_action_name</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">new_ref?</span> - <span class="ruby-string">"pushed new"</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">rm_ref?</span> - <span class="ruby-string">"deleted"</span> - <span class="ruby-keyword">else</span> - <span class="ruby-string">"pushed to"</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-push_with_commits-3F"> - - <b>push_with_commits?</b>() - - <a href="../classes/PushEvent.html#method-i-push_with_commits-3F" name="method-i-push_with_commits-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-push_with_commits-3F_source')" id="l_method-i-push_with_commits-3F_source">show</a> - - </p> - <div id="method-i-push_with_commits-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_event.rb, line 91</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">push_with_commits?</span> - <span class="ruby-identifier">md_ref?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">commits</span>.<span class="ruby-identifier">any?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">parent_commit</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">last_commit</span> -<span class="ruby-keyword">rescue</span> <span class="ruby-constant">Grit</span><span class="ruby-operator">::</span><span class="ruby-constant">NoSuchPathError</span> - <span class="ruby-keyword">false</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-ref_name"> - - <b>ref_name</b>() - - <a href="../classes/PushEvent.html#method-i-ref_name" name="method-i-ref_name" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-ref_name_source')" id="l_method-i-ref_name_source">show</a> - - </p> - <div id="method-i-ref_name_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_event.rb, line 40</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">ref_name</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">tag?</span> - <span class="ruby-identifier">tag_name</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">branch_name</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-ref_type"> - - <b>ref_type</b>() - - <a href="../classes/PushEvent.html#method-i-ref_type" name="method-i-ref_type" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-ref_type_source')" id="l_method-i-ref_type_source">show</a> - - </p> - <div id="method-i-ref_type_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_event.rb, line 65</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">ref_type</span> - <span class="ruby-identifier">tag?</span> <span class="ruby-operator">?</span> <span class="ruby-string">"tag"</span> <span class="ruby-operator">:</span> <span class="ruby-string">"branch"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-rm_ref-3F"> - - <b>rm_ref?</b>() - - <a href="../classes/PushEvent.html#method-i-rm_ref-3F" name="method-i-rm_ref-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-rm_ref-3F_source')" id="l_method-i-rm_ref-3F_source">show</a> - - </p> - <div id="method-i-rm_ref-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_event.rb, line 24</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">rm_ref?</span> - <span class="ruby-identifier">commit_to</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">%r^00000/</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-tag-3F"> - - <b>tag?</b>() - - <a href="../classes/PushEvent.html#method-i-tag-3F" name="method-i-tag-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-tag-3F_source')" id="l_method-i-tag-3F_source">show</a> - - </p> - <div id="method-i-tag-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_event.rb, line 8</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">tag?</span> - <span class="ruby-identifier">data</span>[<span class="ruby-value">:ref</span>][<span class="ruby-string">"refs/tags"</span>] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-tag_name"> - - <b>tag_name</b>() - - <a href="../classes/PushEvent.html#method-i-tag_name" name="method-i-tag_name" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-tag_name_source')" id="l_method-i-tag_name_source">show</a> - - </p> - <div id="method-i-tag_name_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_event.rb, line 52</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">tag_name</span> - <span class="ruby-ivar">@tag_name</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">data</span>[<span class="ruby-value">:ref</span>].<span class="ruby-identifier">gsub</span>(<span class="ruby-string">"refs/tags/"</span>, <span class="ruby-string">""</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-valid_push-3F"> - - <b>valid_push?</b>() - - <a href="../classes/PushEvent.html#method-i-valid_push-3F" name="method-i-valid_push-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-valid_push-3F_source')" id="l_method-i-valid_push-3F_source">show</a> - - </p> - <div id="method-i-valid_push-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_event.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">valid_push?</span> - <span class="ruby-identifier">data</span>[<span class="ruby-value">:ref</span>] -<span class="ruby-keyword">rescue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span> - <span class="ruby-keyword">false</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/PushObserver.html b/doc/code/classes/PushObserver.html deleted file mode 100644 index f747fb4a958..00000000000 --- a/doc/code/classes/PushObserver.html +++ /dev/null @@ -1,512 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>PushObserver</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - PushObserver - - </h1> - <ul class="files"> - - <li><a href="../files/app/roles/push_observer_rb.html">app/roles/push_observer.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>Includes methods for handling Git Push events</p> - -<p>Triggered by <a href="PostReceive.html">PostReceive</a> job</p> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-execute_hooks">execute_hooks</a>, - </li> - - - <li> - <a href="#method-i-execute_services">execute_services</a> - </li> - - </ul> - </dd> - - <dt>O</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-observe_push">observe_push</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-post_receive_data">post_receive_data</a>, - </li> - - - <li> - <a href="#method-i-push_to_branch-3F">push_to_branch?</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-trigger_post_receive">trigger_post_receive</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-update_merge_requests">update_merge_requests</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-execute_hooks"> - - <b>execute_hooks</b>(data) - - <a href="../classes/PushObserver.html#method-i-execute_hooks" name="method-i-execute_hooks" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-execute_hooks_source')" id="l_method-i-execute_hooks_source">show</a> - - </p> - <div id="method-i-execute_hooks_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_observer.rb, line 52</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">execute_hooks</span>(<span class="ruby-identifier">data</span>) - <span class="ruby-identifier">hooks</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">hook</span><span class="ruby-operator">|</span> <span class="ruby-identifier">hook</span>.<span class="ruby-identifier">execute</span>(<span class="ruby-identifier">data</span>) } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-execute_services"> - - <b>execute_services</b>(data) - - <a href="../classes/PushObserver.html#method-i-execute_services" name="method-i-execute_services" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-execute_services_source')" id="l_method-i-execute_services_source">show</a> - - </p> - <div id="method-i-execute_services_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_observer.rb, line 56</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">execute_services</span>(<span class="ruby-identifier">data</span>) - <span class="ruby-identifier">services</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">service</span><span class="ruby-operator">|</span> - - <span class="ruby-comment"># Call service hook only if it is active</span> - <span class="ruby-identifier">service</span>.<span class="ruby-identifier">execute</span>(<span class="ruby-identifier">data</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">service</span>.<span class="ruby-identifier">active</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-observe_push"> - - <b>observe_push</b>(data) - - <a href="../classes/PushObserver.html#method-i-observe_push" name="method-i-observe_push" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-observe_push_source')" id="l_method-i-observe_push_source">show</a> - - </p> - <div id="method-i-observe_push_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_observer.rb, line 43</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">observe_push</span>(<span class="ruby-identifier">data</span>) - <span class="ruby-constant">Event</span>.<span class="ruby-identifier">create</span>( - <span class="ruby-identifier">project</span><span class="ruby-operator">:</span> <span class="ruby-keyword">self</span>, - <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-constant">Event</span><span class="ruby-operator">::</span><span class="ruby-constant">Pushed</span>, - <span class="ruby-identifier">data</span><span class="ruby-operator">:</span> <span class="ruby-identifier">data</span>, - <span class="ruby-identifier">author_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">data</span>[<span class="ruby-value">:user_id</span>] - ) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-post_receive_data"> - - <b>post_receive_data</b>(oldrev, newrev, ref, user) - - <a href="../classes/PushObserver.html#method-i-post_receive_data" name="method-i-post_receive_data" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Produce a hash of post-receive data</p> - -<p>data = {</p> - -<pre>before: String, -after: String, -ref: String, -user_id: String, -user_name: String, -repository: { - name: String, - url: String, - description: String, - homepage: String, -}, -commits: Array, -total_commits_count: Fixnum</pre> - -<p>}</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-post_receive_data_source')" id="l_method-i-post_receive_data_source">show</a> - - </p> - <div id="method-i-post_receive_data_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_observer.rb, line 82</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">post_receive_data</span>(<span class="ruby-identifier">oldrev</span>, <span class="ruby-identifier">newrev</span>, <span class="ruby-identifier">ref</span>, <span class="ruby-identifier">user</span>) - - <span class="ruby-identifier">push_commits</span> = <span class="ruby-identifier">commits_between</span>(<span class="ruby-identifier">oldrev</span>, <span class="ruby-identifier">newrev</span>) - - <span class="ruby-comment"># Total commits count</span> - <span class="ruby-identifier">push_commits_count</span> = <span class="ruby-identifier">push_commits</span>.<span class="ruby-identifier">size</span> - - <span class="ruby-comment"># Get latest 20 commits ASC</span> - <span class="ruby-identifier">push_commits_limited</span> = <span class="ruby-identifier">push_commits</span>.<span class="ruby-identifier">last</span>(<span class="ruby-number">20</span>) - - <span class="ruby-comment"># Hash to be passed as post_receive_data</span> - <span class="ruby-identifier">data</span> = { - <span class="ruby-identifier">before</span><span class="ruby-operator">:</span> <span class="ruby-identifier">oldrev</span>, - <span class="ruby-identifier">after</span><span class="ruby-operator">:</span> <span class="ruby-identifier">newrev</span>, - <span class="ruby-identifier">ref</span><span class="ruby-operator">:</span> <span class="ruby-identifier">ref</span>, - <span class="ruby-identifier">user_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>, - <span class="ruby-identifier">user_name</span><span class="ruby-operator">:</span> <span class="ruby-identifier">user</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-identifier">repository</span><span class="ruby-operator">:</span> { - <span class="ruby-identifier">name</span><span class="ruby-operator">:</span> <span class="ruby-identifier">name</span>, - <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-identifier">url_to_repo</span>, - <span class="ruby-identifier">description</span><span class="ruby-operator">:</span> <span class="ruby-identifier">description</span>, - <span class="ruby-identifier">homepage</span><span class="ruby-operator">:</span> <span class="ruby-identifier">web_url</span>, - }, - <span class="ruby-identifier">commits</span><span class="ruby-operator">:</span> [], - <span class="ruby-identifier">total_commits_count</span><span class="ruby-operator">:</span> <span class="ruby-identifier">push_commits_count</span> - } - - <span class="ruby-comment"># For perfomance purposes maximum 20 latest commits</span> - <span class="ruby-comment"># will be passed as post receive hook data.</span> - <span class="ruby-comment">#</span> - <span class="ruby-identifier">push_commits_limited</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">commit</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">data</span>[<span class="ruby-value">:commits</span>] <span class="ruby-operator"><<</span> { - <span class="ruby-identifier">id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">commit</span>.<span class="ruby-identifier">id</span>, - <span class="ruby-identifier">message</span><span class="ruby-operator">:</span> <span class="ruby-identifier">commit</span>.<span class="ruby-identifier">safe_message</span>, - <span class="ruby-identifier">timestamp</span><span class="ruby-operator">:</span> <span class="ruby-identifier">commit</span>.<span class="ruby-identifier">date</span>.<span class="ruby-identifier">xmlschema</span>, - <span class="ruby-identifier">url</span><span class="ruby-operator">:</span> <span class="ruby-node">"#{Gitlab.config.gitlab.url}/#{path_with_namespace}/commit/#{commit.id}"</span>, - <span class="ruby-identifier">author</span><span class="ruby-operator">:</span> { - <span class="ruby-identifier">name</span><span class="ruby-operator">:</span> <span class="ruby-identifier">commit</span>.<span class="ruby-identifier">author_name</span>, - <span class="ruby-identifier">email</span><span class="ruby-operator">:</span> <span class="ruby-identifier">commit</span>.<span class="ruby-identifier">author_email</span> - } - } - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">data</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-push_to_branch-3F"> - - <b>push_to_branch?</b>(ref, oldrev) - - <a href="../classes/PushObserver.html#method-i-push_to_branch-3F" name="method-i-push_to_branch-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-push_to_branch-3F_source')" id="l_method-i-push_to_branch-3F_source">show</a> - - </p> - <div id="method-i-push_to_branch-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_observer.rb, line 36</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">push_to_branch?</span> <span class="ruby-identifier">ref</span>, <span class="ruby-identifier">oldrev</span> - <span class="ruby-identifier">ref_parts</span> = <span class="ruby-identifier">ref</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">'/'</span>) - - <span class="ruby-comment"># Return if this is not a push to a branch (e.g. new commits)</span> - <span class="ruby-operator">!</span>(<span class="ruby-identifier">ref_parts</span>[<span class="ruby-number">1</span>] <span class="ruby-operator">!~</span> <span class="ruby-regexp">%rheads/</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">oldrev</span> <span class="ruby-operator">==</span> <span class="ruby-string">"00000000000000000000000000000000"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-trigger_post_receive"> - - <b>trigger_post_receive</b>(oldrev, newrev, ref, user) - - <a href="../classes/PushObserver.html#method-i-trigger_post_receive" name="method-i-trigger_post_receive" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>This method will be called after each post receive and only if the provided -user is present in GitLab.</p> - -<p>All callbacks for post receive should be placed here.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-trigger_post_receive_source')" id="l_method-i-trigger_post_receive_source">show</a> - - </p> - <div id="method-i-trigger_post_receive_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_observer.rb, line 9</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">trigger_post_receive</span>(<span class="ruby-identifier">oldrev</span>, <span class="ruby-identifier">newrev</span>, <span class="ruby-identifier">ref</span>, <span class="ruby-identifier">user</span>) - <span class="ruby-identifier">data</span> = <span class="ruby-identifier">post_receive_data</span>(<span class="ruby-identifier">oldrev</span>, <span class="ruby-identifier">newrev</span>, <span class="ruby-identifier">ref</span>, <span class="ruby-identifier">user</span>) - - <span class="ruby-comment"># Create push event</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">observe_push</span>(<span class="ruby-identifier">data</span>) - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">push_to_branch?</span> <span class="ruby-identifier">ref</span>, <span class="ruby-identifier">oldrev</span> - <span class="ruby-comment"># Close merged MR</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">update_merge_requests</span>(<span class="ruby-identifier">oldrev</span>, <span class="ruby-identifier">newrev</span>, <span class="ruby-identifier">ref</span>, <span class="ruby-identifier">user</span>) - - <span class="ruby-comment"># Execute web hooks</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">execute_hooks</span>(<span class="ruby-identifier">data</span>.<span class="ruby-identifier">dup</span>) - - <span class="ruby-comment"># Execute project services</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">execute_services</span>(<span class="ruby-identifier">data</span>.<span class="ruby-identifier">dup</span>) - <span class="ruby-keyword">end</span> - - <span class="ruby-comment"># Create satellite</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">satellite</span>.<span class="ruby-identifier">create</span> <span class="ruby-keyword">unless</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">satellite</span>.<span class="ruby-identifier">exists?</span> - - <span class="ruby-comment"># Discover the default branch, but only if it hasn't already been set to</span> - <span class="ruby-comment"># something else</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">default_branch</span>.<span class="ruby-identifier">nil?</span> - <span class="ruby-identifier">update_attributes</span>(<span class="ruby-identifier">default_branch</span><span class="ruby-operator">:</span> <span class="ruby-identifier">discover_default_branch</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update_merge_requests"> - - <b>update_merge_requests</b>(oldrev, newrev, ref, user) - - <a href="../classes/PushObserver.html#method-i-update_merge_requests" name="method-i-update_merge_requests" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_merge_requests_source')" id="l_method-i-update_merge_requests_source">show</a> - - </p> - <div id="method-i-update_merge_requests_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/push_observer.rb, line 128</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update_merge_requests</span>(<span class="ruby-identifier">oldrev</span>, <span class="ruby-identifier">newrev</span>, <span class="ruby-identifier">ref</span>, <span class="ruby-identifier">user</span>) - <span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">ref</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">%rheads/</span> - <span class="ruby-identifier">branch_name</span> = <span class="ruby-identifier">ref</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-string">"refs/heads/"</span>, <span class="ruby-string">""</span>) - <span class="ruby-identifier">c_ids</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">commits_between</span>(<span class="ruby-identifier">oldrev</span>, <span class="ruby-identifier">newrev</span>).<span class="ruby-identifier">map</span>(&<span class="ruby-value">:id</span>) - - <span class="ruby-comment"># Update code for merge requests</span> - <span class="ruby-identifier">mrs</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merge_requests</span>.<span class="ruby-identifier">opened</span>.<span class="ruby-identifier">find_all_by_branch</span>(<span class="ruby-identifier">branch_name</span>).<span class="ruby-identifier">all</span> - <span class="ruby-identifier">mrs</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">merge_request</span><span class="ruby-operator">|</span> <span class="ruby-identifier">merge_request</span>.<span class="ruby-identifier">reload_code</span>; <span class="ruby-identifier">merge_request</span>.<span class="ruby-identifier">mark_as_unchecked</span> } - - <span class="ruby-comment"># Close merge requests</span> - <span class="ruby-identifier">mrs</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merge_requests</span>.<span class="ruby-identifier">opened</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">target_branch</span><span class="ruby-operator">:</span> <span class="ruby-identifier">branch_name</span>).<span class="ruby-identifier">all</span> - <span class="ruby-identifier">mrs</span> = <span class="ruby-identifier">mrs</span>.<span class="ruby-identifier">select</span>(&<span class="ruby-value">:last_commit</span>).<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mr</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c_ids</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">mr</span>.<span class="ruby-identifier">last_commit</span>.<span class="ruby-identifier">id</span>) } - <span class="ruby-identifier">mrs</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">merge_request</span><span class="ruby-operator">|</span> <span class="ruby-identifier">merge_request</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>) } - - <span class="ruby-keyword">true</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Redcarpet.html b/doc/code/classes/Redcarpet.html deleted file mode 100644 index e1b53d96fea..00000000000 --- a/doc/code/classes/Redcarpet.html +++ /dev/null @@ -1,79 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Redcarpet</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - Redcarpet - - </h1> - <ul class="files"> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">MODULE</span> - <a href="Redcarpet/Render.html">Redcarpet::Render</a> - </li> - - </ul> - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Redcarpet/Render.html b/doc/code/classes/Redcarpet/Render.html deleted file mode 100644 index 29a763942b5..00000000000 --- a/doc/code/classes/Redcarpet/Render.html +++ /dev/null @@ -1,79 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Redcarpet::Render</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - Redcarpet::Render - - </h1> - <ul class="files"> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">CLASS</span> - <a href="Render/GitlabHTML.html">Redcarpet::Render::GitlabHTML</a> - </li> - - </ul> - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Redcarpet/Render/GitlabHTML.html b/doc/code/classes/Redcarpet/Render/GitlabHTML.html deleted file mode 100644 index 664207dd196..00000000000 --- a/doc/code/classes/Redcarpet/Render/GitlabHTML.html +++ /dev/null @@ -1,264 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Redcarpet::Render::GitlabHTML</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" /> -<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Redcarpet::Render::GitlabHTML - - <span class="parent">< - - Redcarpet::Render::HTML - - </span> - - </h1> - <ul class="files"> - - <li><a href="../../../files/lib/redcarpet/render/gitlab_html_rb.html">lib/redcarpet/render/gitlab_html.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>B</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-block_code">block_code</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-new">new</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-postprocess">postprocess</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [R] - </td> - <td class='attr-name'>h</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [R] - </td> - <td class='attr-name'>template</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-new"> - - <b>new</b>(template, options = {}) - - <a href="../../../classes/Redcarpet/Render/GitlabHTML.html#method-c-new" name="method-c-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a> - - </p> - <div id="method-c-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/redcarpet/render/gitlab_html.rb, line 6</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span>(<span class="ruby-identifier">template</span>, <span class="ruby-identifier">options</span> = {}) - <span class="ruby-ivar">@template</span> = <span class="ruby-identifier">template</span> - <span class="ruby-ivar">@project</span> = <span class="ruby-ivar">@template</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-string">"@project"</span>) - <span class="ruby-keyword">super</span> <span class="ruby-identifier">options</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-block_code"> - - <b>block_code</b>(code, language) - - <a href="../../../classes/Redcarpet/Render/GitlabHTML.html#method-i-block_code" name="method-i-block_code" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-block_code_source')" id="l_method-i-block_code_source">show</a> - - </p> - <div id="method-i-block_code_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/redcarpet/render/gitlab_html.rb, line 12</span> - <span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">block_code</span>(<span class="ruby-identifier">code</span>, <span class="ruby-identifier">language</span>) - <span class="ruby-identifier">options</span> = { <span class="ruby-identifier">options</span><span class="ruby-operator">:</span> {<span class="ruby-identifier">encoding</span><span class="ruby-operator">:</span> <span class="ruby-string">'utf-8'</span>} } - <span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">lexer</span><span class="ruby-operator">:</span> <span class="ruby-identifier">language</span>.<span class="ruby-identifier">downcase</span>) <span class="ruby-keyword">if</span> <span class="ruby-constant">Pygments</span><span class="ruby-operator">::</span><span class="ruby-constant">Lexer</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">language</span>) - - <span class="ruby-comment"># New lines are placed to fix an rendering issue</span> - <span class="ruby-comment"># with code wrapped inside <h1> tag for next case:</span> - <span class="ruby-comment">#</span> - <span class="ruby-comment"># # Title kinda h1</span> - <span class="ruby-comment">#</span> - <span class="ruby-comment"># ruby code here</span> - <span class="ruby-comment">#</span> - <span class="ruby-string">" - <div class="#{h.user_color_scheme_class}">#{Pygments.highlight(code, options)}</div> - -"</span> - <span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-postprocess"> - - <b>postprocess</b>(full_document) - - <a href="../../../classes/Redcarpet/Render/GitlabHTML.html#method-i-postprocess" name="method-i-postprocess" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-postprocess_source')" id="l_method-i-postprocess_source">show</a> - - </p> - <div id="method-i-postprocess_source" class="dyn-source"> - <pre><span class="ruby-comment"># File lib/redcarpet/render/gitlab_html.rb, line 30</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">postprocess</span>(<span class="ruby-identifier">full_document</span>) - <span class="ruby-identifier">h</span>.<span class="ruby-identifier">gfm</span>(<span class="ruby-identifier">full_document</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/RefsController.html b/doc/code/classes/RefsController.html deleted file mode 100644 index 971b8fcb9a3..00000000000 --- a/doc/code/classes/RefsController.html +++ /dev/null @@ -1,313 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>RefsController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - RefsController - - <span class="parent">< - - <a href="ProjectResourceController.html">ProjectResourceController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/refs_controller_rb.html">app/controllers/refs_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-define_tree_vars">define_tree_vars</a> - </li> - - </ul> - </dd> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-logs_tree">logs_tree</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-ref">ref</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-switch">switch</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-logs_tree"> - - <b>logs_tree</b>() - - <a href="../classes/RefsController.html#method-i-logs_tree" name="method-i-logs_tree" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-logs_tree_source')" id="l_method-i-logs_tree_source">show</a> - - </p> - <div id="method-i-logs_tree_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/refs_controller.rb, line 30</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">logs_tree</span> - <span class="ruby-identifier">contents</span> = <span class="ruby-ivar">@tree</span>.<span class="ruby-identifier">contents</span> - <span class="ruby-ivar">@logs</span> = <span class="ruby-identifier">contents</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">content</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">file</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:path</span>] <span class="ruby-operator">?</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:path</span>], <span class="ruby-identifier">content</span>.<span class="ruby-identifier">name</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">content</span>.<span class="ruby-identifier">name</span> - <span class="ruby-identifier">last_commit</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">commits</span>(<span class="ruby-ivar">@commit</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">file</span>, <span class="ruby-number">1</span>).<span class="ruby-identifier">last</span> - <span class="ruby-identifier">last_commit</span> = <span class="ruby-constant">CommitDecorator</span>.<span class="ruby-identifier">decorate</span>(<span class="ruby-identifier">last_commit</span>) - { - <span class="ruby-identifier">file_name</span><span class="ruby-operator">:</span> <span class="ruby-identifier">content</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-identifier">commit</span><span class="ruby-operator">:</span> <span class="ruby-identifier">last_commit</span> - } - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-switch"> - - <b>switch</b>() - - <a href="../classes/RefsController.html#method-i-switch" name="method-i-switch" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-switch_source')" id="l_method-i-switch_source">show</a> - - </p> - <div id="method-i-switch_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/refs_controller.rb, line 11</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">switch</span> - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> <span class="ruby-keyword">do</span> - <span class="ruby-identifier">new_path</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:destination</span>] <span class="ruby-operator">==</span> <span class="ruby-string">"tree"</span> - <span class="ruby-identifier">project_tree_path</span>(<span class="ruby-ivar">@project</span>, <span class="ruby-ivar">@ref</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">project_commits_path</span>(<span class="ruby-ivar">@project</span>, <span class="ruby-ivar">@ref</span>) - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">new_path</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> <span class="ruby-keyword">do</span> - <span class="ruby-ivar">@ref</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:ref</span>] - <span class="ruby-identifier">define_tree_vars</span> - <span class="ruby-identifier">render</span> <span class="ruby-string">"tree"</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-define_tree_vars"> - - <b>define_tree_vars</b>() - - <a href="../classes/RefsController.html#method-i-define_tree_vars" name="method-i-define_tree_vars" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-define_tree_vars_source')" id="l_method-i-define_tree_vars_source">show</a> - - </p> - <div id="method-i-define_tree_vars_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/refs_controller.rb, line 45</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">define_tree_vars</span> - <span class="ruby-identifier">params</span>[<span class="ruby-value">:path</span>] = <span class="ruby-keyword">nil</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:path</span>].<span class="ruby-identifier">blank?</span> - - <span class="ruby-ivar">@repo</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">repo</span> - <span class="ruby-ivar">@commit</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">commit</span>(<span class="ruby-ivar">@ref</span>) - <span class="ruby-ivar">@commit</span> = <span class="ruby-constant">CommitDecorator</span>.<span class="ruby-identifier">decorate</span>(<span class="ruby-ivar">@commit</span>) - <span class="ruby-ivar">@tree</span> = <span class="ruby-constant">Tree</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@commit</span>.<span class="ruby-identifier">tree</span>, <span class="ruby-identifier">project</span>, <span class="ruby-ivar">@ref</span>, <span class="ruby-identifier">params</span>[<span class="ruby-value">:path</span>]) - <span class="ruby-ivar">@tree</span> = <span class="ruby-constant">TreeDecorator</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@tree</span>) - <span class="ruby-ivar">@hex_path</span> = <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">SHA1</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:path</span>] <span class="ruby-operator">||</span> <span class="ruby-string">""</span>) - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:path</span>] - <span class="ruby-ivar">@logs_path</span> = <span class="ruby-identifier">logs_file_project_ref_path</span>(<span class="ruby-ivar">@project</span>, <span class="ruby-ivar">@ref</span>, <span class="ruby-identifier">params</span>[<span class="ruby-value">:path</span>]) - <span class="ruby-keyword">else</span> - <span class="ruby-ivar">@logs_path</span> = <span class="ruby-identifier">logs_tree_project_ref_path</span>(<span class="ruby-ivar">@project</span>, <span class="ruby-ivar">@ref</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">rescue</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">render_404</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-ref"> - - <b>ref</b>() - - <a href="../classes/RefsController.html#method-i-ref" name="method-i-ref" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-ref_source')" id="l_method-i-ref_source">show</a> - - </p> - <div id="method-i-ref_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/refs_controller.rb, line 64</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">ref</span> - <span class="ruby-ivar">@ref</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:ref</span>] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/RepositoriesController.html b/doc/code/classes/RepositoriesController.html deleted file mode 100644 index cd661646d44..00000000000 --- a/doc/code/classes/RepositoriesController.html +++ /dev/null @@ -1,325 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>RepositoriesController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - RepositoriesController - - <span class="parent">< - - <a href="ProjectResourceController.html">ProjectResourceController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/repositories_controller_rb.html">app/controllers/repositories_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-archive">archive</a> - </li> - - </ul> - </dd> - - <dt>B</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-branches">branches</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-show">show</a>, - </li> - - - <li> - <a href="#method-i-stats">stats</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-tags">tags</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-archive"> - - <b>archive</b>() - - <a href="../classes/RepositoriesController.html#method-i-archive" name="method-i-archive" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-archive_source')" id="l_method-i-archive_source">show</a> - - </p> - <div id="method-i-archive_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/repositories_controller.rb, line 24</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">archive</span> - <span class="ruby-keyword">unless</span> <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-value">:download_code</span>, <span class="ruby-ivar">@project</span>) - <span class="ruby-identifier">render_404</span> <span class="ruby-keyword">and</span> <span class="ruby-keyword">return</span> - <span class="ruby-keyword">end</span> - - - <span class="ruby-identifier">file_path</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">archive_repo</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:ref</span>]) - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">file_path</span> - <span class="ruby-comment"># Send file to user</span> - <span class="ruby-identifier">send_file</span> <span class="ruby-identifier">file_path</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">render_404</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-branches"> - - <b>branches</b>() - - <a href="../classes/RepositoriesController.html#method-i-branches" name="method-i-branches" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-branches_source')" id="l_method-i-branches_source">show</a> - - </p> - <div id="method-i-branches_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/repositories_controller.rb, line 11</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">branches</span> - <span class="ruby-ivar">@branches</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">branches</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-show"> - - <b>show</b>() - - <a href="../classes/RepositoriesController.html#method-i-show" name="method-i-show" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a> - - </p> - <div id="method-i-show_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/repositories_controller.rb, line 7</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span> - <span class="ruby-ivar">@activities</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">commits_with_refs</span>(<span class="ruby-number">20</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-stats"> - - <b>stats</b>() - - <a href="../classes/RepositoriesController.html#method-i-stats" name="method-i-stats" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-stats_source')" id="l_method-i-stats_source">show</a> - - </p> - <div id="method-i-stats_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/repositories_controller.rb, line 19</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">stats</span> - <span class="ruby-ivar">@stats</span> = <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">GitStats</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@project</span>.<span class="ruby-identifier">repo</span>, <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">root_ref</span>) - <span class="ruby-ivar">@graph</span> = <span class="ruby-ivar">@stats</span>.<span class="ruby-identifier">graph</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-tags"> - - <b>tags</b>() - - <a href="../classes/RepositoriesController.html#method-i-tags" name="method-i-tags" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-tags_source')" id="l_method-i-tags_source">show</a> - - </p> - <div id="method-i-tags_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/repositories_controller.rb, line 15</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">tags</span> - <span class="ruby-ivar">@tags</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">tags</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Repository.html b/doc/code/classes/Repository.html deleted file mode 100644 index a6266790d88..00000000000 --- a/doc/code/classes/Repository.html +++ /dev/null @@ -1,1737 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Repository</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - Repository - - </h1> - <ul class="files"> - - <li><a href="../files/app/roles/repository_rb.html">app/roles/repository.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-archive_repo">archive_repo</a> - </li> - - </ul> - </dd> - - <dt>B</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-branch_names">branch_names</a>, - </li> - - - <li> - <a href="#method-i-branches">branches</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-commit">commit</a>, - </li> - - - <li> - <a href="#method-i-commits">commits</a>, - </li> - - - <li> - <a href="#method-i-commits_between">commits_between</a>, - </li> - - - <li> - <a href="#method-i-commits_since">commits_since</a>, - </li> - - - <li> - <a href="#method-i-commits_with_refs">commits_with_refs</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-destroy_repository">destroy_repository</a>, - </li> - - - <li> - <a href="#method-i-discover_default_branch">discover_default_branch</a> - </li> - - </ul> - </dd> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-empty_repo-3F">empty_repo?</a> - </li> - - </ul> - </dd> - - <dt>F</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-fresh_commits">fresh_commits</a> - </li> - - </ul> - </dd> - - <dt>H</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-has_commits-3F">has_commits?</a>, - </li> - - - <li> - <a href="#method-i-has_post_receive_file-3F">has_post_receive_file?</a>, - </li> - - - <li> - <a href="#method-i-heads">heads</a>, - </li> - - - <li> - <a href="#method-i-hook_file">hook_file</a>, - </li> - - - <li> - <a href="#method-i-http_url_to_repo">http_url_to_repo</a> - </li> - - </ul> - </dd> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-last_commit_for">last_commit_for</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-namespace_dir">namespace_dir</a> - </li> - - </ul> - </dd> - - <dt>O</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-open_branches">open_branches</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-path_to_repo">path_to_repo</a>, - </li> - - - <li> - <a href="#method-i-protected_branch-3F">protected_branch?</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-ref_names">ref_names</a>, - </li> - - - <li> - <a href="#method-i-repo">repo</a>, - </li> - - - <li> - <a href="#method-i-repo_exists-3F">repo_exists?</a>, - </li> - - - <li> - <a href="#method-i-root_ref">root_ref</a>, - </li> - - - <li> - <a href="#method-i-root_ref-3F">root_ref?</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-satellite">satellite</a>, - </li> - - - <li> - <a href="#method-i-ssh_url_to_repo">ssh_url_to_repo</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-tag_names">tag_names</a>, - </li> - - - <li> - <a href="#method-i-tags">tags</a>, - </li> - - - <li> - <a href="#method-i-tree">tree</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-update_repository">update_repository</a>, - </li> - - - <li> - <a href="#method-i-url_to_repo">url_to_repo</a> - </li> - - </ul> - </dd> - - <dt>V</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-valid_hook_file">valid_hook_file</a>, - </li> - - - <li> - <a href="#method-i-valid_post_receive_file-3F">valid_post_receive_file?</a>, - </li> - - - <li> - <a href="#method-i-valid_repo-3F">valid_repo?</a> - </li> - - </ul> - </dd> - - </dl> - - - - <!-- Includes --> - <div class="sectiontitle">Included Modules</div> - <ul> - - <li> - - <a href="GitHost.html"> - GitHost - </a> - - </li> - - </ul> - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-archive_repo"> - - <b>archive_repo</b>(ref) - - <a href="../classes/Repository.html#method-i-archive_repo" name="method-i-archive_repo" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Archive <a href="Project.html">Project</a> to .tar.gz</p> - -<p>Already packed repo archives stored at -app_root/tmp/repositories/project_name/project_name-commit-id.tag.gz</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-archive_repo_source')" id="l_method-i-archive_repo_source">show</a> - - </p> - <div id="method-i-archive_repo_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 175</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">archive_repo</span>(<span class="ruby-identifier">ref</span>) - <span class="ruby-identifier">ref</span> = <span class="ruby-identifier">ref</span> <span class="ruby-operator">||</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">root_ref</span> - <span class="ruby-identifier">commit</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">commit</span>(<span class="ruby-identifier">ref</span>) - <span class="ruby-keyword">return</span> <span class="ruby-keyword">nil</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">commit</span> - - <span class="ruby-comment"># Build file path</span> - <span class="ruby-identifier">file_name</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">path</span> <span class="ruby-operator">+</span> <span class="ruby-string">"-"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">commit</span>.<span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-string">".tar.gz"</span> - <span class="ruby-identifier">storage_path</span> = <span class="ruby-constant">Rails</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">"tmp"</span>, <span class="ruby-string">"repositories"</span>, <span class="ruby-keyword">self</span>.<span class="ruby-identifier">path_with_namespace</span>) - <span class="ruby-identifier">file_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">storage_path</span>, <span class="ruby-identifier">file_name</span>) - - <span class="ruby-comment"># Put files into a directory before archiving</span> - <span class="ruby-identifier">prefix</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">path</span> <span class="ruby-operator">+</span> <span class="ruby-string">"/"</span> - - <span class="ruby-comment"># Create file if not exists</span> - <span class="ruby-keyword">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">file_path</span>) - <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span> <span class="ruby-identifier">storage_path</span> - <span class="ruby-identifier">file</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">repo</span>.<span class="ruby-identifier">archive_to_file</span>(<span class="ruby-identifier">ref</span>, <span class="ruby-identifier">prefix</span>, <span class="ruby-identifier">file_path</span>) - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">file_path</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-branch_names"> - - <b>branch_names</b>() - - <a href="../classes/Repository.html#method-i-branch_names" name="method-i-branch_names" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Returns an Array of branch names</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-branch_names_source')" id="l_method-i-branch_names_source">show</a> - - </p> - <div id="method-i-branch_names_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 67</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">branch_names</span> - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">branches</span>.<span class="ruby-identifier">collect</span>(&<span class="ruby-value">:name</span>).<span class="ruby-identifier">sort</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-branches"> - - <b>branches</b>() - - <a href="../classes/Repository.html#method-i-branches" name="method-i-branches" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Returns an Array of Branches</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-branches_source')" id="l_method-i-branches_source">show</a> - - </p> - <div id="method-i-branches_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 72</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">branches</span> - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">branches</span>.<span class="ruby-identifier">sort_by</span>(&<span class="ruby-value">:name</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-commit"> - - <b>commit</b>(commit_id = nil) - - <a href="../classes/Repository.html#method-i-commit" name="method-i-commit" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-commit_source')" id="l_method-i-commit_source">show</a> - - </p> - <div id="method-i-commit_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 15</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commit</span>(<span class="ruby-identifier">commit_id</span> = <span class="ruby-keyword">nil</span>) - <span class="ruby-constant">Commit</span>.<span class="ruby-identifier">find_or_first</span>(<span class="ruby-identifier">repo</span>, <span class="ruby-identifier">commit_id</span>, <span class="ruby-identifier">root_ref</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-commits"> - - <b>commits</b>(ref, path = nil, limit = nil, offset = nil) - - <a href="../classes/Repository.html#method-i-commits" name="method-i-commits" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-commits_source')" id="l_method-i-commits_source">show</a> - - </p> - <div id="method-i-commits_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 31</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commits</span>(<span class="ruby-identifier">ref</span>, <span class="ruby-identifier">path</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">limit</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">offset</span> = <span class="ruby-keyword">nil</span>) - <span class="ruby-constant">Commit</span>.<span class="ruby-identifier">commits</span>(<span class="ruby-identifier">repo</span>, <span class="ruby-identifier">ref</span>, <span class="ruby-identifier">path</span>, <span class="ruby-identifier">limit</span>, <span class="ruby-identifier">offset</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-commits_between"> - - <b>commits_between</b>(from, to) - - <a href="../classes/Repository.html#method-i-commits_between" name="method-i-commits_between" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-commits_between_source')" id="l_method-i-commits_between_source">show</a> - - </p> - <div id="method-i-commits_between_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 39</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commits_between</span>(<span class="ruby-identifier">from</span>, <span class="ruby-identifier">to</span>) - <span class="ruby-constant">Commit</span>.<span class="ruby-identifier">commits_between</span>(<span class="ruby-identifier">repo</span>, <span class="ruby-identifier">from</span>, <span class="ruby-identifier">to</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-commits_since"> - - <b>commits_since</b>(date) - - <a href="../classes/Repository.html#method-i-commits_since" name="method-i-commits_since" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-commits_since_source')" id="l_method-i-commits_since_source">show</a> - - </p> - <div id="method-i-commits_since_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 27</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commits_since</span>(<span class="ruby-identifier">date</span>) - <span class="ruby-constant">Commit</span>.<span class="ruby-identifier">commits_since</span>(<span class="ruby-identifier">repo</span>, <span class="ruby-identifier">date</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-commits_with_refs"> - - <b>commits_with_refs</b>(n = 20) - - <a href="../classes/Repository.html#method-i-commits_with_refs" name="method-i-commits_with_refs" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-commits_with_refs_source')" id="l_method-i-commits_with_refs_source">show</a> - - </p> - <div id="method-i-commits_with_refs_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 23</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commits_with_refs</span>(<span class="ruby-identifier">n</span> = <span class="ruby-number">20</span>) - <span class="ruby-constant">Commit</span>.<span class="ruby-identifier">commits_with_refs</span>(<span class="ruby-identifier">repo</span>, <span class="ruby-identifier">n</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-destroy_repository"> - - <b>destroy_repository</b>() - - <a href="../classes/Repository.html#method-i-destroy_repository" name="method-i-destroy_repository" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-destroy_repository_source')" id="l_method-i-destroy_repository_source">show</a> - - </p> - <div id="method-i-destroy_repository_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 111</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">destroy_repository</span> - <span class="ruby-identifier">git_host</span>.<span class="ruby-identifier">remove_repository</span>(<span class="ruby-keyword">self</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-discover_default_branch"> - - <b>discover_default_branch</b>() - - <a href="../classes/Repository.html#method-i-discover_default_branch" name="method-i-discover_default_branch" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Discovers the default branch based on the repository’s available branches</p> -<ul><li> -<p>If no branches are present, returns nil</p> -</li><li> -<p>If one branch is present, returns its name</p> -</li><li> -<p>If two or more branches are present, returns the one that has a name -matching <a href="Repository.html#method-i-root_ref">#root_ref</a> -(default_branch or ‘master’ if default_branch is nil)</p> -</li></ul> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-discover_default_branch_source')" id="l_method-i-discover_default_branch_source">show</a> - - </p> - <div id="method-i-discover_default_branch_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 146</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">discover_default_branch</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">branch_names</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-number">0</span> - <span class="ruby-keyword">nil</span> - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">branch_names</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-number">1</span> - <span class="ruby-identifier">branch_names</span>.<span class="ruby-identifier">first</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">branch_names</span>.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">v</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">root_ref</span> }.<span class="ruby-identifier">first</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-empty_repo-3F"> - - <b>empty_repo?</b>() - - <a href="../classes/Repository.html#method-i-empty_repo-3F" name="method-i-empty_repo-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-empty_repo-3F_source')" id="l_method-i-empty_repo-3F_source">show</a> - - </p> - <div id="method-i-empty_repo-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 11</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">empty_repo?</span> - <span class="ruby-operator">!</span><span class="ruby-identifier">repo_exists?</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">has_commits?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-fresh_commits"> - - <b>fresh_commits</b>(n = 10) - - <a href="../classes/Repository.html#method-i-fresh_commits" name="method-i-fresh_commits" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-fresh_commits_source')" id="l_method-i-fresh_commits_source">show</a> - - </p> - <div id="method-i-fresh_commits_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 19</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">fresh_commits</span>(<span class="ruby-identifier">n</span> = <span class="ruby-number">10</span>) - <span class="ruby-constant">Commit</span>.<span class="ruby-identifier">fresh_commits</span>(<span class="ruby-identifier">repo</span>, <span class="ruby-identifier">n</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-has_commits-3F"> - - <b>has_commits?</b>() - - <a href="../classes/Repository.html#method-i-has_commits-3F" name="method-i-has_commits-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-has_commits-3F_source')" id="l_method-i-has_commits-3F_source">show</a> - - </p> - <div id="method-i-has_commits-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 156</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">has_commits?</span> - <span class="ruby-operator">!</span><span class="ruby-operator">!</span><span class="ruby-identifier">commit</span> -<span class="ruby-keyword">rescue</span> <span class="ruby-constant">Grit</span><span class="ruby-operator">::</span><span class="ruby-constant">NoSuchPathError</span> - <span class="ruby-keyword">false</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-has_post_receive_file-3F"> - - <b>has_post_receive_file?</b>() - - <a href="../classes/Repository.html#method-i-has_post_receive_file-3F" name="method-i-has_post_receive_file-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-has_post_receive_file-3F_source')" id="l_method-i-has_post_receive_file-3F_source">show</a> - - </p> - <div id="method-i-has_post_receive_file-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 47</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">has_post_receive_file?</span> - <span class="ruby-operator">!</span><span class="ruby-operator">!</span><span class="ruby-identifier">hook_file</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-heads"> - - <b>heads</b>() - - <a href="../classes/Repository.html#method-i-heads" name="method-i-heads" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-heads_source')" id="l_method-i-heads_source">show</a> - - </p> - <div id="method-i-heads_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 121</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">heads</span> - <span class="ruby-ivar">@heads</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">heads</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-hook_file"> - - <b>hook_file</b>() - - <a href="../classes/Repository.html#method-i-hook_file" name="method-i-hook_file" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-hook_file_source')" id="l_method-i-hook_file_source">show</a> - - </p> - <div id="method-i-hook_file_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 59</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">hook_file</span> - <span class="ruby-ivar">@hook_file</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span> - <span class="ruby-identifier">hook_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">path_to_repo</span>, <span class="ruby-string">'hooks'</span>, <span class="ruby-string">'post-receive'</span>) - <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">hook_path</span>) <span class="ruby-keyword">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">hook_path</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-http_url_to_repo"> - - <b>http_url_to_repo</b>() - - <a href="../classes/Repository.html#method-i-http_url_to_repo" name="method-i-http_url_to_repo" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-http_url_to_repo_source')" id="l_method-i-http_url_to_repo_source">show</a> - - </p> - <div id="method-i-http_url_to_repo_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 201</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">http_url_to_repo</span> - <span class="ruby-identifier">http_url</span> = [<span class="ruby-constant">Gitlab</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">gitlab</span>.<span class="ruby-identifier">url</span>, <span class="ruby-string">"/"</span>, <span class="ruby-identifier">path_with_namespace</span>, <span class="ruby-string">".git"</span>].<span class="ruby-identifier">join</span>(<span class="ruby-string">''</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-last_commit_for"> - - <b>last_commit_for</b>(ref, path = nil) - - <a href="../classes/Repository.html#method-i-last_commit_for" name="method-i-last_commit_for" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-last_commit_for_source')" id="l_method-i-last_commit_for_source">show</a> - - </p> - <div id="method-i-last_commit_for_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 35</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">last_commit_for</span>(<span class="ruby-identifier">ref</span>, <span class="ruby-identifier">path</span> = <span class="ruby-keyword">nil</span>) - <span class="ruby-identifier">commits</span>(<span class="ruby-identifier">ref</span>, <span class="ruby-identifier">path</span>, <span class="ruby-number">1</span>).<span class="ruby-identifier">first</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-namespace_dir"> - - <b>namespace_dir</b>() - - <a href="../classes/Repository.html#method-i-namespace_dir" name="method-i-namespace_dir" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-namespace_dir_source')" id="l_method-i-namespace_dir_source">show</a> - - </p> - <div id="method-i-namespace_dir_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 103</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">namespace_dir</span> - <span class="ruby-identifier">namespace</span>.<span class="ruby-identifier">try</span>(<span class="ruby-value">:path</span>) <span class="ruby-operator">||</span> <span class="ruby-string">''</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-open_branches"> - - <b>open_branches</b>() - - <a href="../classes/Repository.html#method-i-open_branches" name="method-i-open_branches" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-open_branches_source')" id="l_method-i-open_branches_source">show</a> - - </p> - <div id="method-i-open_branches_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 131</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">open_branches</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">protected_branches</span>.<span class="ruby-identifier">empty?</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">repo</span>.<span class="ruby-identifier">heads</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">pnames</span> = <span class="ruby-identifier">protected_branches</span>.<span class="ruby-identifier">map</span>(&<span class="ruby-value">:name</span>) - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">repo</span>.<span class="ruby-identifier">heads</span>.<span class="ruby-identifier">reject</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">h</span><span class="ruby-operator">|</span> <span class="ruby-identifier">pnames</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">h</span>.<span class="ruby-identifier">name</span>) } - <span class="ruby-keyword">end</span>.<span class="ruby-identifier">sort_by</span>(&<span class="ruby-value">:name</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-path_to_repo"> - - <b>path_to_repo</b>() - - <a href="../classes/Repository.html#method-i-path_to_repo" name="method-i-path_to_repo" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-path_to_repo_source')" id="l_method-i-path_to_repo_source">show</a> - - </p> - <div id="method-i-path_to_repo_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 99</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">path_to_repo</span> - <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">Gitlab</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">gitolite</span>.<span class="ruby-identifier">repos_path</span>, <span class="ruby-node">"#{path_with_namespace}.git"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-protected_branch-3F"> - - <b>protected_branch?</b>(branch_name) - - <a href="../classes/Repository.html#method-i-protected_branch-3F" name="method-i-protected_branch-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Check if current branch name is marked as protected in the system</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-protected_branch-3F_source')" id="l_method-i-protected_branch-3F_source">show</a> - - </p> - <div id="method-i-protected_branch-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 206</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">protected_branch?</span> <span class="ruby-identifier">branch_name</span> - <span class="ruby-identifier">protected_branches</span>.<span class="ruby-identifier">map</span>(&<span class="ruby-value">:name</span>).<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">branch_name</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-ref_names"> - - <b>ref_names</b>() - - <a href="../classes/Repository.html#method-i-ref_names" name="method-i-ref_names" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Returns an Array of branch and tag names</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-ref_names_source')" id="l_method-i-ref_names_source">show</a> - - </p> - <div id="method-i-ref_names_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 87</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">ref_names</span> - [<span class="ruby-identifier">branch_names</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">tag_names</span>].<span class="ruby-identifier">flatten</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-repo"> - - <b>repo</b>() - - <a href="../classes/Repository.html#method-i-repo" name="method-i-repo" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-repo_source')" id="l_method-i-repo_source">show</a> - - </p> - <div id="method-i-repo_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 91</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">repo</span> - <span class="ruby-ivar">@repo</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Grit</span><span class="ruby-operator">::</span><span class="ruby-constant">Repo</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">path_to_repo</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-repo_exists-3F"> - - <b>repo_exists?</b>() - - <a href="../classes/Repository.html#method-i-repo_exists-3F" name="method-i-repo_exists-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-repo_exists-3F_source')" id="l_method-i-repo_exists-3F_source">show</a> - - </p> - <div id="method-i-repo_exists-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 115</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">repo_exists?</span> - <span class="ruby-ivar">@repo_exists</span> <span class="ruby-operator">||=</span> (<span class="ruby-identifier">repo</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">repo</span>.<span class="ruby-identifier">branches</span>.<span class="ruby-identifier">empty?</span>) -<span class="ruby-keyword">rescue</span> - <span class="ruby-ivar">@repo_exists</span> = <span class="ruby-keyword">false</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-root_ref"> - - <b>root_ref</b>() - - <a href="../classes/Repository.html#method-i-root_ref" name="method-i-root_ref" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-root_ref_source')" id="l_method-i-root_ref_source">show</a> - - </p> - <div id="method-i-root_ref_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 162</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">root_ref</span> - <span class="ruby-identifier">default_branch</span> <span class="ruby-operator">||</span> <span class="ruby-string">"master"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-root_ref-3F"> - - <b>root_ref?</b>(branch) - - <a href="../classes/Repository.html#method-i-root_ref-3F" name="method-i-root_ref-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-root_ref-3F_source')" id="l_method-i-root_ref-3F_source">show</a> - - </p> - <div id="method-i-root_ref-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 166</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">root_ref?</span>(<span class="ruby-identifier">branch</span>) - <span class="ruby-identifier">root_ref</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">branch</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-satellite"> - - <b>satellite</b>() - - <a href="../classes/Repository.html#method-i-satellite" name="method-i-satellite" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-satellite_source')" id="l_method-i-satellite_source">show</a> - - </p> - <div id="method-i-satellite_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 43</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">satellite</span> - <span class="ruby-ivar">@satellite</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">Satellite</span><span class="ruby-operator">::</span><span class="ruby-constant">Satellite</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword">self</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-ssh_url_to_repo"> - - <b>ssh_url_to_repo</b>() - - <a href="../classes/Repository.html#method-i-ssh_url_to_repo" name="method-i-ssh_url_to_repo" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-ssh_url_to_repo_source')" id="l_method-i-ssh_url_to_repo_source">show</a> - - </p> - <div id="method-i-ssh_url_to_repo_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 197</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">ssh_url_to_repo</span> - <span class="ruby-identifier">url_to_repo</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-tag_names"> - - <b>tag_names</b>() - - <a href="../classes/Repository.html#method-i-tag_names" name="method-i-tag_names" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Returns an Array of tag names</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-tag_names_source')" id="l_method-i-tag_names_source">show</a> - - </p> - <div id="method-i-tag_names_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 77</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">tag_names</span> - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">tags</span>.<span class="ruby-identifier">collect</span>(&<span class="ruby-value">:name</span>).<span class="ruby-identifier">sort</span>.<span class="ruby-identifier">reverse</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-tags"> - - <b>tags</b>() - - <a href="../classes/Repository.html#method-i-tags" name="method-i-tags" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Returns an Array of Tags</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-tags_source')" id="l_method-i-tags_source">show</a> - - </p> - <div id="method-i-tags_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 82</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">tags</span> - <span class="ruby-identifier">repo</span>.<span class="ruby-identifier">tags</span>.<span class="ruby-identifier">sort_by</span>(&<span class="ruby-value">:name</span>).<span class="ruby-identifier">reverse</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-tree"> - - <b>tree</b>(fcommit, path = nil) - - <a href="../classes/Repository.html#method-i-tree" name="method-i-tree" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-tree_source')" id="l_method-i-tree_source">show</a> - - </p> - <div id="method-i-tree_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 125</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">tree</span>(<span class="ruby-identifier">fcommit</span>, <span class="ruby-identifier">path</span> = <span class="ruby-keyword">nil</span>) - <span class="ruby-identifier">fcommit</span> = <span class="ruby-identifier">commit</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">fcommit</span> <span class="ruby-operator">==</span> <span class="ruby-value">:head</span> - <span class="ruby-identifier">tree</span> = <span class="ruby-identifier">fcommit</span>.<span class="ruby-identifier">tree</span> - <span class="ruby-identifier">path</span> <span class="ruby-operator">?</span> (<span class="ruby-identifier">tree</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">path</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">tree</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update_repository"> - - <b>update_repository</b>() - - <a href="../classes/Repository.html#method-i-update_repository" name="method-i-update_repository" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_repository_source')" id="l_method-i-update_repository_source">show</a> - - </p> - <div id="method-i-update_repository_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 107</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update_repository</span> - <span class="ruby-identifier">git_host</span>.<span class="ruby-identifier">update_repository</span>(<span class="ruby-keyword">self</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-url_to_repo"> - - <b>url_to_repo</b>() - - <a href="../classes/Repository.html#method-i-url_to_repo" name="method-i-url_to_repo" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-url_to_repo_source')" id="l_method-i-url_to_repo_source">show</a> - - </p> - <div id="method-i-url_to_repo_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 95</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">url_to_repo</span> - <span class="ruby-identifier">git_host</span>.<span class="ruby-identifier">url_to_repo</span>(<span class="ruby-identifier">path_with_namespace</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-valid_hook_file"> - - <b>valid_hook_file</b>() - - <a href="../classes/Repository.html#method-i-valid_hook_file" name="method-i-valid_hook_file" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-valid_hook_file_source')" id="l_method-i-valid_hook_file_source">show</a> - - </p> - <div id="method-i-valid_hook_file_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 55</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">valid_hook_file</span> - <span class="ruby-ivar">@valid_hook_file</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-constant">Rails</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">'lib'</span>, <span class="ruby-string">'hooks'</span>, <span class="ruby-string">'post-receive'</span>)) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-valid_post_receive_file-3F"> - - <b>valid_post_receive_file?</b>() - - <a href="../classes/Repository.html#method-i-valid_post_receive_file-3F" name="method-i-valid_post_receive_file-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-valid_post_receive_file-3F_source')" id="l_method-i-valid_post_receive_file-3F_source">show</a> - - </p> - <div id="method-i-valid_post_receive_file-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 51</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">valid_post_receive_file?</span> - <span class="ruby-identifier">valid_hook_file</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">hook_file</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-valid_repo-3F"> - - <b>valid_repo?</b>() - - <a href="../classes/Repository.html#method-i-valid_repo-3F" name="method-i-valid_repo-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-valid_repo-3F_source')" id="l_method-i-valid_repo-3F_source">show</a> - - </p> - <div id="method-i-valid_repo-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/repository.rb, line 4</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">valid_repo?</span> - <span class="ruby-identifier">repo</span> -<span class="ruby-keyword">rescue</span> - <span class="ruby-identifier">errors</span>.<span class="ruby-identifier">add</span>(<span class="ruby-value">:path</span>, <span class="ruby-string">"Invalid repository path"</span>) - <span class="ruby-keyword">false</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ResqueAuthentication.html b/doc/code/classes/ResqueAuthentication.html deleted file mode 100644 index ec3fc9e470f..00000000000 --- a/doc/code/classes/ResqueAuthentication.html +++ /dev/null @@ -1,182 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ResqueAuthentication</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - ResqueAuthentication - - <span class="parent">< - - <a href="Object.html">Object</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/config/initializers/4_resque_rb.html">config/initializers/4_resque.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-call">call</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-new">new</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-new"> - - <b>new</b>(app) - - <a href="../classes/ResqueAuthentication.html#method-c-new" name="method-c-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a> - - </p> - <div id="method-c-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File config/initializers/4_resque.rb, line 14</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span>(<span class="ruby-identifier">app</span>) - <span class="ruby-ivar">@app</span> = <span class="ruby-identifier">app</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-call"> - - <b>call</b>(env) - - <a href="../classes/ResqueAuthentication.html#method-i-call" name="method-i-call" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-call_source')" id="l_method-i-call_source">show</a> - - </p> - <div id="method-i-call_source" class="dyn-source"> - <pre><span class="ruby-comment"># File config/initializers/4_resque.rb, line 18</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">call</span>(<span class="ruby-identifier">env</span>) - <span class="ruby-identifier">account</span> = <span class="ruby-identifier">env</span>[<span class="ruby-string">'warden'</span>].<span class="ruby-identifier">authenticate!</span>(<span class="ruby-value">:database_authenticatable</span>, <span class="ruby-value">:rememberable</span>, <span class="ruby-identifier">scope</span><span class="ruby-operator">:</span> <span class="ruby-value">:user</span>) - <span class="ruby-identifier">raise</span> <span class="ruby-string">"Access denied"</span> <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">account</span>.<span class="ruby-identifier">admin?</span> - <span class="ruby-ivar">@app</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">env</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/SearchContext.html b/doc/code/classes/SearchContext.html deleted file mode 100644 index b8ecb2e716d..00000000000 --- a/doc/code/classes/SearchContext.html +++ /dev/null @@ -1,262 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>SearchContext</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - SearchContext - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/contexts/search_context_rb.html">app/contexts/search_context.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-execute">execute</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-new">new</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-result">result</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>params</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>project_ids</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-new"> - - <b>new</b>(project_ids, params) - - <a href="../classes/SearchContext.html#method-c-new" name="method-c-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a> - - </p> - <div id="method-c-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/contexts/search_context.rb, line 4</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span>(<span class="ruby-identifier">project_ids</span>, <span class="ruby-identifier">params</span>) - <span class="ruby-ivar">@project_ids</span>, <span class="ruby-ivar">@params</span> = <span class="ruby-identifier">project_ids</span>, <span class="ruby-identifier">params</span>.<span class="ruby-identifier">dup</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-execute"> - - <b>execute</b>() - - <a href="../classes/SearchContext.html#method-i-execute" name="method-i-execute" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-execute_source')" id="l_method-i-execute_source">show</a> - - </p> - <div id="method-i-execute_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/contexts/search_context.rb, line 8</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">execute</span> - <span class="ruby-identifier">query</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">:search</span>] - - <span class="ruby-keyword">return</span> <span class="ruby-identifier">result</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">query</span>.<span class="ruby-identifier">present?</span> - - <span class="ruby-identifier">result</span>[<span class="ruby-value">:projects</span>] = <span class="ruby-constant">Project</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">project_ids</span>).<span class="ruby-identifier">search</span>(<span class="ruby-identifier">query</span>).<span class="ruby-identifier">limit</span>(<span class="ruby-number">10</span>) - <span class="ruby-identifier">result</span>[<span class="ruby-value">:merge_requests</span>] = <span class="ruby-constant">MergeRequest</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">project_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">project_ids</span>).<span class="ruby-identifier">search</span>(<span class="ruby-identifier">query</span>).<span class="ruby-identifier">limit</span>(<span class="ruby-number">10</span>) - <span class="ruby-identifier">result</span>[<span class="ruby-value">:issues</span>] = <span class="ruby-constant">Issue</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">project_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">project_ids</span>).<span class="ruby-identifier">search</span>(<span class="ruby-identifier">query</span>).<span class="ruby-identifier">limit</span>(<span class="ruby-number">10</span>) - <span class="ruby-identifier">result</span>[<span class="ruby-value">:wiki_pages</span>] = <span class="ruby-constant">Wiki</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">project_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">project_ids</span>).<span class="ruby-identifier">search</span>(<span class="ruby-identifier">query</span>).<span class="ruby-identifier">limit</span>(<span class="ruby-number">10</span>) - <span class="ruby-identifier">result</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-result"> - - <b>result</b>() - - <a href="../classes/SearchContext.html#method-i-result" name="method-i-result" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-result_source')" id="l_method-i-result_source">show</a> - - </p> - <div id="method-i-result_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/contexts/search_context.rb, line 20</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">result</span> - <span class="ruby-ivar">@result</span> <span class="ruby-operator">||=</span> { - <span class="ruby-identifier">projects</span><span class="ruby-operator">:</span> [], - <span class="ruby-identifier">merge_requests</span><span class="ruby-operator">:</span> [], - <span class="ruby-identifier">issues</span><span class="ruby-operator">:</span> [], - <span class="ruby-identifier">wiki_pages</span><span class="ruby-operator">:</span> [] - } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/SearchController.html b/doc/code/classes/SearchController.html deleted file mode 100644 index 5f26c934c5a..00000000000 --- a/doc/code/classes/SearchController.html +++ /dev/null @@ -1,136 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>SearchController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - SearchController - - <span class="parent">< - - <a href="ApplicationController.html">ApplicationController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/search_controller_rb.html">app/controllers/search_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-show">show</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-show"> - - <b>show</b>() - - <a href="../classes/SearchController.html#method-i-show" name="method-i-show" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a> - - </p> - <div id="method-i-show_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/search_controller.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span> - <span class="ruby-identifier">result</span> = <span class="ruby-constant">SearchContext</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">current_user</span>.<span class="ruby-identifier">project_ids</span>, <span class="ruby-identifier">params</span>).<span class="ruby-identifier">execute</span> - - <span class="ruby-ivar">@projects</span> = <span class="ruby-identifier">result</span>[<span class="ruby-value">:projects</span>] - <span class="ruby-ivar">@merge_requests</span> = <span class="ruby-identifier">result</span>[<span class="ruby-value">:merge_requests</span>] - <span class="ruby-ivar">@issues</span> = <span class="ruby-identifier">result</span>[<span class="ruby-value">:issues</span>] - <span class="ruby-ivar">@wiki_pages</span> = <span class="ruby-identifier">result</span>[<span class="ruby-value">:wiki_pages</span>] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Service.html b/doc/code/classes/Service.html deleted file mode 100644 index f4973cb37f6..00000000000 --- a/doc/code/classes/Service.html +++ /dev/null @@ -1,94 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Service</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Service - - <span class="parent">< - - ActiveRecord::Base - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/models/service_rb.html">app/models/service.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<h2 id="label-Schema+Information">Schema Information</h2> - -<p>Table name: services</p> - -<pre>id :integer not null, primary key -type :string(255) -title :string(255) -token :string(255) -project_id :integer not null -created_at :datetime not null -updated_at :datetime not null -active :boolean default(FALSE), not null -project_url :string(255)</pre> - - </div> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ServiceHook.html b/doc/code/classes/ServiceHook.html deleted file mode 100644 index faff9256de2..00000000000 --- a/doc/code/classes/ServiceHook.html +++ /dev/null @@ -1,92 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ServiceHook</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - ServiceHook - - <span class="parent">< - - <a href="WebHook.html">WebHook</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/models/service_hook_rb.html">app/models/service_hook.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<h2 id="label-Schema+Information">Schema Information</h2> - -<p>Table name: web_hooks</p> - -<pre>id :integer not null, primary key -url :string(255) -project_id :integer -created_at :datetime not null -updated_at :datetime not null -type :string(255) default("ProjectHook") -service_id :integer</pre> - - </div> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!-- Methods --> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/ServicesController.html b/doc/code/classes/ServicesController.html deleted file mode 100644 index c0165b096d7..00000000000 --- a/doc/code/classes/ServicesController.html +++ /dev/null @@ -1,287 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>ServicesController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - ServicesController - - <span class="parent">< - - <a href="ProjectResourceController.html">ProjectResourceController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/services_controller_rb.html">app/controllers/services_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-edit">edit</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-index">index</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-test">test</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-update">update</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-edit"> - - <b>edit</b>() - - <a href="../classes/ServicesController.html#method-i-edit" name="method-i-edit" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-edit_source')" id="l_method-i-edit_source">show</a> - - </p> - <div id="method-i-edit_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/services_controller.rb, line 11</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">edit</span> - <span class="ruby-ivar">@service</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">gitlab_ci_service</span> - - <span class="ruby-comment"># Create if missing</span> - <span class="ruby-ivar">@service</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">create_gitlab_ci_service</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@service</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-index"> - - <b>index</b>() - - <a href="../classes/ServicesController.html#method-i-index" name="method-i-index" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-index_source')" id="l_method-i-index_source">show</a> - - </p> - <div id="method-i-index_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/services_controller.rb, line 7</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">index</span> - <span class="ruby-ivar">@gitlab_ci_service</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">gitlab_ci_service</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-test"> - - <b>test</b>() - - <a href="../classes/ServicesController.html#method-i-test" name="method-i-test" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-test_source')" id="l_method-i-test_source">show</a> - - </p> - <div id="method-i-test_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/services_controller.rb, line 28</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">test</span> - <span class="ruby-identifier">commits</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">commits</span>(<span class="ruby-identifier">project</span>.<span class="ruby-identifier">default_branch</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-number">3</span>) - <span class="ruby-identifier">data</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">post_receive_data</span>(<span class="ruby-identifier">commits</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">commits</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">id</span>, <span class="ruby-node">"refs/heads/#{project.default_branch}"</span>, <span class="ruby-identifier">current_user</span>) - - <span class="ruby-ivar">@service</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">gitlab_ci_service</span> - <span class="ruby-ivar">@service</span>.<span class="ruby-identifier">execute</span>(<span class="ruby-identifier">data</span>) - - <span class="ruby-identifier">redirect_to</span> <span class="ruby-value">:back</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update"> - - <b>update</b>() - - <a href="../classes/ServicesController.html#method-i-update" name="method-i-update" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_source')" id="l_method-i-update_source">show</a> - - </p> - <div id="method-i-update_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/services_controller.rb, line 18</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update</span> - <span class="ruby-ivar">@service</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">gitlab_ci_service</span> - - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@service</span>.<span class="ruby-identifier">update_attributes</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:service</span>]) - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">edit_project_service_path</span>(<span class="ruby-ivar">@project</span>, <span class="ruby-value">:gitlab_ci</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">render</span> <span class="ruby-string">'edit'</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Settings.html b/doc/code/classes/Settings.html deleted file mode 100644 index 05219228dbe..00000000000 --- a/doc/code/classes/Settings.html +++ /dev/null @@ -1,131 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Settings</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Settings - - <span class="parent">< - - Settingslogic - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/config/initializers/1_settings_rb.html">config/initializers/1_settings.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>G</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-gitlab_on_non_standard_port-3F">gitlab_on_non_standard_port?</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-gitlab_on_non_standard_port-3F"> - - <b>gitlab_on_non_standard_port?</b>() - - <a href="../classes/Settings.html#method-c-gitlab_on_non_standard_port-3F" name="method-c-gitlab_on_non_standard_port-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-gitlab_on_non_standard_port-3F_source')" id="l_method-c-gitlab_on_non_standard_port-3F_source">show</a> - - </p> - <div id="method-c-gitlab_on_non_standard_port-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File config/initializers/1_settings.rb, line 5</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">gitlab_on_non_standard_port?</span> - <span class="ruby-operator">!</span>[<span class="ruby-number">443</span>, <span class="ruby-number">80</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">gitlab</span>.<span class="ruby-identifier">port</span>.<span class="ruby-identifier">to_i</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Snippet.html b/doc/code/classes/Snippet.html deleted file mode 100644 index a71f13165fc..00000000000 --- a/doc/code/classes/Snippet.html +++ /dev/null @@ -1,402 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Snippet</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Snippet - - <span class="parent">< - - ActiveRecord::Base - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/models/snippet_rb.html">app/models/snippet.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<h2 id="label-Schema+Information">Schema Information</h2> - -<p>Table name: snippets</p> - -<pre>id :integer not null, primary key -title :string(255) -content :text -author_id :integer not null -project_id :integer not null -created_at :datetime not null -updated_at :datetime not null -file_name :string(255) -expires_at :datetime</pre> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-content_types">content_types</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-data">data</a> - </li> - - </ul> - </dd> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-expired-3F">expired?</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-mode">mode</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-name">name</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-size">size</a> - </li> - - </ul> - </dd> - - </dl> - - - - <!-- Includes --> - <div class="sectiontitle">Included Modules</div> - <ul> - - <li> - - Linguist::BlobHelper - - </li> - - </ul> - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-content_types"> - - <b>content_types</b>() - - <a href="../classes/Snippet.html#method-c-content_types" name="method-c-content_types" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-content_types_source')" id="l_method-c-content_types_source">show</a> - - </p> - <div id="method-c-content_types_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/snippet.rb, line 38</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">content_types</span> - [ - <span class="ruby-string">".rb"</span>, <span class="ruby-string">".py"</span>, <span class="ruby-string">".pl"</span>, <span class="ruby-string">".scala"</span>, <span class="ruby-string">".c"</span>, <span class="ruby-string">".cpp"</span>, <span class="ruby-string">".java"</span>, - <span class="ruby-string">".haml"</span>, <span class="ruby-string">".html"</span>, <span class="ruby-string">".sass"</span>, <span class="ruby-string">".scss"</span>, <span class="ruby-string">".xml"</span>, <span class="ruby-string">".php"</span>, <span class="ruby-string">".erb"</span>, - <span class="ruby-string">".js"</span>, <span class="ruby-string">".sh"</span>, <span class="ruby-string">".coffee"</span>, <span class="ruby-string">".yml"</span>, <span class="ruby-string">".md"</span> - ] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-data"> - - <b>data</b>() - - <a href="../classes/Snippet.html#method-i-data" name="method-i-data" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-data_source')" id="l_method-i-data_source">show</a> - - </p> - <div id="method-i-data_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/snippet.rb, line 46</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">data</span> - <span class="ruby-identifier">content</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-expired-3F"> - - <b>expired?</b>() - - <a href="../classes/Snippet.html#method-i-expired-3F" name="method-i-expired-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-expired-3F_source')" id="l_method-i-expired-3F_source">show</a> - - </p> - <div id="method-i-expired-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/snippet.rb, line 62</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">expired?</span> - <span class="ruby-identifier">expires_at</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">expires_at</span> <span class="ruby-operator"><</span> <span class="ruby-constant">Time</span>.<span class="ruby-identifier">current</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-mode"> - - <b>mode</b>() - - <a href="../classes/Snippet.html#method-i-mode" name="method-i-mode" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-mode_source')" id="l_method-i-mode_source">show</a> - - </p> - <div id="method-i-mode_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/snippet.rb, line 58</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">mode</span> - <span class="ruby-keyword">nil</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-name"> - - <b>name</b>() - - <a href="../classes/Snippet.html#method-i-name" name="method-i-name" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-name_source')" id="l_method-i-name_source">show</a> - - </p> - <div id="method-i-name_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/snippet.rb, line 54</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">name</span> - <span class="ruby-identifier">file_name</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-size"> - - <b>size</b>() - - <a href="../classes/Snippet.html#method-i-size" name="method-i-size" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-size_source')" id="l_method-i-size_source">show</a> - - </p> - <div id="method-i-size_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/snippet.rb, line 50</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">size</span> - <span class="ruby-number">0</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/SnippetsController.html b/doc/code/classes/SnippetsController.html deleted file mode 100644 index fd7e0fe6d19..00000000000 --- a/doc/code/classes/SnippetsController.html +++ /dev/null @@ -1,611 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>SnippetsController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - SnippetsController - - <span class="parent">< - - <a href="ProjectResourceController.html">ProjectResourceController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/snippets_controller_rb.html">app/controllers/snippets_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-authorize_admin_snippet-21">authorize_admin_snippet!</a>, - </li> - - - <li> - <a href="#method-i-authorize_modify_snippet-21">authorize_modify_snippet!</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-create">create</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-destroy">destroy</a> - </li> - - </ul> - </dd> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-edit">edit</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-index">index</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-new">new</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-raw">raw</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-show">show</a>, - </li> - - - <li> - <a href="#method-i-snippet">snippet</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-update">update</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-create"> - - <b>create</b>() - - <a href="../classes/SnippetsController.html#method-i-create" name="method-i-create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-create_source')" id="l_method-i-create_source">show</a> - - </p> - <div id="method-i-create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/snippets_controller.rb, line 26</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">create</span> - <span class="ruby-ivar">@snippet</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">snippets</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:snippet</span>]) - <span class="ruby-ivar">@snippet</span>.<span class="ruby-identifier">author</span> = <span class="ruby-identifier">current_user</span> - <span class="ruby-ivar">@snippet</span>.<span class="ruby-identifier">save</span> - - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@snippet</span>.<span class="ruby-identifier">valid?</span> - <span class="ruby-identifier">redirect_to</span> [<span class="ruby-ivar">@project</span>, <span class="ruby-ivar">@snippet</span>] - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">respond_with</span>(<span class="ruby-ivar">@snippet</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-destroy"> - - <b>destroy</b>() - - <a href="../classes/SnippetsController.html#method-i-destroy" name="method-i-destroy" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-destroy_source')" id="l_method-i-destroy_source">show</a> - - </p> - <div id="method-i-destroy_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/snippets_controller.rb, line 55</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">destroy</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">access_denied!</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-value">:admin_snippet</span>, <span class="ruby-ivar">@snippet</span>) - - <span class="ruby-ivar">@snippet</span>.<span class="ruby-identifier">destroy</span> - - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">project_snippets_path</span>(<span class="ruby-ivar">@project</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-edit"> - - <b>edit</b>() - - <a href="../classes/SnippetsController.html#method-i-edit" name="method-i-edit" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-edit_source')" id="l_method-i-edit_source">show</a> - - </p> - <div id="method-i-edit_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/snippets_controller.rb, line 38</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">edit</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-index"> - - <b>index</b>() - - <a href="../classes/SnippetsController.html#method-i-index" name="method-i-index" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-index_source')" id="l_method-i-index_source">show</a> - - </p> - <div id="method-i-index_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/snippets_controller.rb, line 18</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">index</span> - <span class="ruby-ivar">@snippets</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">snippets</span>.<span class="ruby-identifier">fresh</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-new"> - - <b>new</b>() - - <a href="../classes/SnippetsController.html#method-i-new" name="method-i-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-new_source')" id="l_method-i-new_source">show</a> - - </p> - <div id="method-i-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/snippets_controller.rb, line 22</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">new</span> - <span class="ruby-ivar">@snippet</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">snippets</span>.<span class="ruby-identifier">new</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-raw"> - - <b>raw</b>() - - <a href="../classes/SnippetsController.html#method-i-raw" name="method-i-raw" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-raw_source')" id="l_method-i-raw_source">show</a> - - </p> - <div id="method-i-raw_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/snippets_controller.rb, line 63</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">raw</span> - <span class="ruby-identifier">send_data</span>( - <span class="ruby-ivar">@snippet</span>.<span class="ruby-identifier">content</span>, - <span class="ruby-identifier">type</span><span class="ruby-operator">:</span> <span class="ruby-string">"text/plain"</span>, - <span class="ruby-identifier">disposition</span><span class="ruby-operator">:</span> <span class="ruby-string">'inline'</span>, - <span class="ruby-identifier">filename</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@snippet</span>.<span class="ruby-identifier">file_name</span> - ) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-show"> - - <b>show</b>() - - <a href="../classes/SnippetsController.html#method-i-show" name="method-i-show" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a> - - </p> - <div id="method-i-show_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/snippets_controller.rb, line 51</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span> - <span class="ruby-ivar">@note</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">notes</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">noteable</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@snippet</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update"> - - <b>update</b>() - - <a href="../classes/SnippetsController.html#method-i-update" name="method-i-update" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_source')" id="l_method-i-update_source">show</a> - - </p> - <div id="method-i-update_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/snippets_controller.rb, line 41</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update</span> - <span class="ruby-ivar">@snippet</span>.<span class="ruby-identifier">update_attributes</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:snippet</span>]) - - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@snippet</span>.<span class="ruby-identifier">valid?</span> - <span class="ruby-identifier">redirect_to</span> [<span class="ruby-ivar">@project</span>, <span class="ruby-ivar">@snippet</span>] - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">respond_with</span>(<span class="ruby-ivar">@snippet</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-authorize_admin_snippet-21"> - - <b>authorize_admin_snippet!</b>() - - <a href="../classes/SnippetsController.html#method-i-authorize_admin_snippet-21" name="method-i-authorize_admin_snippet-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-authorize_admin_snippet-21_source')" id="l_method-i-authorize_admin_snippet-21_source">show</a> - - </p> - <div id="method-i-authorize_admin_snippet-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/snippets_controller.rb, line 82</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">authorize_admin_snippet!</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">render_404</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-value">:admin_snippet</span>, <span class="ruby-ivar">@snippet</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-authorize_modify_snippet-21"> - - <b>authorize_modify_snippet!</b>() - - <a href="../classes/SnippetsController.html#method-i-authorize_modify_snippet-21" name="method-i-authorize_modify_snippet-21" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-authorize_modify_snippet-21_source')" id="l_method-i-authorize_modify_snippet-21_source">show</a> - - </p> - <div id="method-i-authorize_modify_snippet-21_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/snippets_controller.rb, line 78</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">authorize_modify_snippet!</span> - <span class="ruby-keyword">return</span> <span class="ruby-identifier">render_404</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-value">:modify_snippet</span>, <span class="ruby-ivar">@snippet</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-snippet"> - - <b>snippet</b>() - - <a href="../classes/SnippetsController.html#method-i-snippet" name="method-i-snippet" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-snippet_source')" id="l_method-i-snippet_source">show</a> - - </p> - <div id="method-i-snippet_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/snippets_controller.rb, line 74</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">snippet</span> - <span class="ruby-ivar">@snippet</span> <span class="ruby-operator">||=</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">snippets</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/SnippetsHelper.html b/doc/code/classes/SnippetsHelper.html deleted file mode 100644 index 4230a0cce79..00000000000 --- a/doc/code/classes/SnippetsHelper.html +++ /dev/null @@ -1,131 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>SnippetsHelper</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - SnippetsHelper - - </h1> - <ul class="files"> - - <li><a href="../files/app/helpers/snippets_helper_rb.html">app/helpers/snippets_helper.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-lifetime_select_options">lifetime_select_options</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-lifetime_select_options"> - - <b>lifetime_select_options</b>() - - <a href="../classes/SnippetsHelper.html#method-i-lifetime_select_options" name="method-i-lifetime_select_options" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-lifetime_select_options_source')" id="l_method-i-lifetime_select_options_source">show</a> - - </p> - <div id="method-i-lifetime_select_options_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/snippets_helper.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">lifetime_select_options</span> - <span class="ruby-identifier">options</span> = [ - [<span class="ruby-string">'forever'</span>, <span class="ruby-keyword">nil</span>], - [<span class="ruby-string">'1 day'</span>, <span class="ruby-node">"#{Date.current + 1.day}"</span>], - [<span class="ruby-string">'1 week'</span>, <span class="ruby-node">"#{Date.current + 1.week}"</span>], - [<span class="ruby-string">'1 month'</span>, <span class="ruby-node">"#{Date.current + 1.month}"</span>] - ] - <span class="ruby-identifier">options_for_select</span>(<span class="ruby-identifier">options</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/StaticModel.html b/doc/code/classes/StaticModel.html deleted file mode 100644 index 46ead77607d..00000000000 --- a/doc/code/classes/StaticModel.html +++ /dev/null @@ -1,377 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>StaticModel</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - StaticModel - - </h1> - <ul class="files"> - - <li><a href="../files/app/roles/static_model_rb.html">app/roles/static_model.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>Provides an ActiveRecord-like interface to a model whose data is not -persisted to a database.</p> - - </div> - - - - - - - - - - - - <!-- Namespace --> - <div class="sectiontitle">Namespace</div> - <ul> - - <li> - <span class="type">MODULE</span> - <a href="StaticModel/ClassMethods.html">StaticModel::ClassMethods</a> - </li> - - </ul> - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>#</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-3D-3D">==</a>, - </li> - - - <li> - <a href="#method-i-5B-5D">[]</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-destroyed-3F">destroyed?</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-new_record-3F">new_record?</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-persisted-3F">persisted?</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_param">to_param</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-3D-3D"> - - <b>==</b>(other) - - <a href="../classes/StaticModel.html#method-i-3D-3D" name="method-i-3D-3D" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-3D-3D_source')" id="l_method-i-3D-3D_source">show</a> - - </p> - <div id="method-i-3D-3D_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/static_model.rb, line 40</span> -<span class="ruby-keyword">def</span> <span class="ruby-operator">==</span>(<span class="ruby-keyword ruby-title">other</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">StaticModel</span> - <span class="ruby-identifier">id</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">id</span> - <span class="ruby-keyword">else</span> - <span class="ruby-keyword">super</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-5B-5D"> - - <b>[]</b>(key) - - <a href="../classes/StaticModel.html#method-i-5B-5D" name="method-i-5B-5D" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Used by AR for fetching attributes</p> - -<p>Pass it along if we respond to it.</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-5B-5D_source')" id="l_method-i-5B-5D_source">show</a> - - </p> - <div id="method-i-5B-5D_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/static_model.rb, line 20</span> -<span class="ruby-keyword">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-keyword ruby-title">key</span>) - <span class="ruby-identifier">send</span>(<span class="ruby-identifier">key</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">key</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-destroyed-3F"> - - <b>destroyed?</b>() - - <a href="../classes/StaticModel.html#method-i-destroyed-3F" name="method-i-destroyed-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-destroyed-3F_source')" id="l_method-i-destroyed-3F_source">show</a> - - </p> - <div id="method-i-destroyed-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/static_model.rb, line 36</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">destroyed?</span> - <span class="ruby-keyword">false</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-new_record-3F"> - - <b>new_record?</b>() - - <a href="../classes/StaticModel.html#method-i-new_record-3F" name="method-i-new_record-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-new_record-3F_source')" id="l_method-i-new_record-3F_source">show</a> - - </p> - <div id="method-i-new_record-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/static_model.rb, line 28</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">new_record?</span> - <span class="ruby-keyword">false</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-persisted-3F"> - - <b>persisted?</b>() - - <a href="../classes/StaticModel.html#method-i-persisted-3F" name="method-i-persisted-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-persisted-3F_source')" id="l_method-i-persisted-3F_source">show</a> - - </p> - <div id="method-i-persisted-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/static_model.rb, line 32</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">persisted?</span> - <span class="ruby-keyword">false</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-to_param"> - - <b>to_param</b>() - - <a href="../classes/StaticModel.html#method-i-to_param" name="method-i-to_param" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_param_source')" id="l_method-i-to_param_source">show</a> - - </p> - <div id="method-i-to_param_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/static_model.rb, line 24</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_param</span> - <span class="ruby-identifier">id</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/StaticModel/ClassMethods.html b/doc/code/classes/StaticModel/ClassMethods.html deleted file mode 100644 index 38508f6d91f..00000000000 --- a/doc/code/classes/StaticModel/ClassMethods.html +++ /dev/null @@ -1,172 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>StaticModel::ClassMethods</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" /> -<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - StaticModel::ClassMethods - - </h1> - <ul class="files"> - - <li><a href="../../files/app/roles/static_model_rb.html">app/roles/static_model.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>B</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-base_class">base_class</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-primary_key">primary_key</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-base_class"> - - <b>base_class</b>() - - <a href="../../classes/StaticModel/ClassMethods.html#method-i-base_class" name="method-i-base_class" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Used by ActiveRecord’s polymorphic association to set object_type</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-base_class_source')" id="l_method-i-base_class_source">show</a> - - </p> - <div id="method-i-base_class_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/static_model.rb, line 12</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">base_class</span> - <span class="ruby-keyword">self</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-primary_key"> - - <b>primary_key</b>() - - <a href="../../classes/StaticModel/ClassMethods.html#method-i-primary_key" name="method-i-primary_key" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Used by ActiveRecord’s polymorphic association to set object_id</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-primary_key_source')" id="l_method-i-primary_key_source">show</a> - - </p> - <div id="method-i-primary_key_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/static_model.rb, line 7</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">primary_key</span> - <span class="ruby-string">'id'</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/SystemHook.html b/doc/code/classes/SystemHook.html deleted file mode 100644 index 4f1ce71fbba..00000000000 --- a/doc/code/classes/SystemHook.html +++ /dev/null @@ -1,191 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>SystemHook</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - SystemHook - - <span class="parent">< - - <a href="WebHook.html">WebHook</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/models/system_hook_rb.html">app/models/system_hook.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<h2 id="label-Schema+Information">Schema Information</h2> - -<p>Table name: web_hooks</p> - -<pre>id :integer not null, primary key -url :string(255) -project_id :integer -created_at :datetime not null -updated_at :datetime not null -type :string(255) default("ProjectHook") -service_id :integer</pre> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-all_hooks_fire">all_hooks_fire</a>, - </li> - - - <li> - <a href="#method-i-async_execute">async_execute</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-all_hooks_fire"> - - <b>all_hooks_fire</b>(data) - - <a href="../classes/SystemHook.html#method-c-all_hooks_fire" name="method-c-all_hooks_fire" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-all_hooks_fire_source')" id="l_method-c-all_hooks_fire_source">show</a> - - </p> - <div id="method-c-all_hooks_fire_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/system_hook.rb, line 15</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">all_hooks_fire</span>(<span class="ruby-identifier">data</span>) - <span class="ruby-constant">SystemHook</span>.<span class="ruby-identifier">all</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sh</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">sh</span>.<span class="ruby-identifier">async_execute</span> <span class="ruby-identifier">data</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-async_execute"> - - <b>async_execute</b>(data) - - <a href="../classes/SystemHook.html#method-i-async_execute" name="method-i-async_execute" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-async_execute_source')" id="l_method-i-async_execute_source">show</a> - - </p> - <div id="method-i-async_execute_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/system_hook.rb, line 21</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">async_execute</span>(<span class="ruby-identifier">data</span>) - <span class="ruby-constant">Resque</span>.<span class="ruby-identifier">enqueue</span>(<span class="ruby-constant">SystemHookWorker</span>, <span class="ruby-identifier">id</span>, <span class="ruby-identifier">data</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/SystemHookObserver.html b/doc/code/classes/SystemHookObserver.html deleted file mode 100644 index 24609a5c916..00000000000 --- a/doc/code/classes/SystemHookObserver.html +++ /dev/null @@ -1,227 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>SystemHookObserver</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - SystemHookObserver - - <span class="parent">< - - ActiveRecord::Observer - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/observers/system_hook_observer_rb.html">app/observers/system_hook_observer.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-after_create">after_create</a>, - </li> - - - <li> - <a href="#method-i-after_destroy">after_destroy</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-after_create"> - - <b>after_create</b>(model) - - <a href="../classes/SystemHookObserver.html#method-i-after_create" name="method-i-after_create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-after_create_source')" id="l_method-i-after_create_source">show</a> - - </p> - <div id="method-i-after_create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/system_hook_observer.rb, line 4</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">after_create</span>(<span class="ruby-identifier">model</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Project</span> - <span class="ruby-constant">SystemHook</span>.<span class="ruby-identifier">all_hooks_fire</span>({ - <span class="ruby-identifier">event_name</span><span class="ruby-operator">:</span> <span class="ruby-string">"project_create"</span>, - <span class="ruby-identifier">name</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-identifier">path</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">path</span>, - <span class="ruby-identifier">project_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">id</span>, - <span class="ruby-identifier">owner_name</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">owner</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-identifier">owner_email</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">owner</span>.<span class="ruby-identifier">email</span>, - <span class="ruby-identifier">created_at</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">created_at</span> - }) - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">User</span> - <span class="ruby-constant">SystemHook</span>.<span class="ruby-identifier">all_hooks_fire</span>({ - <span class="ruby-identifier">event_name</span><span class="ruby-operator">:</span> <span class="ruby-string">"user_create"</span>, - <span class="ruby-identifier">name</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-identifier">email</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">email</span>, - <span class="ruby-identifier">created_at</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">created_at</span> - }) - - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">UsersProject</span> - <span class="ruby-constant">SystemHook</span>.<span class="ruby-identifier">all_hooks_fire</span>({ - <span class="ruby-identifier">event_name</span><span class="ruby-operator">:</span> <span class="ruby-string">"user_add_to_team"</span>, - <span class="ruby-identifier">project_name</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">project</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-identifier">project_path</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">project</span>.<span class="ruby-identifier">path</span>, - <span class="ruby-identifier">project_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">project_id</span>, - <span class="ruby-identifier">user_name</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-identifier">user_email</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">email</span>, - <span class="ruby-identifier">project_access</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">repo_access_human</span>, - <span class="ruby-identifier">created_at</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">created_at</span> - }) - - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-after_destroy"> - - <b>after_destroy</b>(model) - - <a href="../classes/SystemHookObserver.html#method-i-after_destroy" name="method-i-after_destroy" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-after_destroy_source')" id="l_method-i-after_destroy_source">show</a> - - </p> - <div id="method-i-after_destroy_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/system_hook_observer.rb, line 38</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">after_destroy</span>(<span class="ruby-identifier">model</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Project</span> - <span class="ruby-constant">SystemHook</span>.<span class="ruby-identifier">all_hooks_fire</span>({ - <span class="ruby-identifier">event_name</span><span class="ruby-operator">:</span> <span class="ruby-string">"project_destroy"</span>, - <span class="ruby-identifier">name</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-identifier">path</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">path</span>, - <span class="ruby-identifier">project_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">id</span>, - <span class="ruby-identifier">owner_name</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">owner</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-identifier">owner_email</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">owner</span>.<span class="ruby-identifier">email</span>, - }) - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">User</span> - <span class="ruby-constant">SystemHook</span>.<span class="ruby-identifier">all_hooks_fire</span>({ - <span class="ruby-identifier">event_name</span><span class="ruby-operator">:</span> <span class="ruby-string">"user_destroy"</span>, - <span class="ruby-identifier">name</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-identifier">email</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">email</span> - }) - - <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">UsersProject</span> - <span class="ruby-constant">SystemHook</span>.<span class="ruby-identifier">all_hooks_fire</span>({ - <span class="ruby-identifier">event_name</span><span class="ruby-operator">:</span> <span class="ruby-string">"user_remove_from_team"</span>, - <span class="ruby-identifier">project_name</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">project</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-identifier">project_path</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">project</span>.<span class="ruby-identifier">path</span>, - <span class="ruby-identifier">project_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">project_id</span>, - <span class="ruby-identifier">user_name</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">name</span>, - <span class="ruby-identifier">user_email</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">email</span>, - <span class="ruby-identifier">project_access</span><span class="ruby-operator">:</span> <span class="ruby-identifier">model</span>.<span class="ruby-identifier">repo_access_human</span> - }) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/SystemHookWorker.html b/doc/code/classes/SystemHookWorker.html deleted file mode 100644 index 9c114ba6261..00000000000 --- a/doc/code/classes/SystemHookWorker.html +++ /dev/null @@ -1,131 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>SystemHookWorker</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - SystemHookWorker - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/workers/system_hook_worker_rb.html">app/workers/system_hook_worker.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-perform">perform</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-perform"> - - <b>perform</b>(hook_id, data) - - <a href="../classes/SystemHookWorker.html#method-c-perform" name="method-c-perform" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-perform_source')" id="l_method-c-perform_source">show</a> - - </p> - <div id="method-c-perform_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/workers/system_hook_worker.rb, line 4</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">perform</span>(<span class="ruby-identifier">hook_id</span>, <span class="ruby-identifier">data</span>) - <span class="ruby-constant">SystemHook</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">hook_id</span>).<span class="ruby-identifier">execute</span> <span class="ruby-identifier">data</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/TabHelper.html b/doc/code/classes/TabHelper.html deleted file mode 100644 index c7b4c7908ab..00000000000 --- a/doc/code/classes/TabHelper.html +++ /dev/null @@ -1,346 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>TabHelper</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - TabHelper - - </h1> - <ul class="files"> - - <li><a href="../files/app/helpers/tab_helper_rb.html">app/helpers/tab_helper.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>B</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-branches_tab_class">branches_tab_class</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-nav_link">nav_link</a>, - </li> - - - <li> - <a href="#method-i-nav_tab">nav_tab</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-project_tab_class">project_tab_class</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-branches_tab_class"> - - <b>branches_tab_class</b>() - - <a href="../classes/TabHelper.html#method-i-branches_tab_class" name="method-i-branches_tab_class" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-branches_tab_class_source')" id="l_method-i-branches_tab_class_source">show</a> - - </p> - <div id="method-i-branches_tab_class_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/tab_helper.rb, line 80</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">branches_tab_class</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">current_page?</span>(<span class="ruby-identifier">branches_project_repository_path</span>(<span class="ruby-ivar">@project</span>)) <span class="ruby-operator">||</span> - <span class="ruby-identifier">current_controller?</span>(<span class="ruby-value">:protected_branches</span>) <span class="ruby-operator">||</span> - <span class="ruby-identifier">current_page?</span>(<span class="ruby-identifier">project_repository_path</span>(<span class="ruby-ivar">@project</span>)) - <span class="ruby-string">'active'</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-nav_link"> - - <b>nav_link</b>(options = {}, &block) - - <a href="../classes/TabHelper.html#method-i-nav_link" name="method-i-nav_link" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Navigation link helper</p> - -<p>Returns an `li` element with an ‘active’ class if the supplied -controller(s) and/or action(s) are currently active. The content of the -element is the value passed to the block.</p> - -<p>options - The options hash used to determine if the element is “active” -(default: {})</p> - -<pre>:controller - One or more controller names to check (optional). -:action - One or more action names to check (optional). -:path - A shorthand path, such as 'dashboard#index', to check (optional). -:html_options - Extra options to be passed to the list element (optional).</pre> - -<p>block - An optional block that will become the contents of the returned</p> - -<pre>`li` element.</pre> - -<p>When both :controller and :action are specified, BOTH must match in order -to be marked as active. When only one is given, either can match.</p> - -<p>Examples</p> - -<pre class="ruby"><span class="ruby-comment"># Assuming we're on TreeController#show</span> - -<span class="ruby-comment"># Controller matches, but action doesn't</span> -<span class="ruby-identifier">nav_link</span>(<span class="ruby-identifier">controller</span><span class="ruby-operator">:</span> [:<span class="ruby-identifier">tree</span>, :<span class="ruby-identifier">refs</span>], <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> :<span class="ruby-identifier">edit</span>) { <span class="ruby-string">"Hello"</span> } -<span class="ruby-comment"># => '<li>Hello</li>'</span> - -<span class="ruby-comment"># Controller matches</span> -<span class="ruby-identifier">nav_link</span>(<span class="ruby-identifier">controller</span><span class="ruby-operator">:</span> [:<span class="ruby-identifier">tree</span>, :<span class="ruby-identifier">refs</span>]) { <span class="ruby-string">"Hello"</span> } -<span class="ruby-comment"># => '<li class="active">Hello</li>'</span> - -<span class="ruby-comment"># Shorthand path</span> -<span class="ruby-identifier">nav_link</span>(<span class="ruby-identifier">path</span><span class="ruby-operator">:</span> <span class="ruby-string">'tree#show'</span>) { <span class="ruby-string">"Hello"</span> } -<span class="ruby-comment"># => '<li class="active">Hello</li>'</span> - -<span class="ruby-comment"># Supplying custom options for the list element</span> -<span class="ruby-identifier">nav_link</span>(<span class="ruby-identifier">controller</span><span class="ruby-operator">:</span> :<span class="ruby-identifier">tree</span>, <span class="ruby-identifier">html_options</span><span class="ruby-operator">:</span> {<span class="ruby-keyword">class</span><span class="ruby-operator">:</span> <span class="ruby-string">'home'</span>}) { <span class="ruby-string">"Hello"</span> } -<span class="ruby-comment"># => '<li class="home active">Hello</li>'</span> -</pre> - -<p>Returns a list item element String</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-nav_link_source')" id="l_method-i-nav_link_source">show</a> - - </p> - <div id="method-i-nav_link_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/tab_helper.rb, line 40</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">nav_link</span>(<span class="ruby-identifier">options</span> = {}, &<span class="ruby-identifier">block</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">path</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:path</span>) - <span class="ruby-identifier">c</span>, <span class="ruby-identifier">a</span>, <span class="ruby-identifier">_</span> = <span class="ruby-identifier">path</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">'#'</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">c</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:controller</span>) - <span class="ruby-identifier">a</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:action</span>) - <span class="ruby-keyword">end</span> - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">a</span> - <span class="ruby-comment"># When given both options, make sure BOTH are active</span> - <span class="ruby-identifier">klass</span> = <span class="ruby-identifier">current_controller?</span>(*<span class="ruby-identifier">c</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">current_action?</span>(*<span class="ruby-identifier">a</span>) <span class="ruby-operator">?</span> <span class="ruby-string">'active'</span> <span class="ruby-operator">:</span> <span class="ruby-string">''</span> - <span class="ruby-keyword">else</span> - <span class="ruby-comment"># Otherwise check EITHER option</span> - <span class="ruby-identifier">klass</span> = <span class="ruby-identifier">current_controller?</span>(*<span class="ruby-identifier">c</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">current_action?</span>(*<span class="ruby-identifier">a</span>) <span class="ruby-operator">?</span> <span class="ruby-string">'active'</span> <span class="ruby-operator">:</span> <span class="ruby-string">''</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-comment"># Add our custom class into the html_options, which may or may not exist</span> - <span class="ruby-comment"># and which may or may not already have a :class key</span> - <span class="ruby-identifier">o</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:html_options</span>) <span class="ruby-operator">||</span> {} - <span class="ruby-identifier">o</span>[<span class="ruby-value">:class</span>] <span class="ruby-operator">||=</span> <span class="ruby-string">''</span> - <span class="ruby-identifier">o</span>[<span class="ruby-value">:class</span>] <span class="ruby-operator">+=</span> <span class="ruby-string">' '</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">klass</span> - <span class="ruby-identifier">o</span>[<span class="ruby-value">:class</span>].<span class="ruby-identifier">strip!</span> - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span> - <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:li</span>, <span class="ruby-identifier">capture</span>(&<span class="ruby-identifier">block</span>), <span class="ruby-identifier">o</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:li</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">o</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-nav_tab"> - - <b>nav_tab</b>(key, value, &block) - - <a href="../classes/TabHelper.html#method-i-nav_tab" name="method-i-nav_tab" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Use <a href="TabHelper.html#method-i-nav_tab">#nav_tab</a> for save -controller/action but different params</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-nav_tab_source')" id="l_method-i-nav_tab_source">show</a> - - </p> - <div id="method-i-nav_tab_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/tab_helper.rb, line 89</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">nav_tab</span> <span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>, &<span class="ruby-identifier">block</span> - <span class="ruby-identifier">o</span> = {} - <span class="ruby-identifier">o</span>[<span class="ruby-value">:class</span>] = <span class="ruby-string">""</span> - <span class="ruby-identifier">o</span>[<span class="ruby-value">:class</span>] <span class="ruby-operator"><<</span> <span class="ruby-string">" active"</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">key</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">value</span> - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span> - <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:li</span>, <span class="ruby-identifier">capture</span>(&<span class="ruby-identifier">block</span>), <span class="ruby-identifier">o</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:li</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">o</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-project_tab_class"> - - <b>project_tab_class</b>() - - <a href="../classes/TabHelper.html#method-i-project_tab_class" name="method-i-project_tab_class" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-project_tab_class_source')" id="l_method-i-project_tab_class_source">show</a> - - </p> - <div id="method-i-project_tab_class_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/tab_helper.rb, line 70</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">project_tab_class</span> - [<span class="ruby-value">:show</span>, <span class="ruby-value">:files</span>, <span class="ruby-value">:edit</span>, <span class="ruby-value">:update</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">action</span><span class="ruby-operator">|</span> - <span class="ruby-keyword">return</span> <span class="ruby-string">"active"</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">current_page?</span>(<span class="ruby-identifier">controller</span><span class="ruby-operator">:</span> <span class="ruby-string">"projects"</span>, <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-identifier">action</span>, <span class="ruby-identifier">id</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@project</span>) - <span class="ruby-keyword">end</span> - - <span class="ruby-keyword">if</span> [<span class="ruby-string">'snippets'</span>, <span class="ruby-string">'services'</span>, <span class="ruby-string">'hooks'</span>, <span class="ruby-string">'deploy_keys'</span>, <span class="ruby-string">'team_members'</span>].<span class="ruby-identifier">include?</span> <span class="ruby-identifier">controller</span>.<span class="ruby-identifier">controller_name</span> - <span class="ruby-string">"active"</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/TagsHelper.html b/doc/code/classes/TagsHelper.html deleted file mode 100644 index cf30b011b4a..00000000000 --- a/doc/code/classes/TagsHelper.html +++ /dev/null @@ -1,170 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>TagsHelper</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - TagsHelper - - </h1> - <ul class="files"> - - <li><a href="../files/app/helpers/tags_helper_rb.html">app/helpers/tags_helper.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-tag_list">tag_list</a>, - </li> - - - <li> - <a href="#method-i-tag_path">tag_path</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-tag_list"> - - <b>tag_list</b>(project) - - <a href="../classes/TagsHelper.html#method-i-tag_list" name="method-i-tag_list" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-tag_list_source')" id="l_method-i-tag_list_source">show</a> - - </p> - <div id="method-i-tag_list_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/tags_helper.rb, line 6</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">tag_list</span> <span class="ruby-identifier">project</span> - <span class="ruby-identifier">html</span> = <span class="ruby-string">''</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">tag_list</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">tag</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">html</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">link_to</span> <span class="ruby-identifier">tag</span>, <span class="ruby-identifier">tag_path</span>(<span class="ruby-identifier">tag</span>) - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">html</span>.<span class="ruby-identifier">html_safe</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-tag_path"> - - <b>tag_path</b>(tag) - - <a href="../classes/TagsHelper.html#method-i-tag_path" name="method-i-tag_path" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-tag_path_source')" id="l_method-i-tag_path_source">show</a> - - </p> - <div id="method-i-tag_path_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/tags_helper.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">tag_path</span> <span class="ruby-identifier">tag</span> - <span class="ruby-node">"/tags/#{tag}"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Team.html b/doc/code/classes/Team.html deleted file mode 100644 index 08d2c07e3c6..00000000000 --- a/doc/code/classes/Team.html +++ /dev/null @@ -1,470 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Team</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - Team - - </h1> - <ul class="files"> - - <li><a href="../files/app/roles/team_rb.html">app/roles/team.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-add_user_id_to_team">add_user_id_to_team</a>, - </li> - - - <li> - <a href="#method-i-add_user_to_team">add_user_to_team</a>, - </li> - - - <li> - <a href="#method-i-add_users_ids_to_team">add_users_ids_to_team</a>, - </li> - - - <li> - <a href="#method-i-add_users_to_team">add_users_to_team</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-delete_users_ids_from_team">delete_users_ids_from_team</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-team_member_by_id">team_member_by_id</a>, - </li> - - - <li> - <a href="#method-i-team_member_by_name_or_email">team_member_by_name_or_email</a>, - </li> - - - <li> - <a href="#method-i-truncate_team">truncate_team</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-update_users_ids_to_role">update_users_ids_to_role</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-add_user_id_to_team"> - - <b>add_user_id_to_team</b>(user_id, access_role) - - <a href="../classes/Team.html#method-i-add_user_id_to_team" name="method-i-add_user_id_to_team" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Add user to project with passed access role by user id</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-add_user_id_to_team_source')" id="l_method-i-add_user_id_to_team_source">show</a> - - </p> - <div id="method-i-add_user_id_to_team_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/team.rb, line 26</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">add_user_id_to_team</span>(<span class="ruby-identifier">user_id</span>, <span class="ruby-identifier">access_role</span>) - <span class="ruby-identifier">users_projects</span>.<span class="ruby-identifier">create</span>( - <span class="ruby-identifier">user_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">user_id</span>, - <span class="ruby-identifier">project_access</span><span class="ruby-operator">:</span> <span class="ruby-identifier">access_role</span> - ) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-add_user_to_team"> - - <b>add_user_to_team</b>(user, access_role) - - <a href="../classes/Team.html#method-i-add_user_to_team" name="method-i-add_user_to_team" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Add user to project with passed access role</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-add_user_to_team_source')" id="l_method-i-add_user_to_team_source">show</a> - - </p> - <div id="method-i-add_user_to_team_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/team.rb, line 14</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">add_user_to_team</span>(<span class="ruby-identifier">user</span>, <span class="ruby-identifier">access_role</span>) - <span class="ruby-identifier">add_user_id_to_team</span>(<span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">access_role</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-add_users_ids_to_team"> - - <b>add_users_ids_to_team</b>(users_ids, access_role) - - <a href="../classes/Team.html#method-i-add_users_ids_to_team" name="method-i-add_users_ids_to_team" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Add multiple users to project with same access role by user ids</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-add_users_ids_to_team_source')" id="l_method-i-add_users_ids_to_team_source">show</a> - - </p> - <div id="method-i-add_users_ids_to_team_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/team.rb, line 35</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">add_users_ids_to_team</span>(<span class="ruby-identifier">users_ids</span>, <span class="ruby-identifier">access_role</span>) - <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">bulk_import</span>(<span class="ruby-keyword">self</span>, <span class="ruby-identifier">users_ids</span>, <span class="ruby-identifier">access_role</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-add_users_to_team"> - - <b>add_users_to_team</b>(users, access_role) - - <a href="../classes/Team.html#method-i-add_users_to_team" name="method-i-add_users_to_team" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Add multiple users to project with same access role</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-add_users_to_team_source')" id="l_method-i-add_users_to_team_source">show</a> - - </p> - <div id="method-i-add_users_to_team_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/team.rb, line 20</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">add_users_to_team</span>(<span class="ruby-identifier">users</span>, <span class="ruby-identifier">access_role</span>) - <span class="ruby-identifier">add_users_ids_to_team</span>(<span class="ruby-identifier">users</span>.<span class="ruby-identifier">map</span>(&<span class="ruby-value">:id</span>), <span class="ruby-identifier">access_role</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-delete_users_ids_from_team"> - - <b>delete_users_ids_from_team</b>(users_ids) - - <a href="../classes/Team.html#method-i-delete_users_ids_from_team" name="method-i-delete_users_ids_from_team" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Delete multiple users from project by user ids</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-delete_users_ids_from_team_source')" id="l_method-i-delete_users_ids_from_team_source">show</a> - - </p> - <div id="method-i-delete_users_ids_from_team_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/team.rb, line 46</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">delete_users_ids_from_team</span>(<span class="ruby-identifier">users_ids</span>) - <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">bulk_delete</span>(<span class="ruby-keyword">self</span>, <span class="ruby-identifier">users_ids</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-team_member_by_id"> - - <b>team_member_by_id</b>(user_id) - - <a href="../classes/Team.html#method-i-team_member_by_id" name="method-i-team_member_by_id" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Get <a href="Team.html">Team</a> Member record by user id</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-team_member_by_id_source')" id="l_method-i-team_member_by_id_source">show</a> - - </p> - <div id="method-i-team_member_by_id_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/team.rb, line 8</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">team_member_by_id</span>(<span class="ruby-identifier">user_id</span>) - <span class="ruby-identifier">users_projects</span>.<span class="ruby-identifier">find_by_user_id</span>(<span class="ruby-identifier">user_id</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-team_member_by_name_or_email"> - - <b>team_member_by_name_or_email</b>(name = nil, email = nil) - - <a href="../classes/Team.html#method-i-team_member_by_name_or_email" name="method-i-team_member_by_name_or_email" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-team_member_by_name_or_email_source')" id="l_method-i-team_member_by_name_or_email_source">show</a> - - </p> - <div id="method-i-team_member_by_name_or_email_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/team.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">team_member_by_name_or_email</span>(<span class="ruby-identifier">name</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">email</span> = <span class="ruby-keyword">nil</span>) - <span class="ruby-identifier">user</span> = <span class="ruby-identifier">users</span>.<span class="ruby-identifier">where</span>(<span class="ruby-string">"name like ? or email like ?"</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">email</span>).<span class="ruby-identifier">first</span> - <span class="ruby-identifier">users_projects</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">user</span><span class="ruby-operator">:</span> <span class="ruby-identifier">user</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">user</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-truncate_team"> - - <b>truncate_team</b>() - - <a href="../classes/Team.html#method-i-truncate_team" name="method-i-truncate_team" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Remove all users from project team</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-truncate_team_source')" id="l_method-i-truncate_team_source">show</a> - - </p> - <div id="method-i-truncate_team_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/team.rb, line 51</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">truncate_team</span> - <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">truncate_team</span>(<span class="ruby-keyword">self</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update_users_ids_to_role"> - - <b>update_users_ids_to_role</b>(users_ids, access_role) - - <a href="../classes/Team.html#method-i-update_users_ids_to_role" name="method-i-update_users_ids_to_role" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Update multiple project users to same access role by user ids</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_users_ids_to_role_source')" id="l_method-i-update_users_ids_to_role_source">show</a> - - </p> - <div id="method-i-update_users_ids_to_role_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/team.rb, line 41</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update_users_ids_to_role</span>(<span class="ruby-identifier">users_ids</span>, <span class="ruby-identifier">access_role</span>) - <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">bulk_update</span>(<span class="ruby-keyword">self</span>, <span class="ruby-identifier">users_ids</span>, <span class="ruby-identifier">access_role</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/TeamMembersController.html b/doc/code/classes/TeamMembersController.html deleted file mode 100644 index f411dfd17ce..00000000000 --- a/doc/code/classes/TeamMembersController.html +++ /dev/null @@ -1,438 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>TeamMembersController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - TeamMembersController - - <span class="parent">< - - <a href="ProjectResourceController.html">ProjectResourceController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/team_members_controller_rb.html">app/controllers/team_members_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-apply_import">apply_import</a> - </li> - - </ul> - </dd> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-create">create</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-destroy">destroy</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-index">index</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-new">new</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-show">show</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-update">update</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-apply_import"> - - <b>apply_import</b>() - - <a href="../classes/TeamMembersController.html#method-i-apply_import" name="method-i-apply_import" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-apply_import_source')" id="l_method-i-apply_import_source">show</a> - - </p> - <div id="method-i-apply_import_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/team_members_controller.rb, line 51</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">apply_import</span> - <span class="ruby-identifier">giver</span> = <span class="ruby-constant">Project</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:source_project_id</span>]) - <span class="ruby-identifier">status</span> = <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">import_team</span>(<span class="ruby-identifier">giver</span>, <span class="ruby-identifier">project</span>) - <span class="ruby-identifier">notice</span> = <span class="ruby-identifier">status</span> <span class="ruby-operator">?</span> <span class="ruby-string">"Succesfully imported"</span> <span class="ruby-operator">:</span> <span class="ruby-string">"Import failed"</span> - - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">project_team_members_path</span>(<span class="ruby-identifier">project</span>), <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-identifier">notice</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-create"> - - <b>create</b>() - - <a href="../classes/TeamMembersController.html#method-i-create" name="method-i-create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-create_source')" id="l_method-i-create_source">show</a> - - </p> - <div id="method-i-create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/team_members_controller.rb, line 18</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">create</span> - <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">add_users_ids_to_team</span>( - <span class="ruby-identifier">params</span>[<span class="ruby-value">:user_ids</span>], - <span class="ruby-identifier">params</span>[<span class="ruby-value">:project_access</span>] - ) - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:redirect_to</span>] - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:redirect_to</span>] - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">project_team_index_path</span>(<span class="ruby-ivar">@project</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-destroy"> - - <b>destroy</b>() - - <a href="../classes/TeamMembersController.html#method-i-destroy" name="method-i-destroy" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-destroy_source')" id="l_method-i-destroy_source">show</a> - - </p> - <div id="method-i-destroy_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/team_members_controller.rb, line 41</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">destroy</span> - <span class="ruby-ivar">@team_member</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">users_projects</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) - <span class="ruby-ivar">@team_member</span>.<span class="ruby-identifier">destroy</span> - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> { <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">project_team_index_path</span>(<span class="ruby-ivar">@project</span>) } - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">nothing</span><span class="ruby-operator">:</span> <span class="ruby-keyword">true</span> } - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-index"> - - <b>index</b>() - - <a href="../classes/TeamMembersController.html#method-i-index" name="method-i-index" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-index_source')" id="l_method-i-index_source">show</a> - - </p> - <div id="method-i-index_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/team_members_controller.rb, line 6</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">index</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-new"> - - <b>new</b>() - - <a href="../classes/TeamMembersController.html#method-i-new" name="method-i-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-new_source')" id="l_method-i-new_source">show</a> - - </p> - <div id="method-i-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/team_members_controller.rb, line 14</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">new</span> - <span class="ruby-ivar">@team_member</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">users_projects</span>.<span class="ruby-identifier">new</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-show"> - - <b>show</b>() - - <a href="../classes/TeamMembersController.html#method-i-show" name="method-i-show" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a> - - </p> - <div id="method-i-show_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/team_members_controller.rb, line 9</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span> - <span class="ruby-ivar">@team_member</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">users_projects</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) - <span class="ruby-ivar">@events</span> = <span class="ruby-ivar">@team_member</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">recent_events</span>.<span class="ruby-identifier">where</span>(<span class="ruby-value">:project_id</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">id</span>).<span class="ruby-identifier">limit</span>(<span class="ruby-number">7</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update"> - - <b>update</b>() - - <a href="../classes/TeamMembersController.html#method-i-update" name="method-i-update" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_source')" id="l_method-i-update_source">show</a> - - </p> - <div id="method-i-update_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/team_members_controller.rb, line 31</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update</span> - <span class="ruby-ivar">@team_member</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">users_projects</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) - <span class="ruby-ivar">@team_member</span>.<span class="ruby-identifier">update_attributes</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:team_member</span>]) - - <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@team_member</span>.<span class="ruby-identifier">valid?</span> - <span class="ruby-identifier">flash</span>[<span class="ruby-value">:alert</span>] = <span class="ruby-string">"User should have at least one role"</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">project_team_index_path</span>(<span class="ruby-ivar">@project</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/TestHookContext.html b/doc/code/classes/TestHookContext.html deleted file mode 100644 index 5b9b647858b..00000000000 --- a/doc/code/classes/TestHookContext.html +++ /dev/null @@ -1,134 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>TestHookContext</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - TestHookContext - - <span class="parent">< - - <a href="BaseContext.html">BaseContext</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/contexts/test_hook_context_rb.html">app/contexts/test_hook_context.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-execute">execute</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-execute"> - - <b>execute</b>() - - <a href="../classes/TestHookContext.html#method-i-execute" name="method-i-execute" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-execute_source')" id="l_method-i-execute_source">show</a> - - </p> - <div id="method-i-execute_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/contexts/test_hook_context.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">execute</span> - <span class="ruby-identifier">hook</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">hooks</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) - <span class="ruby-identifier">commits</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">commits</span>(<span class="ruby-identifier">project</span>.<span class="ruby-identifier">default_branch</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-number">3</span>) - <span class="ruby-identifier">data</span> = <span class="ruby-identifier">project</span>.<span class="ruby-identifier">post_receive_data</span>(<span class="ruby-identifier">commits</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">commits</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">id</span>, <span class="ruby-node">"refs/heads/#{project.default_branch}"</span>, <span class="ruby-identifier">current_user</span>) - <span class="ruby-identifier">hook</span>.<span class="ruby-identifier">execute</span>(<span class="ruby-identifier">data</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Tree.html b/doc/code/classes/Tree.html deleted file mode 100644 index e71dfa3ffc4..00000000000 --- a/doc/code/classes/Tree.html +++ /dev/null @@ -1,322 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Tree</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Tree - - <span class="parent">< - - Object - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/models/tree_rb.html">app/models/tree.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-empty-3F">empty?</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-invalid-3F">invalid?</a>, - </li> - - - <li> - <a href="#method-i-is_blob-3F">is_blob?</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-new">new</a> - </li> - - </ul> - </dd> - - </dl> - - - - <!-- Includes --> - <div class="sectiontitle">Included Modules</div> - <ul> - - <li> - - Linguist::BlobHelper - - </li> - - </ul> - - - - - - - - - - - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>path</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>project</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>ref</td> - <td class='attr-desc'></td> - </tr> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>tree</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-new"> - - <b>new</b>(raw_tree, project, ref = nil, path = nil) - - <a href="../classes/Tree.html#method-c-new" name="method-c-new" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a> - - </p> - <div id="method-c-new_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/tree.rb, line 8</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span>(<span class="ruby-identifier">raw_tree</span>, <span class="ruby-identifier">project</span>, <span class="ruby-identifier">ref</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">path</span> = <span class="ruby-keyword">nil</span>) - <span class="ruby-ivar">@project</span>, <span class="ruby-ivar">@ref</span>, <span class="ruby-ivar">@path</span> = <span class="ruby-identifier">project</span>, <span class="ruby-identifier">ref</span>, <span class="ruby-identifier">path</span> - <span class="ruby-ivar">@tree</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">path</span>.<span class="ruby-identifier">present?</span> - <span class="ruby-identifier">raw_tree</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">path</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">raw_tree</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-empty-3F"> - - <b>empty?</b>() - - <a href="../classes/Tree.html#method-i-empty-3F" name="method-i-empty-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-empty-3F_source')" id="l_method-i-empty-3F_source">show</a> - - </p> - <div id="method-i-empty-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/tree.rb, line 25</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">empty?</span> - <span class="ruby-identifier">data</span>.<span class="ruby-identifier">blank?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-invalid-3F"> - - <b>invalid?</b>() - - <a href="../classes/Tree.html#method-i-invalid-3F" name="method-i-invalid-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-invalid-3F_source')" id="l_method-i-invalid-3F_source">show</a> - - </p> - <div id="method-i-invalid-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/tree.rb, line 21</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">invalid?</span> - <span class="ruby-identifier">tree</span>.<span class="ruby-identifier">nil?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-is_blob-3F"> - - <b>is_blob?</b>() - - <a href="../classes/Tree.html#method-i-is_blob-3F" name="method-i-is_blob-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-is_blob-3F_source')" id="l_method-i-is_blob-3F_source">show</a> - - </p> - <div id="method-i-is_blob-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/tree.rb, line 17</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">is_blob?</span> - <span class="ruby-identifier">tree</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Grit</span><span class="ruby-operator">::</span><span class="ruby-constant">Blob</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/TreeController.html b/doc/code/classes/TreeController.html deleted file mode 100644 index 35c99bc09e4..00000000000 --- a/doc/code/classes/TreeController.html +++ /dev/null @@ -1,264 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>TreeController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - TreeController - - <span class="parent">< - - <a href="ProjectResourceController.html">ProjectResourceController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/tree_controller_rb.html">app/controllers/tree_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<p>Controller for viewing a repository’s file structure</p> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-edit">edit</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-show">show</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-update">update</a> - </li> - - </ul> - </dd> - - </dl> - - - - <!-- Includes --> - <div class="sectiontitle">Included Modules</div> - <ul> - - <li> - - <a href="ExtractsPath.html"> - ExtractsPath - </a> - - </li> - - </ul> - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-edit"> - - <b>edit</b>() - - <a href="../classes/TreeController.html#method-i-edit" name="method-i-edit" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-edit_source')" id="l_method-i-edit_source">show</a> - - </p> - <div id="method-i-edit_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/tree_controller.rb, line 24</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">edit</span> - <span class="ruby-ivar">@last_commit</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">last_commit_for</span>(<span class="ruby-ivar">@ref</span>, <span class="ruby-ivar">@path</span>).<span class="ruby-identifier">sha</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-show"> - - <b>show</b>() - - <a href="../classes/TreeController.html#method-i-show" name="method-i-show" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a> - - </p> - <div id="method-i-show_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/tree_controller.rb, line 13</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span> - <span class="ruby-ivar">@hex_path</span> = <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">SHA1</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-ivar">@path</span>) - <span class="ruby-ivar">@logs_path</span> = <span class="ruby-identifier">logs_file_project_ref_path</span>(<span class="ruby-ivar">@project</span>, <span class="ruby-ivar">@ref</span>, <span class="ruby-ivar">@path</span>) - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> - <span class="ruby-comment"># Disable cache so browser history works</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">js</span> { <span class="ruby-identifier">no_cache_headers</span> } - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update"> - - <b>update</b>() - - <a href="../classes/TreeController.html#method-i-update" name="method-i-update" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_source')" id="l_method-i-update_source">show</a> - - </p> - <div id="method-i-update_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/tree_controller.rb, line 28</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update</span> - <span class="ruby-identifier">edit_file_action</span> = <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">Satellite</span><span class="ruby-operator">::</span><span class="ruby-constant">EditFileAction</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-ivar">@project</span>, <span class="ruby-ivar">@ref</span>, <span class="ruby-ivar">@path</span>) - <span class="ruby-identifier">updated_successfully</span> = <span class="ruby-identifier">edit_file_action</span>.<span class="ruby-identifier">commit!</span>( - <span class="ruby-identifier">params</span>[<span class="ruby-value">:content</span>], - <span class="ruby-identifier">params</span>[<span class="ruby-value">:commit_message</span>], - <span class="ruby-identifier">params</span>[<span class="ruby-value">:last_commit</span>] - ) - - <span class="ruby-keyword">if</span> <span class="ruby-identifier">updated_successfully</span> - <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">project_tree_path</span>(<span class="ruby-ivar">@project</span>, <span class="ruby-ivar">@id</span>), <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">"Your changes have been successfully commited"</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">flash</span>[<span class="ruby-value">:notice</span>] = <span class="ruby-string">"Your changes could not be commited, because the file has been changed"</span> - <span class="ruby-identifier">render</span> <span class="ruby-value">:edit</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/TreeDecorator.html b/doc/code/classes/TreeDecorator.html deleted file mode 100644 index 9b32e1c9381..00000000000 --- a/doc/code/classes/TreeDecorator.html +++ /dev/null @@ -1,281 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>TreeDecorator</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - TreeDecorator - - <span class="parent">< - - <a href="ApplicationDecorator.html">ApplicationDecorator</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/decorators/tree_decorator_rb.html">app/decorators/tree_decorator.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>B</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-breadcrumbs">breadcrumbs</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-readme">readme</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-up_dir-3F">up_dir?</a>, - </li> - - - <li> - <a href="#method-i-up_dir_path">up_dir_path</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-breadcrumbs"> - - <b>breadcrumbs</b>(max_links = 2) - - <a href="../classes/TreeDecorator.html#method-i-breadcrumbs" name="method-i-breadcrumbs" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-breadcrumbs_source')" id="l_method-i-breadcrumbs_source">show</a> - - </p> - <div id="method-i-breadcrumbs_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/decorators/tree_decorator.rb, line 4</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">breadcrumbs</span>(<span class="ruby-identifier">max_links</span> = <span class="ruby-number">2</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">path</span> - <span class="ruby-identifier">part_path</span> = <span class="ruby-string">""</span> - <span class="ruby-identifier">parts</span> = <span class="ruby-identifier">path</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">"\/"</span>) - - <span class="ruby-comment">#parts = parts[0...-1] if is_blob?</span> - - <span class="ruby-keyword">yield</span>(<span class="ruby-identifier">h</span>.<span class="ruby-identifier">link_to</span>(<span class="ruby-string">".."</span>, <span class="ruby-node">"#"</span>)) <span class="ruby-keyword">if</span> <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">count</span> <span class="ruby-operator">></span> <span class="ruby-identifier">max_links</span> - - <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">part</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">part_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">part_path</span>, <span class="ruby-identifier">part</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">part_path</span>.<span class="ruby-identifier">empty?</span> - <span class="ruby-identifier">part_path</span> = <span class="ruby-identifier">part</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">part_path</span>.<span class="ruby-identifier">empty?</span> - - <span class="ruby-keyword">next</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">last</span>(<span class="ruby-number">2</span>).<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">part</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">count</span> <span class="ruby-operator">></span> <span class="ruby-identifier">max_links</span> - <span class="ruby-keyword">yield</span>(<span class="ruby-identifier">h</span>.<span class="ruby-identifier">link_to</span>(<span class="ruby-identifier">h</span>.<span class="ruby-identifier">truncate</span>(<span class="ruby-identifier">part</span>, <span class="ruby-identifier">length</span><span class="ruby-operator">:</span> <span class="ruby-number">40</span>), <span class="ruby-identifier">h</span>.<span class="ruby-identifier">project_tree_path</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">h</span>.<span class="ruby-identifier">tree_join</span>(<span class="ruby-identifier">ref</span>, <span class="ruby-identifier">part_path</span>)))) - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-readme"> - - <b>readme</b>() - - <a href="../classes/TreeDecorator.html#method-i-readme" name="method-i-readme" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-readme_source')" id="l_method-i-readme_source">show</a> - - </p> - <div id="method-i-readme_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/decorators/tree_decorator.rb, line 32</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">readme</span> - <span class="ruby-ivar">@readme</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">contents</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Grit</span><span class="ruby-operator">::</span><span class="ruby-constant">Blob</span>) <span class="ruby-keyword">and</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">%r^readme/</span> } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-up_dir-3F"> - - <b>up_dir?</b>() - - <a href="../classes/TreeDecorator.html#method-i-up_dir-3F" name="method-i-up_dir-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-up_dir-3F_source')" id="l_method-i-up_dir-3F_source">show</a> - - </p> - <div id="method-i-up_dir-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/decorators/tree_decorator.rb, line 23</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">up_dir?</span> - <span class="ruby-identifier">path</span>.<span class="ruby-identifier">present?</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-up_dir_path"> - - <b>up_dir_path</b>() - - <a href="../classes/TreeDecorator.html#method-i-up_dir_path" name="method-i-up_dir_path" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-up_dir_path_source')" id="l_method-i-up_dir_path_source">show</a> - - </p> - <div id="method-i-up_dir_path_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/decorators/tree_decorator.rb, line 27</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">up_dir_path</span> - <span class="ruby-identifier">file</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">path</span>, <span class="ruby-string">".."</span>) - <span class="ruby-identifier">h</span>.<span class="ruby-identifier">project_tree_path</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">h</span>.<span class="ruby-identifier">tree_join</span>(<span class="ruby-identifier">ref</span>, <span class="ruby-identifier">file</span>)) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/TreeHelper.html b/doc/code/classes/TreeHelper.html deleted file mode 100644 index a9ca79494de..00000000000 --- a/doc/code/classes/TreeHelper.html +++ /dev/null @@ -1,541 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>TreeHelper</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - TreeHelper - - </h1> - <ul class="files"> - - <li><a href="../files/app/helpers/tree_helper_rb.html">app/helpers/tree_helper.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-allowed_tree_edit-3F">allowed_tree_edit?</a> - </li> - - </ul> - </dd> - - <dt>B</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-breadcrumbs">breadcrumbs</a> - </li> - - </ul> - </dd> - - <dt>G</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-gitlab_markdown-3F">gitlab_markdown?</a> - </li> - - </ul> - </dd> - - <dt>M</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-markup-3F">markup?</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-plain_text_readme-3F">plain_text_readme?</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-render_tree">render_tree</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-tree_hex_class">tree_hex_class</a>, - </li> - - - <li> - <a href="#method-i-tree_icon">tree_icon</a>, - </li> - - - <li> - <a href="#method-i-tree_join">tree_join</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-allowed_tree_edit-3F"> - - <b>allowed_tree_edit?</b>() - - <a href="../classes/TreeHelper.html#method-i-allowed_tree_edit-3F" name="method-i-allowed_tree_edit-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-allowed_tree_edit-3F_source')" id="l_method-i-allowed_tree_edit-3F_source">show</a> - - </p> - <div id="method-i-allowed_tree_edit-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/tree_helper.rb, line 63</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">allowed_tree_edit?</span> - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">protected_branch?</span> <span class="ruby-ivar">@ref</span> - <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-value">:push_code_to_protected_branches</span>, <span class="ruby-ivar">@project</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-value">:push_code</span>, <span class="ruby-ivar">@project</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-breadcrumbs"> - - <b>breadcrumbs</b>() - - <a href="../classes/TreeHelper.html#method-i-breadcrumbs" name="method-i-breadcrumbs" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Breadcrumb links for a <a href="Project.html">Project</a> and, if -applicable, a tree path</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-breadcrumbs_source')" id="l_method-i-breadcrumbs_source">show</a> - - </p> - <div id="method-i-breadcrumbs_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/tree_helper.rb, line 72</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">breadcrumbs</span> - <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@project</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@ref</span> - - <span class="ruby-comment"># Add the root project link and the arrow icon</span> - <span class="ruby-identifier">crumbs</span> = <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:li</span>) <span class="ruby-keyword">do</span> - <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:span</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-keyword">class</span><span class="ruby-operator">:</span> <span class="ruby-string">'arrow'</span>) <span class="ruby-operator">+</span> - <span class="ruby-keyword ruby-title">link_to</span>(<span class="ruby-ivar">@project</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">project_commits_path</span>(<span class="ruby-ivar">@project</span>, <span class="ruby-ivar">@ref</span>)) - <span class="ruby-keyword">end</span> - - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@path</span> - <span class="ruby-identifier">parts</span> = <span class="ruby-ivar">@path</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">'/'</span>) - - <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">part</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">crumbs</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:span</span>, <span class="ruby-string">'/'</span>, <span class="ruby-keyword">class</span><span class="ruby-operator">:</span> <span class="ruby-string">'divider'</span>) - <span class="ruby-keyword ruby-title">crumbs</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">content_tag</span>(<span class="ruby-value">:li</span>) <span class="ruby-keyword">do</span> - <span class="ruby-comment"># The text is just the individual part, but the link needs all the parts before it</span> - <span class="ruby-identifier">link_to</span> <span class="ruby-identifier">part</span>, <span class="ruby-identifier">project_commits_path</span>(<span class="ruby-ivar">@project</span>, <span class="ruby-identifier">tree_join</span>(<span class="ruby-ivar">@ref</span>, <span class="ruby-identifier">parts</span>[<span class="ruby-number">0</span><span class="ruby-operator">..</span><span class="ruby-identifier">i</span>].<span class="ruby-identifier">join</span>(<span class="ruby-string">'/'</span>))) - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">crumbs</span>.<span class="ruby-identifier">html_safe</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-gitlab_markdown-3F"> - - <b>gitlab_markdown?</b>(filename) - - <a href="../classes/TreeHelper.html#method-i-gitlab_markdown-3F" name="method-i-gitlab_markdown-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-gitlab_markdown-3F_source')" id="l_method-i-gitlab_markdown-3F_source">show</a> - - </p> - <div id="method-i-gitlab_markdown-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/tree_helper.rb, line 50</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">gitlab_markdown?</span>(<span class="ruby-identifier">filename</span>) - <span class="ruby-identifier">filename</span>.<span class="ruby-identifier">end_with?</span>(*<span class="ruby-node">%w(.mdown .md .markdown)</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-markup-3F"> - - <b>markup?</b>(filename) - - <a href="../classes/TreeHelper.html#method-i-markup-3F" name="method-i-markup-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Public: Determines if a given filename is compatible with GitHub::Markup.</p> - -<p>filename - Filename string to check</p> - -<p>Returns boolean</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-markup-3F_source')" id="l_method-i-markup-3F_source">show</a> - - </p> - <div id="method-i-markup-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/tree_helper.rb, line 45</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">markup?</span>(<span class="ruby-identifier">filename</span>) - <span class="ruby-identifier">filename</span>.<span class="ruby-identifier">end_with?</span>(*<span class="ruby-node">%w(.textile .rdoc .org .creole - .mediawiki .rst .asciidoc .pod)</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-plain_text_readme-3F"> - - <b>plain_text_readme?</b>(filename) - - <a href="../classes/TreeHelper.html#method-i-plain_text_readme-3F" name="method-i-plain_text_readme-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-plain_text_readme-3F_source')" id="l_method-i-plain_text_readme-3F_source">show</a> - - </p> - <div id="method-i-plain_text_readme-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/tree_helper.rb, line 54</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">plain_text_readme?</span> <span class="ruby-identifier">filename</span> - <span class="ruby-identifier">filename</span> <span class="ruby-operator">==</span> <span class="ruby-string">'README'</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-render_tree"> - - <b>render_tree</b>(contents) - - <a href="../classes/TreeHelper.html#method-i-render_tree" name="method-i-render_tree" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Sorts a repository’s tree so that folders are before files and renders -their corresponding partials</p> - -<p>contents - A Grit::Tree object for the current tree</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-render_tree_source')" id="l_method-i-render_tree_source">show</a> - - </p> - <div id="method-i-render_tree_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/tree_helper.rb, line 6</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">render_tree</span>(<span class="ruby-identifier">contents</span>) - <span class="ruby-comment"># Render Folders before Files/Submodules</span> - <span class="ruby-identifier">folders</span>, <span class="ruby-identifier">files</span> = <span class="ruby-identifier">contents</span>.<span class="ruby-identifier">partition</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Grit</span><span class="ruby-operator">::</span><span class="ruby-constant">Tree</span>) } - - <span class="ruby-identifier">tree</span> = <span class="ruby-string">""</span> - - <span class="ruby-comment"># Render folders if we have any</span> - <span class="ruby-identifier">tree</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">render</span> <span class="ruby-identifier">partial</span><span class="ruby-operator">:</span> <span class="ruby-string">'tree/tree_item'</span>, <span class="ruby-identifier">collection</span><span class="ruby-operator">:</span> <span class="ruby-identifier">folders</span>, <span class="ruby-identifier">locals</span><span class="ruby-operator">:</span> {<span class="ruby-identifier">type</span><span class="ruby-operator">:</span> <span class="ruby-string">'folder'</span>} <span class="ruby-keyword">if</span> <span class="ruby-identifier">folders</span>.<span class="ruby-identifier">present?</span> - - <span class="ruby-identifier">files</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:url</span>) - <span class="ruby-comment"># Object is a Submodule</span> - <span class="ruby-identifier">tree</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">render</span> <span class="ruby-identifier">partial</span><span class="ruby-operator">:</span> <span class="ruby-string">'tree/submodule_item'</span>, <span class="ruby-identifier">object</span><span class="ruby-operator">:</span> <span class="ruby-identifier">f</span> - <span class="ruby-keyword">else</span> - <span class="ruby-comment"># Object is a Blob</span> - <span class="ruby-identifier">tree</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">render</span> <span class="ruby-identifier">partial</span><span class="ruby-operator">:</span> <span class="ruby-string">'tree/tree_item'</span>, <span class="ruby-identifier">object</span><span class="ruby-operator">:</span> <span class="ruby-identifier">f</span>, <span class="ruby-identifier">locals</span><span class="ruby-operator">:</span> {<span class="ruby-identifier">type</span><span class="ruby-operator">:</span> <span class="ruby-string">'file'</span>} - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">tree</span>.<span class="ruby-identifier">html_safe</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-tree_hex_class"> - - <b>tree_hex_class</b>(content) - - <a href="../classes/TreeHelper.html#method-i-tree_hex_class" name="method-i-tree_hex_class" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-tree_hex_class_source')" id="l_method-i-tree_hex_class_source">show</a> - - </p> - <div id="method-i-tree_hex_class_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/tree_helper.rb, line 36</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">tree_hex_class</span>(<span class="ruby-identifier">content</span>) - <span class="ruby-node">"file_#{hexdigest(content.name)}"</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-tree_icon"> - - <b>tree_icon</b>(type) - - <a href="../classes/TreeHelper.html#method-i-tree_icon" name="method-i-tree_icon" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Return an image icon depending on the file type</p> - -<p>type - String type of the tree item; either ‘folder’ or ‘file’</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-tree_icon_source')" id="l_method-i-tree_icon_source">show</a> - - </p> - <div id="method-i-tree_icon_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/tree_helper.rb, line 31</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">tree_icon</span>(<span class="ruby-identifier">type</span>) - <span class="ruby-identifier">image</span> = <span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-string">'folder'</span> <span class="ruby-operator">?</span> <span class="ruby-string">'file_dir.png'</span> <span class="ruby-operator">:</span> <span class="ruby-string">'file_txt.png'</span> - <span class="ruby-identifier">image_tag</span>(<span class="ruby-identifier">image</span>, <span class="ruby-identifier">size</span><span class="ruby-operator">:</span> <span class="ruby-string">'16x16'</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-tree_join"> - - <b>tree_join</b>(*args) - - <a href="../classes/TreeHelper.html#method-i-tree_join" name="method-i-tree_join" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Simple shortcut to File.join</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-tree_join_source')" id="l_method-i-tree_join_source">show</a> - - </p> - <div id="method-i-tree_join_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/helpers/tree_helper.rb, line 59</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">tree_join</span>(*<span class="ruby-identifier">args</span>) - <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(*<span class="ruby-identifier">args</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/User.html b/doc/code/classes/User.html deleted file mode 100644 index 661b143ebd1..00000000000 --- a/doc/code/classes/User.html +++ /dev/null @@ -1,566 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>User</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - User - - <span class="parent">< - - ActiveRecord::Base - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/models/user_rb.html">app/models/user.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<h2 id="label-Schema+Information">Schema Information</h2> - -<p>Table name: users</p> - -<pre>id :integer not null, primary key -email :string(255) default(""), not null -encrypted_password :string(255) default(""), not null -reset_password_token :string(255) -reset_password_sent_at :datetime -remember_created_at :datetime -sign_in_count :integer default(0) -current_sign_in_at :datetime -last_sign_in_at :datetime -current_sign_in_ip :string(255) -last_sign_in_ip :string(255) -created_at :datetime not null -updated_at :datetime not null -name :string(255) -admin :boolean default(FALSE), not null -projects_limit :integer default(10) -skype :string(255) default(""), not null -linkedin :string(255) default(""), not null -twitter :string(255) default(""), not null -authentication_token :string(255) -dark_scheme :boolean default(FALSE), not null -theme_id :integer default(1), not null -bio :string(255) -blocked :boolean default(FALSE), not null -failed_attempts :integer default(0) -locked_at :datetime -extern_uid :string(255) -provider :string(255) -username :string(255)</pre> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-create_from_omniauth">create_from_omniauth</a> - </li> - - </ul> - </dd> - - <dt>F</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-filter">filter</a>, - </li> - - - <li> - <a href="#method-c-find_for_ldap_auth">find_for_ldap_auth</a>, - </li> - - - <li> - <a href="#method-c-find_or_new_for_omniauth">find_or_new_for_omniauth</a> - </li> - - </ul> - </dd> - - <dt>G</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-generate_password">generate_password</a>, - </li> - - - <li> - <a href="#method-c-gitlab_auth">gitlab_auth</a> - </li> - - </ul> - </dd> - - <dt>N</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-not_in_project">not_in_project</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-search">search</a> - </li> - - </ul> - </dd> - - <dt>W</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-without_projects">without_projects</a> - </li> - - </ul> - </dd> - - </dl> - - - - <!-- Includes --> - <div class="sectiontitle">Included Modules</div> - <ul> - - <li> - - <a href="Account.html"> - Account - </a> - - </li> - - </ul> - - - - - - - - - - - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>force_random_password</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-create_from_omniauth"> - - <b>create_from_omniauth</b>(auth, ldap = false) - - <a href="../classes/User.html#method-c-create_from_omniauth" name="method-c-create_from_omniauth" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-create_from_omniauth_source')" id="l_method-c-create_from_omniauth_source">show</a> - - </p> - <div id="method-c-create_from_omniauth_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/user.rb, line 108</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">create_from_omniauth</span>(<span class="ruby-identifier">auth</span>, <span class="ruby-identifier">ldap</span> = <span class="ruby-keyword">false</span>) - <span class="ruby-identifier">gitlab_auth</span>.<span class="ruby-identifier">create_from_omniauth</span>(<span class="ruby-identifier">auth</span>, <span class="ruby-identifier">ldap</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-filter"> - - <b>filter</b>(filter_name) - - <a href="../classes/User.html#method-c-filter" name="method-c-filter" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-filter_source')" id="l_method-c-filter_source">show</a> - - </p> - <div id="method-c-filter_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/user.rb, line 86</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">filter</span> <span class="ruby-identifier">filter_name</span> - <span class="ruby-keyword">case</span> <span class="ruby-identifier">filter_name</span> - <span class="ruby-keyword">when</span> <span class="ruby-string">"admins"</span>; <span class="ruby-keyword">self</span>.<span class="ruby-identifier">admins</span> - <span class="ruby-keyword">when</span> <span class="ruby-string">"blocked"</span>; <span class="ruby-keyword">self</span>.<span class="ruby-identifier">blocked</span> - <span class="ruby-keyword">when</span> <span class="ruby-string">"wop"</span>; <span class="ruby-keyword">self</span>.<span class="ruby-identifier">without_projects</span> - <span class="ruby-keyword">else</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">active</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-find_for_ldap_auth"> - - <b>find_for_ldap_auth</b>(auth, signed_in_resource = nil) - - <a href="../classes/User.html#method-c-find_for_ldap_auth" name="method-c-find_for_ldap_auth" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-find_for_ldap_auth_source')" id="l_method-c-find_for_ldap_auth_source">show</a> - - </p> - <div id="method-c-find_for_ldap_auth_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/user.rb, line 116</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">find_for_ldap_auth</span>(<span class="ruby-identifier">auth</span>, <span class="ruby-identifier">signed_in_resource</span> = <span class="ruby-keyword">nil</span>) - <span class="ruby-identifier">gitlab_auth</span>.<span class="ruby-identifier">find_for_ldap_auth</span>(<span class="ruby-identifier">auth</span>, <span class="ruby-identifier">signed_in_resource</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-find_or_new_for_omniauth"> - - <b>find_or_new_for_omniauth</b>(auth) - - <a href="../classes/User.html#method-c-find_or_new_for_omniauth" name="method-c-find_or_new_for_omniauth" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-find_or_new_for_omniauth_source')" id="l_method-c-find_or_new_for_omniauth_source">show</a> - - </p> - <div id="method-c-find_or_new_for_omniauth_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/user.rb, line 112</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">find_or_new_for_omniauth</span>(<span class="ruby-identifier">auth</span>) - <span class="ruby-identifier">gitlab_auth</span>.<span class="ruby-identifier">find_or_new_for_omniauth</span>(<span class="ruby-identifier">auth</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-gitlab_auth"> - - <b>gitlab_auth</b>() - - <a href="../classes/User.html#method-c-gitlab_auth" name="method-c-gitlab_auth" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-gitlab_auth_source')" id="l_method-c-gitlab_auth_source">show</a> - - </p> - <div id="method-c-gitlab_auth_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/user.rb, line 120</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">gitlab_auth</span> - <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">Auth</span>.<span class="ruby-identifier">new</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-not_in_project"> - - <b>not_in_project</b>(project) - - <a href="../classes/User.html#method-c-not_in_project" name="method-c-not_in_project" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-not_in_project_source')" id="l_method-c-not_in_project_source">show</a> - - </p> - <div id="method-c-not_in_project_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/user.rb, line 96</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">not_in_project</span>(<span class="ruby-identifier">project</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">project</span>.<span class="ruby-identifier">users</span>.<span class="ruby-identifier">present?</span> - <span class="ruby-identifier">where</span>(<span class="ruby-string">"id not in (:ids)"</span>, <span class="ruby-identifier">ids</span><span class="ruby-operator">:</span> <span class="ruby-identifier">project</span>.<span class="ruby-identifier">users</span>.<span class="ruby-identifier">map</span>(&<span class="ruby-value">:id</span>) ) - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">scoped</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-search"> - - <b>search</b>(query) - - <a href="../classes/User.html#method-c-search" name="method-c-search" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-search_source')" id="l_method-c-search_source">show</a> - - </p> - <div id="method-c-search_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/user.rb, line 124</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">search</span> <span class="ruby-identifier">query</span> - <span class="ruby-identifier">where</span>(<span class="ruby-string">"name LIKE :query or email LIKE :query"</span>, <span class="ruby-identifier">query</span><span class="ruby-operator">:</span> <span class="ruby-node">"%#{query}%"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-without_projects"> - - <b>without_projects</b>() - - <a href="../classes/User.html#method-c-without_projects" name="method-c-without_projects" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-without_projects_source')" id="l_method-c-without_projects_source">show</a> - - </p> - <div id="method-c-without_projects_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/user.rb, line 104</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">without_projects</span> - <span class="ruby-identifier">where</span>(<span class="ruby-string">'id NOT IN (SELECT DISTINCT(user_id) FROM users_projects)'</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-generate_password"> - - <b>generate_password</b>() - - <a href="../classes/User.html#method-i-generate_password" name="method-i-generate_password" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-generate_password_source')" id="l_method-i-generate_password_source">show</a> - - </p> - <div id="method-i-generate_password_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/user.rb, line 129</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">generate_password</span> - <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">force_random_password</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">password</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">password_confirmation</span> = <span class="ruby-constant">Devise</span>.<span class="ruby-identifier">friendly_token</span>.<span class="ruby-identifier">first</span>(<span class="ruby-number">8</span>) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/UserDecorator.html b/doc/code/classes/UserDecorator.html deleted file mode 100644 index 24ce4b76352..00000000000 --- a/doc/code/classes/UserDecorator.html +++ /dev/null @@ -1,178 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>UserDecorator</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - UserDecorator - - <span class="parent">< - - <a href="ApplicationDecorator.html">ApplicationDecorator</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/decorators/user_decorator_rb.html">app/decorators/user_decorator.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-avatar_image">avatar_image</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-tm_of">tm_of</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-avatar_image"> - - <b>avatar_image</b>(size = 16) - - <a href="../classes/UserDecorator.html#method-i-avatar_image" name="method-i-avatar_image" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-avatar_image_source')" id="l_method-i-avatar_image_source">show</a> - - </p> - <div id="method-i-avatar_image_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/decorators/user_decorator.rb, line 4</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">avatar_image</span> <span class="ruby-identifier">size</span> = <span class="ruby-number">16</span> - <span class="ruby-identifier">h</span>.<span class="ruby-identifier">image_tag</span> <span class="ruby-identifier">h</span>.<span class="ruby-identifier">gravatar_icon</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">email</span>, <span class="ruby-identifier">size</span>), <span class="ruby-keyword">class</span><span class="ruby-operator">:</span> <span class="ruby-node">"avatar #{"s#{size}"}"</span>, <span class="ruby-keyword ruby-title">width</span><span class="ruby-operator">:</span> <span class="ruby-identifier">size</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-tm_of"> - - <b>tm_of</b>(project) - - <a href="../classes/UserDecorator.html#method-i-tm_of" name="method-i-tm_of" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-tm_of_source')" id="l_method-i-tm_of_source">show</a> - - </p> - <div id="method-i-tm_of_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/decorators/user_decorator.rb, line 8</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">tm_of</span>(<span class="ruby-identifier">project</span>) - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">team_member_by_id</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">id</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/UserObserver.html b/doc/code/classes/UserObserver.html deleted file mode 100644 index 6899937afb9..00000000000 --- a/doc/code/classes/UserObserver.html +++ /dev/null @@ -1,268 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>UserObserver</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - UserObserver - - <span class="parent">< - - ActiveRecord::Observer - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/observers/user_observer_rb.html">app/observers/user_observer.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-after_create">after_create</a>, - </li> - - - <li> - <a href="#method-i-after_destroy">after_destroy</a>, - </li> - - - <li> - <a href="#method-i-after_save">after_save</a> - </li> - - </ul> - </dd> - - <dt>L</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-log_info">log_info</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-after_create"> - - <b>after_create</b>(user) - - <a href="../classes/UserObserver.html#method-i-after_create" name="method-i-after_create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-after_create_source')" id="l_method-i-after_create_source">show</a> - - </p> - <div id="method-i-after_create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/user_observer.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">after_create</span>(<span class="ruby-identifier">user</span>) - <span class="ruby-identifier">log_info</span>(<span class="ruby-node">"User \"#{user.name}\" (#{user.email}) was created"</span>) - - <span class="ruby-constant">Notify</span>.<span class="ruby-identifier">new_user_email</span>(<span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">user</span>.<span class="ruby-identifier">password</span>).<span class="ruby-identifier">deliver</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-after_destroy"> - - <b>after_destroy</b>(user) - - <a href="../classes/UserObserver.html#method-i-after_destroy" name="method-i-after_destroy" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-after_destroy_source')" id="l_method-i-after_destroy_source">show</a> - - </p> - <div id="method-i-after_destroy_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/user_observer.rb, line 8</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">after_destroy</span> <span class="ruby-identifier">user</span> - <span class="ruby-identifier">log_info</span>(<span class="ruby-node">"User \"#{user.name}\" (#{user.email}) was removed"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-after_save"> - - <b>after_save</b>(user) - - <a href="../classes/UserObserver.html#method-i-after_save" name="method-i-after_save" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-after_save_source')" id="l_method-i-after_save_source">show</a> - - </p> - <div id="method-i-after_save_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/user_observer.rb, line 12</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">after_save</span> <span class="ruby-identifier">user</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">user</span>.<span class="ruby-identifier">username_changed?</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">user</span>.<span class="ruby-identifier">namespace</span> - <span class="ruby-identifier">user</span>.<span class="ruby-identifier">namespace</span>.<span class="ruby-identifier">update_attributes</span>(<span class="ruby-identifier">path</span><span class="ruby-operator">:</span> <span class="ruby-identifier">user</span>.<span class="ruby-identifier">username</span>) - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">user</span>.<span class="ruby-identifier">create_namespace!</span>(<span class="ruby-identifier">path</span><span class="ruby-operator">:</span> <span class="ruby-identifier">user</span>.<span class="ruby-identifier">username</span>, <span class="ruby-identifier">name</span><span class="ruby-operator">:</span> <span class="ruby-identifier">user</span>.<span class="ruby-identifier">username</span>) - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-log_info"> - - <b>log_info</b>(message) - - <a href="../classes/UserObserver.html#method-i-log_info" name="method-i-log_info" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-log_info_source')" id="l_method-i-log_info_source">show</a> - - </p> - <div id="method-i-log_info_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/user_observer.rb, line 24</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">log_info</span> <span class="ruby-identifier">message</span> - <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">AppLogger</span>.<span class="ruby-identifier">info</span> <span class="ruby-identifier">message</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/UsersProject.html b/doc/code/classes/UsersProject.html deleted file mode 100644 index 76ae5125a1d..00000000000 --- a/doc/code/classes/UsersProject.html +++ /dev/null @@ -1,871 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>UsersProject</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - UsersProject - - <span class="parent">< - - ActiveRecord::Base - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/models/users_project_rb.html">app/models/users_project.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<h2 id="label-Schema+Information">Schema Information</h2> - -<p>Table name: users_projects</p> - -<pre>id :integer not null, primary key -user_id :integer not null -project_id :integer not null -created_at :datetime not null -updated_at :datetime not null -project_access :integer default(0), not null</pre> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-access_roles">access_roles</a>, - </li> - - - <li> - <a href="#method-c-add_users_into_projects">add_users_into_projects</a> - </li> - - </ul> - </dd> - - <dt>B</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-bulk_delete">bulk_delete</a>, - </li> - - - <li> - <a href="#method-c-bulk_import">bulk_import</a>, - </li> - - - <li> - <a href="#method-c-bulk_update">bulk_update</a> - </li> - - </ul> - </dd> - - <dt>I</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-import_team">import_team</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-project_access_human">project_access_human</a> - </li> - - </ul> - </dd> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-repo_access_human">repo_access_human</a>, - </li> - - - <li> - <a href="#method-i-role_access">role_access</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-skip_git-3F">skip_git?</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-truncate_team">truncate_team</a>, - </li> - - - <li> - <a href="#method-c-truncate_teams">truncate_teams</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-update_repository">update_repository</a>, - </li> - - - <li> - <a href="#method-c-user_bulk_import">user_bulk_import</a> - </li> - - </ul> - </dd> - - </dl> - - - - <!-- Includes --> - <div class="sectiontitle">Included Modules</div> - <ul> - - <li> - - <a href="GitHost.html"> - GitHost - </a> - - </li> - - </ul> - - - - - - - - - - - - <!-- Section constants --> - <div class="sectiontitle">Constants</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class="attr-name">GUEST</td> - <td>=</td> - <td class="attr-value">10</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">REPORTER</td> - <td>=</td> - <td class="attr-value">20</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">DEVELOPER</td> - <td>=</td> - <td class="attr-value">30</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - <tr valign='top'> - <td class="attr-name">MASTER</td> - <td>=</td> - <td class="attr-value">40</td> - </tr> - - <tr valign='top'> - <td> </td> - <td colspan="2" class="attr-desc"></td> - </tr> - - - </table> - - - - - <!-- Section attributes --> - <div class="sectiontitle">Attributes</div> - <table border='0' cellpadding='5'> - - <tr valign='top'> - <td class='attr-rw'> - [RW] - </td> - <td class='attr-name'>skip_git</td> - <td class='attr-desc'></td> - </tr> - - </table> - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-access_roles"> - - <b>access_roles</b>() - - <a href="../classes/UsersProject.html#method-c-access_roles" name="method-c-access_roles" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-access_roles_source')" id="l_method-c-access_roles_source">show</a> - - </p> - <div id="method-c-access_roles_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/users_project.rb, line 140</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">access_roles</span> - { - <span class="ruby-string">"Guest"</span> =<span class="ruby-operator">></span> <span class="ruby-constant">GUEST</span>, - <span class="ruby-string">"Reporter"</span> =<span class="ruby-operator">></span> <span class="ruby-constant">REPORTER</span>, - <span class="ruby-string">"Developer"</span> =<span class="ruby-operator">></span> <span class="ruby-constant">DEVELOPER</span>, - <span class="ruby-string">"Master"</span> =<span class="ruby-operator">></span> <span class="ruby-constant">MASTER</span> - } -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-add_users_into_projects"> - - <b>add_users_into_projects</b>(project_ids, user_ids, project_access) - - <a href="../classes/UsersProject.html#method-c-add_users_into_projects" name="method-c-add_users_into_projects" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-add_users_into_projects_source')" id="l_method-c-add_users_into_projects_source">show</a> - - </p> - <div id="method-c-add_users_into_projects_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/users_project.rb, line 41</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">add_users_into_projects</span>(<span class="ruby-identifier">project_ids</span>, <span class="ruby-identifier">user_ids</span>, <span class="ruby-identifier">project_access</span>) - <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">transaction</span> <span class="ruby-keyword">do</span> - <span class="ruby-identifier">project_ids</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">project_id</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">user_ids</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">user_id</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">users_project</span> = <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">project_access</span><span class="ruby-operator">:</span> <span class="ruby-identifier">project_access</span>, <span class="ruby-identifier">user_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">user_id</span>) - <span class="ruby-identifier">users_project</span>.<span class="ruby-identifier">project_id</span> = <span class="ruby-identifier">project_id</span> - <span class="ruby-identifier">users_project</span>.<span class="ruby-identifier">skip_git</span> = <span class="ruby-keyword">true</span> - <span class="ruby-identifier">users_project</span>.<span class="ruby-identifier">save</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> - <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">Gitolite</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">update_repositories</span>(<span class="ruby-constant">Project</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">project_ids</span>)) - <span class="ruby-keyword">end</span> - - <span class="ruby-keyword">true</span> -<span class="ruby-keyword">rescue</span> - <span class="ruby-keyword">false</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-bulk_delete"> - - <b>bulk_delete</b>(project, user_ids) - - <a href="../classes/UsersProject.html#method-c-bulk_delete" name="method-c-bulk_delete" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-bulk_delete_source')" id="l_method-c-bulk_delete_source">show</a> - - </p> - <div id="method-c-bulk_delete_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/users_project.rb, line 108</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">bulk_delete</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">user_ids</span>) - <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">transaction</span> <span class="ruby-keyword">do</span> - <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">user_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">user_ids</span>, <span class="ruby-identifier">project_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">project</span>.<span class="ruby-identifier">id</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">users_project</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">users_project</span>.<span class="ruby-identifier">skip_git</span> = <span class="ruby-keyword">true</span> - <span class="ruby-identifier">users_project</span>.<span class="ruby-identifier">destroy</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">update_repository</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-bulk_import"> - - <b>bulk_import</b>(project, user_ids, project_access) - - <a href="../classes/UsersProject.html#method-c-bulk_import" name="method-c-bulk_import" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>TODO: depreceate in future in favor of <a -href="UsersProject.html#method-c-add_users_into_projects">::add_users_into_projects</a></p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-bulk_import_source')" id="l_method-c-bulk_import_source">show</a> - - </p> - <div id="method-c-bulk_import_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/users_project.rb, line 131</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">bulk_import</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">user_ids</span>, <span class="ruby-identifier">project_access</span>) - <span class="ruby-identifier">add_users_into_projects</span>([<span class="ruby-identifier">project</span>.<span class="ruby-identifier">id</span>], <span class="ruby-identifier">user_ids</span>, <span class="ruby-identifier">project_access</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-bulk_update"> - - <b>bulk_update</b>(project, user_ids, project_access) - - <a href="../classes/UsersProject.html#method-c-bulk_update" name="method-c-bulk_update" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-bulk_update_source')" id="l_method-c-bulk_update_source">show</a> - - </p> - <div id="method-c-bulk_update_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/users_project.rb, line 119</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">bulk_update</span>(<span class="ruby-identifier">project</span>, <span class="ruby-identifier">user_ids</span>, <span class="ruby-identifier">project_access</span>) - <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">transaction</span> <span class="ruby-keyword">do</span> - <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">user_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">user_ids</span>, <span class="ruby-identifier">project_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">project</span>.<span class="ruby-identifier">id</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">users_project</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">users_project</span>.<span class="ruby-identifier">project_access</span> = <span class="ruby-identifier">project_access</span> - <span class="ruby-identifier">users_project</span>.<span class="ruby-identifier">skip_git</span> = <span class="ruby-keyword">true</span> - <span class="ruby-identifier">users_project</span>.<span class="ruby-identifier">save</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">project</span>.<span class="ruby-identifier">update_repository</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-import_team"> - - <b>import_team</b>(source_project, target_project) - - <a href="../classes/UsersProject.html#method-c-import_team" name="method-c-import_team" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-import_team_source')" id="l_method-c-import_team_source">show</a> - - </p> - <div id="method-c-import_team_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/users_project.rb, line 78</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">import_team</span>(<span class="ruby-identifier">source_project</span>, <span class="ruby-identifier">target_project</span>) - <span class="ruby-identifier">source_team</span> = <span class="ruby-identifier">source_project</span>.<span class="ruby-identifier">users_projects</span>.<span class="ruby-identifier">all</span> - <span class="ruby-identifier">target_team</span> = <span class="ruby-identifier">target_project</span>.<span class="ruby-identifier">users_projects</span>.<span class="ruby-identifier">all</span> - <span class="ruby-identifier">target_user_ids</span> = <span class="ruby-identifier">target_team</span>.<span class="ruby-identifier">map</span>(&<span class="ruby-value">:user_id</span>) - - <span class="ruby-identifier">source_team</span>.<span class="ruby-identifier">reject!</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">tm</span><span class="ruby-operator">|</span> - <span class="ruby-comment"># Skip if user already present in team</span> - <span class="ruby-identifier">target_user_ids</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">tm</span>.<span class="ruby-identifier">user_id</span>) - <span class="ruby-keyword">end</span> - - <span class="ruby-identifier">source_team</span>.<span class="ruby-identifier">map!</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">tm</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">new_tm</span> = <span class="ruby-identifier">tm</span>.<span class="ruby-identifier">dup</span> - <span class="ruby-identifier">new_tm</span>.<span class="ruby-identifier">id</span> = <span class="ruby-keyword">nil</span> - <span class="ruby-identifier">new_tm</span>.<span class="ruby-identifier">project_id</span> = <span class="ruby-identifier">target_project</span>.<span class="ruby-identifier">id</span> - <span class="ruby-identifier">new_tm</span>.<span class="ruby-identifier">skip_git</span> = <span class="ruby-keyword">true</span> - <span class="ruby-identifier">new_tm</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">transaction</span> <span class="ruby-keyword">do</span> - <span class="ruby-identifier">source_team</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">tm</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">tm</span>.<span class="ruby-identifier">save</span> - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">target_project</span>.<span class="ruby-identifier">update_repository</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-keyword">true</span> -<span class="ruby-keyword">rescue</span> - <span class="ruby-keyword">false</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-truncate_team"> - - <b>truncate_team</b>(project) - - <a href="../classes/UsersProject.html#method-c-truncate_team" name="method-c-truncate_team" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-truncate_team_source')" id="l_method-c-truncate_team_source">show</a> - - </p> - <div id="method-c-truncate_team_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/users_project.rb, line 74</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">truncate_team</span> <span class="ruby-identifier">project</span> - <span class="ruby-identifier">truncate_teams</span> [<span class="ruby-identifier">project</span>.<span class="ruby-identifier">id</span>] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-truncate_teams"> - - <b>truncate_teams</b>(project_ids) - - <a href="../classes/UsersProject.html#method-c-truncate_teams" name="method-c-truncate_teams" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-truncate_teams_source')" id="l_method-c-truncate_teams_source">show</a> - - </p> - <div id="method-c-truncate_teams_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/users_project.rb, line 59</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">truncate_teams</span>(<span class="ruby-identifier">project_ids</span>) - <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">transaction</span> <span class="ruby-keyword">do</span> - <span class="ruby-identifier">users_projects</span> = <span class="ruby-constant">UsersProject</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">project_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">project_ids</span>) - <span class="ruby-identifier">users_projects</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">users_project</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">users_project</span>.<span class="ruby-identifier">skip_git</span> = <span class="ruby-keyword">true</span> - <span class="ruby-identifier">users_project</span>.<span class="ruby-identifier">destroy</span> - <span class="ruby-keyword">end</span> - <span class="ruby-constant">Gitlab</span><span class="ruby-operator">::</span><span class="ruby-constant">Gitolite</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">update_repositories</span>(<span class="ruby-constant">Project</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">project_ids</span>)) - <span class="ruby-keyword">end</span> - - <span class="ruby-keyword">true</span> -<span class="ruby-keyword">rescue</span> - <span class="ruby-keyword">false</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-c-user_bulk_import"> - - <b>user_bulk_import</b>(user, project_ids, project_access) - - <a href="../classes/UsersProject.html#method-c-user_bulk_import" name="method-c-user_bulk_import" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>TODO: depreceate in future in favor of <a -href="UsersProject.html#method-c-add_users_into_projects">::add_users_into_projects</a></p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-user_bulk_import_source')" id="l_method-c-user_bulk_import_source">show</a> - - </p> - <div id="method-c-user_bulk_import_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/users_project.rb, line 136</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">user_bulk_import</span>(<span class="ruby-identifier">user</span>, <span class="ruby-identifier">project_ids</span>, <span class="ruby-identifier">project_access</span>) - <span class="ruby-identifier">add_users_into_projects</span>(<span class="ruby-identifier">project_ids</span>, [<span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>], <span class="ruby-identifier">project_access</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-project_access_human"> - - <b>project_access_human</b>() - - <a href="../classes/UsersProject.html#method-i-project_access_human" name="method-i-project_access_human" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-project_access_human_source')" id="l_method-i-project_access_human_source">show</a> - - </p> - <div id="method-i-project_access_human_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/users_project.rb, line 158</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">project_access_human</span> - <span class="ruby-constant">Project</span>.<span class="ruby-identifier">access_options</span>.<span class="ruby-identifier">key</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">project_access</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-repo_access_human"> - - <b>repo_access_human</b>() - - <a href="../classes/UsersProject.html#method-i-repo_access_human" name="method-i-repo_access_human" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-repo_access_human_source')" id="l_method-i-repo_access_human_source">show</a> - - </p> - <div id="method-i-repo_access_human_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/users_project.rb, line 162</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">repo_access_human</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">access_roles</span>.<span class="ruby-identifier">invert</span>[<span class="ruby-keyword">self</span>.<span class="ruby-identifier">project_access</span>] -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-role_access"> - - <b>role_access</b>() - - <a href="../classes/UsersProject.html#method-i-role_access" name="method-i-role_access" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-role_access_source')" id="l_method-i-role_access_source">show</a> - - </p> - <div id="method-i-role_access_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/users_project.rb, line 150</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">role_access</span> - <span class="ruby-identifier">project_access</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-skip_git-3F"> - - <b>skip_git?</b>() - - <a href="../classes/UsersProject.html#method-i-skip_git-3F" name="method-i-skip_git-3F" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-skip_git-3F_source')" id="l_method-i-skip_git-3F_source">show</a> - - </p> - <div id="method-i-skip_git-3F_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/users_project.rb, line 166</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">skip_git?</span> - <span class="ruby-operator">!</span><span class="ruby-operator">!</span><span class="ruby-ivar">@skip_git</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-update_repository"> - - <b>update_repository</b>() - - <a href="../classes/UsersProject.html#method-i-update_repository" name="method-i-update_repository" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-update_repository_source')" id="l_method-i-update_repository_source">show</a> - - </p> - <div id="method-i-update_repository_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/users_project.rb, line 154</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">update_repository</span> - <span class="ruby-identifier">git_host</span>.<span class="ruby-identifier">update_repository</span>(<span class="ruby-identifier">project</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/UsersProjectObserver.html b/doc/code/classes/UsersProjectObserver.html deleted file mode 100644 index 50b02dc75f6..00000000000 --- a/doc/code/classes/UsersProjectObserver.html +++ /dev/null @@ -1,220 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>UsersProjectObserver</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - UsersProjectObserver - - <span class="parent">< - - ActiveRecord::Observer - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/observers/users_project_observer_rb.html">app/observers/users_project_observer.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>A</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-after_commit">after_commit</a>, - </li> - - - <li> - <a href="#method-i-after_create">after_create</a>, - </li> - - - <li> - <a href="#method-i-after_destroy">after_destroy</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-after_commit"> - - <b>after_commit</b>(users_project) - - <a href="../classes/UsersProjectObserver.html#method-i-after_commit" name="method-i-after_commit" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-after_commit_source')" id="l_method-i-after_commit_source">show</a> - - </p> - <div id="method-i-after_commit_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/users_project_observer.rb, line 2</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">after_commit</span>(<span class="ruby-identifier">users_project</span>) - <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">users_project</span>.<span class="ruby-identifier">destroyed?</span> - <span class="ruby-constant">Notify</span>.<span class="ruby-identifier">project_access_granted_email</span>(<span class="ruby-identifier">users_project</span>.<span class="ruby-identifier">id</span>).<span class="ruby-identifier">deliver</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-after_create"> - - <b>after_create</b>(users_project) - - <a href="../classes/UsersProjectObserver.html#method-i-after_create" name="method-i-after_create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-after_create_source')" id="l_method-i-after_create_source">show</a> - - </p> - <div id="method-i-after_create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/users_project_observer.rb, line 7</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">after_create</span>(<span class="ruby-identifier">users_project</span>) - <span class="ruby-constant">Event</span>.<span class="ruby-identifier">create</span>( - <span class="ruby-identifier">project_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">users_project</span>.<span class="ruby-identifier">project</span>.<span class="ruby-identifier">id</span>, - <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-constant">Event</span><span class="ruby-operator">::</span><span class="ruby-constant">Joined</span>, - <span class="ruby-identifier">author_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">users_project</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span> - ) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-after_destroy"> - - <b>after_destroy</b>(users_project) - - <a href="../classes/UsersProjectObserver.html#method-i-after_destroy" name="method-i-after_destroy" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-after_destroy_source')" id="l_method-i-after_destroy_source">show</a> - - </p> - <div id="method-i-after_destroy_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/observers/users_project_observer.rb, line 15</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">after_destroy</span>(<span class="ruby-identifier">users_project</span>) - <span class="ruby-constant">Event</span>.<span class="ruby-identifier">create</span>( - <span class="ruby-identifier">project_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">users_project</span>.<span class="ruby-identifier">project</span>.<span class="ruby-identifier">id</span>, - <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-constant">Event</span><span class="ruby-operator">::</span><span class="ruby-constant">Left</span>, - <span class="ruby-identifier">author_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">users_project</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span> - ) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Votes.html b/doc/code/classes/Votes.html deleted file mode 100644 index bb786a79662..00000000000 --- a/doc/code/classes/Votes.html +++ /dev/null @@ -1,307 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Votes</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Module</span> - Votes - - </h1> - <ul class="files"> - - <li><a href="../files/app/roles/votes_rb.html">app/roles/votes.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-downvotes">downvotes</a>, - </li> - - - <li> - <a href="#method-i-downvotes_in_percent">downvotes_in_percent</a> - </li> - - </ul> - </dd> - - <dt>U</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-upvotes">upvotes</a>, - </li> - - - <li> - <a href="#method-i-upvotes_in_percent">upvotes_in_percent</a> - </li> - - </ul> - </dd> - - <dt>V</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-votes_count">votes_count</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-downvotes"> - - <b>downvotes</b>() - - <a href="../classes/Votes.html#method-i-downvotes" name="method-i-downvotes" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Return the number of -1 comments (downvotes)</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-downvotes_source')" id="l_method-i-downvotes_source">show</a> - - </p> - <div id="method-i-downvotes_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/votes.rb, line 16</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">downvotes</span> - <span class="ruby-identifier">notes</span>.<span class="ruby-identifier">select</span>(&<span class="ruby-value">:downvote?</span>).<span class="ruby-identifier">size</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-downvotes_in_percent"> - - <b>downvotes_in_percent</b>() - - <a href="../classes/Votes.html#method-i-downvotes_in_percent" name="method-i-downvotes_in_percent" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-downvotes_in_percent_source')" id="l_method-i-downvotes_in_percent_source">show</a> - - </p> - <div id="method-i-downvotes_in_percent_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/votes.rb, line 20</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">downvotes_in_percent</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">votes_count</span>.<span class="ruby-identifier">zero?</span> - <span class="ruby-number">0</span> - <span class="ruby-keyword">else</span> - <span class="ruby-number">100.0</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">upvotes_in_percent</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-upvotes"> - - <b>upvotes</b>() - - <a href="../classes/Votes.html#method-i-upvotes" name="method-i-upvotes" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Return the number of +1 comments (upvotes)</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-upvotes_source')" id="l_method-i-upvotes_source">show</a> - - </p> - <div id="method-i-upvotes_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/votes.rb, line 3</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">upvotes</span> - <span class="ruby-identifier">notes</span>.<span class="ruby-identifier">select</span>(&<span class="ruby-value">:upvote?</span>).<span class="ruby-identifier">size</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-upvotes_in_percent"> - - <b>upvotes_in_percent</b>() - - <a href="../classes/Votes.html#method-i-upvotes_in_percent" name="method-i-upvotes_in_percent" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-upvotes_in_percent_source')" id="l_method-i-upvotes_in_percent_source">show</a> - - </p> - <div id="method-i-upvotes_in_percent_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/votes.rb, line 7</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">upvotes_in_percent</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">votes_count</span>.<span class="ruby-identifier">zero?</span> - <span class="ruby-number">0</span> - <span class="ruby-keyword">else</span> - <span class="ruby-number">100.0</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">votes_count</span> * <span class="ruby-identifier">upvotes</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-votes_count"> - - <b>votes_count</b>() - - <a href="../classes/Votes.html#method-i-votes_count" name="method-i-votes_count" class="permalink">Link</a> - </div> - - - <div class="description"> - <p>Return the total number of votes</p> - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-votes_count_source')" id="l_method-i-votes_count_source">show</a> - - </p> - <div id="method-i-votes_count_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/roles/votes.rb, line 29</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">votes_count</span> - <span class="ruby-identifier">upvotes</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">downvotes</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/WebHook.html b/doc/code/classes/WebHook.html deleted file mode 100644 index 54097dd30e5..00000000000 --- a/doc/code/classes/WebHook.html +++ /dev/null @@ -1,168 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>WebHook</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - WebHook - - <span class="parent">< - - ActiveRecord::Base - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/models/web_hook_rb.html">app/models/web_hook.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<h2 id="label-Schema+Information">Schema Information</h2> - -<p>Table name: web_hooks</p> - -<pre>id :integer not null, primary key -url :string(255) -project_id :integer -created_at :datetime not null -updated_at :datetime not null -type :string(255) default("ProjectHook") -service_id :integer</pre> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-execute">execute</a> - </li> - - </ul> - </dd> - - </dl> - - - - <!-- Includes --> - <div class="sectiontitle">Included Modules</div> - <ul> - - <li> - - HTTParty - - </li> - - </ul> - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-execute"> - - <b>execute</b>(data) - - <a href="../classes/WebHook.html#method-i-execute" name="method-i-execute" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-execute_source')" id="l_method-i-execute_source">show</a> - - </p> - <div id="method-i-execute_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/web_hook.rb, line 25</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">execute</span>(<span class="ruby-identifier">data</span>) - <span class="ruby-identifier">parsed_url</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">url</span>) - <span class="ruby-keyword">if</span> <span class="ruby-identifier">parsed_url</span>.<span class="ruby-identifier">userinfo</span>.<span class="ruby-identifier">blank?</span> - <span class="ruby-constant">WebHook</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">body</span><span class="ruby-operator">:</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">to_json</span>, <span class="ruby-identifier">headers</span><span class="ruby-operator">:</span> { <span class="ruby-string">"Content-Type"</span> =<span class="ruby-operator">></span> <span class="ruby-string">"application/json"</span> }) - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">post_url</span> = <span class="ruby-identifier">url</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-node">"#{parsed_url.userinfo}@"</span>, <span class="ruby-string">""</span>) - <span class="ruby-constant">WebHook</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">post_url</span>, - <span class="ruby-identifier">body</span><span class="ruby-operator">:</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">to_json</span>, - <span class="ruby-identifier">headers</span><span class="ruby-operator">:</span> {<span class="ruby-string">"Content-Type"</span> =<span class="ruby-operator">></span> <span class="ruby-string">"application/json"</span>}, - <span class="ruby-identifier">basic_auth</span><span class="ruby-operator">:</span> {<span class="ruby-identifier">username</span><span class="ruby-operator">:</span> <span class="ruby-identifier">parsed_url</span>.<span class="ruby-identifier">user</span>, <span class="ruby-identifier">password</span><span class="ruby-operator">:</span> <span class="ruby-identifier">parsed_url</span>.<span class="ruby-identifier">password</span>}) - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/Wiki.html b/doc/code/classes/Wiki.html deleted file mode 100644 index ab0fe9b2444..00000000000 --- a/doc/code/classes/Wiki.html +++ /dev/null @@ -1,294 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Wiki</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - Wiki - - <span class="parent">< - - ActiveRecord::Base - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/models/wiki_rb.html">app/models/wiki.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - <div class="description"> - -<h2 id="label-Schema+Information">Schema Information</h2> - -<p>Table name: wikis</p> - -<pre>id :integer not null, primary key -title :string(255) -content :text -project_id :integer -created_at :datetime not null -updated_at :datetime not null -slug :string(255) -user_id :integer</pre> - - </div> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>R</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-regenerate_from">regenerate_from</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-c-search">search</a>, - </li> - - - <li> - <a href="#method-i-set_slug">set_slug</a> - </li> - - </ul> - </dd> - - <dt>T</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-to_param">to_param</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Class Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-search"> - - <b>search</b>(query) - - <a href="../classes/Wiki.html#method-c-search" name="method-c-search" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-search_source')" id="l_method-c-search_source">show</a> - - </p> - <div id="method-c-search_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/wiki.rb, line 33</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">search</span>(<span class="ruby-identifier">query</span>) - <span class="ruby-identifier">where</span>(<span class="ruby-string">"title like :query OR content like :query"</span>, <span class="ruby-identifier">query</span><span class="ruby-operator">:</span> <span class="ruby-node">"%#{query}%"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Class Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-c-regenerate_from"> - - <b>regenerate_from</b>(wiki) - - <a href="../classes/Wiki.html#method-c-regenerate_from" name="method-c-regenerate_from" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-c-regenerate_from_source')" id="l_method-c-regenerate_from_source">show</a> - - </p> - <div id="method-c-regenerate_from_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/wiki.rb, line 40</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">regenerate_from</span> <span class="ruby-identifier">wiki</span> - <span class="ruby-identifier">regenerated_field</span> = [<span class="ruby-value">:slug</span>, <span class="ruby-value">:content</span>, <span class="ruby-value">:title</span>] - - <span class="ruby-identifier">new_wiki</span> = <span class="ruby-constant">Wiki</span>.<span class="ruby-identifier">new</span> - <span class="ruby-identifier">regenerated_field</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">field</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">new_wiki</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">"#{field}="</span>, <span class="ruby-identifier">wiki</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">field</span>)) - <span class="ruby-keyword">end</span> - <span class="ruby-identifier">new_wiki</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-to_param"> - - <b>to_param</b>() - - <a href="../classes/Wiki.html#method-i-to_param" name="method-i-to_param" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-to_param_source')" id="l_method-i-to_param_source">show</a> - - </p> - <div id="method-i-to_param_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/wiki.rb, line 28</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_param</span> - <span class="ruby-identifier">slug</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="sectiontitle">Instance Protected methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-set_slug"> - - <b>set_slug</b>() - - <a href="../classes/Wiki.html#method-i-set_slug" name="method-i-set_slug" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-set_slug_source')" id="l_method-i-set_slug_source">show</a> - - </p> - <div id="method-i-set_slug_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/models/wiki.rb, line 50</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">set_slug</span> - <span class="ruby-keyword">self</span>.<span class="ruby-identifier">slug</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">title</span>.<span class="ruby-identifier">parameterize</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file diff --git a/doc/code/classes/WikisController.html b/doc/code/classes/WikisController.html deleted file mode 100644 index 3247d4f0fd9..00000000000 --- a/doc/code/classes/WikisController.html +++ /dev/null @@ -1,397 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>WikisController</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> -<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" /> -<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/main.js" type="text/javascript" charset="utf-8"></script> -<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script> - -</head> - -<body> - <div class="banner"> - - <h1> - <span class="type">Class</span> - WikisController - - <span class="parent">< - - <a href="ProjectResourceController.html">ProjectResourceController</a> - - </span> - - </h1> - <ul class="files"> - - <li><a href="../files/app/controllers/wikis_controller_rb.html">app/controllers/wikis_controller.rb</a></li> - - </ul> - </div> - <div id="bodyContent"> - <div id="content"> - - - - - - - - - - - - - - - <!-- Method ref --> - <div class="sectiontitle">Methods</div> - <dl class="methods"> - - <dt>C</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-create">create</a> - </li> - - </ul> - </dd> - - <dt>D</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-destroy">destroy</a> - </li> - - </ul> - </dd> - - <dt>E</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-edit">edit</a> - </li> - - </ul> - </dd> - - <dt>H</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-history">history</a> - </li> - - </ul> - </dd> - - <dt>P</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-pages">pages</a> - </li> - - </ul> - </dd> - - <dt>S</dt> - <dd> - <ul> - - - <li> - <a href="#method-i-show">show</a> - </li> - - </ul> - </dd> - - </dl> - - - - - - - - - - - - - - - - - - - <!-- Methods --> - - <div class="sectiontitle">Instance Public methods</div> - - <div class="method"> - <div class="title method-title" id="method-i-create"> - - <b>create</b>() - - <a href="../classes/WikisController.html#method-i-create" name="method-i-create" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-create_source')" id="l_method-i-create_source">show</a> - - </p> - <div id="method-i-create_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/wikis_controller.rb, line 36</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">create</span> - <span class="ruby-ivar">@wiki</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">wikis</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:wiki</span>]) - <span class="ruby-ivar">@wiki</span>.<span class="ruby-identifier">user</span> = <span class="ruby-identifier">current_user</span> - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@wiki</span>.<span class="ruby-identifier">save</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> { <span class="ruby-identifier">redirect_to</span> [<span class="ruby-ivar">@project</span>, <span class="ruby-ivar">@wiki</span>], <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">'Wiki was successfully updated.'</span> } - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">"edit"</span> } - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-destroy"> - - <b>destroy</b>() - - <a href="../classes/WikisController.html#method-i-destroy" name="method-i-destroy" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-destroy_source')" id="l_method-i-destroy_source">show</a> - - </p> - <div id="method-i-destroy_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/wikis_controller.rb, line 53</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">destroy</span> - <span class="ruby-ivar">@wikis</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">wikis</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">slug</span><span class="ruby-operator">:</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]).<span class="ruby-identifier">delete_all</span> - - <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> { <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">project_wiki_path</span>(<span class="ruby-ivar">@project</span>, <span class="ruby-value">:index</span>), <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">"Page was successfully deleted"</span> } - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-edit"> - - <b>edit</b>() - - <a href="../classes/WikisController.html#method-i-edit" name="method-i-edit" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-edit_source')" id="l_method-i-edit_source">show</a> - - </p> - <div id="method-i-edit_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/wikis_controller.rb, line 31</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">edit</span> - <span class="ruby-ivar">@wiki</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">wikis</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">slug</span><span class="ruby-operator">:</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]).<span class="ruby-identifier">order</span>(<span class="ruby-string">"created_at"</span>).<span class="ruby-identifier">last</span> - <span class="ruby-ivar">@wiki</span> = <span class="ruby-constant">Wiki</span>.<span class="ruby-identifier">regenerate_from</span> <span class="ruby-ivar">@wiki</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-history"> - - <b>history</b>() - - <a href="../classes/WikisController.html#method-i-history" name="method-i-history" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-history_source')" id="l_method-i-history_source">show</a> - - </p> - <div id="method-i-history_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/wikis_controller.rb, line 49</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">history</span> - <span class="ruby-ivar">@wikis</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">wikis</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">slug</span><span class="ruby-operator">:</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]).<span class="ruby-identifier">order</span>(<span class="ruby-string">"created_at"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-pages"> - - <b>pages</b>() - - <a href="../classes/WikisController.html#method-i-pages" name="method-i-pages" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-pages_source')" id="l_method-i-pages_source">show</a> - - </p> - <div id="method-i-pages_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/wikis_controller.rb, line 6</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">pages</span> - <span class="ruby-ivar">@wikis</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">wikis</span>.<span class="ruby-identifier">group</span>(<span class="ruby-value">:slug</span>).<span class="ruby-identifier">order</span>(<span class="ruby-string">"created_at"</span>) -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - - <div class="method"> - <div class="title method-title" id="method-i-show"> - - <b>show</b>() - - <a href="../classes/WikisController.html#method-i-show" name="method-i-show" class="permalink">Link</a> - </div> - - - <div class="description"> - - </div> - - - - - - - <div class="sourcecode"> - - <p class="source-link"> - Source: - <a href="javascript:toggleSource('method-i-show_source')" id="l_method-i-show_source">show</a> - - </p> - <div id="method-i-show_source" class="dyn-source"> - <pre><span class="ruby-comment"># File app/controllers/wikis_controller.rb, line 10</span> -<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">show</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:old_page_id</span>] - <span class="ruby-ivar">@wiki</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">wikis</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:old_page_id</span>]) - <span class="ruby-keyword">else</span> - <span class="ruby-ivar">@wiki</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">wikis</span>.<span class="ruby-identifier">where</span>(<span class="ruby-identifier">slug</span><span class="ruby-operator">:</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]).<span class="ruby-identifier">order</span>(<span class="ruby-string">"created_at"</span>).<span class="ruby-identifier">last</span> - <span class="ruby-keyword">end</span> - - <span class="ruby-ivar">@note</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">notes</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">noteable</span><span class="ruby-operator">:</span> <span class="ruby-ivar">@wiki</span>) - - <span class="ruby-keyword">if</span> <span class="ruby-ivar">@wiki</span> - <span class="ruby-identifier">render</span> <span class="ruby-string">'show'</span> - <span class="ruby-keyword">else</span> - <span class="ruby-keyword">if</span> <span class="ruby-identifier">can?</span>(<span class="ruby-identifier">current_user</span>, <span class="ruby-value">:write_wiki</span>, <span class="ruby-ivar">@project</span>) - <span class="ruby-ivar">@wiki</span> = <span class="ruby-ivar">@project</span>.<span class="ruby-identifier">wikis</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">slug</span><span class="ruby-operator">:</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>]) - <span class="ruby-identifier">render</span> <span class="ruby-string">'edit'</span> - <span class="ruby-keyword">else</span> - <span class="ruby-identifier">render</span> <span class="ruby-string">'empty'</span> - <span class="ruby-keyword">end</span> - <span class="ruby-keyword">end</span> -<span class="ruby-keyword">end</span></pre> - </div> - </div> - - </div> - </div> - - </div> - </body> -</html>
\ No newline at end of file |