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
data/README.rdoc CHANGED
@@ -20,6 +20,10 @@ Please set up SMARTCLOUD_USERNAME and SMARTCLOUD_PASSWORD in your .bash_profile
20
20
  export SMARTCLOUD_USERNAME=[your username]
21
21
  export SMARTCLOUD_PASSWORD=[your password]
22
22
 
23
+ == screencast
24
+
25
+ http://www.youtube.com/cohesiveft#p/u/0/-WdSHP2iwDM
26
+
23
27
  == using the console
24
28
 
25
29
  script/console
data/Rakefile CHANGED
@@ -6,10 +6,10 @@ begin
6
6
  Jeweler::Tasks.new do |gem|
7
7
  gem.name = "cft_smartcloud"
8
8
  gem.summary = %Q{CohesiveFT IBM SmartCloud API Gem}
9
- gem.description = %Q{CohesiveFT Ruby Interface for IBM SmartCloud}
9
+ gem.description = %Q{CohesiveFT Ruby Interface for IBM SmartCloud and 'smartcloud' command line helper.}
10
10
  gem.email = "yan.pritzker@cohesiveft.com"
11
- gem.homepage = "http://github.com/cohesive/smartcloud"
12
- gem.authors = ["yan"]
11
+ gem.homepage = "http://github.com/cohesive/cft_smartcloud"
12
+ gem.authors = ["yan", "cohesive"]
13
13
  # gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
14
14
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
15
15
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require File.join(File.dirname(__FILE__), '../lib/smartcloud')
4
+ require 'pp'
5
+
6
+ if !ENV['SMARTCLOUD_USERNAME'] || !ENV['SMARTCLOUD_PASSWORD']
7
+ puts "Please set environment variables SMARTCLOUD_PASSWORD and SMARTCLOUD_USERNAME in your environment."
8
+ exit(1)
9
+ end
10
+
11
+ if ARGV.size == 1
12
+ @cmd=ARGV[0]
13
+ elsif ARGV.size == 2
14
+ @cmd="#{ARGV[0]}('#{ARGV[1]}')"
15
+ else
16
+ puts %{
17
+ Usage:
18
+ smartcloud help
19
+ smartcloud help [command]
20
+ smartcloud [command]
21
+ }
22
+ exit(0)
23
+ end
24
+
25
+ # allows us to send arbitrary commands like
26
+ # smartcloud username password describe_instance("122345")
27
+ result = eval("@smartcloud.#{@cmd}")
28
+
29
+ if result == true || result.nil?
30
+ # do nothing, the command already logged
31
+ else
32
+ if result.is_a?(String)
33
+ puts result
34
+ else
35
+ puts result.pretty_inspect
36
+ end
37
+ end
@@ -5,15 +5,14 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cft_smartcloud}
8
- s.version = "0.1.4"
8
+ s.version = "0.1.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["yan"]
12
- s.date = %q{2011-07-25}
13
- s.default_executable = %q{smartcloud}
14
- s.description = %q{CohesiveFT Ruby Interface for IBM SmartCloud}
11
+ s.authors = ["yan", "cohesive"]
12
+ s.date = %q{2011-07-26}
13
+ s.description = %q{CohesiveFT Ruby Interface for IBM SmartCloud and 'smartcloud' command line helper.}
15
14
  s.email = %q{yan.pritzker@cohesiveft.com}
