cft_smartcloud 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. data/README.rdoc +4 -0
  2. data/Rakefile +3 -3
  3. data/VERSION +1 -1
  4. data/bin/cft_smartcloud +37 -0
  5. data/cft_smartcloud.gemspec +88 -7
  6. data/lib/smartcloud.rb +12 -2
  7. data/lib/smartcloud_logger.rb +1 -1
  8. data/rdoc/classes/ConfigTable/BoolItem.html +172 -0
  9. data/rdoc/classes/ConfigTable/ExecItem.html +252 -0
  10. data/rdoc/classes/ConfigTable/Item.html +308 -0
  11. data/rdoc/classes/ConfigTable/MetaConfigEnvironment.html +445 -0
  12. data/rdoc/classes/ConfigTable/PackageSelectionItem.html +188 -0
  13. data/rdoc/classes/ConfigTable/PathItem.html +148 -0
  14. data/rdoc/classes/ConfigTable/ProgramItem.html +148 -0
  15. data/rdoc/classes/ConfigTable/SelectItem.html +175 -0
  16. data/rdoc/classes/ConfigTable.html +724 -0
  17. data/rdoc/classes/Enumerable.html +157 -0
  18. data/rdoc/classes/Errno/ENOTEMPTY.html +111 -0
  19. data/rdoc/classes/Errno.html +111 -0
  20. data/rdoc/classes/File.html +197 -0
  21. data/rdoc/classes/FileOperations.html +600 -0
  22. data/rdoc/classes/Hash.html +163 -0
  23. data/rdoc/classes/HookScriptAPI.html +413 -0
  24. data/rdoc/classes/IBMSmartCloud.html +1484 -0
  25. data/rdoc/classes/Installer/Shebang.html +245 -0
  26. data/rdoc/classes/Installer.html +1660 -0
  27. data/rdoc/classes/MIME/InvalidContentType.html +119 -0
  28. data/rdoc/classes/MIME/Type.html +1366 -0
  29. data/rdoc/classes/MIME/Types.html +643 -0
  30. data/rdoc/classes/MIME.html +124 -0
  31. data/rdoc/classes/MockSmartCloud.html +376 -0
  32. data/rdoc/classes/Net/HTTP.html +164 -0
  33. data/rdoc/classes/Net.html +122 -0
  34. data/rdoc/classes/RestClient/AbstractResponse.html +417 -0
  35. data/rdoc/classes/RestClient/Exception.html +305 -0
  36. data/rdoc/classes/RestClient/ExceptionWithResponse.html +119 -0
  37. data/rdoc/classes/RestClient/Exceptions.html +130 -0
  38. data/rdoc/classes/RestClient/MaxRedirectsReached.html +113 -0
  39. data/rdoc/classes/RestClient/Payload/Base.html +422 -0
  40. data/rdoc/classes/RestClient/Payload/Multipart.html +372 -0
  41. data/rdoc/classes/RestClient/Payload/Streamed.html +191 -0
  42. data/rdoc/classes/RestClient/Payload/UrlEncoded.html +202 -0
  43. data/rdoc/classes/RestClient/Payload.html +192 -0
  44. data/rdoc/classes/RestClient/RawResponse.html +236 -0
  45. data/rdoc/classes/RestClient/Redirect.html +168 -0
  46. data/rdoc/classes/RestClient/Request.html +950 -0
  47. data/rdoc/classes/RestClient/RequestFailed.html +178 -0
  48. data/rdoc/classes/RestClient/Resource.html +607 -0
  49. data/rdoc/classes/RestClient/Response.html +208 -0
  50. data/rdoc/classes/RestClient/ResponseForException.html +152 -0
  51. data/rdoc/classes/RestClient/SSLCertificateNotVerified.html +149 -0
  52. data/rdoc/classes/RestClient/ServerBrokeConnection.html +157 -0
  53. data/rdoc/classes/RestClient.html +737 -0
  54. data/rdoc/classes/SetupError.html +111 -0
  55. data/rdoc/classes/SmartcloudLogger.html +162 -0
  56. data/rdoc/classes/TestMIME.html +109 -0
  57. data/rdoc/classes/ToplevelInstaller.html +987 -0
  58. data/rdoc/classes/ToplevelInstallerMulti.html +593 -0
  59. data/rdoc/classes/XmlSimple/Cache.html +372 -0
  60. data/rdoc/classes/XmlSimple.html +475 -0
  61. data/rdoc/created.rid +1 -0
  62. data/rdoc/files/README_rdoc.html +198 -0
  63. data/rdoc/files/lib/hash_fix_rb.html +115 -0
  64. data/rdoc/files/lib/mime-types-1_16/lib/mime/types_rb.html +107 -0
  65. data/rdoc/files/lib/mime-types-1_16/setup_rb.html +157 -0
  66. data/rdoc/files/lib/mime-types-1_16/test/test_mime_type_rb.html +109 -0
  67. data/rdoc/files/lib/mime-types-1_16/test/test_mime_types_rb.html +109 -0
  68. data/rdoc/files/lib/mock_smartcloud_rb.html +115 -0
  69. data/rdoc/files/lib/rest-client-1_6_3/lib/rest-client_rb.html +107 -0
  70. data/rdoc/files/lib/rest-client-1_6_3/lib/rest_client_rb.html +108 -0
  71. data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/abstract_response_rb.html +108 -0
  72. data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/exceptions_rb.html +101 -0
  73. data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/net_http_ext_rb.html +113 -0
  74. data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/payload_rb.html +110 -0
  75. data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/raw_response_rb.html +101 -0
  76. data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/request_rb.html +110 -0
  77. data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/resource_rb.html +101 -0
  78. data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/response_rb.html +101 -0
  79. data/rdoc/files/lib/rest-client-1_6_3/lib/restclient_rb.html +111 -0
  80. data/rdoc/files/lib/restclient_fix_rb.html +115 -0
  81. data/rdoc/files/lib/smartcloud_logger_rb.html +115 -0
  82. data/rdoc/files/lib/smartcloud_rb.html +143 -0
  83. data/rdoc/files/lib/xml-simple-1_0_12/lib/xmlsimple_rb.html +124 -0
  84. data/rdoc/fr_class_index.html +79 -0
  85. data/rdoc/fr_file_index.html +48 -0
  86. data/rdoc/fr_method_index.html +441 -0
  87. data/rdoc/index.html +26 -0
  88. data/rdoc/rdoc-style.css +208 -0
  89. metadata +90 -6
