vermillion-client 1.0.0 → 1.1.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 +4 -4
- data/doc/CreateTest.html +1 -1
- data/doc/Vermillion/Controller/Base.html +8 -8
- data/doc/Vermillion/Helper/Endpoint.html +8 -8
- data/doc/Vermillion/Helper/Network.html +3 -3
- data/doc/Vermillion/Helper/Results.html +4 -4
- data/doc/Vermillion/Request.html +8 -7
- data/doc/created.rid +26 -26
- data/lib/client/controller.rb +4 -1
- data/lib/client/helper/endpoint.rb +1 -0
- data/lib/client/helper/network.rb +1 -0
- data/lib/client/helper/results.rb +1 -0
- data/lib/client/request.rb +19 -10
- data/lib/client/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5a61bbed4e85a2a0c649c970712e40daa26b9c4
|
4
|
+
data.tar.gz: 63c7ec5c017a4f44e12d22dcbab67464b7e73a3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33887afc73a0c3f14ca37350ba8fbe7acb84f9bb122a580169d04c3cef6a963195b110a1f95dec8f8972d871be9b0b7eb528ca7c7ef67004500be2dcc35e426c
|
7
|
+
data.tar.gz: 8327c437e03acd7ae77078b15a2ecf3ca595d98ff5da645cbb92397ba5c16787a13814427b8c080774ceff3040d83cfc055eca0738b7d235872c27aa747020af
|
data/doc/CreateTest.html
CHANGED
@@ -213,7 +213,7 @@
|
|
213
213
|
|
214
214
|
<span class="ruby-identifier">create</span> = <span class="ruby-constant">Create</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">cfg</span>, <span class="ruby-identifier">req</span>)
|
215
215
|
|
216
|
-
<span class="ruby-identifier">assert</span> <span class="ruby-identifier">create</span>.<span class="ruby-identifier">
|
216
|
+
<span class="ruby-identifier">assert</span> <span class="ruby-identifier">create</span>.<span class="ruby-identifier">one</span>(<span class="ruby-value">:local</span>, <span class="ruby-identifier">req</span>.<span class="ruby-identifier">param</span>).<span class="ruby-identifier">zero?</span>
|
217
217
|
<span class="ruby-keyword">end</span></pre>
|
218
218
|
</div><!-- test_default-source -->
|
219
219
|
|
@@ -228,7 +228,7 @@ but not one that resulted in a force quit</p>
|
|
228
228
|
|
229
229
|
<div class="method-description">
|
230
230
|
|
231
|
-
|
231
|
+
<p>Access the configuration object instance externally</p>
|
232
232
|
|
233
233
|
</div>
|
234
234
|
</div>
|
@@ -241,7 +241,7 @@ but not one that resulted in a force quit</p>
|
|
241
241
|
|
242
242
|
<div class="method-description">
|
243
243
|
|
244
|
-
|
244
|
+
<p>Access the request object instance externally</p>
|
245
245
|
|
246
246
|
</div>
|
247
247
|
</div>
|
@@ -283,7 +283,7 @@ access to request parameters</p>
|
|
283
283
|
|
284
284
|
|
285
285
|
<div class="method-source-code" id="new-source">
|
286
|
-
<pre><span class="ruby-comment"># File lib/client/controller.rb, line
|
286
|
+
<pre><span class="ruby-comment"># File lib/client/controller.rb, line 23</span>
|
287
287
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">config</span>, <span class="ruby-identifier">request</span>)
|
288
288
|
<span class="ruby-ivar">@config</span> = <span class="ruby-identifier">config</span>
|
289
289
|
<span class="ruby-ivar">@request</span> = <span class="ruby-identifier">request</span>
|
@@ -329,7 +329,7 @@ access to request parameters</p>
|
|
329
329
|
|
330
330
|
|
331
331
|
<div class="method-source-code" id="can_exec-3F-source">
|
332
|
-
<pre><span class="ruby-comment"># File lib/client/controller.rb, line
|
332
|
+
<pre><span class="ruby-comment"># File lib/client/controller.rb, line 53</span>
|
333
333
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">can_exec?</span>(<span class="ruby-identifier">command</span>)
|
334
334
|
<span class="ruby-comment"># no command was passed, check if controller has a default method</span>
|
335
335
|
<span class="ruby-keyword">if</span> <span class="ruby-identifier">command</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:default</span>)
|
@@ -370,7 +370,7 @@ access to request parameters</p>
|
|
370
370
|
|
371
371
|
|
372
372
|
<div class="method-source-code" id="exec-source">
|
373
|
-
<pre><span class="ruby-comment"># File lib/client/controller.rb, line
|
373
|
+
<pre><span class="ruby-comment"># File lib/client/controller.rb, line 38</span>
|
374
374
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">exec</span>
|
375
375
|
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">param</span>.<span class="ruby-identifier">nil?</span>
|
376
376
|
<span class="ruby-identifier">send</span>(<span class="ruby-ivar">@method</span>.<span class="ruby-identifier">to_sym</span>)
|
@@ -407,7 +407,7 @@ access to request parameters</p>
|
|
407
407
|
|
408
408
|
|
409
409
|
<div class="method-source-code" id="post_exec-source">
|
410
|
-
<pre><span class="ruby-comment"># File lib/client/controller.rb, line
|
410
|
+
<pre><span class="ruby-comment"># File lib/client/controller.rb, line 47</span>
|
411
411
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">post_exec</span>
|
412
412
|
<span class="ruby-keyword">end</span></pre>
|
413
413
|
</div><!-- post_exec-source -->
|
@@ -439,7 +439,7 @@ access to request parameters</p>
|
|
439
439
|
|
440
440
|
|
441
441
|
<div class="method-source-code" id="pre_exec-source">
|
442
|
-
<pre><span class="ruby-comment"># File lib/client/controller.rb, line
|
442
|
+
<pre><span class="ruby-comment"># File lib/client/controller.rb, line 31</span>
|
443
443
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">pre_exec</span>
|
444
444
|
<span class="ruby-ivar">@format</span> = <span class="ruby-constant">Vermillion</span><span class="ruby-operator">::</span><span class="ruby-constant">Helper</span>.<span class="ruby-identifier">load</span>(<span class="ruby-string">'formatting'</span>)
|
445
445
|
<span class="ruby-ivar">@network</span> = <span class="ruby-constant">Vermillion</span><span class="ruby-operator">::</span><span class="ruby-constant">Helper</span>.<span class="ruby-identifier">load</span>(<span class="ruby-string">'network'</span>)
|
@@ -474,7 +474,7 @@ access to request parameters</p>
|
|
474
474
|
|
475
475
|
|
476
476
|
<div class="method-source-code" id="sample-source">
|
477
|
-
<pre><span class="ruby-comment"># File lib/client/controller.rb, line
|
477
|
+
<pre><span class="ruby-comment"># File lib/client/controller.rb, line 66</span>
|
478
478
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">sample</span>
|
479
479
|
<span class="ruby-constant">Notify</span>.<span class="ruby-identifier">warning</span>(<span class="ruby-string">"Method not implemented"</span>)
|
480
480
|
<span class="ruby-keyword">end</span></pre>
|
@@ -205,7 +205,7 @@
|
|
205
205
|
|
206
206
|
<div class="method-description">
|
207
207
|
|
208
|
-
|
208
|
+
<p>Set the @server variable externally</p>
|
209
209
|
|
210
210
|
</div>
|
211
211
|
</div>
|
@@ -243,7 +243,7 @@ for internal variables Params:</p>
|
|
243
243
|
|
244
244
|
|
245
245
|
<div class="method-source-code" id="new-source">
|
246
|
-
<pre><span class="ruby-comment"># File lib/client/helper/endpoint.rb, line
|
246
|
+
<pre><span class="ruby-comment"># File lib/client/helper/endpoint.rb, line 10</span>
|
247
247
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">initial_path</span>)
|
248
248
|
<span class="ruby-ivar">@path</span> = { <span class="ruby-identifier">default</span><span class="ruby-operator">:</span> <span class="ruby-identifier">initial_path</span> }
|
249
249
|
<span class="ruby-ivar">@server</span> = <span class="ruby-keyword">nil</span>
|
@@ -291,7 +291,7 @@ for internal variables Params:</p>
|
|
291
291
|
|
292
292
|
|
293
293
|
<div class="method-source-code" id="add-source">
|
294
|
-
<pre><span class="ruby-comment"># File lib/client/helper/endpoint.rb, line
|
294
|
+
<pre><span class="ruby-comment"># File lib/client/helper/endpoint.rb, line 27</span>
|
295
295
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>)
|
296
296
|
<span class="ruby-ivar">@path</span>[<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">value</span>
|
297
297
|
<span class="ruby-keyword">end</span></pre>
|
@@ -328,7 +328,7 @@ for internal variables Params:</p>
|
|
328
328
|
|
329
329
|
|
330
330
|
<div class="method-source-code" id="delete-source">
|
331
|
-
<pre><span class="ruby-comment"># File lib/client/helper/endpoint.rb, line
|
331
|
+
<pre><span class="ruby-comment"># File lib/client/helper/endpoint.rb, line 41</span>
|
332
332
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">key</span>)
|
333
333
|
<span class="ruby-ivar">@path</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">key</span>)
|
334
334
|
<span class="ruby-keyword">end</span></pre>
|
@@ -365,7 +365,7 @@ for internal variables Params:</p>
|
|
365
365
|
|
366
366
|
|
367
367
|
<div class="method-source-code" id="exists-3F-source">
|
368
|
-
<pre><span class="ruby-comment"># File lib/client/helper/endpoint.rb, line
|
368
|
+
<pre><span class="ruby-comment"># File lib/client/helper/endpoint.rb, line 48</span>
|
369
369
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">key</span>)
|
370
370
|
<span class="ruby-ivar">@path</span>.<span class="ruby-identifier">key?</span> <span class="ruby-identifier">key</span>
|
371
371
|
<span class="ruby-keyword">end</span></pre>
|
@@ -402,7 +402,7 @@ for internal variables Params:</p>
|
|
402
402
|
|
403
403
|
|
404
404
|
<div class="method-source-code" id="get-source">
|
405
|
-
<pre><span class="ruby-comment"># File lib/client/helper/endpoint.rb, line
|
405
|
+
<pre><span class="ruby-comment"># File lib/client/helper/endpoint.rb, line 34</span>
|
406
406
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">key</span>)
|
407
407
|
<span class="ruby-ivar">@path</span>[<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_sym</span>]
|
408
408
|
<span class="ruby-keyword">end</span></pre>
|
@@ -439,7 +439,7 @@ for internal variables Params:</p>
|
|
439
439
|
|
440
440
|
|
441
441
|
<div class="method-source-code" id="protocol-3D-source">
|
442
|
-
<pre><span class="ruby-comment"># File lib/client/helper/endpoint.rb, line
|
442
|
+
<pre><span class="ruby-comment"># File lib/client/helper/endpoint.rb, line 19</span>
|
443
443
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">protocol=</span>(<span class="ruby-identifier">use_https</span>)
|
444
444
|
<span class="ruby-ivar">@protocol</span> = <span class="ruby-string">'https://'</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">use_https</span>
|
445
445
|
<span class="ruby-keyword">end</span></pre>
|
@@ -473,7 +473,7 @@ return an endpoint fragment</p>
|
|
473
473
|
|
474
474
|
|
475
475
|
<div class="method-source-code" id="to_s-source">
|
476
|
-
<pre><span class="ruby-comment"># File lib/client/helper/endpoint.rb, line
|
476
|
+
<pre><span class="ruby-comment"># File lib/client/helper/endpoint.rb, line 53</span>
|
477
477
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
|
478
478
|
<span class="ruby-identifier">output</span> = <span class="ruby-ivar">@protocol</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@server</span>
|
479
479
|
<span class="ruby-ivar">@path</span>.<span class="ruby-identifier">each_pair</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">_k</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
|
@@ -195,7 +195,7 @@
|
|
195
195
|
|
196
196
|
<div class="method-description">
|
197
197
|
|
198
|
-
|
198
|
+
<p>Access the configuration object instance externally</p>
|
199
199
|
|
200
200
|
</div>
|
201
201
|
</div>
|
@@ -235,7 +235,7 @@
|
|
235
235
|
|
236
236
|
|
237
237
|
<div class="method-source-code" id="get-source">
|
238
|
-
<pre><span class="ruby-comment"># File lib/client/helper/network.rb, line
|
238
|
+
<pre><span class="ruby-comment"># File lib/client/helper/network.rb, line 11</span>
|
239
239
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">key</span>)
|
240
240
|
<span class="ruby-identifier">_request</span>(<span class="ruby-identifier">url</span>, <span class="ruby-value">:GET</span>, <span class="ruby-identifier">key</span>)
|
241
241
|
<span class="ruby-keyword">end</span></pre>
|
@@ -275,7 +275,7 @@
|
|
275
275
|
|
276
276
|
|
277
277
|
<div class="method-source-code" id="post-source">
|
278
|
-
<pre><span class="ruby-comment"># File lib/client/helper/network.rb, line
|
278
|
+
<pre><span class="ruby-comment"># File lib/client/helper/network.rb, line 19</span>
|
279
279
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">post</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">key</span>)
|
280
280
|
<span class="ruby-identifier">_request</span>(<span class="ruby-identifier">url</span>, <span class="ruby-value">:POST</span>, <span class="ruby-identifier">key</span>)
|
281
281
|
<span class="ruby-keyword">end</span></pre>
|
@@ -197,7 +197,7 @@
|
|
197
197
|
|
198
198
|
<div class="method-description">
|
199
199
|
|
200
|
-
|
200
|
+
<p>Internal array to hold all the result values</p>
|
201
201
|
|
202
202
|
</div>
|
203
203
|
</div>
|
@@ -230,7 +230,7 @@
|
|
230
230
|
|
231
231
|
|
232
232
|
<div class="method-source-code" id="new-source">
|
233
|
-
<pre><span class="ruby-comment"># File lib/client/helper/results.rb, line
|
233
|
+
<pre><span class="ruby-comment"># File lib/client/helper/results.rb, line 8</span>
|
234
234
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>
|
235
235
|
<span class="ruby-ivar">@bucket</span> = []
|
236
236
|
<span class="ruby-ivar">@bucket</span>
|
@@ -274,7 +274,7 @@
|
|
274
274
|
|
275
275
|
|
276
276
|
<div class="method-source-code" id="add-source">
|
277
|
-
<pre><span class="ruby-comment"># File lib/client/helper/results.rb, line
|
277
|
+
<pre><span class="ruby-comment"># File lib/client/helper/results.rb, line 16</span>
|
278
278
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">result</span>)
|
279
279
|
<span class="ruby-ivar">@bucket</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">result</span>)
|
280
280
|
<span class="ruby-identifier">result</span>
|
@@ -312,7 +312,7 @@
|
|
312
312
|
|
313
313
|
|
314
314
|
<div class="method-source-code" id="should_eval_to-source">
|
315
|
-
<pre><span class="ruby-comment"># File lib/client/helper/results.rb, line
|
315
|
+
<pre><span class="ruby-comment"># File lib/client/helper/results.rb, line 24</span>
|
316
316
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">should_eval_to</span>(<span class="ruby-identifier">pass_value</span>)
|
317
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
318
|
<span class="ruby-keyword">end</span></pre>
|
data/doc/Vermillion/Request.html
CHANGED
@@ -193,7 +193,7 @@
|
|
193
193
|
|
194
194
|
<div class="method-description">
|
195
195
|
|
196
|
-
|
196
|
+
<p>Access command variable property externally</p>
|
197
197
|
|
198
198
|
</div>
|
199
199
|
</div>
|
@@ -206,7 +206,7 @@
|
|
206
206
|
|
207
207
|
<div class="method-description">
|
208
208
|
|
209
|
-
|
209
|
+
<p>Access controller variable property externally</p>
|
210
210
|
|
211
211
|
</div>
|
212
212
|
</div>
|
@@ -219,7 +219,7 @@
|
|
219
219
|
|
220
220
|
<div class="method-description">
|
221
221
|
|
222
|
-
|
222
|
+
<p>Access custom variable property externally</p>
|
223
223
|
|
224
224
|
</div>
|
225
225
|
</div>
|
@@ -232,7 +232,7 @@
|
|
232
232
|
|
233
233
|
<div class="method-description">
|
234
234
|
|
235
|
-
|
235
|
+
<p>Access flags variable property externally</p>
|
236
236
|
|
237
237
|
</div>
|
238
238
|
</div>
|
@@ -245,7 +245,7 @@
|
|
245
245
|
|
246
246
|
<div class="method-description">
|
247
247
|
|
248
|
-
|
248
|
+
<p>Access param variable property externally</p>
|
249
249
|
|
250
250
|
</div>
|
251
251
|
</div>
|
@@ -258,7 +258,8 @@
|
|
258
258
|
|
259
259
|
<div class="method-description">
|
260
260
|
|
261
|
-
|
261
|
+
<p>Access <a href="Request.html#attribute-i-raw_flags">#raw_flags</a> variable
|
262
|
+
property externally</p>
|
262
263
|
|
263
264
|
</div>
|
264
265
|
</div>
|
@@ -291,7 +292,7 @@
|
|
291
292
|
|
292
293
|
|
293
294
|
<div class="method-source-code" id="new-source">
|
294
|
-
<pre><span class="ruby-comment"># File lib/client/request.rb, line
|
295
|
+
<pre><span class="ruby-comment"># File lib/client/request.rb, line 17</span>
|
295
296
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>
|
296
297
|
<span class="ruby-ivar">@controller</span> = <span class="ruby-keyword">nil</span>
|
297
298
|
<span class="ruby-ivar">@flags</span> = <span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">select</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">start_with?</span>(<span class="ruby-string">'-'</span>) }.<span class="ruby-identifier">map</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">split</span>(<span class="ruby-string">"="</span>).<span class="ruby-identifier">map</span>(<span class="ruby-operator">&</span><span class="ruby-value">:to_sym</span>) } <span class="ruby-operator">||</span> []
|
data/doc/created.rid
CHANGED
@@ -1,33 +1,33 @@
|
|
1
|
-
Wed, 12 Oct 2016
|
1
|
+
Wed, 12 Oct 2016 13:45:39 -0600
|
2
2
|
./bin/setup Thu, 21 Apr 2016 10:21:49 -0600
|
3
3
|
./bin/vermillion Fri, 07 Oct 2016 15:28:31 -0600
|
4
4
|
./Gemfile Thu, 21 Apr 2016 10:21:49 -0600
|
5
5
|
./Gemfile.lock Thu, 21 Apr 2016 10:21:49 -0600
|
6
|
-
./lib/client/config.rb Wed, 12 Oct 2016
|
7
|
-
./lib/client/controller/change.rb Wed, 12 Oct 2016
|
8
|
-
./lib/client/controller/create.rb Wed, 12 Oct 2016
|
9
|
-
./lib/client/controller/firstrun.rb Wed, 12 Oct 2016
|
10
|
-
./lib/client/controller/status.rb Wed, 12 Oct 2016
|
11
|
-
./lib/client/controller/update.rb Wed, 12 Oct 2016
|
12
|
-
./lib/client/controller.rb Wed, 12 Oct 2016
|
13
|
-
./lib/client/helper/apicommunication.rb Wed, 12 Oct 2016
|
14
|
-
./lib/client/helper/endpoint.rb Wed, 12 Oct 2016
|
15
|
-
./lib/client/helper/formatting.rb Wed, 12 Oct 2016
|
16
|
-
./lib/client/helper/network.rb Wed, 12 Oct 2016
|
17
|
-
./lib/client/helper/results.rb Wed, 12 Oct 2016
|
18
|
-
./lib/client/helper/time.rb Wed, 12 Oct 2016
|
19
|
-
./lib/client/helper.rb Wed, 12 Oct 2016
|
20
|
-
./lib/client/request.rb Wed, 12 Oct 2016
|
21
|
-
./lib/client/router.rb Wed, 12 Oct 2016
|
22
|
-
./lib/client/utils.rb Wed, 12 Oct 2016
|
23
|
-
./lib/client/version.rb Wed, 12 Oct 2016
|
24
|
-
./lib/client.rb Wed, 12 Oct 2016
|
25
|
-
./lib/test/base.rb Wed, 12 Oct 2016
|
26
|
-
./lib/test.rb Wed, 12 Oct 2016
|
6
|
+
./lib/client/config.rb Wed, 12 Oct 2016 12:05:23 -0600
|
7
|
+
./lib/client/controller/change.rb Wed, 12 Oct 2016 12:05:23 -0600
|
8
|
+
./lib/client/controller/create.rb Wed, 12 Oct 2016 12:05:23 -0600
|
9
|
+
./lib/client/controller/firstrun.rb Wed, 12 Oct 2016 12:05:23 -0600
|
10
|
+
./lib/client/controller/status.rb Wed, 12 Oct 2016 12:05:23 -0600
|
11
|
+
./lib/client/controller/update.rb Wed, 12 Oct 2016 12:05:23 -0600
|
12
|
+
./lib/client/controller.rb Wed, 12 Oct 2016 13:42:20 -0600
|
13
|
+
./lib/client/helper/apicommunication.rb Wed, 12 Oct 2016 12:05:23 -0600
|
14
|
+
./lib/client/helper/endpoint.rb Wed, 12 Oct 2016 13:41:21 -0600
|
15
|
+
./lib/client/helper/formatting.rb Wed, 12 Oct 2016 12:05:23 -0600
|
16
|
+
./lib/client/helper/network.rb Wed, 12 Oct 2016 13:40:43 -0600
|
17
|
+
./lib/client/helper/results.rb Wed, 12 Oct 2016 13:41:39 -0600
|
18
|
+
./lib/client/helper/time.rb Wed, 12 Oct 2016 12:05:23 -0600
|
19
|
+
./lib/client/helper.rb Wed, 12 Oct 2016 12:05:23 -0600
|
20
|
+
./lib/client/request.rb Wed, 12 Oct 2016 13:43:40 -0600
|
21
|
+
./lib/client/router.rb Wed, 12 Oct 2016 12:05:23 -0600
|
22
|
+
./lib/client/utils.rb Wed, 12 Oct 2016 12:05:23 -0600
|
23
|
+
./lib/client/version.rb Wed, 12 Oct 2016 12:05:23 -0600
|
24
|
+
./lib/client.rb Wed, 12 Oct 2016 12:05:23 -0600
|
25
|
+
./lib/test/base.rb Wed, 12 Oct 2016 12:05:23 -0600
|
26
|
+
./lib/test.rb Wed, 12 Oct 2016 12:05:23 -0600
|
27
27
|
./Rakefile Fri, 07 Oct 2016 15:28:31 -0600
|
28
28
|
./README.md Tue, 11 Oct 2016 16:24:09 -0600
|
29
|
-
./test/test_change_branch.rb Wed, 12 Oct 2016
|
30
|
-
./test/test_configuration.rb Wed, 12 Oct 2016
|
31
|
-
./test/test_create.rb Wed, 12 Oct 2016
|
32
|
-
./test/test_update.rb Wed, 12 Oct 2016
|
29
|
+
./test/test_change_branch.rb Wed, 12 Oct 2016 12:05:23 -0600
|
30
|
+
./test/test_configuration.rb Wed, 12 Oct 2016 12:05:23 -0600
|
31
|
+
./test/test_create.rb Wed, 12 Oct 2016 12:05:23 -0600
|
32
|
+
./test/test_update.rb Wed, 12 Oct 2016 12:05:23 -0600
|
33
33
|
./vermillion-client.gemspec Wed, 12 Oct 2016 11:53:02 -0600
|
data/lib/client/controller.rb
CHANGED
@@ -1,7 +1,10 @@
|
|
1
1
|
module Vermillion
|
2
2
|
module Controller
|
3
3
|
class Base
|
4
|
-
|
4
|
+
# Access the configuration object instance externally
|
5
|
+
attr_accessor :config
|
6
|
+
# Access the request object instance externally
|
7
|
+
attr_accessor :request
|
5
8
|
|
6
9
|
# Exit code to indicate everything is ok!
|
7
10
|
OK = 0
|
data/lib/client/request.rb
CHANGED
@@ -1,22 +1,31 @@
|
|
1
1
|
module Vermillion
|
2
2
|
class Request
|
3
|
-
|
3
|
+
# Access controller variable property externally
|
4
|
+
attr_reader :controller
|
5
|
+
# Access command variable property externally
|
6
|
+
attr_reader :command
|
7
|
+
# Access custom variable property externally
|
8
|
+
attr_reader :custom
|
9
|
+
# Access flags variable property externally
|
10
|
+
attr_reader :flags
|
11
|
+
# Access raw_flags variable property externally
|
12
|
+
attr_reader :raw_flags
|
13
|
+
# Access param variable property externally
|
14
|
+
attr_reader :param
|
4
15
|
|
5
16
|
# Create the request object, parse ARGV for values
|
6
17
|
def initialize
|
7
|
-
|
18
|
+
raise ArgumentError, "ARGV is empty" if ARGV.empty?
|
19
|
+
|
8
20
|
@flags = ARGV.select { |f| f.start_with?('-') }.map { |f| f.split("=").map(&:to_sym) } || []
|
9
21
|
@raw_flags = ARGV.select { |f| f.start_with?('-') } || []
|
22
|
+
@controller = ARGV[0].to_sym unless ARGV[0].start_with?('-')
|
23
|
+
@command = ARGV[1].to_sym unless ARGV[1].nil?
|
10
24
|
|
11
|
-
unless ARGV.
|
12
|
-
@controller = ARGV[0].to_sym unless ARGV[0].start_with?('-')
|
13
|
-
@command = ARGV[1].to_sym unless ARGV[1].nil?
|
25
|
+
return unless ARGV.size > 2
|
14
26
|
|
15
|
-
|
16
|
-
|
17
|
-
@param = ARGV[2]
|
18
|
-
end
|
19
|
-
end
|
27
|
+
@custom = ARGV[2..ARGV.size].select { |p| !p.start_with?('-') }.map(&:to_sym) || []
|
28
|
+
@param = ARGV[2]
|
20
29
|
end
|
21
30
|
end
|
22
31
|
end
|
data/lib/client/version.rb
CHANGED