16
- s.executables = ["smartcloud"]
15
+ s.executables = ["cft_smartcloud", "smartcloud"]
17
16
  s.extra_rdoc_files = [
18
17
  "LICENSE",
19
18
  "README.rdoc"
@@ -25,6 +24,7 @@ Gem::Specification.new do |s|
25
24
  "README.rdoc",
26
25
  "Rakefile",
27
26
  "VERSION",
27
+ "bin/cft_smartcloud",
28
28
  "bin/smartcloud",
29
29
  "cft_smartcloud.gemspec",
30
30
  "lib/cli_tools/README.txt",
@@ -151,10 +151,91 @@ Gem::Specification.new do |s|
151
151
  "lib/smartcloud.rb",
152
152
  "lib/smartcloud_logger.rb",
153
153
  "lib/xml-simple-1.0.12/lib/xmlsimple.rb",
154
+ "rdoc/classes/ConfigTable.html",
155
+ "rdoc/classes/ConfigTable/BoolItem.html",
156
+ "rdoc/classes/ConfigTable/ExecItem.html",
157
+ "rdoc/classes/ConfigTable/Item.html",
158
+ "rdoc/classes/ConfigTable/MetaConfigEnvironment.html",
159
+ "rdoc/classes/ConfigTable/PackageSelectionItem.html",
160
+ "rdoc/classes/ConfigTable/PathItem.html",
161
+ "rdoc/classes/ConfigTable/ProgramItem.html",
162
+ "rdoc/classes/ConfigTable/SelectItem.html",
163
+ "rdoc/classes/Enumerable.html",
164
+ "rdoc/classes/Errno.html",
165
+ "rdoc/classes/Errno/ENOTEMPTY.html",
166
+ "rdoc/classes/File.html",
167
+ "rdoc/classes/FileOperations.html",
168
+ "rdoc/classes/Hash.html",
169
+ "rdoc/classes/HookScriptAPI.html",
170
+ "rdoc/classes/IBMSmartCloud.html",
171
+ "rdoc/classes/Installer.html",
172
+ "rdoc/classes/Installer/Shebang.html",
173
+ "rdoc/classes/MIME.html",
174
+ "rdoc/classes/MIME/InvalidContentType.html",
175
+ "rdoc/classes/MIME/Type.html",
176
+ "rdoc/classes/MIME/Types.html",
177
+ "rdoc/classes/MockSmartCloud.html",
178
+ "rdoc/classes/Net.html",
179
+ "rdoc/classes/Net/HTTP.html",
180
+ "rdoc/classes/RestClient.html",
181
+ "rdoc/classes/RestClient/AbstractResponse.html",
182
+ "rdoc/classes/RestClient/Exception.html",
183
+ "rdoc/classes/RestClient/ExceptionWithResponse.html",
184
+ "rdoc/classes/RestClient/Exceptions.html",
185
+ "rdoc/classes/RestClient/MaxRedirectsReached.html",
186
+ "rdoc/classes/RestClient/Payload.html",
187
+ "rdoc/classes/RestClient/Payload/Base.html",
188
+ "rdoc/classes/RestClient/Payload/Multipart.html",
189
+ "rdoc/classes/RestClient/Payload/Streamed.html",
190
+ "rdoc/classes/RestClient/Payload/UrlEncoded.html",
191
+ "rdoc/classes/RestClient/RawResponse.html",
192
+ "rdoc/classes/RestClient/Redirect.html",
193
+ "rdoc/classes/RestClient/Request.html",
194
+ "rdoc/classes/RestClient/RequestFailed.html",
195
+ "rdoc/classes/RestClient/Resource.html",
196
+ "rdoc/classes/RestClient/Response.html",
197
+ "rdoc/classes/RestClient/ResponseForException.html",
198
+ "rdoc/classes/RestClient/SSLCertificateNotVerified.html",
199
+ "rdoc/classes/RestClient/ServerBrokeConnection.html",
200
+ "rdoc/classes/SetupError.html",
201
+ "rdoc/classes/SmartcloudLogger.html",
202
+ "rdoc/classes/TestMIME.html",
203
+ "rdoc/classes/ToplevelInstaller.html",
204
+ "rdoc/classes/ToplevelInstallerMulti.html",
205
+ "rdoc/classes/XmlSimple.html",
206
+ "rdoc/classes/XmlSimple/Cache.html",
207
+ "rdoc/created.rid",
208
+ "rdoc/files/README_rdoc.html",
209
+ "rdoc/files/lib/hash_fix_rb.html",
210
+ "rdoc/files/lib/mime-types-1_16/lib/mime/types_rb.html",
211
+ "rdoc/files/lib/mime-types-1_16/setup_rb.html",
212
+ "rdoc/files/lib/mime-types-1_16/test/test_mime_type_rb.html",
213
+ "rdoc/files/lib/mime-types-1_16/test/test_mime_types_rb.html",
214
+ "rdoc/files/lib/mock_smartcloud_rb.html",
215
+ "rdoc/files/lib/rest-client-1_6_3/lib/rest-client_rb.html",
216
+ "rdoc/files/lib/rest-client-1_6_3/lib/rest_client_rb.html",
217
+ "rdoc/files/lib/rest-client-1_6_3/lib/restclient/abstract_response_rb.html",
218
+ "rdoc/files/lib/rest-client-1_6_3/lib/restclient/exceptions_rb.html",
219
+ "rdoc/files/lib/rest-client-1_6_3/lib/restclient/net_http_ext_rb.html",
220
+ "rdoc/files/lib/rest-client-1_6_3/lib/restclient/payload_rb.html",
221
+ "rdoc/files/lib/rest-client-1_6_3/lib/restclient/raw_response_rb.html",
222
+ "rdoc/files/lib/rest-client-1_6_3/lib/restclient/request_rb.html",
223
+ "rdoc/files/lib/rest-client-1_6_3/lib/restclient/resource_rb.html",
224
+ "rdoc/files/lib/rest-client-1_6_3/lib/restclient/response_rb.html",
225
+ "rdoc/files/lib/rest-client-1_6_3/lib/restclient_rb.html",
226
+ "rdoc/files/lib/restclient_fix_rb.html",
227
+ "rdoc/files/lib/smartcloud_logger_rb.html",
228
+ "rdoc/files/lib/smartcloud_rb.html",
229
+ "rdoc/files/lib/xml-simple-1_0_12/lib/xmlsimple_rb.html",
230
+ "rdoc/fr_class_index.html",
231
+ "rdoc/fr_file_index.html",
232
+ "rdoc/fr_method_index.html",
233
+ "rdoc/index.html",
234
+ "rdoc/rdoc-style.css",
154
235
  "script/console",
155
236
  "test/helper.rb"
156
237
  ]
