automate_soup 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +15 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +5 -0
  5. data/CODE_OF_CONDUCT.md +74 -0
  6. data/Gemfile +6 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +128 -0
  9. data/Rakefile +10 -0
  10. data/automate_soup.gemspec +31 -0
  11. data/bin/console +14 -0
  12. data/bin/setup +8 -0
  13. data/docs/AutomateSoup.html +2566 -0
  14. data/docs/AutomateSoup/API.html +1174 -0
  15. data/docs/AutomateSoup/Change.html +892 -0
  16. data/docs/AutomateSoup/Credentials.html +452 -0
  17. data/docs/AutomateSoup/Rest.html +321 -0
  18. data/docs/AutomateSoup/Stage.html +428 -0
  19. data/docs/AutomateSoup/Topic.html +530 -0
  20. data/docs/_index.html +166 -0
  21. data/docs/class_list.html +51 -0
  22. data/docs/coverage/.last_run.json +5 -0
  23. data/docs/coverage/.resultset.json +145 -0
  24. data/docs/coverage/.resultset.json.lock +0 -0
  25. data/docs/coverage/assets/0.10.2/application.css +799 -0
  26. data/docs/coverage/assets/0.10.2/application.js +1707 -0
  27. data/docs/coverage/assets/0.10.2/colorbox/border.png +0 -0
  28. data/docs/coverage/assets/0.10.2/colorbox/controls.png +0 -0
  29. data/docs/coverage/assets/0.10.2/colorbox/loading.gif +0 -0
  30. data/docs/coverage/assets/0.10.2/colorbox/loading_background.png +0 -0
  31. data/docs/coverage/assets/0.10.2/favicon_green.png +0 -0
  32. data/docs/coverage/assets/0.10.2/favicon_red.png +0 -0
  33. data/docs/coverage/assets/0.10.2/favicon_yellow.png +0 -0
  34. data/docs/coverage/assets/0.10.2/loading.gif +0 -0
  35. data/docs/coverage/assets/0.10.2/magnify.png +0 -0
  36. data/docs/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  37. data/docs/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  38. data/docs/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  39. data/docs/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  40. data/docs/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  41. data/docs/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  42. data/docs/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  43. data/docs/coverage/assets/0.10.2/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  44. data/docs/coverage/assets/0.10.2/smoothness/images/ui-icons_222222_256x240.png +0 -0
  45. data/docs/coverage/assets/0.10.2/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  46. data/docs/coverage/assets/0.10.2/smoothness/images/ui-icons_454545_256x240.png +0 -0
  47. data/docs/coverage/assets/0.10.2/smoothness/images/ui-icons_888888_256x240.png +0 -0
  48. data/docs/coverage/assets/0.10.2/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  49. data/docs/coverage/index.html +968 -0
  50. data/docs/css/common.css +1 -0
  51. data/docs/css/full_list.css +58 -0
  52. data/docs/css/style.css +492 -0
  53. data/docs/file.README.html +211 -0
  54. data/docs/file_list.html +56 -0
  55. data/docs/frames.html +17 -0
  56. data/docs/index.html +211 -0
  57. data/docs/js/app.js +248 -0
  58. data/docs/js/full_list.js +216 -0
  59. data/docs/js/jquery.js +4 -0
  60. data/docs/method_list.html +395 -0
  61. data/docs/top-level-namespace.html +110 -0
  62. data/lib/automate_soup.rb +264 -0
  63. data/lib/automate_soup/api.rb +112 -0
  64. data/lib/automate_soup/change.rb +105 -0
  65. data/lib/automate_soup/credentials.rb +16 -0
  66. data/lib/automate_soup/rest.rb +40 -0
  67. data/lib/automate_soup/stage.rb +25 -0
  68. data/lib/automate_soup/version.rb +3 -0
  69. metadata +195 -0
