mu 5.7.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. data/Mu_Gem.html +1591 -0
  2. data/bin/mu +11 -0
  3. data/lib/mu.rb +65 -0
  4. data/lib/mu/api/ddt.rb +233 -0
  5. data/lib/mu/api/homepage.rb +54 -0
  6. data/lib/mu/api/muapi.rb +231 -0
  7. data/lib/mu/api/netconfig.rb +233 -0
  8. data/lib/mu/api/scale.rb +199 -0
  9. data/lib/mu/api/system.rb +40 -0
  10. data/lib/mu/client.rb +31 -0
  11. data/lib/mu/command.rb +28 -0
  12. data/lib/mu/command/api.rb +95 -0
  13. data/lib/mu/command/cmd_appid.rb +486 -0
  14. data/lib/mu/command/cmd_cli.rb +151 -0
  15. data/lib/mu/command/cmd_ddt.rb +449 -0
  16. data/lib/mu/command/cmd_homepage.rb +146 -0
  17. data/lib/mu/command/cmd_muapi.rb +361 -0
  18. data/lib/mu/command/cmd_netconfig.rb +262 -0
  19. data/lib/mu/command/cmd_runscale.rb +533 -0
  20. data/lib/mu/command/cmd_runscenario.rb +258 -0
  21. data/lib/mu/command/cmd_runverify.rb +336 -0
  22. data/lib/mu/command/cmd_scale.rb +333 -0
  23. data/lib/mu/command/cmd_system.rb +127 -0
  24. data/lib/mu/command/curl.rb +246 -0
  25. data/lib/mu/command/help.rb +29 -0
  26. data/lib/mu/curl/error.rb +54 -0
  27. data/lib/mu/curl/verify.rb +137 -0
  28. data/lib/mu/helper.rb +55 -0
  29. data/lib/mu/http_helper.rb +232 -0
  30. data/rdoc/classes/Mu.html +305 -0
  31. data/rdoc/classes/Mu/Client.html +265 -0
  32. data/rdoc/classes/Mu/Command.html +208 -0
  33. data/rdoc/classes/Mu/Command/API.html +524 -0
  34. data/rdoc/classes/Mu/Command/Cmd_appid.html +934 -0
  35. data/rdoc/classes/Mu/Command/Cmd_cli.html +515 -0
  36. data/rdoc/classes/Mu/Command/Cmd_ddt.html +1169 -0
  37. data/rdoc/classes/Mu/Command/Cmd_homepage.html +489 -0
  38. data/rdoc/classes/Mu/Command/Cmd_muapi.html +968 -0
  39. data/rdoc/classes/Mu/Command/Cmd_netconfig.html +743 -0
  40. data/rdoc/classes/Mu/Command/Cmd_runscale.html +970 -0
  41. data/rdoc/classes/Mu/Command/Cmd_runscenario.html +530 -0
  42. data/rdoc/classes/Mu/Command/Cmd_runverify.html +621 -0
  43. data/rdoc/classes/Mu/Command/Cmd_scale.html +939 -0
  44. data/rdoc/classes/Mu/Command/Cmd_system.html +426 -0
  45. data/rdoc/classes/Mu/Command/Curl.html +524 -0
  46. data/rdoc/classes/Mu/Command/Help.html +166 -0
  47. data/rdoc/classes/Mu/Curl.html +116 -0
  48. data/rdoc/classes/Mu/Curl/Error.html +157 -0
  49. data/rdoc/classes/Mu/Curl/Error/Authorize.html +178 -0
  50. data/rdoc/classes/Mu/Curl/Error/Connect.html +149 -0
  51. data/rdoc/classes/Mu/Curl/Error/DNS.html +113 -0
  52. data/rdoc/classes/Mu/Curl/Error/Region.html +160 -0
  53. data/rdoc/classes/Mu/Curl/Error/Status.html +149 -0
  54. data/rdoc/classes/Mu/Curl/Error/Timeout.html +149 -0
  55. data/rdoc/classes/Mu/Curl/Verify.html +282 -0
  56. data/rdoc/classes/Mu/Curl/Verify/Request.html +227 -0
  57. data/rdoc/classes/Mu/Curl/Verify/Response.html +187 -0
  58. data/rdoc/classes/Mu/Curl/Verify/Result.html +188 -0
  59. data/rdoc/classes/Mu/Ddt.html +914 -0
  60. data/rdoc/classes/Mu/Helper.html +308 -0
  61. data/rdoc/classes/Mu/Homepage.html +377 -0
  62. data/rdoc/classes/Mu/HttpHelper.html +639 -0
  63. data/rdoc/classes/Mu/Muapi.html +816 -0
  64. data/rdoc/classes/Mu/Netconfig.html +781 -0
  65. data/rdoc/classes/Mu/Scale.html +832 -0
  66. data/rdoc/classes/Mu/System.html +281 -0
  67. data/rdoc/classes/Object.html +148 -0
  68. data/rdoc/classes/TCTestMu.html +1793 -0
  69. data/rdoc/classes/Test.html +107 -0
  70. data/rdoc/classes/Test/Unit.html +107 -0
  71. data/rdoc/classes/Test/Unit/TestCase.html +113 -0
  72. data/rdoc/created.rid +1 -0
  73. data/rdoc/files/lib/mu/api/ddt_rb.html +101 -0
  74. data/rdoc/files/lib/mu/api/homepage_rb.html +101 -0
  75. data/rdoc/files/lib/mu/api/muapi_rb.html +101 -0
  76. data/rdoc/files/lib/mu/api/netconfig_rb.html +101 -0
  77. data/rdoc/files/lib/mu/api/scale_rb.html +101 -0
  78. data/rdoc/files/lib/mu/api/system_rb.html +101 -0
  79. data/rdoc/files/lib/mu/client_rb.html +101 -0
  80. data/rdoc/files/lib/mu/command/api_rb.html +101 -0
  81. data/rdoc/files/lib/mu/command/cmd_appid_rb.html +119 -0
  82. data/rdoc/files/lib/mu/command/cmd_cli_rb.html +108 -0
  83. data/rdoc/files/lib/mu/command/cmd_ddt_rb.html +117 -0
  84. data/rdoc/files/lib/mu/command/cmd_homepage_rb.html +115 -0
  85. data/rdoc/files/lib/mu/command/cmd_muapi_rb.html +116 -0
  86. data/rdoc/files/lib/mu/command/cmd_netconfig_rb.html +116 -0
  87. data/rdoc/files/lib/mu/command/cmd_runscale_rb.html +119 -0
  88. data/rdoc/files/lib/mu/command/cmd_runscenario_rb.html +115 -0
  89. data/rdoc/files/lib/mu/command/cmd_runverify_rb.html +117 -0
  90. data/rdoc/files/lib/mu/command/cmd_scale_rb.html +115 -0
  91. data/rdoc/files/lib/mu/command/cmd_system_rb.html +116 -0
  92. data/rdoc/files/lib/mu/command/curl_rb.html +101 -0
  93. data/rdoc/files/lib/mu/command/help_rb.html +101 -0
  94. data/rdoc/files/lib/mu/command_rb.html +107 -0
  95. data/rdoc/files/lib/mu/curl/error_rb.html +101 -0
  96. data/rdoc/files/lib/mu/curl/verify_rb.html +101 -0
  97. data/rdoc/files/lib/mu/helper_rb.html +101 -0
  98. data/rdoc/files/lib/mu/http_helper_rb.html +101 -0
  99. data/rdoc/files/lib/mu_rb.html +121 -0
  100. data/rdoc/files/test/helper_rb.html +112 -0
  101. data/rdoc/files/test/tc_test_mu_rb.html +111 -0
  102. data/rdoc/fr_class_index.html +68 -0
  103. data/rdoc/fr_file_index.html +55 -0
  104. data/rdoc/fr_method_index.html +374 -0
  105. data/rdoc/index.html +24 -0
  106. data/rdoc/rdoc-style.css +208 -0
  107. data/test/data/app_id_stats.csv +1 -0
  108. data/test/data/data_cgi.msl +94 -0
  109. data/test/data/data_cgi.xml +322 -0
  110. data/test/data/default_test.csv +3 -0
  111. data/test/data/ftp_with_channel.xml +1643 -0
  112. data/test/data/irc.xml +3837 -0
  113. data/test/data/scale_configuration.json +25 -0
  114. data/test/data/test_data_cgi_error.xml +35 -0
  115. data/test/helper.rb +18 -0
  116. data/test/tc_test_mu.rb +716 -0
  117. metadata +322 -0