@@ -0,0 +1,202 @@
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: RestClient::Payload::UrlEncoded</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">RestClient::Payload::UrlEncoded</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/rest-client-1_6_3/lib/restclient/payload_rb.html">
59
+ lib/rest-client-1.6.3/lib/restclient/payload.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
+ <a href="Base.html">
69
+ Base
70
+ </a>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+
84
+
85
+ </div>
86
+
87
+ <div id="method-list">
88
+ <h3 class="section-bar">Methods</h3>
89
+
90
+ <div class="name-list">
91
+ <a href="#M000281">build_stream</a>&nbsp;&nbsp;
92
+ <a href="#M000282">handle_key</a>&nbsp;&nbsp;
93
+ <a href="#M000283">headers</a>&nbsp;&nbsp;
94
+ </div>
95
+ </div>
96
+
97
+ </div>
98
+
99
+
100
+ <!-- if includes -->
101
+
102
+ <div id="section">
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+ <!-- if method_list -->
112
+ <div id="methods">
113
+ <h3 class="section-bar">Public Instance methods</h3>
114
+
115
+ <div id="method-M000281" class="method-detail">
116
+ <a name="M000281"></a>
117
+
118
+ <div class="method-heading">
119
+ <a href="#M000281" class="method-signature">
120
+ <span class="method-name">build_stream</span><span class="method-args">(params = nil)</span>
121
+ </a>
122
+ </div>
123
+
124
+ <div class="method-description">
125
+ <p><a class="source-toggle" href="#"
126
+ onclick="toggleCode('M000281-source');return false;">[Source]</a></p>
127
+ <div class="method-source-code" id="M000281-source">
128
+ <pre>
129
+ <span class="ruby-comment cmt"># File lib/rest-client-1.6.3/lib/restclient/payload.rb, line 126</span>
130
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build_stream</span>(<span class="ruby-identifier">params</span> = <span class="ruby-keyword kw">nil</span>)
131
+ <span class="ruby-ivar">@stream</span> = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">flatten_params</span>(<span class="ruby-identifier">params</span>).<span class="ruby-identifier">collect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span>
132
+ <span class="ruby-node">&quot;#{entry[0]}=#{handle_key(entry[1])}&quot;</span>
133
+ <span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;&amp;&quot;</span>))
134
+ <span class="ruby-ivar">@stream</span>.<span class="ruby-identifier">seek</span>(<span class="ruby-value">0</span>)
135
+ <span class="ruby-keyword kw">end</span>
136
+ </pre>
137
+ </div>
138
+ </div>
139
+ </div>
140
+
141
+ <div id="method-M000282" class="method-detail">
142
+ <a name="M000282"></a>
143
+
144
+ <div class="method-heading">
145
+ <a href="#M000282" class="method-signature">
146
+ <span class="method-name">handle_key</span><span class="method-args">(key)</span>
147
+ </a>
148
+ </div>
149
+
150
+ <div class="method-description">
151
+ <p>
152
+ for <a href="UrlEncoded.html">UrlEncoded</a> escape the keys
153
+ </p>
154
+ <p><a class="source-toggle" href="#"
155
+ onclick="toggleCode('M000282-source');return false;">[Source]</a></p>
156
+ <div class="method-source-code" id="M000282-source">
157
+ <pre>
158
+ <span class="ruby-comment cmt"># File lib/rest-client-1.6.3/lib/restclient/payload.rb, line 134</span>
159
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">handle_key</span> <span class="ruby-identifier">key</span>
160
+ <span class="ruby-constant">URI</span>.<span class="ruby-identifier">escape</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;[^#{URI::PATTERN::UNRESERVED}]&quot;</span>))
161
+ <span class="ruby-keyword kw">end</span>
162
+ </pre>
163
+ </div>
164
+ </div>
165
+ </div>
166
+
167
+ <div id="method-M000283" class="method-detail">
168
+ <a name="M000283"></a>
169
+
170
+ <div class="method-heading">
171
+ <a href="#M000283" class="method-signature">
172
+ <span class="method-name">headers</span><span class="method-args">()</span>
173
+ </a>
174
+ </div>
175
+
176
+ <div class="method-description">
177
+ <p><a class="source-toggle" href="#"
178
+ onclick="toggleCode('M000283-source');return false;">[Source]</a></p>
179
+ <div class="method-source-code" id="M000283-source">
180
+ <pre>
181
+ <span class="ruby-comment cmt"># File lib/rest-client-1.6.3/lib/restclient/payload.rb, line 138</span>
182
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">headers</span>
183
+ <span class="ruby-keyword kw">super</span>.<span class="ruby-identifier">merge</span>({<span class="ruby-value str">'Content-Type'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'application/x-www-form-urlencoded'</span>})
184
+ <span class="ruby-keyword kw">end</span>
185
+ </pre>
186
+ </div>
187
+ </div>
188
+ </div>
189
+
190
+
191
+ </div>
192
+
193
+
194
+ </div>
195
+
196
+
197
+ <div id="validator-badges">
198
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
199
+ </div>
200
+
201
+ </body>
202
+ </html>
@@ -0,0 +1,192 @@
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>Module: RestClient::Payload</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>Module</strong></td>
53
+ <td class="class-name-in-header">RestClient::Payload</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/rest-client-1_6_3/lib/restclient/payload_rb.html">
59
+ lib/rest-client-1.6.3/lib/restclient/payload.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+
76
+
77
+ </div>
78
+
79
+ <div id="method-list">
80
+ <h3 class="section-bar">Methods</h3>
81
+
82
+ <div class="name-list">
83
+ <a href="#M000279">generate</a>&nbsp;&nbsp;
84
+ <a href="#M000280">has_file?</a>&nbsp;&nbsp;
85
+ </div>
86
+ </div>
87
+
88
+ </div>
89
+
90
+
91
+ <!-- if includes -->
92
+
93
+ <div id="section">
94
+
95
+ <div id="class-list">
96
+ <h3 class="section-bar">Classes and Modules</h3>
97
+
98
+ Class <a href="Payload/Base.html" class="link">RestClient::Payload::Base</a><br />
99
+ Class <a href="Payload/Multipart.html" class="link">RestClient::Payload::Multipart</a><br />
100
+ Class <a href="Payload/Streamed.html" class="link">RestClient::Payload::Streamed</a><br />
101
+ Class <a href="Payload/UrlEncoded.html" class="link">RestClient::Payload::UrlEncoded</a><br />
102
+
103
+ </div>
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+ <!-- if method_list -->
112
+ <div id="methods">
113
+ <h3 class="section-bar">Public Instance methods</h3>
114
+
115
+ <div id="method-M000279" class="method-detail">
116
+ <a name="M000279"></a>
117
+
118
+ <div class="method-heading">
119
+ <a href="#M000279" class="method-signature">
120
+ <span class="method-name">generate</span><span class="method-args">(params)</span>
121
+ </a>
122
+ </div>
123
+
124
+ <div class="method-description">
125
+ <p><a class="source-toggle" href="#"
126
+ onclick="toggleCode('M000279-source');return false;">[Source]</a></p>
127
+ <div class="method-source-code" id="M000279-source">
128
+ <pre>
129
+ <span class="ruby-comment cmt"># File lib/rest-client-1.6.3/lib/restclient/payload.rb, line 9</span>
130
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate</span>(<span class="ruby-identifier">params</span>)
131
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">params</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
132
+ <span class="ruby-constant">Base</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">params</span>)
133
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">params</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:read</span>)
134
+ <span class="ruby-constant">Streamed</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">params</span>)
135
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">params</span>
136
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">params</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:multipart</span>) <span class="ruby-operator">==</span> <span class="ruby-keyword kw">true</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">has_file?</span>(<span class="ruby-identifier">params</span>)
137
+ <span class="ruby-constant">Multipart</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">params</span>)
138
+ <span class="ruby-keyword kw">else</span>
139
+ <span class="ruby-constant">UrlEncoded</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">params</span>)
140
+ <span class="ruby-keyword kw">end</span>
141
+ <span class="ruby-keyword kw">else</span>
142
+ <span class="ruby-keyword kw">nil</span>
143
+ <span class="ruby-keyword kw">end</span>
144
+ <span class="ruby-keyword kw">end</span>
145
+ </pre>
146
+ </div>
147
+ </div>
148
+ </div>
149
+
150
+ <div id="method-M000280" class="method-detail">
151
+ <a name="M000280"></a>
152
+
153
+ <div class="method-heading">
154
+ <a href="#M000280" class="method-signature">
155
+ <span class="method-name">has_file?</span><span class="method-args">(params)</span>
156
+ </a>
157
+ </div>
158
+
159
+ <div class="method-description">
160
+ <p><a class="source-toggle" href="#"
161
+ onclick="toggleCode('M000280-source');return false;">[Source]</a></p>
162
+ <div class="method-source-code" id="M000280-source">
163
+ <pre>
164
+ <span class="ruby-comment cmt"># File lib/rest-client-1.6.3/lib/restclient/payload.rb, line 25</span>
165
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">has_file?</span>(<span class="ruby-identifier">params</span>)
166
+ <span class="ruby-identifier">params</span>.<span class="ruby-identifier">any?</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">_</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
167
+ <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">v</span>
168
+ <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Hash</span>
169
+ <span class="ruby-identifier">has_file?</span>(<span class="ruby-identifier">v</span>)
170
+ <span class="ruby-keyword kw">else</span>
171
+ <span class="ruby-identifier">v</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:path</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:read</span>)
172
+ <span class="ruby-keyword kw">end</span>
173
+ <span class="ruby-keyword kw">end</span>
174
+ <span class="ruby-keyword kw">end</span>
175
+ </pre>
176
+ </div>
177
+ </div>
178
+ </div>
179
+
180
+
181
+ </div>
182
+
183
+
184
+ </div>
185
+
186
+
187
+ <div id="validator-badges">
188
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
189
+ </div>
190
+
191
+ </body>
192
+ </html>
@@ -0,0 +1,236 @@
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: RestClient::RawResponse</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">RestClient::RawResponse</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/rest-client-1_6_3/lib/restclient/raw_response_rb.html">
59
+ lib/rest-client-1.6.3/lib/restclient/raw_response.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
+ Object
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
+ <div id="description">
82
+ <p>
83
+ The response from <a href="../RestClient.html">RestClient</a> on a raw
84
+ request looks like a string, but is actually one of these. 99% of the time
85
+ you&#8216;re making a rest call all you care about is the body, but on the
86
+ occassion you want to fetch the headers you can:
87
+ </p>
88
+ <pre>
89
+ RestClient.get('http://example.com').headers[:content_type]
90
+ </pre>
91
+ <p>
92
+ In addition, if you do not use the response as a string, you can access a
93
+ Tempfile object at res.file, which contains the path to the raw downloaded
94
+ request body.
95
+ </p>
96
+
97
+ </div>
98
+
99
+
100
+ </div>
101
+
102
+ <div id="method-list">
103
+ <h3 class="section-bar">Methods</h3>
104
+
105
+ <div class="name-list">
106
+ <a href="#M000317">new</a>&nbsp;&nbsp;
107
+ <a href="#M000319">size</a>&nbsp;&nbsp;
108
+ <a href="#M000318">to_s</a>&nbsp;&nbsp;
109
+ </div>
110
+ </div>
111
+
112
+ </div>
113
+
114
+
115
+ <!-- if includes -->
116
+ <div id="includes">
117
+ <h3 class="section-bar">Included Modules</h3>
118
+
119
+ <div id="includes-list">
120
+ <span class="include-name"><a href="AbstractResponse.html">AbstractResponse</a></span>
121
+ </div>
122
+ </div>
123
+
124
+ <div id="section">
125
+
126
+
127
+
128
+
129
+
130
+ <div id="attribute-list">
131
+ <h3 class="section-bar">Attributes</h3>
132
+
133
+ <div class="name-list">
134
+ <table>
135
+ <tr class="top-aligned-row context-row">
136
+ <td class="context-item-name">file</td>
137
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
138
+ <td class="context-item-desc"></td>
139
+ </tr>
140
+ </table>
141
+ </div>
142
+ </div>
143
+
144
+
145
+
146
+ <!-- if method_list -->
147
+ <div id="methods">
148
+ <h3 class="section-bar">Public Class methods</h3>
149
+
150
+ <div id="method-M000317" class="method-detail">
151
+ <a name="M000317"></a>
152
+
153
+ <div class="method-heading">
154
+ <a href="#M000317" class="method-signature">
155
+ <span class="method-name">new</span><span class="method-args">(tempfile, net_http_res, args)</span>
156
+ </a>
157
+ </div>
158
+
159
+ <div class="method-description">
160
+ <p><a class="source-toggle" href="#"
161
+ onclick="toggleCode('M000317-source');return false;">[Source]</a></p>
162
+ <div class="method-source-code" id="M000317-source">
163
+ <pre>
164
+ <span class="ruby-comment cmt"># File lib/rest-client-1.6.3/lib/restclient/raw_response.rb, line 18</span>
165
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">tempfile</span>, <span class="ruby-identifier">net_http_res</span>, <span class="ruby-identifier">args</span>
166
+ <span class="ruby-ivar">@net_http_res</span> = <span class="ruby-identifier">net_http_res</span>
167
+ <span class="ruby-ivar">@args</span> = <span class="ruby-identifier">args</span>
168
+ <span class="ruby-ivar">@file</span> = <span class="ruby-identifier">tempfile</span>
169
+ <span class="ruby-keyword kw">end</span>
170
+ </pre>
171
+ </div>
172
+ </div>
173
+ </div>
174
+
175
+ <h3 class="section-bar">Public Instance methods</h3>
176
+
177
+ <div id="method-M000319" class="method-detail">
178
+ <a name="M000319"></a>
179
+
180
+ <div class="method-heading">
181
+ <a href="#M000319" class="method-signature">
182
+ <span class="method-name">size</span><span class="method-args">()</span>
183
+ </a>
184
+ </div>
185
+
186
+ <div class="method-description">
187
+ <p><a class="source-toggle" href="#"
188
+ onclick="toggleCode('M000319-source');return false;">[Source]</a></p>
189
+ <div class="method-source-code" id="M000319-source">
190
+ <pre>
191
+ <span class="ruby-comment cmt"># File lib/rest-client-1.6.3/lib/restclient/raw_response.rb, line 29</span>
192
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">size</span>
193
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">size</span> <span class="ruby-identifier">file</span>
194
+ <span class="ruby-keyword kw">end</span>
195
+ </pre>
196
+ </div>
197
+ </div>
198
+ </div>
199
+
200
+ <div id="method-M000318" class="method-detail">
201
+ <a name="M000318"></a>
202
+
203
+ <div class="method-heading">
204
+ <a href="#M000318" class="method-signature">
205
+ <span class="method-name">to_s</span><span class="method-args">()</span>
206
+ </a>
207
+ </div>
208
+
209
+ <div class="method-description">
210
+ <p><a class="source-toggle" href="#"
211
+ onclick="toggleCode('M000318-source');return false;">[Source]</a></p>
212
+ <div class="method-source-code" id="M000318-source">
213
+ <pre>
214
+ <span class="ruby-comment cmt"># File lib/rest-client-1.6.3/lib/restclient/raw_response.rb, line 24</span>
215
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
216
+ <span class="ruby-ivar">@file</span>.<span class="ruby-identifier">open</span>
217
+ <span class="ruby-ivar">@file</span>.<span class="ruby-identifier">read</span>
218
+ <span class="ruby-keyword kw">end</span>
219
+ </pre>
220
+ </div>
221
+ </div>
222
+ </div>
223
+
224
+
225
+ </div>
226
+
227
+
228
+ </div>
229
+
230
+
231
+ <div id="validator-badges">
232
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
233
+ </div>
234
+
235
+ </body>
236
+ </html>