/usr/share/debci/public/doc/file.graph.html is in debci 1.7.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
File: graph
— Documentation by YARD 0.9.9
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
pathId = "graph";
relpath = '';
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="file_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="_index.html">Index</a> »
<span class="title">File: graph</span>
</div>
<div id="search">
<a class="full_list_link" id="class_list_link"
href="class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><div id='filecontents'><pre class="code ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>rubygems</span><span class='tstring_end'>'</span></span>
<span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>debci</span><span class='tstring_end'>'</span></span>
<span class='kw'>module</span> <span class='const'><span class='object_link'><a href="Debci.html" title="Debci (module)">Debci</a></span></span>
<span class='comment'># This class represents different data charts for a specific
</span> <span class='comment'># suite and architecture.
</span> <span class='kw'>class</span> <span class='const'>Graph</span>
<span class='id identifier rubyid_attr_accessor'>attr_accessor</span> <span class='symbol'>:suite</span><span class='comma'>,</span> <span class='symbol'>:architecture</span><span class='comma'>,</span> <span class='symbol'>:entries</span>
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_repository'>repository</span><span class='comma'>,</span> <span class='id identifier rubyid_suite'>suite</span><span class='comma'>,</span> <span class='id identifier rubyid_architecture'>architecture</span><span class='rparen'>)</span>
<span class='ivar'>@repository</span> <span class='op'>=</span> <span class='id identifier rubyid_repository'>repository</span>
<span class='ivar'>@suite</span> <span class='op'>=</span> <span class='id identifier rubyid_suite'>suite</span>
<span class='ivar'>@architecture</span> <span class='op'>=</span> <span class='id identifier rubyid_architecture'>architecture</span>
<span class='id identifier rubyid_load_data'>load_data</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_private'>private</span>
<span class='kw'>def</span> <span class='id identifier rubyid_load_data'>load_data</span>
<span class='comment'># load all the data
</span> <span class='ivar'>@entries</span> <span class='op'>=</span> <span class='const'>Array</span><span class='lparen'>(</span><span class='ivar'>@repository</span><span class='period'>.</span><span class='id identifier rubyid_status_history'>status_history</span><span class='lparen'>(</span><span class='ivar'>@suite</span><span class='comma'>,</span> <span class='ivar'>@architecture</span><span class='rparen'>)</span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='ivar'>@entries</span>
<span class='kw'>return</span> <span class='kw'>if</span> <span class='ivar'>@entries</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'><=</span> <span class='int'>100</span>
<span class='comment'># simplify the data: pick 101 points in the history
</span> <span class='id identifier rubyid_original_entries'>original_entries</span> <span class='op'>=</span> <span class='ivar'>@entries</span>
<span class='ivar'>@entries</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='int'>0</span><span class='op'>..</span><span class='int'>100</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_i'>i</span><span class='op'>|</span>
<span class='id identifier rubyid_j'>j</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_i'>i</span> <span class='op'>*</span> <span class='lparen'>(</span><span class='id identifier rubyid_original_entries'>original_entries</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span><span class='op'>-</span><span class='int'>1</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_f'>to_f</span> <span class='op'>/</span> <span class='int'>100</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_round'>round</span>
<span class='ivar'>@entries</span><span class='lbracket'>[</span><span class='id identifier rubyid_j'>j</span><span class='rbracket'>]</span>
<span class='kw'>end</span>
<span class='kw'>end</span>
<span class='kw'>end</span>
<span class='kw'>end</span></pre></div></div>
<div id="footer">
Generated by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.3.3).
</div>
</div>
</body>
</html>
|