157
- s.homepage = %q{http://github.com/cohesive/smartcloud}
238
+ s.homepage = %q{http://github.com/cohesive/cft_smartcloud}
158
239
  s.rdoc_options = ["--charset=UTF-8"]
159
240
  s.require_paths = ["lib"]
160
241
  s.rubygems_version = %q{1.3.6}
data/lib/smartcloud.rb CHANGED
@@ -94,7 +94,7 @@ class IBMSmartCloud
94
94
  end
95
95
 
96
96
  def display_locations
97
- log = describe_locations.map {|loc| "#{loc.ID} #{loc.Location}"}.join("\n")
97
+ log = describe_locations.map {|loc| "#{loc.ID.ljust(4)} | #{loc.Location.ljust(15)} | #{loc.Name}"}.join("\n")
98
98
  logger.info "\n#{log}"
99
99
  end
100
100
 
@@ -562,7 +562,17 @@ class IBMSmartCloud
562
562
  end
563
563
  end
564
564
 
565
- instances = instances.sort_by{|ins| ins.has_key?(order_by) ? ins.send(order_by) : 0 }
565
+ instances = instances.sort_by{|ins|
566
+ if ins.has_key?(order_by)
567
+ order_by_value = ins.send(order_by)
568
+ integer_sort = order_by_value.to_i
569
+ # If we are trying to sort by an integer field, i.e. 41.to_s=="41" then sort by the integer
570
+ # version of it, otherwise sort by the original string
571
+ order_by_value = (order_by_value == integer_sort.to_s) ? integer_sort : order_by_value
572
+ else
573
+ 0
574
+ end
575
+ }
566
576
  if order_by == "LaunchTime"
567
577
  instances = instances.reverse
568
578
  end
@@ -14,7 +14,7 @@ class SmartcloudLogger < Logger
14
14
  def format_message(severity, timestamp, foobar, message)
15
15
  message = message.to_s
16
16
 
17
- "#{timestamp.strftime("%b %d %H:%M:%S")} #{severity}: #{message}\n"
17
+ "#{message}\n"
18
18
  end
19
19
 
20
20
  end
@@ -0,0 +1,172 @@
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: ConfigTable::BoolItem</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">ConfigTable::BoolItem</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/mime-types-1_16/setup_rb.html">
59
+ lib/mime-types-1.16/setup.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="Item.html">
69
+ Item
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="#M000106">config_type</a>&nbsp;&nbsp;
92
+ <a href="#M000107">help_opt</a>&nbsp;&nbsp;
93
+ </div>
94
+ </div>
95
+
96
+ </div>
97
+
98
+
99
+ <!-- if includes -->
100
+
101
+ <div id="section">
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <!-- if method_list -->
111
+ <div id="methods">
112
+ <h3 class="section-bar">Public Instance methods</h3>
113
+
114
+ <div id="method-M000106" class="method-detail">
115
+ <a name="M000106"></a>
116
+
117
+ <div class="method-heading">
118
+ <a href="#M000106" class="method-signature">
119
+ <span class="method-name">config_type</span><span class="method-args">()</span>
120
+ </a>
121
+ </div>
122
+
123
+ <div class="method-description">
124
+ <p><a class="source-toggle" href="#"
125
+ onclick="toggleCode('M000106-source');return false;">[Source]</a></p>
126
+ <div class="method-source-code" id="M000106-source">
127
+ <pre>
128
+ <span class="ruby-comment cmt"># File lib/mime-types-1.16/setup.rb, line 361</span>
129
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">config_type</span>
130
+ <span class="ruby-value str">'bool'</span>
131
+ <span class="ruby-keyword kw">end</span>
132
+ </pre>
133
+ </div>
134
+ </div>
135
+ </div>
136
+
137
+ <div id="method-M000107" class="method-detail">
138
+ <a name="M000107"></a>
139
+
140
+ <div class="method-heading">
141
+ <a href="#M000107" class="method-signature">
142
+ <span class="method-name">help_opt</span><span class="method-args">()</span>
143
+ </a>
144
+ </div>
145
+
146
+ <div class="method-description">
147
+ <p><a class="source-toggle" href="#"
148
+ onclick="toggleCode('M000107-source');return false;">[Source]</a></p>
149
+ <div class="method-source-code" id="M000107-source">
150
+ <pre>
151
+ <span class="ruby-comment cmt"># File lib/mime-types-1.16/setup.rb, line 365</span>
152
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">help_opt</span>
153
+ <span class="ruby-node">&quot;--#{@name}&quot;</span>
154
+ <span class="ruby-keyword kw">end</span>
155
+ </pre>
156
+ </div>
157
+ </div>
158
+ </div>
159
+
160
+
161
+ </div>
162
+
163
+
164
+ </div>
165
+
166
+
167
+ <div id="validator-badges">
168
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
169
+ </div>
170
+
171
+ </body>
172
+ </html>
@@ -0,0 +1,252 @@
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: ConfigTable::ExecItem</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">ConfigTable::ExecItem</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/mime-types-1_16/setup_rb.html">
59
+ lib/mime-types-1.16/setup.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="Item.html">
69
+ Item
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="#M000100">config_type</a>&nbsp;&nbsp;
92
+ <a href="#M000103">evaluate</a>&nbsp;&nbsp;
93
+ <a href="#M000099">new</a>&nbsp;&nbsp;
94
+ <a href="#M000102">resolve</a>&nbsp;&nbsp;
95
+ <a href="#M000101">value?</a>&nbsp;&nbsp;
96
+ </div>
97
+ </div>
98
+
99
+ </div>
100
+
101
+
102
+ <!-- if includes -->
103
+
104
+ <div id="section">
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+ <!-- if method_list -->
114
+ <div id="methods">
115
+ <h3 class="section-bar">Public Class methods</h3>
116
+
117
+ <div id="method-M000099" class="method-detail">
118
+ <a name="M000099"></a>
119
+
120
+ <div class="method-heading">
121
+ <a href="#M000099" class="method-signature">
122
+ <span class="method-name">new</span><span class="method-args">(name, selection, desc, &amp;block)</span>
123
+ </a>
124
+ </div>
125
+
126
+ <div class="method-description">
127
+ <p><a class="source-toggle" href="#"
128
+ onclick="toggleCode('M000099-source');return false;">[Source]</a></p>
129
+ <div class="method-source-code" id="M000099-source">
130
+ <pre>
131
+ <span class="ruby-comment cmt"># File lib/mime-types-1.16/setup.rb, line 422</span>
132
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">selection</span>, <span class="ruby-identifier">desc</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
133
+ <span class="ruby-keyword kw">super</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">selection</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">desc</span>
134
+ <span class="ruby-ivar">@ok</span> = <span class="ruby-identifier">selection</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'/'</span>)
135
+ <span class="ruby-ivar">@action</span> = <span class="ruby-identifier">block</span>
136
+ <span class="ruby-keyword kw">end</span>
137
+ </pre>
138
+ </div>
139
+ </div>
140
+ </div>
141
+
142
+ <h3 class="section-bar">Public Instance methods</h3>
143
+
144
+ <div id="method-M000100" class="method-detail">
145
+ <a name="M000100"></a>
146
+
147
+ <div class="method-heading">
148
+ <a href="#M000100" class="method-signature">
149
+ <span class="method-name">config_type</span><span class="method-args">()</span>
150
+ </a>
151
+ </div>
152
+
153
+ <div class="method-description">
154
+ <p><a class="source-toggle" href="#"
155
+ onclick="toggleCode('M000100-source');return false;">[Source]</a></p>
156
+ <div class="method-source-code" id="M000100-source">
157
+ <pre>
158
+ <span class="ruby-comment cmt"># File lib/mime-types-1.16/setup.rb, line 428</span>
159
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">config_type</span>
160
+ <span class="ruby-value str">'exec'</span>
161
+ <span class="ruby-keyword kw">end</span>
162
+ </pre>
163
+ </div>
164
+ </div>
165
+ </div>
166
+
167
+ <div id="method-M000103" class="method-detail">
168
+ <a name="M000103"></a>
169
+
170
+ <div class="method-heading">
171
+ <a href="#M000103" class="method-signature">
172
+ <span class="method-name">evaluate</span><span class="method-args">(val, table)</span>
173
+ </a>
174
+ </div>
175
+
176
+ <div class="method-description">
177
+ <p><a class="source-toggle" href="#"
178
+ onclick="toggleCode('M000103-source');return false;">[Source]</a></p>
179
+ <div class="method-source-code" id="M000103-source">
180
+ <pre>
181
+ <span class="ruby-comment cmt"># File lib/mime-types-1.16/setup.rb, line 442</span>
182
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">evaluate</span>(<span class="ruby-identifier">val</span>, <span class="ruby-identifier">table</span>)
183
+ <span class="ruby-identifier">v</span> = <span class="ruby-identifier">val</span>.<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">downcase</span>
184
+ <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@ok</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">v</span>)
185
+ <span class="ruby-identifier">setup_rb_error</span> <span class="ruby-node">&quot;invalid option --#{@name}=#{val} (use #{@template})&quot;</span>
186
+ <span class="ruby-keyword kw">end</span>
187
+ <span class="ruby-ivar">@action</span>.<span class="ruby-identifier">call</span> <span class="ruby-identifier">v</span>, <span class="ruby-identifier">table</span>
188
+ <span class="ruby-keyword kw">end</span>
189
+ </pre>
190
+ </div>
191
+ </div>
192
+ </div>
193
+
194
+ <div id="method-M000102" class="method-detail">
195
+ <a name="M000102"></a>
196
+
197
+ <div class="method-heading">
198
+ <a href="#M000102" class="method-signature">
199
+ <span class="method-name">resolve</span><span class="method-args">(table)</span>
200
+ </a>
201
+ </div>
202
+
203
+ <div class="method-description">
204
+ <p><a class="source-toggle" href="#"
205
+ onclick="toggleCode('M000102-source');return false;">[Source]</a></p>
206
+ <div class="method-source-code" id="M000102-source">
207
+ <pre>
208
+ <span class="ruby-comment cmt"># File lib/mime-types-1.16/setup.rb, line 436</span>
209
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">resolve</span>(<span class="ruby-identifier">table</span>)
210
+ <span class="ruby-identifier">setup_rb_error</span> <span class="ruby-node">&quot;$#{name()} wrongly used as option value&quot;</span>
211
+ <span class="ruby-keyword kw">end</span>
212
+ </pre>
213
+ </div>
214
+ </div>
215
+ </div>
216
+
217
+ <div id="method-M000101" class="method-detail">
218
+ <a name="M000101"></a>
219
+
220
+ <div class="method-heading">
221
+ <a href="#M000101" class="method-signature">
222
+ <span class="method-name">value?</span><span class="method-args">()</span>
223
+ </a>
224
+ </div>
225
+
226
+ <div class="method-description">
227
+ <p><a class="source-toggle" href="#"
228
+ onclick="toggleCode('M000101-source');return false;">[Source]</a></p>
229
+ <div class="method-source-code" id="M000101-source">
230
+ <pre>
231
+ <span class="ruby-comment cmt"># File lib/mime-types-1.16/setup.rb, line 432</span>
232
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">value?</span>
233
+ <span class="ruby-keyword kw">false</span>
234
+ <span class="ruby-keyword kw">end</span>
235
+ </pre>
236
+ </div>
237
+ </div>
238
+ </div>
239
+
240
+
241
+ </div>
242
+
243
+
244
+ </div>
245
+
246
+
247
+ <div id="validator-badges">
248
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
249
+ </div>
250
+
251
+ </body>
252
+ </html>