@@ -0,0 +1,524 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Mu::Command::API</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Mu::Command::API</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/mu/command/api_rb.html">
59
+ lib/mu/command/api.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Command
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+
82
+
83
+ </div>
84
+
85
+ <div id="method-list">
86
+ <h3 class="section-bar">Methods</h3>
87
+
88
+ <div class="name-list">
89
+ <a href="#M000156">ask_for_credentials</a>&nbsp;&nbsp;
90
+ <a href="#M000149">client</a>&nbsp;&nbsp;
91
+ <a href="#M000161">client</a>&nbsp;&nbsp;
92
+ <a href="#M000148">cmd_init</a>&nbsp;&nbsp;
93
+ <a href="#M000153">credentials_file</a>&nbsp;&nbsp;
94
+ <a href="#M000154">get_credentials</a>&nbsp;&nbsp;
95
+ <a href="#M000152">host</a>&nbsp;&nbsp;
96
+ <a href="#M000160">instance</a>&nbsp;&nbsp;
97
+ <a href="#M000162">new</a>&nbsp;&nbsp;
98
+ <a href="#M000151">password</a>&nbsp;&nbsp;
99
+ <a href="#M000155">read_credentials</a>&nbsp;&nbsp;
100
+ <a href="#M000157">save_credentials</a>&nbsp;&nbsp;
101
+ <a href="#M000159">set_credentials_permissions</a>&nbsp;&nbsp;
102
+ <a href="#M000150">user</a>&nbsp;&nbsp;
103
+ <a href="#M000158">write_credentials</a>&nbsp;&nbsp;
104
+ </div>
105
+ </div>
106
+
107
+ </div>
108
+
109
+
110
+ <!-- if includes -->
111
+
112
+ <div id="section">
113
+
114
+
115
+
116
+
117
+
118
+ <div id="attribute-list">
119
+ <h3 class="section-bar">Attributes</h3>
120
+
121
+ <div class="name-list">
122
+ <table>
123
+ <tr class="top-aligned-row context-row">
124
+ <td class="context-item-name">credentials</td>
125
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
126
+ <td class="context-item-desc"></td>
127
+ </tr>
128
+ </table>
129
+ </div>
130
+ </div>
131
+
132
+
133
+
134
+ <!-- if method_list -->
135
+ <div id="methods">
136
+ <h3 class="section-bar">Public Class methods</h3>
137
+
138
+ <div id="method-M000161" class="method-detail">
139
+ <a name="M000161"></a>
140
+
141
+ <div class="method-heading">
142
+ <a href="#M000161" class="method-signature">
143
+ <span class="method-name">client</span><span class="method-args">()</span>
144
+ </a>
145
+ </div>
146
+
147
+ <div class="method-description">
148
+ <p><a class="source-toggle" href="#"
149
+ onclick="toggleCode('M000161-source');return false;">[Source]</a></p>
150
+ <div class="method-source-code" id="M000161-source">
151
+ <pre>
152
+ <span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 86</span>
153
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">client</span>
154
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">client</span>
155
+ <span class="ruby-keyword kw">end</span>
156
+ </pre>
157
+ </div>
158
+ </div>
159
+ </div>
160
+
161
+ <div id="method-M000160" class="method-detail">
162
+ <a name="M000160"></a>
163
+
164
+ <div class="method-heading">
165
+ <a href="#M000160" class="method-signature">
166
+ <span class="method-name">instance</span><span class="method-args">()</span>
167
+ </a>
168
+ </div>
169
+
170
+ <div class="method-description">
171
+ <p><a class="source-toggle" href="#"
172
+ onclick="toggleCode('M000160-source');return false;">[Source]</a></p>
173
+ <div class="method-source-code" id="M000160-source">
174
+ <pre>
175
+ <span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 82</span>
176
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance</span>
177
+ <span class="ruby-ivar">@instance</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">API</span>.<span class="ruby-identifier">new</span>
178
+ <span class="ruby-keyword kw">end</span>
179
+ </pre>
180
+ </div>
181
+ </div>
182
+ </div>
183
+
184
+ <div id="method-M000162" class="method-detail">
185
+ <a name="M000162"></a>
186
+
187
+ <div class="method-heading">
188
+ <a href="#M000162" class="method-signature">
189
+ <span class="method-name">new</span><span class="method-args">()</span>
190
+ </a>
191
+ </div>
192
+
193
+ <div class="method-description">
194
+ <p><a class="source-toggle" href="#"
195
+ onclick="toggleCode('M000162-source');return false;">[Source]</a></p>
196
+ <div class="method-source-code" id="M000162-source">
197
+ <pre>
198
+ <span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 91</span>
199
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
200
+ <span class="ruby-keyword kw">end</span>
201
+ </pre>
202
+ </div>
203
+ </div>
204
+ </div>
205
+
206
+ <h3 class="section-bar">Public Instance methods</h3>
207
+
208
+ <div id="method-M000156" class="method-detail">
209
+ <a name="M000156"></a>
210
+
211
+ <div class="method-heading">
212
+ <a href="#M000156" class="method-signature">
213
+ <span class="method-name">ask_for_credentials</span><span class="method-args">()</span>
214
+ </a>
215
+ </div>
216
+
217
+ <div class="method-description">
218
+ <p><a class="source-toggle" href="#"
219
+ onclick="toggleCode('M000156-source');return false;">[Source]</a></p>
220
+ <div class="method-source-code" id="M000156-source">
221
+ <pre>
222
+ <span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 50</span>
223
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ask_for_credentials</span>
224
+ <span class="ruby-identifier">msg</span> <span class="ruby-value str">&quot;Enter your escale credentials.&quot;</span>
225
+ <span class="ruby-identifier">print</span> <span class="ruby-value str">&quot;User-ID: &quot;</span>
226
+ <span class="ruby-identifier">user</span> = <span class="ruby-identifier">ask</span>
227
+ <span class="ruby-identifier">print</span> <span class="ruby-value str">&quot;API-Key: &quot;</span>
228
+ <span class="ruby-identifier">apik</span> = <span class="ruby-identifier">ask</span>
229
+ <span class="ruby-identifier">apik2</span> = <span class="ruby-constant">Mu</span><span class="ruby-operator">::</span><span class="ruby-constant">Client</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">user</span>, <span class="ruby-identifier">apik</span>, <span class="ruby-identifier">host</span>).<span class="ruby-identifier">login</span>[<span class="ruby-value str">'api_key'</span>]
230
+ <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">apik2</span>
231
+ <span class="ruby-identifier">error</span> <span class="ruby-value str">&quot;Authentication failed&quot;</span>
232
+ <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
233
+ <span class="ruby-keyword kw">end</span>
234
+
235
+ [ <span class="ruby-identifier">user</span>, <span class="ruby-identifier">apik2</span> ]
236
+ <span class="ruby-keyword kw">end</span>
237
+ </pre>
238
+ </div>
239
+ </div>
240
+ </div>
241
+
242
+ <div id="method-M000149" class="method-detail">
243
+ <a name="M000149"></a>
244
+
245
+ <div class="method-heading">
246
+ <a href="#M000149" class="method-signature">
247
+ <span class="method-name">client</span><span class="method-args">()</span>
248
+ </a>
249
+ </div>
250
+
251
+ <div class="method-description">
252
+ <p><a class="source-toggle" href="#"
253
+ onclick="toggleCode('M000149-source');return false;">[Source]</a></p>
254
+ <div class="method-source-code" id="M000149-source">
255
+ <pre>
256
+ <span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 14</span>
257
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">client</span>
258
+ <span class="ruby-identifier">get_credentials</span>
259
+ <span class="ruby-constant">Mu</span><span class="ruby-operator">::</span><span class="ruby-constant">Client</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">user</span>, <span class="ruby-identifier">password</span>, <span class="ruby-identifier">host</span>)
260
+ <span class="ruby-keyword kw">end</span>
261
+ </pre>
262
+ </div>
263
+ </div>
264
+ </div>
265
+
266
+ <div id="method-M000148" class="method-detail">
267
+ <a name="M000148"></a>
268
+
269
+ <div class="method-heading">
270
+ <a href="#M000148" class="method-signature">
271
+ <span class="method-name">cmd_init</span><span class="method-args">(argv)</span>
272
+ </a>
273
+ </div>
274
+
275
+ <div class="method-description">
276
+ <p><a class="source-toggle" href="#"
277
+ onclick="toggleCode('M000148-source');return false;">[Source]</a></p>
278
+ <div class="method-source-code" id="M000148-source">
279
+ <pre>
280
+ <span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 6</span>
281
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_init</span> <span class="ruby-identifier">argv</span>
282
+ <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm</span> <span class="ruby-identifier">credentials_file</span> <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
283
+ <span class="ruby-constant">API</span>.<span class="ruby-identifier">client</span>
284
+
285
+ <span class="ruby-identifier">msg</span> <span class="ruby-value str">&quot;You are now ready to use mu!&quot;</span>
286
+ <span class="ruby-identifier">msg</span> <span class="ruby-value str">&quot;Try mu help to learn more about the commands.&quot;</span>
287
+ <span class="ruby-keyword kw">end</span>
288
+ </pre>
289
+ </div>
290
+ </div>
291
+ </div>
292
+
293
+ <div id="method-M000153" class="method-detail">
294
+ <a name="M000153"></a>
295
+
296
+ <div class="method-heading">
297
+ <a href="#M000153" class="method-signature">
298
+ <span class="method-name">credentials_file</span><span class="method-args">()</span>
299
+ </a>
300
+ </div>
301
+
302
+ <div class="method-description">
303
+ <p><a class="source-toggle" href="#"
304
+ onclick="toggleCode('M000153-source');return false;">[Source]</a></p>
305
+ <div class="method-source-code" id="M000153-source">
306
+ <pre>
307
+ <span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 33</span>
308
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">credentials_file</span>
309
+ <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'HOME'</span>] <span class="ruby-operator">+</span> <span class="ruby-value str">'/.escale/credentials'</span>
310
+ <span class="ruby-keyword kw">end</span>
311
+ </pre>
312
+ </div>
313
+ </div>
314
+ </div>
315
+
316
+ <div id="method-M000154" class="method-detail">
317
+ <a name="M000154"></a>
318
+
319
+ <div class="method-heading">
320
+ <a href="#M000154" class="method-signature">
321
+ <span class="method-name">get_credentials</span><span class="method-args">()</span>
322
+ </a>
323
+ </div>
324
+
325
+ <div class="method-description">
326
+ <p><a class="source-toggle" href="#"
327
+ onclick="toggleCode('M000154-source');return false;">[Source]</a></p>
328
+ <div class="method-source-code" id="M000154-source">
329
+ <pre>
330
+ <span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 37</span>
331
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_credentials</span>
332
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@credentials</span>
333
+ <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@credentials</span> = <span class="ruby-identifier">read_credentials</span>
334
+ <span class="ruby-ivar">@credentials</span> = <span class="ruby-identifier">ask_for_credentials</span>
335
+ <span class="ruby-identifier">save_credentials</span>
336
+ <span class="ruby-keyword kw">end</span>
337
+ <span class="ruby-ivar">@credentials</span>
338
+ <span class="ruby-keyword kw">end</span>
339
+ </pre>
340
+ </div>
341
+ </div>
342
+ </div>
343
+
344
+ <div id="method-M000152" class="method-detail">
345
+ <a name="M000152"></a>
346
+
347
+ <div class="method-heading">
348
+ <a href="#M000152" class="method-signature">
349
+ <span class="method-name">host</span><span class="method-args">()</span>
350
+ </a>
351
+ </div>
352
+
353
+ <div class="method-description">
354
+ <p><a class="source-toggle" href="#"
355
+ onclick="toggleCode('M000152-source');return false;">[Source]</a></p>
356
+ <div class="method-source-code" id="M000152-source">
357
+ <pre>
358
+ <span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 29</span>
359
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">host</span>
360
+ <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'ESCALE_HOST'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'escale.mudynamics.com'</span>
361
+ <span class="ruby-keyword kw">end</span>
362
+ </pre>
363
+ </div>
364
+ </div>
365
+ </div>
366
+
367
+ <div id="method-M000151" class="method-detail">
368
+ <a name="M000151"></a>
369
+
370
+ <div class="method-heading">
371
+ <a href="#M000151" class="method-signature">
372
+ <span class="method-name">password</span><span class="method-args">()</span>
373
+ </a>
374
+ </div>
375
+
376
+ <div class="method-description">
377
+ <p><a class="source-toggle" href="#"
378
+ onclick="toggleCode('M000151-source');return false;">[Source]</a></p>
379
+ <div class="method-source-code" id="M000151-source">
380
+ <pre>
381
+ <span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 24</span>
382
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">password</span>
383
+ <span class="ruby-identifier">get_credentials</span>
384
+ <span class="ruby-ivar">@credentials</span>[<span class="ruby-value">1</span>]
385
+ <span class="ruby-keyword kw">end</span>
386
+ </pre>
387
+ </div>
388
+ </div>
389
+ </div>
390
+
391
+ <div id="method-M000155" class="method-detail">
392
+ <a name="M000155"></a>
393
+
394
+ <div class="method-heading">
395
+ <a href="#M000155" class="method-signature">
396
+ <span class="method-name">read_credentials</span><span class="method-args">()</span>
397
+ </a>
398
+ </div>
399
+
400
+ <div class="method-description">
401
+ <p><a class="source-toggle" href="#"
402
+ onclick="toggleCode('M000155-source');return false;">[Source]</a></p>
403
+ <div class="method-source-code" id="M000155-source">
404
+ <pre>
405
+ <span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 46</span>
406
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_credentials</span>
407
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">credentials_file</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">credentials_file</span>).<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;\n&quot;</span>)
408
+ <span class="ruby-keyword kw">end</span>
409
+ </pre>
410
+ </div>
411
+ </div>
412
+ </div>
413
+
414
+ <div id="method-M000157" class="method-detail">
415
+ <a name="M000157"></a>
416
+
417
+ <div class="method-heading">
418
+ <a href="#M000157" class="method-signature">
419
+ <span class="method-name">save_credentials</span><span class="method-args">()</span>
420
+ </a>
421
+ </div>
422
+
423
+ <div class="method-description">
424
+ <p><a class="source-toggle" href="#"
425
+ onclick="toggleCode('M000157-source');return false;">[Source]</a></p>
426
+ <div class="method-source-code" id="M000157-source">
427
+ <pre>
428
+ <span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 65</span>
429
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">save_credentials</span>
430
+ <span class="ruby-identifier">write_credentials</span>
431
+ <span class="ruby-keyword kw">end</span>
432
+ </pre>
433
+ </div>
434
+ </div>
435
+ </div>
436
+
437
+ <div id="method-M000159" class="method-detail">
438
+ <a name="M000159"></a>
439
+
440
+ <div class="method-heading">
441
+ <a href="#M000159" class="method-signature">
442
+ <span class="method-name">set_credentials_permissions</span><span class="method-args">()</span>
443
+ </a>
444
+ </div>
445
+
446
+ <div class="method-description">
447
+ <p><a class="source-toggle" href="#"
448
+ onclick="toggleCode('M000159-source');return false;">[Source]</a></p>
449
+ <div class="method-source-code" id="M000159-source">
450
+ <pre>
451
+ <span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 77</span>
452
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_credentials_permissions</span>
453
+ <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">chmod</span> <span class="ruby-value">0700</span>, <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">credentials_file</span>)
454
+ <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">chmod</span> <span class="ruby-value">0600</span>, <span class="ruby-identifier">credentials_file</span>
455
+ <span class="ruby-keyword kw">end</span>
456
+ </pre>
457
+ </div>
458
+ </div>
459
+ </div>
460
+
461
+ <div id="method-M000150" class="method-detail">
462
+ <a name="M000150"></a>
463
+
464
+ <div class="method-heading">
465
+ <a href="#M000150" class="method-signature">
466
+ <span class="method-name">user</span><span class="method-args">()</span>
467
+ </a>
468
+ </div>
469
+
470
+ <div class="method-description">
471
+ <p><a class="source-toggle" href="#"
472
+ onclick="toggleCode('M000150-source');return false;">[Source]</a></p>
473
+ <div class="method-source-code" id="M000150-source">
474
+ <pre>
475
+ <span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 19</span>
476
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">user</span>
477
+ <span class="ruby-identifier">get_credentials</span>
478
+ <span class="ruby-ivar">@credentials</span>[<span class="ruby-value">0</span>]
479
+ <span class="ruby-keyword kw">end</span>
480
+ </pre>
481
+ </div>
482
+ </div>
483
+ </div>
484
+
485
+ <div id="method-M000158" class="method-detail">
486
+ <a name="M000158"></a>
487
+
488
+ <div class="method-heading">
489
+ <a href="#M000158" class="method-signature">
490
+ <span class="method-name">write_credentials</span><span class="method-args">()</span>
491
+ </a>
492
+ </div>
493
+
494
+ <div class="method-description">
495
+ <p><a class="source-toggle" href="#"
496
+ onclick="toggleCode('M000158-source');return false;">[Source]</a></p>
497
+ <div class="method-source-code" id="M000158-source">
498
+ <pre>
499
+ <span class="ruby-comment cmt"># File lib/mu/command/api.rb, line 69</span>
500
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_credentials</span>
501
+ <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">credentials_file</span>))
502
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">credentials_file</span>, <span class="ruby-value str">'w'</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
503
+ <span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">credentials</span>
504
+ <span class="ruby-keyword kw">end</span>
505
+ <span class="ruby-identifier">set_credentials_permissions</span>
506
+ <span class="ruby-keyword kw">end</span>
507
+ </pre>
508
+ </div>
509
+ </div>
510
+ </div>
511
+
512
+
513
+ </div>
514
+
515
+
516
+ </div>
517
+
518
+
519
+ <div id="validator-badges">
520
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
521
+ </div>
522
+
523
+ </body>
524
+ </html>