Commit 48154823 authored by Raphael Sofaer's avatar Raphael Sofaer

Start some real docs

parent 319863a7
app/models/post.rb 1c52c0a1c26a882c609379b7fcf48db582a89e2f
......@@ -17,7 +17,7 @@ gem 'devise_invitable', '0.5.0'
#Authentication
gem 'omniauth', '0.2.6'
gem 'twitter', '1.5.0'
gem 'twitter', '1.5.0'
#Views
gem 'haml', '3.0.25'
......@@ -62,6 +62,7 @@ gem 'resque', '1.10.0'
gem 'SystemTimer', '1.2.1' unless RUBY_VERSION.include? '1.9' || RUBY_PLATFORM =~ 'win32'
group :development do
gem 'yard'
gem 'capistrano', '2.5.19', :require => false
gem 'capistrano-ext', '1.2.1', :require => false
gem 'sod', :git => "git://github.com/MikeSofaer/sod.git", :require => false
......
......@@ -389,6 +389,7 @@ GEM
crack (>= 0.1.7)
will_paginate (3.0.pre2)
xml-simple (1.0.16)
yard (0.7.1)
yui-compressor (0.9.6)
POpen4 (>= 0.1.4)
......@@ -451,3 +452,4 @@ DEPENDENCIES
typhoeus
webmock
will_paginate (= 3.0.pre2)
yard
......@@ -30,7 +30,7 @@ integration test suite. As you can see, we need more integration tests. Pick a
- Take a look at the [issue tracker](http://bugs.joindiaspora.com) and pick a bug.
Write a spec for it, so it's easy for another developer to fix it.
Patches must be tested, and all your tests should be green,
Catches must be tested, and all your tests should be green,
unless you're marking an existing bug, before a pull request is sent.
Unit tests should be in Rspec, and integration tests should be in Cucumber.
......
......@@ -67,6 +67,10 @@ class Post < ActiveRecord::Base
false
end
# The list of people that should receive this Post.
#
# @param [User] user The context, or dispatching user.
# @return [Array<Person>] The list of subscribers to this post
def subscribers(user)
if self.public?
user.contact_people
......
This diff is collapsed.
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
Module: ActionDispatch
&mdash; Documentation by YARD 0.7.1
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
relpath = '';
if (relpath != '') relpath += '/';
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
</head>
<body>
<script type="text/javascript" charset="utf-8">
if (window.top.frames.main) document.body.className = 'frames';
</script>
<div id="header">
<div id="menu">
<a href="_index.html">Index (A)</a> &raquo;
<span class="title">ActionDispatch</span>
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>
<div id="search">
<a id="class_list_link" href="#">Class List</a>
<a id="method_list_link" href="#">Method List</a>
<a id="file_list_link" href="#">File List</a>
</div>
<div class="clear"></div>
</div>
<iframe id="search_frame"></iframe>
<div id="content"><h1>Module: ActionDispatch
</h1>
<dl class="box">
<dt class="r1 last">Defined in:</dt>
<dd class="r1 last">lib/log_overrider.rb</dd>
</dl>
<div class="clear"></div>
<h2>Defined Under Namespace</h2>
<p class="children">
<strong class="classes">Classes:</strong> <span class='object_link'><a href="ActionDispatch/ShowExceptions.html" title="ActionDispatch::ShowExceptions (class)">ShowExceptions</a></span>
</p>
</div>
<div id="footer">
Generated on Mon Jun 13 15:59:19 2011 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.1 (ruby-1.8.7).
</div>
</body>
</html>
\ No newline at end of file
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
Class: ActionView::LogSubscriber
&mdash; Documentation by YARD 0.7.1
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
relpath = '..';
if (relpath != '') relpath += '/';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<script type="text/javascript" charset="utf-8">
if (window.top.frames.main) document.body.className = 'frames';
</script>
<div id="header">
<div id="menu">
<a href="../_index.html">Index (L)</a> &raquo;
<span class='title'>ActionView</span>
&raquo;
<span class="title">LogSubscriber</span>
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>
<div id="search">
<a id="class_list_link" href="#">Class List</a>
<a id="method_list_link" href="#">Method List</a>
<a id="file_list_link" href="#">File List</a>
</div>
<div class="clear"></div>
</div>
<iframe id="search_frame"></iframe>
<div id="content"><h1>Class: ActionView::LogSubscriber
</h1>
<dl class="box">
<dt class="r1">Inherits:</dt>
<dd class="r1">
<span class="inheritName">Object</span>
<ul class="fullTree">
<li>Object</li>
<li class="next">ActionView::LogSubscriber</li>
</ul>
<a href="#" class="inheritanceTree">show all</a>
</dd>
<dt class="r2 last">Defined in:</dt>
<dd class="r2 last">lib/log_overrider.rb</dd>
</dl>
<div class="clear"></div>
<h2>
Instance Method Summary
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
</h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#render_template-instance_method" title="#render_template (instance method)">- (Object) <strong>render_template</strong>(event) </a>
(also: #render_partial, #render_collection)
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
</ul>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<p class="signature first" id="render_template-instance_method">
- (<tt>Object</tt>) <strong>render_template</strong>(event)
<span class="aliases">Also known as:
<span class="names"><span id='render_partial-instance_method'>render_partial</span>, <span id='render_collection-instance_method'>render_collection</span></span>
</span>
</p><table class="source_code">
<tr>
<td>
<pre class="lines">
2
3
4
5
6
7
8
9
10
11
12
13</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/log_overrider.rb', line 2</span>
<span class='def def kw'>def</span> <span class='render_template identifier id'>render_template</span><span class='lparen token'>(</span><span class='event identifier id'>event</span><span class='rparen token'>)</span>
<span class='count identifier id'>count</span> <span class='assign token'>=</span> <span class='event identifier id'>event</span><span class='dot token'>.</span><span class='payload identifier id'>payload</span><span class='lbrack token'>[</span><span class='symbol val'>:count</span><span class='rbrack token'>]</span> <span class='orop op'>||</span> <span class='integer val'>1</span>
<span class='hash identifier id'>hash</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='symbol val'>:event</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='symbol val'>:render</span><span class='comma token'>,</span>
<span class='symbol val'>:template</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='from_rails_root identifier id'>from_rails_root</span><span class='lparen token'>(</span><span class='event identifier id'>event</span><span class='dot token'>.</span><span class='payload identifier id'>payload</span><span class='lbrack token'>[</span><span class='symbol val'>:identifier</span><span class='rbrack token'>]</span><span class='rparen token'>)</span><span class='comma token'>,</span>
<span class='symbol val'>:total_ms</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='event identifier id'>event</span><span class='dot token'>.</span><span class='duration identifier id'>duration</span><span class='comma token'>,</span>
<span class='symbol val'>:count</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='count identifier id'>count</span><span class='comma token'>,</span>
<span class='symbol val'>:ms</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='event identifier id'>event</span><span class='dot token'>.</span><span class='duration identifier id'>duration</span> <span class='div op'>/</span> <span class='count identifier id'>count</span><span class='rbrace token'>}</span>
<span class='hash identifier id'>hash</span><span class='dot token'>.</span><span class='merge identifier id'>merge</span><span class='lparen token'>(</span><span class='symbol val'>:layout</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='event identifier id'>event</span><span class='dot token'>.</span><span class='payload identifier id'>payload</span><span class='lbrack token'>[</span><span class='symbol val'>:layout</span><span class='rbrack token'>]</span><span class='rparen token'>)</span> <span class='if if_mod kw'>if</span> <span class='event identifier id'>event</span><span class='dot token'>.</span><span class='payload identifier id'>payload</span><span class='lbrack token'>[</span><span class='symbol val'>:layout</span><span class='rbrack token'>]</span>
<span class='Rails constant id'>Rails</span><span class='dot token'>.</span><span class='logger identifier id'>logger</span><span class='dot token'>.</span><span class='info identifier id'>info</span><span class='lparen token'>(</span><span class='hash identifier id'>hash</span><span class='rparen token'>)</span>
<span class='end end kw'>end</span>
</pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Mon Jun 13 15:59:22 2011 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.1 (ruby-1.8.7).
</div>
</body>
</html>
\ No newline at end of file
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
Class: ActiveRecord::LogSubscriber
&mdash; Documentation by YARD 0.7.1
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
relpath = '..';
if (relpath != '') relpath += '/';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<script type="text/javascript" charset="utf-8">
if (window.top.frames.main) document.body.className = 'frames';
</script>
<div id="header">
<div id="menu">
<a href="../_index.html">Index (L)</a> &raquo;
<span class='title'><span class='object_link'><a href="../ActiveRecord.html" title="ActiveRecord (module)">ActiveRecord</a></span></span>
&raquo;
<span class="title">LogSubscriber</span>
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>
<div id="search">
<a id="class_list_link" href="#">Class List</a>
<a id="method_list_link" href="#">Method List</a>
<a id="file_list_link" href="#">File List</a>
</div>
<div class="clear"></div>
</div>
<iframe id="search_frame"></iframe>
<div id="content"><h1>Class: ActiveRecord::LogSubscriber
</h1>
<dl class="box">
<dt class="r1">Inherits:</dt>
<dd class="r1">
<span class="inheritName">Object</span>
<ul class="fullTree">
<li>Object</li>
<li class="next">ActiveRecord::LogSubscriber</li>
</ul>
<a href="#" class="inheritanceTree">show all</a>
</dd>
<dt class="r2 last">Defined in:</dt>
<dd class="r2 last">lib/log_overrider.rb</dd>
</dl>
<div class="clear"></div>
<h2>
Instance Method Summary
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
</h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#sql-instance_method" title="#sql (instance method)">- (Object) <strong>sql</strong>(event) </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
</ul>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<p class="signature first" id="sql-instance_method">
- (<tt>Object</tt>) <strong>sql</strong>(event)
</p><table class="source_code">
<tr>
<td>
<pre class="lines">
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/log_overrider.rb', line 83</span>
<span class='def def kw'>def</span> <span class='sql identifier id'>sql</span><span class='lparen token'>(</span><span class='event identifier id'>event</span><span class='rparen token'>)</span>
<span class='self self kw'>self</span><span class='dot token'>.</span><span class='class identifier id'>class</span><span class='dot token'>.</span><span class='runtime identifier id'>runtime</span> <span class='opasgn op'>+=</span> <span class='event identifier id'>event</span><span class='dot token'>.</span><span class='duration identifier id'>duration</span>
<span class='return return kw'>return</span> <span class='unless unless_mod kw'>unless</span> <span class='logger identifier id'>logger</span><span class='dot token'>.</span><span class='info? fid id'>info?</span>
<span class='payload identifier id'>payload</span> <span class='assign token'>=</span> <span class='event identifier id'>event</span><span class='dot token'>.</span><span class='payload identifier id'>payload</span>
<span class='sql identifier id'>sql</span> <span class='assign token'>=</span> <span class='payload identifier id'>payload</span><span class='lbrack token'>[</span><span class='symbol val'>:sql</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='squeeze identifier id'>squeeze</span><span class='lparen token'>(</span><span class='string val'>' '</span><span class='rparen token'>)</span>
<span class='binds identifier id'>binds</span> <span class='assign token'>=</span> <span class='nil nil kw'>nil</span>
<span class='unless unless kw'>unless</span> <span class='lparen token'>(</span><span class='payload identifier id'>payload</span><span class='lbrack token'>[</span><span class='symbol val'>:binds</span><span class='rbrack token'>]</span> <span class='orop op'>||</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='empty? fid id'>empty?</span>
<span class='binds identifier id'>binds</span> <span class='assign token'>=</span> <span class='string val'>&quot; &quot;</span> <span class='plus op'>+</span> <span class='payload identifier id'>payload</span><span class='lbrack token'>[</span><span class='symbol val'>:binds</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='map identifier id'>map</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='col identifier id'>col</span><span class='comma token'>,</span><span class='v identifier id'>v</span><span class='bitor op'>|</span>
<span class='lbrack token'>[</span><span class='col identifier id'>col</span><span class='dot token'>.</span><span class='name identifier id'>name</span><span class='comma token'>,</span> <span class='v identifier id'>v</span><span class='rbrack token'>]</span>
<span class='rbrace token'>}</span><span class='dot token'>.</span><span class='inspect identifier id'>inspect</span>
<span class='end end kw'>end</span>
<span class='log_string identifier id'>log_string</span> <span class='assign token'>=</span> <span class='dstring node'>&quot;event=sql name='#{payload[:name]}' ms=#{event.duration} query='#{sql}'&quot;</span>
<span class='log_string identifier id'>log_string</span> <span class='lshft op'>&lt;&lt;</span> <span class='dstring node'>&quot;caller_hash=#{caller.hash} binds='#{binds}' caller_with_diaspora='#{caller.grep(/diaspora\/(app|lib)/).join(';')}'&quot;</span>
<span class='info identifier id'>info</span> <span class='log_string identifier id'>log_string</span>
<span class='end end kw'>end</span>
</pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Mon Jun 13 15:59:23 2011 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.1 (ruby-1.8.7).
</div>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
Class: AppsController
&mdash; Documentation by YARD 0.7.1
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
relpath = '';
if (relpath != '') relpath += '/';
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
</head>
<body>
<script type="text/javascript" charset="utf-8">
if (window.top.frames.main) document.body.className = 'frames';
</script>
<div id="header">
<div id="menu">
<a href="_index.html">Index (A)</a> &raquo;
<span class="title">AppsController</span>
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>
<div id="search">
<a id="class_list_link" href="#">Class List</a>
<a id="method_list_link" href="#">Method List</a>
<a id="file_list_link" href="#">File List</a>
</div>
<div class="clear"></div>
</div>
<iframe id="search_frame"></iframe>
<div id="content"><h1>Class: AppsController
</h1>
<dl class="box">
<dt class="r1">Inherits:</dt>
<dd class="r1">
<span class="inheritName"><span class='object_link'><a href="ApplicationController.html" title="ApplicationController (class)">ApplicationController</a></span></span>
<ul class="fullTree">
<li>Object</li>
<li class="next">ActionController::Base</li>
<li class="next"><span class='object_link'><a href="ApplicationController.html" title="ApplicationController (class)">ApplicationController</a></span></li>
<li class="next">AppsController</li>
</ul>
<a href="#" class="inheritanceTree">show all</a>
</dd>
<dt class="r2 last">Defined in:</dt>
<dd class="r2 last">app/controllers/apps_controller.rb</dd>
</dl>
<div class="clear"></div>
<h2>
Instance Method Summary
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
</h2>
<ul class="summary">
<li class=