@@ -0,0 +1,452 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: AutomateSoup::Credentials
8
+
9
+ &mdash; Documentation by YARD 0.9.9
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "AutomateSoup::Credentials";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (C)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../AutomateSoup.html" title="AutomateSoup (module)">AutomateSoup</a></span></span>
41
+ &raquo;
42
+ <span class="title">Credentials</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: AutomateSoup::Credentials
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">AutomateSoup::Credentials</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/automate_soup/credentials.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>Credentials to authenticate with chef automate</p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div>
114
+
115
+
116
+
117
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
118
+ <ul class="summary">
119
+
120
+ <li class="public ">
121
+ <span class="summary_signature">
122
+
123
+ <a href="#password-instance_method" title="#password (instance method)">#<strong>password</strong> &#x21d2; Object </a>
124
+
125
+
126
+
127
+ </span>
128
+
129
+
130
+
131
+
132
+ <span class="note title readonly">readonly</span>
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+ <span class="summary_desc"><div class='inline'>
143
+ <p>Returns the value of attribute password.</p>
144
+ </div></span>
145
+
146
+ </li>
147
+
148
+
149
+ <li class="public ">
150
+ <span class="summary_signature">
151
+
152
+ <a href="#token-instance_method" title="#token (instance method)">#<strong>token</strong> &#x21d2; Object </a>
153
+
154
+
155
+
156
+ </span>
157
+
158
+
159
+
160
+
161
+ <span class="note title readonly">readonly</span>
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ <span class="summary_desc"><div class='inline'>
172
+ <p>Returns the value of attribute token.</p>
173
+ </div></span>
174
+
175
+ </li>
176
+
177
+
178
+ <li class="public ">
179
+ <span class="summary_signature">
180
+
181
+ <a href="#username-instance_method" title="#username (instance method)">#<strong>username</strong> &#x21d2; Object </a>
182
+
183
+
184
+
185
+ </span>
186
+
187
+
188
+
189
+
190
+ <span class="note title readonly">readonly</span>
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+ <span class="summary_desc"><div class='inline'>
201
+ <p>Returns the value of attribute username.</p>
202
+ </div></span>
203
+
204
+ </li>
205
+
206
+
207
+ </ul>
208
+
209
+
210
+
211
+
212
+
213
+ <h2>
214
+ Instance Method Summary
215
+ <small><a href="#" class="summary_toggle">collapse</a></small>
216
+ </h2>
217
+
218
+ <ul class="summary">
219
+
220
+ <li class="public ">
221
+ <span class="summary_signature">
222
+
223
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(username: nil, password: nil, token: nil) &#x21d2; Credentials </a>
224
+
225
+
226
+
227
+ </span>
228
+
229
+
230
+ <span class="note title constructor">constructor</span>
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+ <span class="summary_desc"><div class='inline'>
240
+ <p>A new instance of Credentials.</p>
241
+ </div></span>
242
+
243
+ </li>
244
+
245
+
246
+ </ul>
247
+
248
+
249
+ <div id="constructor_details" class="method_details_list">
250
+ <h2>Constructor Details</h2>
251
+
252
+ <div class="method_details first">
253
+ <h3 class="signature first" id="initialize-instance_method">
254
+
255
+ #<strong>initialize</strong>(username: nil, password: nil, token: nil) &#x21d2; <tt><span class='object_link'><a href="" title="AutomateSoup::Credentials (class)">Credentials</a></span></tt>
256
+
257
+
258
+
259
+
260
+
261
+ </h3><div class="docstring">
262
+ <div class="discussion">
263
+
264
+ <p>Returns a new instance of Credentials</p>
265
+
266
+
267
+ </div>
268
+ </div>
269
+ <div class="tags">
270
+
271
+
272
+ </div><table class="source_code">
273
+ <tr>
274
+ <td>
275
+ <pre class="lines">
276
+
277
+
278
+ 6
279
+ 7
280
+ 8
281
+ 9
282
+ 10
283
+ 11
284
+ 12
285
+ 13
286
+ 14</pre>
287
+ </td>
288
+ <td>
289
+ <pre class="code"><span class="info file"># File 'lib/automate_soup/credentials.rb', line 6</span>
290
+
291
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span>
292
+ <span class='label'>username:</span> <span class='kw'>nil</span><span class='comma'>,</span>
293
+ <span class='label'>password:</span> <span class='kw'>nil</span><span class='comma'>,</span>
294
+ <span class='label'>token:</span> <span class='kw'>nil</span>
295
+ <span class='rparen'>)</span>
296
+ <span class='ivar'>@username</span> <span class='op'>=</span> <span class='id identifier rubyid_username'>username</span>
297
+ <span class='ivar'>@password</span> <span class='op'>=</span> <span class='id identifier rubyid_password'>password</span>
298
+ <span class='ivar'>@token</span> <span class='op'>=</span> <span class='id identifier rubyid_token'>token</span>
299
+ <span class='kw'>end</span></pre>
300
+ </td>
301
+ </tr>
302
+ </table>
303
+ </div>
304
+
305
+ </div>
306
+
307
+ <div id="instance_attr_details" class="attr_details">
308
+ <h2>Instance Attribute Details</h2>
309
+
310
+
311
+ <span id=""></span>
312
+ <div class="method_details first">
313
+ <h3 class="signature first" id="password-instance_method">
314
+
315
+ #<strong>password</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
316
+
317
+
318
+
319
+
320
+
321
+ </h3><div class="docstring">
322
+ <div class="discussion">
323
+
324
+ <p>Returns the value of attribute password</p>
325
+
326
+
327
+ </div>
328
+ </div>
329
+ <div class="tags">
330
+
331
+
332
+ </div><table class="source_code">
333
+ <tr>
334
+ <td>
335
+ <pre class="lines">
336
+
337
+
338
+ 5
339
+ 6
340
+ 7</pre>
341
+ </td>
342
+ <td>
343
+ <pre class="code"><span class="info file"># File 'lib/automate_soup/credentials.rb', line 5</span>
344
+
345
+ <span class='kw'>def</span> <span class='id identifier rubyid_password'>password</span>
346
+ <span class='ivar'>@password</span>
347
+ <span class='kw'>end</span></pre>
348
+ </td>
349
+ </tr>
350
+ </table>
351
+ </div>
352
+
353
+
354
+ <span id=""></span>
355
+ <div class="method_details ">
356
+ <h3 class="signature " id="token-instance_method">
357
+
358
+ #<strong>token</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
359
+
360
+
361
+
362
+
363
+
364
+ </h3><div class="docstring">
365
+ <div class="discussion">
366
+
367
+ <p>Returns the value of attribute token</p>
368
+
369
+
370
+ </div>
371
+ </div>
372
+ <div class="tags">
373
+
374
+
375
+ </div><table class="source_code">
376
+ <tr>
377
+ <td>
378
+ <pre class="lines">
379
+
380
+
381
+ 5
382
+ 6
383
+ 7</pre>
384
+ </td>
385
+ <td>
386
+ <pre class="code"><span class="info file"># File 'lib/automate_soup/credentials.rb', line 5</span>
387
+
388
+ <span class='kw'>def</span> <span class='id identifier rubyid_token'>token</span>
389
+ <span class='ivar'>@token</span>
390
+ <span class='kw'>end</span></pre>
391
+ </td>
392
+ </tr>
393
+ </table>
394
+ </div>
395
+
396
+
397
+ <span id=""></span>
398
+ <div class="method_details ">
399
+ <h3 class="signature " id="username-instance_method">
400
+
401
+ #<strong>username</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
402
+
403
+
404
+
405
+
406
+
407
+ </h3><div class="docstring">
408
+ <div class="discussion">
409
+
410
+ <p>Returns the value of attribute username</p>
411
+
412
+
413
+ </div>
414
+ </div>
415
+ <div class="tags">
416
+
417
+
418
+ </div><table class="source_code">
419
+ <tr>
420
+ <td>
421
+ <pre class="lines">
422
+
423
+
424
+ 5
425
+ 6
426
+ 7</pre>
427
+ </td>
428
+ <td>
429
+ <pre class="code"><span class="info file"># File 'lib/automate_soup/credentials.rb', line 5</span>
430
+
431
+ <span class='kw'>def</span> <span class='id identifier rubyid_username'>username</span>
432
+ <span class='ivar'>@username</span>
433
+ <span class='kw'>end</span></pre>
434
+ </td>
435
+ </tr>
436
+ </table>
437
+ </div>
438
+
439
+ </div>
440
+
441
+
442
+ </div>
443
+
444
+ <div id="footer">
445
+ Generated on Mon Dec 18 14:46:35 2017 by
446
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
447
+ 0.9.9 (ruby-2.4.1).
448
+ </div>
449
+
450
+ </div>
451
+ </body>
452
+ </html>
@@ -0,0 +1,321 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Module: AutomateSoup::Rest
8
+
9
+ &mdash; Documentation by YARD 0.9.9
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "AutomateSoup::Rest";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (R)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../AutomateSoup.html" title="AutomateSoup (module)">AutomateSoup</a></span></span>
41
+ &raquo;
42
+ <span class="title">Rest</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Module: AutomateSoup::Rest
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/automate_soup/rest.rb</dd>
82
+ </dl>
83
+
84
+ </div>
85
+
86
+ <h2>Overview</h2><div class="docstring">
87
+ <div class="discussion">
88
+
89
+ <p>Rest class for making HTTP requests</p>
90
+
91
+
92
+ </div>
93
+ </div>
94
+ <div class="tags">
95
+
96
+
97
+ </div>
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+ <h2>
106
+ Class Method Summary
107
+ <small><a href="#" class="summary_toggle">collapse</a></small>
108
+ </h2>
109
+
110
+ <ul class="summary">
111
+
112
+ <li class="public ">
113
+ <span class="summary_signature">
114
+
115
+ <a href="#auth_request-class_method" title="auth_request (class method)">.<strong>auth_request</strong>(request, user, token) &#x21d2; Object </a>
116
+
117
+
118
+
119
+ </span>
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+ <span class="summary_desc"><div class='inline'></div></span>
130
+
131
+ </li>
132
+
133
+
134
+ <li class="public ">
135
+ <span class="summary_signature">
136
+
137
+ <a href="#get-class_method" title="get (class method)">.<strong>get</strong>(url: nil, username: nil, token: nil) &#x21d2; Object </a>
138
+
139
+
140
+
141
+ </span>
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+ <span class="summary_desc"><div class='inline'></div></span>
152
+
153
+ </li>
154
+
155
+
156
+ <li class="public ">
157
+ <span class="summary_signature">
158
+
159
+ <a href="#post-class_method" title="post (class method)">.<strong>post</strong>(url: nil, username: nil, token: nil) &#x21d2; Object </a>
160
+
161
+
162
+
163
+ </span>
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+ <span class="summary_desc"><div class='inline'></div></span>
174
+
175
+ </li>
176
+
177
+
178
+ </ul>
179
+
180
+
181
+
182
+
183
+ <div id="class_method_details" class="method_details_list">
184
+ <h2>Class Method Details</h2>
185
+
186
+
187
+ <div class="method_details first">
188
+ <h3 class="signature first" id="auth_request-class_method">
189
+
190
+ .<strong>auth_request</strong>(request, user, token) &#x21d2; <tt>Object</tt>
191
+
192
+
193
+
194
+
195
+
196
+ </h3><table class="source_code">
197
+ <tr>
198
+ <td>
199
+ <pre class="lines">
200
+
201
+
202
+ 33
203
+ 34
204
+ 35
205
+ 36
206
+ 37</pre>
207
+ </td>
208
+ <td>
209
+ <pre class="code"><span class="info file"># File 'lib/automate_soup/rest.rb', line 33</span>
210
+
211
+ <span class='kw'>def</span> <span class='id identifier rubyid_auth_request'>auth_request</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='comma'>,</span> <span class='id identifier rubyid_user'>user</span><span class='comma'>,</span> <span class='id identifier rubyid_token'>token</span><span class='rparen'>)</span>
212
+ <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_add_field'>add_field</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>chef-delivery-user</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span>
213
+ <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_add_field'>add_field</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>chef-delivery-token</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_token'>token</span><span class='rparen'>)</span>
214
+ <span class='id identifier rubyid_request'>request</span>
215
+ <span class='kw'>end</span></pre>
216
+ </td>
217
+ </tr>
218
+ </table>
219
+ </div>
220
+
221
+ <div class="method_details ">
222
+ <h3 class="signature " id="get-class_method">
223
+
224
+ .<strong>get</strong>(url: nil, username: nil, token: nil) &#x21d2; <tt>Object</tt>
225
+
226
+
227
+
228
+
229
+
230
+ </h3><table class="source_code">
231
+ <tr>
232
+ <td>
233
+ <pre class="lines">
234
+
235
+
236
+ 11
237
+ 12
238
+ 13
239
+ 14
240
+ 15
241
+ 16
242
+ 17
243
+ 18
244
+ 19
245
+ 20</pre>
246
+ </td>
247
+ <td>
248
+ <pre class="code"><span class="info file"># File 'lib/automate_soup/rest.rb', line 11</span>
249
+
250
+ <span class='kw'>def</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='label'>url:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>username:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>token:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
251
+ <span class='id identifier rubyid_uri'>uri</span> <span class='op'>=</span> <span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
252
+ <span class='id identifier rubyid_http'>http</span> <span class='op'>=</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTP</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_host'>host</span><span class='comma'>,</span> <span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_port'>port</span><span class='rparen'>)</span>
253
+ <span class='id identifier rubyid_http'>http</span><span class='period'>.</span><span class='id identifier rubyid_use_ssl'>use_ssl</span> <span class='op'>=</span> <span class='kw'>true</span>
254
+ <span class='id identifier rubyid_http'>http</span><span class='period'>.</span><span class='id identifier rubyid_verify_mode'>verify_mode</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>SSL</span><span class='op'>::</span><span class='const'>VERIFY_NONE</span>
255
+ <span class='id identifier rubyid_request'>request</span> <span class='op'>=</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTP</span><span class='op'>::</span><span class='const'>Get</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_request_uri'>request_uri</span><span class='rparen'>)</span>
256
+ <span class='id identifier rubyid_request'>request</span> <span class='op'>=</span> <span class='id identifier rubyid_auth_request'>auth_request</span> <span class='id identifier rubyid_request'>request</span><span class='comma'>,</span> <span class='id identifier rubyid_username'>username</span><span class='comma'>,</span> <span class='id identifier rubyid_token'>token</span>
257
+ <span class='id identifier rubyid_res'>res</span> <span class='op'>=</span> <span class='id identifier rubyid_http'>http</span><span class='period'>.</span><span class='id identifier rubyid_request'>request</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span>
258
+ <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_res'>res</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
259
+ <span class='kw'>end</span></pre>
260
+ </td>
261
+ </tr>
262
+ </table>
263
+ </div>
264
+
265
+ <div class="method_details ">
266
+ <h3 class="signature " id="post-class_method">
267
+
268
+ .<strong>post</strong>(url: nil, username: nil, token: nil) &#x21d2; <tt>Object</tt>
269
+
270
+
271
+
272
+
273
+
274
+ </h3><table class="source_code">
275
+ <tr>
276
+ <td>
277
+ <pre class="lines">
278
+
279
+
280
+ 22
281
+ 23
282
+ 24
283
+ 25
284
+ 26
285
+ 27
286
+ 28
287
+ 29
288
+ 30
289
+ 31</pre>
290
+ </td>
291
+ <td>
292
+ <pre class="code"><span class="info file"># File 'lib/automate_soup/rest.rb', line 22</span>
293
+
294
+ <span class='kw'>def</span> <span class='id identifier rubyid_post'>post</span><span class='lparen'>(</span><span class='label'>url:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>username:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>token:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
295
+ <span class='id identifier rubyid_uri'>uri</span> <span class='op'>=</span> <span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
296
+ <span class='id identifier rubyid_http'>http</span> <span class='op'>=</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTP</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_host'>host</span><span class='comma'>,</span> <span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_port'>port</span><span class='rparen'>)</span>
297
+ <span class='id identifier rubyid_http'>http</span><span class='period'>.</span><span class='id identifier rubyid_use_ssl'>use_ssl</span> <span class='op'>=</span> <span class='kw'>true</span>
298
+ <span class='id identifier rubyid_http'>http</span><span class='period'>.</span><span class='id identifier rubyid_verify_mode'>verify_mode</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>SSL</span><span class='op'>::</span><span class='const'>VERIFY_NONE</span>
299
+ <span class='id identifier rubyid_request'>request</span> <span class='op'>=</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTP</span><span class='op'>::</span><span class='const'>Post</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_request_uri'>request_uri</span><span class='rparen'>)</span>
300
+ <span class='id identifier rubyid_request'>request</span> <span class='op'>=</span> <span class='id identifier rubyid_auth_request'>auth_request</span> <span class='id identifier rubyid_request'>request</span><span class='comma'>,</span> <span class='id identifier rubyid_username'>username</span><span class='comma'>,</span> <span class='id identifier rubyid_token'>token</span>
301
+ <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_add_field'>add_field</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Content-Type</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>application/json;charset=utf-8</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
302
+ <span class='id identifier rubyid_http'>http</span><span class='period'>.</span><span class='id identifier rubyid_request'>request</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span>
303
+ <span class='kw'>end</span></pre>
304
+ </td>
305
+ </tr>
306
+ </table>
307
+ </div>
308
+
309
+ </div>
310
+
311
+ </div>
312
+
313
+ <div id="footer">
314
+ Generated on Mon Dec 18 14:46:35 2017 by
315
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
316
+ 0.9.9 (ruby-2.4.1).
317
+ </div>
318
+
319
+ </div>
320
+ </body>
321
+ </html>