vermillion-client 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/.hound.yml +2 -0
- data/.rubocop.yml +320 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +26 -0
- data/README.md +55 -0
- data/Rakefile +10 -0
- data/bin/setup +7 -0
- data/bin/vermillion +16 -0
- data/doc/ChangeBranchTest.html +240 -0
- data/doc/ConfigurationTest.html +277 -0
- data/doc/CreateTest.html +240 -0
- data/doc/Gemfile.html +145 -0
- data/doc/Gemfile_lock.html +173 -0
- data/doc/README_md.html +216 -0
- data/doc/Rakefile.html +151 -0
- data/doc/UpdateTest.html +280 -0
- data/doc/Vermillion.html +272 -0
- data/doc/Vermillion/Cfg.html +362 -0
- data/doc/Vermillion/Controller.html +185 -0
- data/doc/Vermillion/Controller/Base.html +503 -0
- data/doc/Vermillion/Controller/Change.html +301 -0
- data/doc/Vermillion/Controller/Create.html +301 -0
- data/doc/Vermillion/Controller/Firstrun.html +256 -0
- data/doc/Vermillion/Controller/Status.html +308 -0
- data/doc/Vermillion/Controller/Update.html +326 -0
- data/doc/Vermillion/Helper.html +252 -0
- data/doc/Vermillion/Helper/ApiCommunication.html +307 -0
- data/doc/Vermillion/Helper/Endpoint.html +506 -0
- data/doc/Vermillion/Helper/Formatting.html +250 -0
- data/doc/Vermillion/Helper/Network.html +304 -0
- data/doc/Vermillion/Helper/Results.html +341 -0
- data/doc/Vermillion/Helper/Time.html +295 -0
- data/doc/Vermillion/Request.html +332 -0
- data/doc/Vermillion/Router.html +351 -0
- data/doc/Vermillion/Test.html +183 -0
- data/doc/Vermillion/Test/Base.html +260 -0
- data/doc/Vermillion/Utils.html +247 -0
- data/doc/bin/setup.html +147 -0
- data/doc/created.rid +33 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +138 -0
- data/doc/js/darkfish.js +155 -0
- data/doc/js/jquery.js +4 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/search.js +94 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/searcher.js +228 -0
- data/doc/rdoc.css +595 -0
- data/doc/table_of_contents.html +255 -0
- data/doc/vermillion-client_gemspec.html +166 -0
- data/lib/client.rb +35 -0
- data/lib/client/config.rb +58 -0
- data/lib/client/controller.rb +68 -0
- data/lib/client/controller/change.rb +26 -0
- data/lib/client/controller/create.rb +26 -0
- data/lib/client/controller/firstrun.rb +30 -0
- data/lib/client/controller/status.rb +43 -0
- data/lib/client/controller/update.rb +26 -0
- data/lib/client/helper.rb +21 -0
- data/lib/client/helper/apicommunication.rb +78 -0
- data/lib/client/helper/endpoint.rb +61 -0
- data/lib/client/helper/formatting.rb +23 -0
- data/lib/client/helper/network.rb +54 -0
- data/lib/client/helper/results.rb +28 -0
- data/lib/client/helper/time.rb +33 -0
- data/lib/client/request.rb +22 -0
- data/lib/client/router.rb +56 -0
- data/lib/client/utils.rb +18 -0
- data/lib/client/version.rb +4 -0
- data/lib/test.rb +13 -0
- data/lib/test/base.rb +17 -0
- data/test/test_change_branch.rb +14 -0
- data/test/test_configuration.rb +21 -0
- data/test/test_create.rb +14 -0
- data/test/test_update.rb +24 -0
- data/vermillion-client.gemspec +23 -0
- metadata +201 -0
@@ -0,0 +1,341 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>class Vermillion::Helper::Results - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "../../";
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
16
|
+
<script type="text/javascript" charset="utf-8" src="../../js/navigation.js"></script>
|
17
|
+
<script type="text/javascript" charset="utf-8" src="../../js/search_index.js"></script>
|
18
|
+
<script type="text/javascript" charset="utf-8" src="../../js/search.js"></script>
|
19
|
+
<script type="text/javascript" charset="utf-8" src="../../js/searcher.js"></script>
|
20
|
+
<script type="text/javascript" charset="utf-8" src="../../js/darkfish.js"></script>
|
21
|
+
|
22
|
+
|
23
|
+
<body id="top" class="class">
|
24
|
+
<nav id="metadata">
|
25
|
+
<nav id="home-section" class="section">
|
26
|
+
<h3 class="section-header">
|
27
|
+
<a href="../../index.html">Home</a>
|
28
|
+
<a href="../../table_of_contents.html#classes">Classes</a>
|
29
|
+
<a href="../../table_of_contents.html#methods">Methods</a>
|
30
|
+
</h3>
|
31
|
+
</nav>
|
32
|
+
|
33
|
+
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
36
|
+
<h3 class="section-header">
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
+
</h3>
|
40
|
+
</form>
|
41
|
+
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
+
</nav>
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
<div id="file-metadata">
|
49
|
+
<nav id="file-list-section" class="section">
|
50
|
+
<h3 class="section-header">Defined In</h3>
|
51
|
+
<ul>
|
52
|
+
<li>lib/client/helper/results.rb
|
53
|
+
</ul>
|
54
|
+
</nav>
|
55
|
+
|
56
|
+
|
57
|
+
</div>
|
58
|
+
|
59
|
+
<div id="class-metadata">
|
60
|
+
|
61
|
+
<nav id="parent-class-section" class="section">
|
62
|
+
<h3 class="section-header">Parent</h3>
|
63
|
+
|
64
|
+
<p class="link">Object
|
65
|
+
|
66
|
+
</nav>
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
<!-- Method Quickref -->
|
71
|
+
<nav id="method-list-section" class="section">
|
72
|
+
<h3 class="section-header">Methods</h3>
|
73
|
+
|
74
|
+
<ul class="link-list">
|
75
|
+
|
76
|
+
<li ><a href="#method-c-new">::new</a>
|
77
|
+
|
78
|
+
<li ><a href="#method-i-add">#add</a>
|
79
|
+
|
80
|
+
<li ><a href="#method-i-should_eval_to">#should_eval_to</a>
|
81
|
+
|
82
|
+
</ul>
|
83
|
+
</nav>
|
84
|
+
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<div id="project-metadata">
|
88
|
+
<nav id="fileindex-section" class="section project-section">
|
89
|
+
<h3 class="section-header">Pages</h3>
|
90
|
+
|
91
|
+
<ul>
|
92
|
+
|
93
|
+
<li class="file"><a href="../../Gemfile.html">Gemfile</a>
|
94
|
+
|
95
|
+
<li class="file"><a href="../../Gemfile_lock.html">Gemfile.lock</a>
|
96
|
+
|
97
|
+
<li class="file"><a href="../../README_md.html">README</a>
|
98
|
+
|
99
|
+
<li class="file"><a href="../../Rakefile.html">Rakefile</a>
|
100
|
+
|
101
|
+
<li class="file"><a href="../../bin/setup.html">setup</a>
|
102
|
+
|
103
|
+
<li class="file"><a href="../../vermillion-client_gemspec.html">vermillion-client.gemspec</a>
|
104
|
+
|
105
|
+
</ul>
|
106
|
+
</nav>
|
107
|
+
|
108
|
+
<nav id="classindex-section" class="section project-section">
|
109
|
+
<h3 class="section-header">Class and Module Index</h3>
|
110
|
+
|
111
|
+
<ul class="link-list">
|
112
|
+
|
113
|
+
<li><a href="../../ChangeBranchTest.html">ChangeBranchTest</a>
|
114
|
+
|
115
|
+
<li><a href="../../ConfigurationTest.html">ConfigurationTest</a>
|
116
|
+
|
117
|
+
<li><a href="../../CreateTest.html">CreateTest</a>
|
118
|
+
|
119
|
+
<li><a href="../../UpdateTest.html">UpdateTest</a>
|
120
|
+
|
121
|
+
<li><a href="../../Vermillion.html">Vermillion</a>
|
122
|
+
|
123
|
+
<li><a href="../../Vermillion/Cfg.html">Vermillion::Cfg</a>
|
124
|
+
|
125
|
+
<li><a href="../../Vermillion/Controller.html">Vermillion::Controller</a>
|
126
|
+
|
127
|
+
<li><a href="../../Vermillion/Controller/Base.html">Vermillion::Controller::Base</a>
|
128
|
+
|
129
|
+
<li><a href="../../Vermillion/Controller/Change.html">Vermillion::Controller::Change</a>
|
130
|
+
|
131
|
+
<li><a href="../../Vermillion/Controller/Create.html">Vermillion::Controller::Create</a>
|
132
|
+
|
133
|
+
<li><a href="../../Vermillion/Controller/Firstrun.html">Vermillion::Controller::Firstrun</a>
|
134
|
+
|
135
|
+
<li><a href="../../Vermillion/Controller/Status.html">Vermillion::Controller::Status</a>
|
136
|
+
|
137
|
+
<li><a href="../../Vermillion/Controller/Update.html">Vermillion::Controller::Update</a>
|
138
|
+
|
139
|
+
<li><a href="../../Vermillion/Helper.html">Vermillion::Helper</a>
|
140
|
+
|
141
|
+
<li><a href="../../Vermillion/Helper/ApiCommunication.html">Vermillion::Helper::ApiCommunication</a>
|
142
|
+
|
143
|
+
<li><a href="../../Vermillion/Helper/Endpoint.html">Vermillion::Helper::Endpoint</a>
|
144
|
+
|
145
|
+
<li><a href="../../Vermillion/Helper/Formatting.html">Vermillion::Helper::Formatting</a>
|
146
|
+
|
147
|
+
<li><a href="../../Vermillion/Helper/Network.html">Vermillion::Helper::Network</a>
|
148
|
+
|
149
|
+
<li><a href="../../Vermillion/Helper/Results.html">Vermillion::Helper::Results</a>
|
150
|
+
|
151
|
+
<li><a href="../../Vermillion/Helper/Time.html">Vermillion::Helper::Time</a>
|
152
|
+
|
153
|
+
<li><a href="../../Vermillion/Request.html">Vermillion::Request</a>
|
154
|
+
|
155
|
+
<li><a href="../../Vermillion/Router.html">Vermillion::Router</a>
|
156
|
+
|
157
|
+
<li><a href="../../Vermillion/Test.html">Vermillion::Test</a>
|
158
|
+
|
159
|
+
<li><a href="../../Vermillion/Test/Base.html">Vermillion::Test::Base</a>
|
160
|
+
|
161
|
+
<li><a href="../../Vermillion/Utils.html">Vermillion::Utils</a>
|
162
|
+
|
163
|
+
</ul>
|
164
|
+
</nav>
|
165
|
+
|
166
|
+
</div>
|
167
|
+
</nav>
|
168
|
+
|
169
|
+
<div id="documentation">
|
170
|
+
<h1 class="class">class Vermillion::Helper::Results</h1>
|
171
|
+
|
172
|
+
<div id="description" class="description">
|
173
|
+
|
174
|
+
</div><!-- description -->
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
<!-- Attributes -->
|
188
|
+
<section id="attribute-method-details" class="method-section section">
|
189
|
+
<h3 class="section-header">Attributes</h3>
|
190
|
+
|
191
|
+
|
192
|
+
<div id="attribute-i-bucket" class="method-detail">
|
193
|
+
<div class="method-heading attribute-method-heading">
|
194
|
+
<span class="method-name">bucket</span><span
|
195
|
+
class="attribute-access-type">[R]</span>
|
196
|
+
</div>
|
197
|
+
|
198
|
+
<div class="method-description">
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
</div>
|
203
|
+
</div>
|
204
|
+
|
205
|
+
</section><!-- attribute-method-details -->
|
206
|
+
|
207
|
+
|
208
|
+
<!-- Methods -->
|
209
|
+
|
210
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
211
|
+
<h3 class="section-header">Public Class Methods</h3>
|
212
|
+
|
213
|
+
|
214
|
+
<div id="method-c-new" class="method-detail ">
|
215
|
+
|
216
|
+
<div class="method-heading">
|
217
|
+
<span class="method-name">new</span><span
|
218
|
+
class="method-args">()</span>
|
219
|
+
|
220
|
+
<span class="method-click-advice">click to toggle source</span>
|
221
|
+
|
222
|
+
</div>
|
223
|
+
|
224
|
+
|
225
|
+
<div class="method-description">
|
226
|
+
|
227
|
+
<p>Create the <a href="Results.html">Results</a> object</p>
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
<div class="method-source-code" id="new-source">
|
233
|
+
<pre><span class="ruby-comment"># File lib/client/helper/results.rb, line 7</span>
|
234
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>
|
235
|
+
<span class="ruby-ivar">@bucket</span> = []
|
236
|
+
<span class="ruby-ivar">@bucket</span>
|
237
|
+
<span class="ruby-keyword">end</span></pre>
|
238
|
+
</div><!-- new-source -->
|
239
|
+
|
240
|
+
</div>
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
</div><!-- new-method -->
|
246
|
+
|
247
|
+
|
248
|
+
</section><!-- public-class-method-details -->
|
249
|
+
|
250
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
251
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
252
|
+
|
253
|
+
|
254
|
+
<div id="method-i-add" class="method-detail ">
|
255
|
+
|
256
|
+
<div class="method-heading">
|
257
|
+
<span class="method-name">add</span><span
|
258
|
+
class="method-args">(result)</span>
|
259
|
+
|
260
|
+
<span class="method-click-advice">click to toggle source</span>
|
261
|
+
|
262
|
+
</div>
|
263
|
+
|
264
|
+
|
265
|
+
<div class="method-description">
|
266
|
+
|
267
|
+
<p>Add a result for processing Params:</p>
|
268
|
+
<dl class="rdoc-list note-list"><dt><code>result</code>
|
269
|
+
<dd>
|
270
|
+
<p>The value you want to store</p>
|
271
|
+
</dd></dl>
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
<div class="method-source-code" id="add-source">
|
277
|
+
<pre><span class="ruby-comment"># File lib/client/helper/results.rb, line 15</span>
|
278
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">result</span>)
|
279
|
+
<span class="ruby-ivar">@bucket</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">result</span>)
|
280
|
+
<span class="ruby-identifier">result</span>
|
281
|
+
<span class="ruby-keyword">end</span></pre>
|
282
|
+
</div><!-- add-source -->
|
283
|
+
|
284
|
+
</div>
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
</div><!-- add-method -->
|
290
|
+
|
291
|
+
|
292
|
+
<div id="method-i-should_eval_to" class="method-detail ">
|
293
|
+
|
294
|
+
<div class="method-heading">
|
295
|
+
<span class="method-name">should_eval_to</span><span
|
296
|
+
class="method-args">(pass_value)</span>
|
297
|
+
|
298
|
+
<span class="method-click-advice">click to toggle source</span>
|
299
|
+
|
300
|
+
</div>
|
301
|
+
|
302
|
+
|
303
|
+
<div class="method-description">
|
304
|
+
|
305
|
+
<p>Check if all values match a specified value Params:</p>
|
306
|
+
<dl class="rdoc-list note-list"><dt><code>pass_value</code>
|
307
|
+
<dd>
|
308
|
+
<p>What all values in the array should evaluate to</p>
|
309
|
+
</dd></dl>
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
<div class="method-source-code" id="should_eval_to-source">
|
315
|
+
<pre><span class="ruby-comment"># File lib/client/helper/results.rb, line 23</span>
|
316
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">should_eval_to</span>(<span class="ruby-identifier">pass_value</span>)
|
317
|
+
<span class="ruby-ivar">@bucket</span>.<span class="ruby-identifier">all?</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">pass_value</span>
|
318
|
+
<span class="ruby-keyword">end</span></pre>
|
319
|
+
</div><!-- should_eval_to-source -->
|
320
|
+
|
321
|
+
</div>
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
</div><!-- should_eval_to-method -->
|
327
|
+
|
328
|
+
|
329
|
+
</section><!-- public-instance-method-details -->
|
330
|
+
|
331
|
+
</section><!-- 5Buntitled-5D -->
|
332
|
+
|
333
|
+
</div><!-- documentation -->
|
334
|
+
|
335
|
+
|
336
|
+
<footer id="validator-badges">
|
337
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
338
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
|
339
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
340
|
+
</footer>
|
341
|
+
|
@@ -0,0 +1,295 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>class Vermillion::Helper::Time - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "../../";
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
16
|
+
<script type="text/javascript" charset="utf-8" src="../../js/navigation.js"></script>
|
17
|
+
<script type="text/javascript" charset="utf-8" src="../../js/search_index.js"></script>
|
18
|
+
<script type="text/javascript" charset="utf-8" src="../../js/search.js"></script>
|
19
|
+
<script type="text/javascript" charset="utf-8" src="../../js/searcher.js"></script>
|
20
|
+
<script type="text/javascript" charset="utf-8" src="../../js/darkfish.js"></script>
|
21
|
+
|
22
|
+
|
23
|
+
<body id="top" class="class">
|
24
|
+
<nav id="metadata">
|
25
|
+
<nav id="home-section" class="section">
|
26
|
+
<h3 class="section-header">
|
27
|
+
<a href="../../index.html">Home</a>
|
28
|
+
<a href="../../table_of_contents.html#classes">Classes</a>
|
29
|
+
<a href="../../table_of_contents.html#methods">Methods</a>
|
30
|
+
</h3>
|
31
|
+
</nav>
|
32
|
+
|
33
|
+
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
36
|
+
<h3 class="section-header">
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
+
</h3>
|
40
|
+
</form>
|
41
|
+
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
+
</nav>
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
<div id="file-metadata">
|
49
|
+
<nav id="file-list-section" class="section">
|
50
|
+
<h3 class="section-header">Defined In</h3>
|
51
|
+
<ul>
|
52
|
+
<li>lib/client/helper/time.rb
|
53
|
+
</ul>
|
54
|
+
</nav>
|
55
|
+
|
56
|
+
|
57
|
+
</div>
|
58
|
+
|
59
|
+
<div id="class-metadata">
|
60
|
+
|
61
|
+
<nav id="parent-class-section" class="section">
|
62
|
+
<h3 class="section-header">Parent</h3>
|
63
|
+
|
64
|
+
<p class="link">Object
|
65
|
+
|
66
|
+
</nav>
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
<!-- Method Quickref -->
|
71
|
+
<nav id="method-list-section" class="section">
|
72
|
+
<h3 class="section-header">Methods</h3>
|
73
|
+
|
74
|
+
<ul class="link-list">
|
75
|
+
|
76
|
+
<li ><a href="#method-c-formatted">::formatted</a>
|
77
|
+
|
78
|
+
<li ><a href="#method-c-human_readable">::human_readable</a>
|
79
|
+
|
80
|
+
</ul>
|
81
|
+
</nav>
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
<div id="project-metadata">
|
86
|
+
<nav id="fileindex-section" class="section project-section">
|
87
|
+
<h3 class="section-header">Pages</h3>
|
88
|
+
|
89
|
+
<ul>
|
90
|
+
|
91
|
+
<li class="file"><a href="../../Gemfile.html">Gemfile</a>
|
92
|
+
|
93
|
+
<li class="file"><a href="../../Gemfile_lock.html">Gemfile.lock</a>
|
94
|
+
|
95
|
+
<li class="file"><a href="../../README_md.html">README</a>
|
96
|
+
|
97
|
+
<li class="file"><a href="../../Rakefile.html">Rakefile</a>
|
98
|
+
|
99
|
+
<li class="file"><a href="../../bin/setup.html">setup</a>
|
100
|
+
|
101
|
+
<li class="file"><a href="../../vermillion-client_gemspec.html">vermillion-client.gemspec</a>
|
102
|
+
|
103
|
+
</ul>
|
104
|
+
</nav>
|
105
|
+
|
106
|
+
<nav id="classindex-section" class="section project-section">
|
107
|
+
<h3 class="section-header">Class and Module Index</h3>
|
108
|
+
|
109
|
+
<ul class="link-list">
|
110
|
+
|
111
|
+
<li><a href="../../ChangeBranchTest.html">ChangeBranchTest</a>
|
112
|
+
|
113
|
+
<li><a href="../../ConfigurationTest.html">ConfigurationTest</a>
|
114
|
+
|
115
|
+
<li><a href="../../CreateTest.html">CreateTest</a>
|
116
|
+
|
117
|
+
<li><a href="../../UpdateTest.html">UpdateTest</a>
|
118
|
+
|
119
|
+
<li><a href="../../Vermillion.html">Vermillion</a>
|
120
|
+
|
121
|
+
<li><a href="../../Vermillion/Cfg.html">Vermillion::Cfg</a>
|
122
|
+
|
123
|
+
<li><a href="../../Vermillion/Controller.html">Vermillion::Controller</a>
|
124
|
+
|
125
|
+
<li><a href="../../Vermillion/Controller/Base.html">Vermillion::Controller::Base</a>
|
126
|
+
|
127
|
+
<li><a href="../../Vermillion/Controller/Change.html">Vermillion::Controller::Change</a>
|
128
|
+
|
129
|
+
<li><a href="../../Vermillion/Controller/Create.html">Vermillion::Controller::Create</a>
|
130
|
+
|
131
|
+
<li><a href="../../Vermillion/Controller/Firstrun.html">Vermillion::Controller::Firstrun</a>
|
132
|
+
|
133
|
+
<li><a href="../../Vermillion/Controller/Status.html">Vermillion::Controller::Status</a>
|
134
|
+
|
135
|
+
<li><a href="../../Vermillion/Controller/Update.html">Vermillion::Controller::Update</a>
|
136
|
+
|
137
|
+
<li><a href="../../Vermillion/Helper.html">Vermillion::Helper</a>
|
138
|
+
|
139
|
+
<li><a href="../../Vermillion/Helper/ApiCommunication.html">Vermillion::Helper::ApiCommunication</a>
|
140
|
+
|
141
|
+
<li><a href="../../Vermillion/Helper/Endpoint.html">Vermillion::Helper::Endpoint</a>
|
142
|
+
|
143
|
+
<li><a href="../../Vermillion/Helper/Formatting.html">Vermillion::Helper::Formatting</a>
|
144
|
+
|
145
|
+
<li><a href="../../Vermillion/Helper/Network.html">Vermillion::Helper::Network</a>
|
146
|
+
|
147
|
+
<li><a href="../../Vermillion/Helper/Results.html">Vermillion::Helper::Results</a>
|
148
|
+
|
149
|
+
<li><a href="../../Vermillion/Helper/Time.html">Vermillion::Helper::Time</a>
|
150
|
+
|
151
|
+
<li><a href="../../Vermillion/Request.html">Vermillion::Request</a>
|
152
|
+
|
153
|
+
<li><a href="../../Vermillion/Router.html">Vermillion::Router</a>
|
154
|
+
|
155
|
+
<li><a href="../../Vermillion/Test.html">Vermillion::Test</a>
|
156
|
+
|
157
|
+
<li><a href="../../Vermillion/Test/Base.html">Vermillion::Test::Base</a>
|
158
|
+
|
159
|
+
<li><a href="../../Vermillion/Utils.html">Vermillion::Utils</a>
|
160
|
+
|
161
|
+
</ul>
|
162
|
+
</nav>
|
163
|
+
|
164
|
+
</div>
|
165
|
+
</nav>
|
166
|
+
|
167
|
+
<div id="documentation">
|
168
|
+
<h1 class="class">class Vermillion::Helper::Time</h1>
|
169
|
+
|
170
|
+
<div id="description" class="description">
|
171
|
+
|
172
|
+
</div><!-- description -->
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
<!-- Methods -->
|
187
|
+
|
188
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
189
|
+
<h3 class="section-header">Public Class Methods</h3>
|
190
|
+
|
191
|
+
|
192
|
+
<div id="method-c-formatted" class="method-detail ">
|
193
|
+
|
194
|
+
<div class="method-heading">
|
195
|
+
<span class="method-name">formatted</span><span
|
196
|
+
class="method-args">(time = nil)</span>
|
197
|
+
|
198
|
+
<span class="method-click-advice">click to toggle source</span>
|
199
|
+
|
200
|
+
</div>
|
201
|
+
|
202
|
+
|
203
|
+
<div class="method-description">
|
204
|
+
|
205
|
+
<p>Use the following format for a given timestamp: “d/m/y @ H:M:S AM/PM”
|
206
|
+
Params:</p>
|
207
|
+
<dl class="rdoc-list note-list"><dt><code>time</code>
|
208
|
+
<dd>
|
209
|
+
<p>Optional time value, uses the current time if not provided, to format</p>
|
210
|
+
</dd></dl>
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
<div class="method-source-code" id="formatted-source">
|
216
|
+
<pre><span class="ruby-comment"># File lib/client/helper/time.rb, line 27</span>
|
217
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">formatted</span>(<span class="ruby-identifier">time</span> = <span class="ruby-keyword">nil</span>)
|
218
|
+
<span class="ruby-identifier">time</span> = <span class="ruby-operator">::</span><span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">time</span>.<span class="ruby-identifier">nil?</span>
|
219
|
+
<span class="ruby-identifier">time</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-string">"%e/%-m/%Y @ %I:%M:%S%P"</span>)
|
220
|
+
<span class="ruby-keyword">end</span></pre>
|
221
|
+
</div><!-- formatted-source -->
|
222
|
+
|
223
|
+
</div>
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
</div><!-- formatted-method -->
|
229
|
+
|
230
|
+
|
231
|
+
<div id="method-c-human_readable" class="method-detail ">
|
232
|
+
|
233
|
+
<div class="method-heading">
|
234
|
+
<span class="method-name">human_readable</span><span
|
235
|
+
class="method-args">(start, finish)</span>
|
236
|
+
|
237
|
+
<span class="method-click-advice">click to toggle source</span>
|
238
|
+
|
239
|
+
</div>
|
240
|
+
|
241
|
+
|
242
|
+
<div class="method-description">
|
243
|
+
|
244
|
+
<p>Human readable strings to represent the length between two time objects
|
245
|
+
Params:</p>
|
246
|
+
<dl class="rdoc-list note-list"><dt><code>start</code>
|
247
|
+
<dd>
|
248
|
+
<p>Start time object</p>
|
249
|
+
</dd><dt><code>finish</code>
|
250
|
+
<dd>
|
251
|
+
<p>End time object</p>
|
252
|
+
</dd></dl>
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
<div class="method-source-code" id="human_readable-source">
|
258
|
+
<pre><span class="ruby-comment"># File lib/client/helper/time.rb, line 8</span>
|
259
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">human_readable</span>(<span class="ruby-identifier">start</span>, <span class="ruby-identifier">finish</span>)
|
260
|
+
<span class="ruby-identifier">seconds</span> = <span class="ruby-identifier">finish</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">start</span>.<span class="ruby-identifier">to_f</span>
|
261
|
+
|
262
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">seconds</span> <span class="ruby-operator"><</span> <span class="ruby-value">60</span>
|
263
|
+
<span class="ruby-string">"No time at all!"</span>
|
264
|
+
<span class="ruby-keyword">else</span>
|
265
|
+
<span class="ruby-identifier">minutes</span> = (<span class="ruby-identifier">seconds</span> <span class="ruby-operator">/</span> <span class="ruby-value">60</span>).<span class="ruby-identifier">round</span>(<span class="ruby-value">1</span>)
|
266
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">minutes</span> <span class="ruby-operator"><</span> <span class="ruby-value">1</span>
|
267
|
+
<span class="ruby-node">"#{minutes} minute"</span>
|
268
|
+
<span class="ruby-keyword">else</span>
|
269
|
+
<span class="ruby-node">"#{minutes} minutes"</span>
|
270
|
+
<span class="ruby-keyword">end</span>
|
271
|
+
<span class="ruby-keyword">end</span>
|
272
|
+
<span class="ruby-keyword">end</span></pre>
|
273
|
+
</div><!-- human_readable-source -->
|
274
|
+
|
275
|
+
</div>
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
</div><!-- human_readable-method -->
|
281
|
+
|
282
|
+
|
283
|
+
</section><!-- public-class-method-details -->
|
284
|
+
|
285
|
+
</section><!-- 5Buntitled-5D -->
|
286
|
+
|
287
|
+
</div><!-- documentation -->
|
288
|
+
|
289
|
+
|
290
|
+
<footer id="validator-badges">
|
291
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
292
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
|
293
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
294
|
+
</footer>
|
295
|
+
|