Commit 81264c64 authored by John E. Vincent's avatar John E. Vincent

Updating README and working on documentation

parent d7eb709d
......@@ -11,4 +11,4 @@ tmp/*
.bundle
warbler/*
Gemfile.lock
Gemfile.lock
doc
lib/noah.rb 269c31354e0a093534b6ab797495b550159d31e4
lib/noah/ark.rb da39a3ee5e6b4b0d3255bfef95601890afd80709
lib/noah/app.rb a6dd925f097aefef6d8dc39c2a26834ae31b2c11
lib/noah/hosts.rb b006e064b7ac812822f9372c50698541d2516f8d
lib/noah/models.rb 3131318013e90b57d973480127f8df323b9a2d73
lib/noah/version.rb fff0731d5b3ed195ea84b8568a1d436580d39687
lib/noah/helpers.rb d64ca090b4b6669b083c48eb7992b257438ea0d9
lib/noah/services.rb a0560ef81155dd845eb2e6a1969e5c5d31cf5a67
lib/noah/watchers.rb f6b78188e5479f49bf4241eb51dae6104ba082db
lib/noah/applications.rb 176e30deccd1444617b711ca4297b9edded36213
lib/noah/configurations.rb c0a086d67deb04e67e84a8210f1d19f1b8abd287
This diff is collapsed.
......@@ -90,7 +90,21 @@ EOJ
end
puts "Sample data populated!"
end
begin
require 'yard'
require 'yard/sinatra'
desc "Generate documentation"
YARD::Rake::YardocTask.new do |t|
t.files = ['lib/**/*.rb'] # optional
t.options = ['--title', "Noah #{Noah::VERSION} Documentation"]
t.options += ['--plugin', "yard-sinatra"]
t.options += ['--protected', '--private'] # optional
end
rescue LoadError
"You need YARD installed to generate docs"
end
desc "Demo environment"
task :start_demo do
puts "Soon, young padawan"
......
This diff is collapsed.
This diff is collapsed.
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 lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>lib/noah/applications.rb</title>
<link href="screen.css" media="all" rel="stylesheet" type="text/css" />
<link href="print.css" media="print" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<script type="text/javascript" src="rcov.js"></script>
</head>
<body>
<h1>Noah C0 Coverage Information - RCov</h1>
<h2>lib/noah/applications.rb</h2>
<div class="report_table_wrapper">
<table class='report' id='report_table'>
<thead>
<tr>
<th class="left_align">Name</th>
<th class="right_align">Total Lines</th>
<th class="right_align">Lines of Code</th>
<th class="left_align">Total Coverage</th>
<th class="left_align">Code Coverage</th>
</tr>
</thead>
<tbody>
<tr>
<td class="left_align"><a href="lib-noah-applications_rb.html">lib/noah/applications.rb</a></td>
<td class='right_align'><tt>46</tt></td>
<td class='right_align'><tt>39</tt></td>
<td class="left_align"><div class="percent_graph_legend"><tt class=''>73.91%</tt></div>
<div class="percent_graph">
<div class="covered" style="width:74px"></div>
<div class="uncovered" style="width:26px"></div>
</div></td>
<td class="left_align"><div class="percent_graph_legend"><tt class=''>69.23%</tt></div>
<div class="percent_graph">
<div class="covered" style="width:69px"></div>
<div class="uncovered" style="width:31px"></div>
</div></td>
</tr>
</tbody>
</table>
</div>
<h3>Key</h3>
<div class="key"><pre><span class='marked'>Code reported as executed by Ruby looks like this...</span><span class='marked1'>and this: this line is also marked as covered.</span><span class='inferred'>Lines considered as run by rcov, but not reported by Ruby, look like this,</span><span class='inferred1'>and this: these lines were inferred by rcov (using simple heuristics).</span><span class='uncovered'>Finally, here's a line marked as not executed.</span></pre></div>
<h3>Coverage Details</h3>
<table class="details">
<tbody>
<tr class="uncovered">
<td><pre><a name="line1">1</a> class Application &lt; Ohm::Model</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line2">2</a> include Ohm::Typecast</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line3">3</a> include Ohm::Timestamping</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line4">4</a> include Ohm::Callbacks</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line5">5</a> include Ohm::ExtraValidations</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line6">6</a> </pre></td>
</tr>
<tr class="uncovered">
<td><pre><a name="line7">7</a> attribute :name</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line8">8</a> collection :configurations, Configuration</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line9">9</a> </pre></td>
</tr>
<tr class="uncovered">
<td><pre><a name="line10">10</a> index :name</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line11">11</a> </pre></td>
</tr>
<tr class="uncovered">
<td><pre><a name="line12">12</a> def validate</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line13">13</a> assert_present :name</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line14">14</a> assert_unique :name</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line15">15</a> end</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line16">16</a> </pre></td>
</tr>
<tr class="uncovered">
<td><pre><a name="line17">17</a> def to_hash</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line18">18</a> arr = []</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line19">19</a> configurations.sort.each {|c| arr &lt;&lt; c.to_hash}</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line20">20</a> super.merge(:name =&gt; name, :updated_at =&gt; updated_at, :configurations =&gt; arr)</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line21">21</a> end</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line22">22</a> </pre></td>
</tr>
<tr class="uncovered">
<td><pre><a name="line23">23</a> def is_new?</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line24">24</a> self.created_at == self.updated_at</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line25">25</a> end</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line26">26</a> </pre></td>
</tr>
<tr class="uncovered">
<td><pre><a name="line27">27</a> class &lt;&lt; self</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line28">28</a> def find_or_create(opts = {})</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line29">29</a> begin</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line30">30</a> find(opts).first.nil? ? (app = create(opts)) : (app = find(opts).first)</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line31">31</a> if app.valid?</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line32">32</a> app.save</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line33">33</a> end</pre></td>
</tr>
<tr class="uncovered">
<td><pre><a name="line34">34</a> app</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line35">35</a> rescue Exception =&gt; e</pre></td>
</tr>
<tr class="uncovered">
<td><pre><a name="line36">36</a> e.message</pre></td>
</tr>
<tr class="uncovered">
<td><pre><a name="line37">37</a> end</pre></td>
</tr>
<tr class="uncovered">
<td><pre><a name="line38">38</a> end</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line39">39</a> end</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line40">40</a> end</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line41">41</a> </pre></td>
</tr>
<tr class="uncovered">
<td><pre><a name="line42">42</a> class Applications</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line43">43</a> def self.all(options = {})</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line44">44</a> options.empty? ? Application.all.sort : Application.find(options).sort</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line45">45</a> end</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line46">46</a> end</pre></td>
</tr>
</tbody>
</table>
<p>Generated on 2011-02-08 01:54:20 -0500 with <a href="http://github.com/relevance/rcov">rcov 0.9.8</a></p>
</body>
</html>
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 lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>lib/noah/models.rb</title>
<link href="screen.css" media="all" rel="stylesheet" type="text/css" />
<link href="print.css" media="print" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<script type="text/javascript" src="rcov.js"></script>
</head>
<body>
<h1>Noah C0 Coverage Information - RCov</h1>
<h2>lib/noah/models.rb</h2>
<div class="report_table_wrapper">
<table class='report' id='report_table'>
<thead>
<tr>
<th class="left_align">Name</th>
<th class="right_align">Total Lines</th>
<th class="right_align">Lines of Code</th>
<th class="left_align">Total Coverage</th>
<th class="left_align">Code Coverage</th>
</tr>
</thead>
<tbody>
<tr>
<td class="left_align"><a href="lib-noah-models_rb.html">lib/noah/models.rb</a></td>
<td class='right_align'><tt>5</tt></td>
<td class='right_align'><tt>5</tt></td>
<td class="left_align"><div class="percent_graph_legend"><tt class=''>80.00%</tt></div>
<div class="percent_graph">
<div class="covered" style="width:80px"></div>
<div class="uncovered" style="width:20px"></div>
</div></td>
<td class="left_align"><div class="percent_graph_legend"><tt class=''>80.00%</tt></div>
<div class="percent_graph">
<div class="covered" style="width:80px"></div>
<div class="uncovered" style="width:20px"></div>
</div></td>
</tr>
</tbody>
</table>
</div>
<h3>Key</h3>
<div class="key"><pre><span class='marked'>Code reported as executed by Ruby looks like this...</span><span class='marked1'>and this: this line is also marked as covered.</span><span class='inferred'>Lines considered as run by rcov, but not reported by Ruby, look like this,</span><span class='inferred1'>and this: these lines were inferred by rcov (using simple heuristics).</span><span class='uncovered'>Finally, here's a line marked as not executed.</span></pre></div>
<h3>Coverage Details</h3>
<table class="details">
<tbody>
<tr class="uncovered">
<td><pre><a name="line1">1</a> require File.join(File.dirname(__FILE__),'hosts')</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line2">2</a> require File.join(File.dirname(__FILE__),'services')</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line3">3</a> require File.join(File.dirname(__FILE__),'applications')</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line4">4</a> require File.join(File.dirname(__FILE__),'configurations')</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line5">5</a> require File.join(File.dirname(__FILE__),'watchers')</pre></td>
</tr>
</tbody>
</table>
<p>Generated on 2011-02-08 01:54:21 -0500 with <a href="http://github.com/relevance/rcov">rcov 0.9.8</a></p>
</body>
</html>
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 lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>lib/noah/watchers.rb</title>
<link href="screen.css" media="all" rel="stylesheet" type="text/css" />
<link href="print.css" media="print" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<script type="text/javascript" src="rcov.js"></script>
</head>
<body>
<h1>Noah C0 Coverage Information - RCov</h1>
<h2>lib/noah/watchers.rb</h2>
<div class="report_table_wrapper">
<table class='report' id='report_table'>
<thead>
<tr>
<th class="left_align">Name</th>
<th class="right_align">Total Lines</th>
<th class="right_align">Lines of Code</th>
<th class="left_align">Total Coverage</th>
<th class="left_align">Code Coverage</th>
</tr>
</thead>
<tbody>
<tr>
<td class="left_align"><a href="lib-noah-watchers_rb.html">lib/noah/watchers.rb</a></td>
<td class='right_align'><tt>18</tt></td>
<td class='right_align'><tt>15</tt></td>
<td class="left_align"><div class="percent_graph_legend"><tt class=''>61.11%</tt></div>
<div class="percent_graph">
<div class="covered" style="width:61px"></div>
<div class="uncovered" style="width:39px"></div>
</div></td>
<td class="left_align"><div class="percent_graph_legend"><tt class=''>53.33%</tt></div>
<div class="percent_graph">
<div class="covered" style="width:53px"></div>
<div class="uncovered" style="width:47px"></div>
</div></td>
</tr>
</tbody>
</table>
</div>
<h3>Key</h3>
<div class="key"><pre><span class='marked'>Code reported as executed by Ruby looks like this...</span><span class='marked1'>and this: this line is also marked as covered.</span><span class='inferred'>Lines considered as run by rcov, but not reported by Ruby, look like this,</span><span class='inferred1'>and this: these lines were inferred by rcov (using simple heuristics).</span><span class='uncovered'>Finally, here's a line marked as not executed.</span></pre></div>
<h3>Coverage Details</h3>
<table class="details">
<tbody>
<tr class="uncovered">
<td><pre><a name="line1">1</a> class Watcher &lt; Ohm::Model #NYI</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line2">2</a> include Ohm::Typecast</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line3">3</a> include Ohm::Timestamping</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line4">4</a> include Ohm::Callbacks</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line5">5</a> </pre></td>
</tr>
<tr class="uncovered">
<td><pre><a name="line6">6</a> attribute :client</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line7">7</a> attribute :endpoint</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line8">8</a> attribute :event</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line9">9</a> attribute :action </pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line10">10</a> </pre></td>
</tr>
<tr class="uncovered">
<td><pre><a name="line11">11</a> index :client</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line12">12</a> index :event</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line13">13</a> </pre></td>
</tr>
<tr class="uncovered">
<td><pre><a name="line14">14</a> def validate</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line15">15</a> assert_present :client, :endpoint, :event, :action</pre></td>
</tr>
<tr class="uncovered">
<td><pre><a name="line16">16</a> assert_unique [:client, :endpoint, :event, :action]</pre></td>
</tr>
<tr class="uncovered">
<td><pre><a name="line17">17</a> end</pre></td>
</tr>
<tr class="uncovered">
<td><pre><a name="line18">18</a> end</pre></td>
</tr>
</tbody>
</table>
<p>Generated on 2011-02-08 01:54:20 -0500 with <a href="http://github.com/relevance/rcov">rcov 0.9.8</a></p>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>lib/noah.rb</title>
<link href="screen.css" media="all" rel="stylesheet" type="text/css" />
<link href="print.css" media="print" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<script type="text/javascript" src="rcov.js"></script>
</head>
<body>
<h1>Noah C0 Coverage Information - RCov</h1>
<h2>lib/noah.rb</h2>
<div class="report_table_wrapper">
<table class='report' id='report_table'>
<thead>
<tr>
<th class="left_align">Name</th>
<th class="right_align">Total Lines</th>
<th class="right_align">Lines of Code</th>
<th class="left_align">Total Coverage</th>
<th class="left_align">Code Coverage</th>
</tr>
</thead>
<tbody>
<tr>
<td class="left_align"><a href="lib-noah_rb.html">lib/noah.rb</a></td>
<td class='right_align'><tt>18</tt></td>
<td class='right_align'><tt>17</tt></td>
<td class="left_align"><div class="percent_graph_legend"><tt class=''>83.33%</tt></div>
<div class="percent_graph">
<div class="covered" style="width:83px"></div>
<div class="uncovered" style="width:17px"></div>
</div></td>
<td class="left_align"><div class="percent_graph_legend"><tt class=''>82.35%</tt></div>
<div class="percent_graph">
<div class="covered" style="width:82px"></div>
<div class="uncovered" style="width:18px"></div>
</div></td>
</tr>
</tbody>
</table>
</div>
<h3>Key</h3>
<div class="key"><pre><span class='marked'>Code reported as executed by Ruby looks like this...</span><span class='marked1'>and this: this line is also marked as covered.</span><span class='inferred'>Lines considered as run by rcov, but not reported by Ruby, look like this,</span><span class='inferred1'>and this: these lines were inferred by rcov (using simple heuristics).</span><span class='uncovered'>Finally, here's a line marked as not executed.</span></pre></div>
<h3>Coverage Details</h3>
<table class="details">
<tbody>
<tr class="uncovered">
<td><pre><a name="line1">1</a> require 'ohm'</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line2">2</a> require 'ohm/contrib'</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line3">3</a> begin</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line4">4</a> require 'yajl'</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line5">5</a> rescue LoadError</pre></td>
</tr>
<tr class="inferred">
<td><pre><a name="line6">6</a> require 'json'</pre></td>
</tr>
<tr class="inferred">
<td><pre><a name="line7">7</a> end</pre></td>
</tr>
<tr class="uncovered">
<td><pre><a name="line8">8</a> require 'haml'</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line9">9</a> require 'yaml'</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line10">10</a> require 'sinatra/base'</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line11">11</a> require 'sinatra/namespace'</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line12">12</a> </pre></td>
</tr>
<tr class="uncovered">
<td><pre><a name="line13">13</a> require File.join(File.dirname(__FILE__), 'noah','hosts')</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line14">14</a> require File.join(File.dirname(__FILE__), 'noah','services')</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line15">15</a> require File.join(File.dirname(__FILE__), 'noah','applications')</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line16">16</a> require File.join(File.dirname(__FILE__), 'noah','configurations')</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line17">17</a> require File.join(File.dirname(__FILE__), 'noah','watchers')</pre></td>
</tr>
<tr class="marked">
<td><pre><a name="line18">18</a> require File.join(File.dirname(__FILE__), 'noah','app')</pre></td>
</tr>
</tbody>
</table>
<p>Generated on 2011-02-08 01:54:21 -0500 with <a href="http://github.com/relevance/rcov">rcov 0.9.8</a></p>
</body>
</html>
/* Hide controls */
body {
color: #000000;
background-color: #ffffff;
}
/* Hide controls */
div.filters {
display: none;
}
\ No newline at end of file
function toggleCode( id ) {
if ( document.getElementById ) {
elem = document.getElementById( id );
} else if ( document.all ) {
elem = eval( "document.all." + id );
} else {
return false;
}
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block";
} else {
elemStyle.display = "none";
}
return true;
}
function restripe() {
i = 0;
$('table#report_table tbody tr').each(function(){
if (this.style.display != "none") {
i += 1;
classes = this.className.split(" ");
if ($.inArray("even",classes) != -1) {
classes.splice($.inArray("even",classes),1);
} else if ($.inArray("odd",classes) != -1) {
classes.splice($.inArray("odd",classes),1);
}
if (i % 2 === 0) {
this.className = classes.join(" ") + " odd";
} else {
this.className = classes.join(" ") + " even";
}
}
});
}
// Fix IE's lack of support for indexOf (!)
if (!Array.indexOf) { Array.prototype.indexOf = function(obj){ for(var i=0; i<this.length; i++){ if(this[i]==obj){return i;} } return -1; }}
\ No newline at end of file
/* @group General */
body {
font-family: Verdana, Helvetica, Arial, Sans-Serif;
font-size: 12px;
color: #4C4C4C;
background-color: #F4F2ED;
padding: 1em;
}
a:link {
color: #191919;
}
a:visited {
color: #191919;
}
pre, code {
color: #000000;
font-family: "Bitstream Vera Sans Mono","Monaco","Courier New",monospace;
font-size: 95%;
line-height: 1.3em;
margin-top: 0;
margin-bottom: 0;
padding: 0;
word-wrap: break-word;
}
h1, h2, h3, h4, h5, h6 {
margin: 0em 0em 1em 0em;
color: #666666;
}
h1 {
display: block;
font-size: 2em;
letter-spacing: -1px;
}
h2 {
margin-top: -1em;
}
fieldset {
display: inline;
border: 0px;
padding: 0px;
margin-right: 1em;
}
div.filters {
margin-bottom: 1em;
}
.hidden {
display: none;
}
/* @end */
/* @group Cross-References */
span.cross-ref-title {
font-size: 140%;
}
span.cross-ref a {
text-decoration: none;
}
span.cross-ref {
background-color:#f3f7fa;
border: 1px dashed #333;
margin: 1em;
padding: 0.5em;
overflow: hidden;
}
a.crossref-toggle {
text-decoration: none;
}
/* @end */
/* @group Report Table */
div.report_table_wrapper {
min-width: 900px;
}
table.report {
border-collapse: collapse;
border: 1px solid #666666;
width: 100%;
margin-bottom: 1em;
}
table.report tr {
line-height: 1.75em;
}
table.report th {
background: #666666;
color: #ffffff;
text-align: right;
text-transform: uppercase;
font-size: .8em;
font-weight: bold;
padding: 0em .5em;
border: 1px solid #666666;
}
table.report tfoot tr {
background: #dddddd;
font-weight: bold;
padding: .5em;
border: 1px solid #666666;
}
th.left_align, td.left_align {
text-align: left !important;
}
th.right_align, td.right_align {
text-align: right;
padding-right: 2em !important;
}
table.report th.header:hover {
cursor: pointer;
text-decoration: underline;
}
table.report th.headerSortUp:after{
content: "\25BC";
margin-left: 1em;
}
table.report th.headerSortDown:after {
content: "\25B2";
margin-left: 1em;
}
table.report tr.summary_row {
background: #cccccc;
border: 1px solid #cccccc;
}
table.report tr.summary_row td {
padding-left: .2em !important;
color: #333333;
font-weight: bold;
}
table.report td {
padding: .2em .5em .2em .5em;
}
table.report td a {
text-decoration: none;
}
table.report tbody tr:hover {
background: #cccccc !important;
}
table.report tr.summary_row td {
border-bottom: 1px solid #aaaaaa;
}
table.report tr {
background-color: #eeeeee;
}
table.report tr.odd {
background-color: #dddddd;
}
/* @end */
/* @group Percentage Graphs */
div.percent_graph_legend {
width: 5.5em;
float: left;
margin: .5em 1em .5em 0em;
height: 1em;
line-height: 1em;
}
div.percent_graph {
height: 1em;
border: #333333 1px solid;
empty-cells: show;
padding: 0px;
border-collapse: collapse;
width: 100px !important;
float: left;
margin: .5em 1em .5em 0em;
}
div.percent_graph div {
float: left;
height: 1em;
padding: 0px !important;
}
div.percent_graph div.covered {
background: #649632;
}
div.percent_graph div.uncovered {
background: #a92730;
}
div.percent_graph div.NA {
background: #eaeaea;
}
/* @end */
/* @group Details page */
table.details {
margin-top: 1em;
border-collapse: collapse;
width: 100%;
border: 1px solid #666666;
}
table.details tr {
line-height: 1.75em;
}
table.details td {
padding: .25em;
}
span.inferred, span.inferred1, span.marked, span.marked1, span.uncovered, span.uncovered1 {
display: block;
padding: .25em;
}
tr.inferred td, span.inferred {
background-color: #e0dedb;
}
tr.inferred1 td, span.inferred1 {
background-color: #e0dedb;
}
tr.marked td, span.marked, span.marked1 {
background-color: #bed2be;
}
tr.uncovered td, span.uncovered {
background-color: #ce8b8c;
}
tr.uncovered1 td, span.uncovered1 {
background-color: #ce8b8c;
}
div.key {
border: 1px solid #666666;
margin: 1em 0em;
}
/* @end */
em-hiredis @ 0ce6400c
Subproject commit 0ce6400c5a8340ee923b3cbae46317372ead9334
......@@ -35,6 +35,7 @@ module Noah
channel = EventMachine::Channel.new
r = EventMachine::Hiredis::Client.connect
r.db(5)
r.psubscribe(@my_pattern)
r.on(:pmessage) do |pattern, event, message|
channel.push "#{message}"
......
This diff is collapsed.
class Host < Ohm::Model
# Host model
# @return {Host} a {Host} object
include Ohm::Typecast
include Ohm::Timestamping
include Ohm::Callbacks
......@@ -25,6 +27,7 @@ class Host < Ohm::Model
assert_member :status, ["up","down","pending"]
end
# @return [Hash] A hash representation of a {Host}
def to_hash
arr = []
services.sort.each {|s| arr << s.to_hash}
......@@ -32,6 +35,7 @@ class Host < Ohm::Model
super.merge(h)
end
# Evaluate if {Host} record is new or not
def is_new?
self.created_at == self.updated_at
end
......@@ -54,6 +58,7 @@ class Host < Ohm::Model
end
protected
# Saves the original {Host#name} attribute before deleting an object
def stash_name
@deleted_name = self.name
end
......@@ -70,6 +75,8 @@ class Host < Ohm::Model
end
class Hosts
# @param [Hash] optional filters for results
# @return [Array] Array of {Host} objects
def self.all(options = {})
options.empty? ? Host.all.sort : Host.find(options).sort
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment