helium-ruby 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/Helium.html +2 -2
- data/docs/Helium/Client.html +45 -23
- data/docs/Helium/Client/Elements.html +1 -1
- data/docs/Helium/Client/Http.html +145 -38
- data/docs/Helium/Client/Labels.html +1 -1
- data/docs/Helium/Client/Organizations.html +1 -1
- data/docs/Helium/Client/Sensors.html +1 -1
- data/docs/Helium/Client/Users.html +1 -1
- data/docs/Helium/ClientError.html +1 -1
- data/docs/Helium/Cursor.html +1 -1
- data/docs/Helium/DataPoint.html +1 -1
- data/docs/Helium/Element.html +1 -1
- data/docs/Helium/Error.html +1 -1
- data/docs/Helium/InvalidApiKey.html +1 -1
- data/docs/Helium/Label.html +1 -1
- data/docs/Helium/Organization.html +1 -1
- data/docs/Helium/Resource.html +1 -1
- data/docs/Helium/Sensor.html +1 -1
- data/docs/Helium/User.html +1 -1
- data/docs/Helium/Utils.html +1 -1
- data/docs/_index.html +1 -1
- data/docs/file.README.html +1 -1
- data/docs/index.html +1 -1
- data/docs/method_list.html +105 -89
- data/docs/top-level-namespace.html +1 -1
- data/helium-ruby.gemspec +2 -2
- data/lib/helium/client.rb +7 -2
- data/lib/helium/client/http.rb +14 -12
- data/lib/helium/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ed4e6a8fbcc7e5ebe36c22b65f36e41566c2e83
|
4
|
+
data.tar.gz: 94ec6f609f280d06f018a6ed4ecaa92b3f308c17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2efa549a8da0fe3b299822e9e1e69ece72edfd2198efebc4ba2f5696910cd6adea2305d6a966d5a4b5f8e4338bb722e6e984b14b3dec7e18015fec6221e0c06e
|
7
|
+
data.tar.gz: 103c4aaafc6a18d10974648d0f0d2e6c8964f9a3a1d6ebd5dcc608aff3c2920aec2af526aa00dcc1878654c4b59e041407f664376158a7ce2698ba69c0833256
|
data/docs/Helium.html
CHANGED
@@ -106,7 +106,7 @@
|
|
106
106
|
<dt id="VERSION-constant" class="">VERSION =
|
107
107
|
|
108
108
|
</dt>
|
109
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.
|
109
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.7.0</span><span class='tstring_end'>"</span></span></pre></dd>
|
110
110
|
|
111
111
|
</dl>
|
112
112
|
|
@@ -121,7 +121,7 @@
|
|
121
121
|
</div>
|
122
122
|
|
123
123
|
<div id="footer">
|
124
|
-
Generated on
|
124
|
+
Generated on Wed Aug 31 12:32:54 2016 by
|
125
125
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
126
126
|
0.9.3 (ruby-2.3.1).
|
127
127
|
</div>
|
data/docs/Helium/Client.html
CHANGED
@@ -119,13 +119,33 @@
|
|
119
119
|
|
120
120
|
</p>
|
121
121
|
|
122
|
+
<h2>Constant Summary</h2>
|
123
|
+
<dl class="constants">
|
124
|
+
|
125
|
+
<dt id="API_VERSION-constant" class="">API_VERSION =
|
126
|
+
|
127
|
+
</dt>
|
128
|
+
<dd><pre class="code"><span class='int'>1</span></pre></dd>
|
129
|
+
|
130
|
+
<dt id="HOST-constant" class="">HOST =
|
131
|
+
|
132
|
+
</dt>
|
133
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>api.helium.com</span><span class='tstring_end'>'</span></span></pre></dd>
|
134
|
+
|
135
|
+
<dt id="PROTOCOL-constant" class="">PROTOCOL =
|
136
|
+
|
137
|
+
</dt>
|
138
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>https</span><span class='tstring_end'>'</span></span></pre></dd>
|
139
|
+
|
140
|
+
</dl>
|
122
141
|
|
123
142
|
|
124
|
-
|
143
|
+
|
144
|
+
|
125
145
|
|
126
146
|
<h3 class="inherited">Constants included
|
127
147
|
from <span class='object_link'><a href="Client/Http.html" title="Helium::Client::Http (module)">Http</a></span></h3>
|
128
|
-
<p class="inherited"><span class='object_link'><a href="Client/Http.html#
|
148
|
+
<p class="inherited"><span class='object_link'><a href="Client/Http.html#BASE_HTTP_HEADERS-constant" title="Helium::Client::Http::BASE_HTTP_HEADERS (constant)">Http::BASE_HTTP_HEADERS</a></span></p>
|
129
149
|
|
130
150
|
|
131
151
|
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
@@ -307,7 +327,7 @@
|
|
307
327
|
|
308
328
|
|
309
329
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Client/Http.html" title="Helium::Client::Http (module)">Http</a></span></h3>
|
310
|
-
<p class="inherited"><span class='object_link'><a href="Client/Http.html#delete-instance_method" title="Helium::Client::Http#delete (method)">#delete</a></span>, <span class='object_link'><a href="Client/Http.html#get-instance_method" title="Helium::Client::Http#get (method)">#get</a></span>, <span class='object_link'><a href="Client/Http.html#paginated_get-instance_method" title="Helium::Client::Http#paginated_get (method)">#paginated_get</a></span>, <span class='object_link'><a href="Client/Http.html#patch-instance_method" title="Helium::Client::Http#patch (method)">#patch</a></span>, <span class='object_link'><a href="Client/Http.html#post-instance_method" title="Helium::Client::Http#post (method)">#post</a></span></p>
|
330
|
+
<p class="inherited"><span class='object_link'><a href="Client/Http.html#base_url-instance_method" title="Helium::Client::Http#base_url (method)">#base_url</a></span>, <span class='object_link'><a href="Client/Http.html#delete-instance_method" title="Helium::Client::Http#delete (method)">#delete</a></span>, <span class='object_link'><a href="Client/Http.html#get-instance_method" title="Helium::Client::Http#get (method)">#get</a></span>, <span class='object_link'><a href="Client/Http.html#paginated_get-instance_method" title="Helium::Client::Http#paginated_get (method)">#paginated_get</a></span>, <span class='object_link'><a href="Client/Http.html#patch-instance_method" title="Helium::Client::Http#patch (method)">#patch</a></span>, <span class='object_link'><a href="Client/Http.html#post-instance_method" title="Helium::Client::Http#post (method)">#post</a></span>, <span class='object_link'><a href="Client/Http.html#url_for-instance_method" title="Helium::Client::Http#url_for (method)">#url_for</a></span></p>
|
311
331
|
|
312
332
|
|
313
333
|
|
@@ -347,17 +367,19 @@
|
|
347
367
|
<pre class="lines">
|
348
368
|
|
349
369
|
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
370
|
+
24
|
371
|
+
25
|
372
|
+
26
|
373
|
+
27
|
374
|
+
28</pre>
|
354
375
|
</td>
|
355
376
|
<td>
|
356
|
-
<pre class="code"><span class="info file"># File 'lib/helium/client.rb', line
|
377
|
+
<pre class="code"><span class="info file"># File 'lib/helium/client.rb', line 24</span>
|
357
378
|
|
358
379
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
359
|
-
<span class='ivar'>@api_key</span>
|
360
|
-
<span class='ivar'>@
|
380
|
+
<span class='ivar'>@api_key</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:api_key</span><span class='rparen'>)</span>
|
381
|
+
<span class='ivar'>@api_host</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:host</span><span class='comma'>,</span> <span class='const'>HOST</span><span class='rparen'>)</span>
|
382
|
+
<span class='ivar'>@debug</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:debug</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
361
383
|
<span class='kw'>end</span></pre>
|
362
384
|
</td>
|
363
385
|
</tr>
|
@@ -396,12 +418,12 @@
|
|
396
418
|
<pre class="lines">
|
397
419
|
|
398
420
|
|
399
|
-
|
400
|
-
|
401
|
-
|
421
|
+
22
|
422
|
+
23
|
423
|
+
24</pre>
|
402
424
|
</td>
|
403
425
|
<td>
|
404
|
-
<pre class="code"><span class="info file"># File 'lib/helium/client.rb', line
|
426
|
+
<pre class="code"><span class="info file"># File 'lib/helium/client.rb', line 22</span>
|
405
427
|
|
406
428
|
<span class='kw'>def</span> <span class='id identifier rubyid_api_key'>api_key</span>
|
407
429
|
<span class='ivar'>@api_key</span>
|
@@ -455,12 +477,12 @@
|
|
455
477
|
<pre class="lines">
|
456
478
|
|
457
479
|
|
458
|
-
|
459
|
-
|
460
|
-
|
480
|
+
34
|
481
|
+
35
|
482
|
+
36</pre>
|
461
483
|
</td>
|
462
484
|
<td>
|
463
|
-
<pre class="code"><span class="info file"># File 'lib/helium/client.rb', line
|
485
|
+
<pre class="code"><span class="info file"># File 'lib/helium/client.rb', line 34</span>
|
464
486
|
|
465
487
|
<span class='kw'>def</span> <span class='id identifier rubyid_debug?'>debug?</span>
|
466
488
|
<span class='ivar'>@debug</span> <span class='op'>==</span> <span class='kw'>true</span>
|
@@ -485,12 +507,12 @@
|
|
485
507
|
<pre class="lines">
|
486
508
|
|
487
509
|
|
488
|
-
|
489
|
-
|
490
|
-
|
510
|
+
30
|
511
|
+
31
|
512
|
+
32</pre>
|
491
513
|
</td>
|
492
514
|
<td>
|
493
|
-
<pre class="code"><span class="info file"># File 'lib/helium/client.rb', line
|
515
|
+
<pre class="code"><span class="info file"># File 'lib/helium/client.rb', line 30</span>
|
494
516
|
|
495
517
|
<span class='kw'>def</span> <span class='id identifier rubyid_inspect'>inspect</span>
|
496
518
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'><Helium::Client @debug=</span><span class='embexpr_beg'>#{</span><span class='ivar'>@debug</span><span class='embexpr_end'>}</span><span class='tstring_content'>></span><span class='tstring_end'>"</span></span>
|
@@ -505,7 +527,7 @@
|
|
505
527
|
</div>
|
506
528
|
|
507
529
|
<div id="footer">
|
508
|
-
Generated on
|
530
|
+
Generated on Wed Aug 31 12:32:54 2016 by
|
509
531
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
510
532
|
0.9.3 (ruby-2.3.1).
|
511
533
|
</div>
|
@@ -291,7 +291,7 @@
|
|
291
291
|
</div>
|
292
292
|
|
293
293
|
<div id="footer">
|
294
|
-
Generated on
|
294
|
+
Generated on Wed Aug 31 12:32:54 2016 by
|
295
295
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
296
296
|
0.9.3 (ruby-2.3.1).
|
297
297
|
</div>
|
@@ -94,21 +94,6 @@
|
|
94
94
|
<h2>Constant Summary</h2>
|
95
95
|
<dl class="constants">
|
96
96
|
|
97
|
-
<dt id="API_VERSION-constant" class="">API_VERSION =
|
98
|
-
|
99
|
-
</dt>
|
100
|
-
<dd><pre class="code"><span class='int'>1</span></pre></dd>
|
101
|
-
|
102
|
-
<dt id="HOST-constant" class="">HOST =
|
103
|
-
|
104
|
-
</dt>
|
105
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>api.helium.com</span><span class='tstring_end'>'</span></span></pre></dd>
|
106
|
-
|
107
|
-
<dt id="PROTOCOL-constant" class="">PROTOCOL =
|
108
|
-
|
109
|
-
</dt>
|
110
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>https</span><span class='tstring_end'>'</span></span></pre></dd>
|
111
|
-
|
112
97
|
<dt id="BASE_HTTP_HEADERS-constant" class="">BASE_HTTP_HEADERS =
|
113
98
|
|
114
99
|
</dt>
|
@@ -137,6 +122,28 @@
|
|
137
122
|
<li class="public ">
|
138
123
|
<span class="summary_signature">
|
139
124
|
|
125
|
+
<a href="#base_url-instance_method" title="#base_url (instance method)">#<strong>base_url</strong> ⇒ Object </a>
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
</span>
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
140
|
+
|
141
|
+
</li>
|
142
|
+
|
143
|
+
|
144
|
+
<li class="public ">
|
145
|
+
<span class="summary_signature">
|
146
|
+
|
140
147
|
<a href="#delete-instance_method" title="#delete (instance method)">#<strong>delete</strong>(path) ⇒ Object </a>
|
141
148
|
|
142
149
|
|
@@ -241,6 +248,29 @@
|
|
241
248
|
|
242
249
|
<span class="summary_desc"><div class='inline'></div></span>
|
243
250
|
|
251
|
+
</li>
|
252
|
+
|
253
|
+
|
254
|
+
<li class="public ">
|
255
|
+
<span class="summary_signature">
|
256
|
+
|
257
|
+
<a href="#url_for-instance_method" title="#url_for (instance method)">#<strong>url_for</strong>(path) ⇒ Object </a>
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
</span>
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
<span class="summary_desc"><div class='inline'><p>Contructs a proper url given a path.</p>
|
272
|
+
</div></span>
|
273
|
+
|
244
274
|
</li>
|
245
275
|
|
246
276
|
|
@@ -254,9 +284,9 @@
|
|
254
284
|
|
255
285
|
|
256
286
|
<div class="method_details first">
|
257
|
-
<h3 class="signature first" id="
|
287
|
+
<h3 class="signature first" id="base_url-instance_method">
|
258
288
|
|
259
|
-
#<strong>
|
289
|
+
#<strong>base_url</strong> ⇒ <tt>Object</tt>
|
260
290
|
|
261
291
|
|
262
292
|
|
@@ -268,13 +298,43 @@
|
|
268
298
|
<pre class="lines">
|
269
299
|
|
270
300
|
|
271
|
-
33
|
272
301
|
34
|
273
302
|
35
|
274
303
|
36</pre>
|
275
304
|
</td>
|
276
305
|
<td>
|
277
|
-
<pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line
|
306
|
+
<pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line 34</span>
|
307
|
+
|
308
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_base_url'>base_url</span>
|
309
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='const'>PROTOCOL</span><span class='embexpr_end'>}</span><span class='tstring_content'>://</span><span class='embexpr_beg'>#{</span><span class='ivar'>@api_host</span><span class='embexpr_end'>}</span><span class='tstring_content'>/v</span><span class='embexpr_beg'>#{</span><span class='const'>API_VERSION</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
310
|
+
<span class='kw'>end</span></pre>
|
311
|
+
</td>
|
312
|
+
</tr>
|
313
|
+
</table>
|
314
|
+
</div>
|
315
|
+
|
316
|
+
<div class="method_details ">
|
317
|
+
<h3 class="signature " id="delete-instance_method">
|
318
|
+
|
319
|
+
#<strong>delete</strong>(path) ⇒ <tt>Object</tt>
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
</h3><table class="source_code">
|
326
|
+
<tr>
|
327
|
+
<td>
|
328
|
+
<pre class="lines">
|
329
|
+
|
330
|
+
|
331
|
+
29
|
332
|
+
30
|
333
|
+
31
|
334
|
+
32</pre>
|
335
|
+
</td>
|
336
|
+
<td>
|
337
|
+
<pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line 29</span>
|
278
338
|
|
279
339
|
<span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
280
340
|
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='symbol'>:delete</span><span class='rparen'>)</span>
|
@@ -300,12 +360,12 @@
|
|
300
360
|
<pre class="lines">
|
301
361
|
|
302
362
|
|
303
|
-
|
304
|
-
|
305
|
-
|
363
|
+
10
|
364
|
+
11
|
365
|
+
12</pre>
|
306
366
|
</td>
|
307
367
|
<td>
|
308
|
-
<pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line
|
368
|
+
<pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line 10</span>
|
309
369
|
|
310
370
|
<span class='kw'>def</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
311
371
|
<span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
@@ -330,15 +390,15 @@
|
|
330
390
|
<pre class="lines">
|
331
391
|
|
332
392
|
|
393
|
+
14
|
394
|
+
15
|
395
|
+
16
|
396
|
+
17
|
333
397
|
18
|
334
|
-
19
|
335
|
-
20
|
336
|
-
21
|
337
|
-
22
|
338
|
-
23</pre>
|
398
|
+
19</pre>
|
339
399
|
</td>
|
340
400
|
<td>
|
341
|
-
<pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line
|
401
|
+
<pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line 14</span>
|
342
402
|
|
343
403
|
<span class='kw'>def</span> <span class='id identifier rubyid_paginated_get'>paginated_get</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
344
404
|
<span class='id identifier rubyid_klass'>klass</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:klass</span><span class='rparen'>)</span>
|
@@ -366,12 +426,12 @@
|
|
366
426
|
<pre class="lines">
|
367
427
|
|
368
428
|
|
369
|
-
|
370
|
-
|
371
|
-
|
429
|
+
25
|
430
|
+
26
|
431
|
+
27</pre>
|
372
432
|
</td>
|
373
433
|
<td>
|
374
|
-
<pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line
|
434
|
+
<pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line 25</span>
|
375
435
|
|
376
436
|
<span class='kw'>def</span> <span class='id identifier rubyid_patch'>patch</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
377
437
|
<span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='symbol'>:patch</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
@@ -396,12 +456,12 @@
|
|
396
456
|
<pre class="lines">
|
397
457
|
|
398
458
|
|
399
|
-
|
400
|
-
|
401
|
-
|
459
|
+
21
|
460
|
+
22
|
461
|
+
23</pre>
|
402
462
|
</td>
|
403
463
|
<td>
|
404
|
-
<pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line
|
464
|
+
<pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line 21</span>
|
405
465
|
|
406
466
|
<span class='kw'>def</span> <span class='id identifier rubyid_post'>post</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
407
467
|
<span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='symbol'>:post</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
@@ -409,6 +469,53 @@
|
|
409
469
|
</td>
|
410
470
|
</tr>
|
411
471
|
</table>
|
472
|
+
</div>
|
473
|
+
|
474
|
+
<div class="method_details ">
|
475
|
+
<h3 class="signature " id="url_for-instance_method">
|
476
|
+
|
477
|
+
#<strong>url_for</strong>(path) ⇒ <tt>Object</tt>
|
478
|
+
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
</h3><div class="docstring">
|
484
|
+
<div class="discussion">
|
485
|
+
<p>Contructs a proper url given a path. If the path is already a full url
|
486
|
+
it will simply pass through</p>
|
487
|
+
|
488
|
+
|
489
|
+
</div>
|
490
|
+
</div>
|
491
|
+
<div class="tags">
|
492
|
+
|
493
|
+
|
494
|
+
</div><table class="source_code">
|
495
|
+
<tr>
|
496
|
+
<td>
|
497
|
+
<pre class="lines">
|
498
|
+
|
499
|
+
|
500
|
+
40
|
501
|
+
41
|
502
|
+
42
|
503
|
+
43
|
504
|
+
44
|
505
|
+
45</pre>
|
506
|
+
</td>
|
507
|
+
<td>
|
508
|
+
<pre class="code"><span class="info file"># File 'lib/helium/client/http.rb', line 40</span>
|
509
|
+
|
510
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_url_for'>url_for</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
511
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_path'>path</span> <span class='kw'>if</span> <span class='id identifier rubyid_path'>path</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^http</span><span class='regexp_end'>/</span></span>
|
512
|
+
|
513
|
+
<span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^\/</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
514
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_base_url'>base_url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_path'>path</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
515
|
+
<span class='kw'>end</span></pre>
|
516
|
+
</td>
|
517
|
+
</tr>
|
518
|
+
</table>
|
412
519
|
</div>
|
413
520
|
|
414
521
|
</div>
|
@@ -416,7 +523,7 @@
|
|
416
523
|
</div>
|
417
524
|
|
418
525
|
<div id="footer">
|
419
|
-
Generated on
|
526
|
+
Generated on Wed Aug 31 12:32:54 2016 by
|
420
527
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
421
528
|
0.9.3 (ruby-2.3.1).
|
422
529
|
</div>
|
@@ -447,7 +447,7 @@
|
|
447
447
|
</div>
|
448
448
|
|
449
449
|
<div id="footer">
|
450
|
-
Generated on
|
450
|
+
Generated on Wed Aug 31 12:32:54 2016 by
|
451
451
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
452
452
|
0.9.3 (ruby-2.3.1).
|
453
453
|
</div>
|
@@ -241,7 +241,7 @@
|
|
241
241
|
</div>
|
242
242
|
|
243
243
|
<div id="footer">
|
244
|
-
Generated on
|
244
|
+
Generated on Wed Aug 31 12:32:54 2016 by
|
245
245
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
246
246
|
0.9.3 (ruby-2.3.1).
|
247
247
|
</div>
|