sprout 1.0.35.pre → 1.1.2.pre

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sprout might be problematic. Click here for more details.

Files changed (234) hide show
  1. data/Gemfile +1 -1
  2. data/Gemfile.lock +0 -2
  3. data/README.textile +1 -1
  4. data/VERSION +1 -1
  5. data/lib/sprout/concern.rb +5 -7
  6. data/lib/sprout/daemon.rb +183 -143
  7. data/lib/sprout/executable/base.rb +564 -0
  8. data/lib/sprout/executable.rb +1 -550
  9. data/lib/sprout/generator/base.rb +2 -3
  10. data/lib/sprout/generator.rb +2 -1
  11. data/lib/sprout/generators/ruby/templates/ruby_base.rb +1 -2
  12. data/lib/sprout/library.rb +3 -3
  13. data/lib/sprout/output_buffer.rb +35 -0
  14. data/lib/sprout/process_runner.rb +68 -17
  15. data/lib/sprout/progress_bar.rb +5 -5
  16. data/lib/sprout/remote_file_target.rb +1 -1
  17. data/lib/sprout/system/base_system.rb +3 -3
  18. data/lib/sprout/system/unix_system.rb +1 -1
  19. data/lib/sprout/{test/sprout_test_case.rb → test_helper.rb} +214 -14
  20. data/lib/sprout/version.rb +1 -1
  21. data/lib/sprout.rb +133 -2
  22. data/rakefile.rb +2 -0
  23. data/test/fixtures/examples/echo_inputs.rb +1 -2
  24. data/test/fixtures/executable/fdb.rb +7 -9
  25. data/test/fixtures/executable/flex3sdk_gem/fdb +49 -18
  26. data/test/fixtures/executable/mxmlc.rb +1 -2
  27. data/test/fixtures/executable/subclass/executable_subclass.rb +0 -1
  28. data/test/fixtures/executable/subclass/executable_superclass.rb +1 -2
  29. data/test/fixtures/specification/flex4sdk.rb +35 -24
  30. data/test/unit/archive_unpacker_test.rb +1 -1
  31. data/test/unit/boolean_param_test.rb +1 -1
  32. data/test/unit/daemon_test.rb +35 -3
  33. data/test/unit/executable_option_parser_test.rb +2 -3
  34. data/test/unit/executable_param_test.rb +1 -1
  35. data/test/unit/executable_test.rb +8 -15
  36. data/test/unit/fake_other_executable.rb +1 -2
  37. data/test/unit/file_param_test.rb +1 -1
  38. data/test/unit/file_target_test.rb +1 -1
  39. data/test/unit/files_param_test.rb +1 -1
  40. data/test/unit/generator_generator_test.rb +1 -1
  41. data/test/unit/generator_test.rb +1 -1
  42. data/test/unit/library_generator_test.rb +1 -1
  43. data/test/unit/library_test.rb +1 -1
  44. data/test/unit/osx_system_test.rb +1 -1
  45. data/test/unit/path_param_test.rb +1 -1
  46. data/test/unit/paths_param_test.rb +1 -1
  47. data/test/unit/platform_test.rb +1 -1
  48. data/test/unit/process_runner_test.rb +1 -1
  49. data/test/unit/rdoc_parser_test.rb +1 -1
  50. data/test/unit/remote_file_loader_test.rb +1 -1
  51. data/test/unit/remote_file_target_test.rb +1 -1
  52. data/test/unit/ruby_feature_test.rb +1 -1
  53. data/test/unit/ruby_generator_test.rb +1 -1
  54. data/test/unit/specification_test.rb +8 -1
  55. data/test/unit/sprout_test.rb +2 -2
  56. data/test/unit/string_param_test.rb +1 -1
  57. data/test/unit/string_test.rb +1 -1
  58. data/test/unit/strings_param_test.rb +1 -1
  59. data/test/unit/test_helper.rb +33 -1
  60. data/test/unit/tool_generator_test.rb +1 -1
  61. data/test/unit/unix_system_test.rb +1 -1
  62. data/test/unit/user_test.rb +1 -1
  63. data/test/unit/vista_system_test.rb +1 -1
  64. data/test/unit/win_nix_system_test.rb +1 -1
  65. data/test/unit/win_system_test.rb +1 -1
  66. data/test-stderr.log +1 -0
  67. data/test-stdout.log +237 -0
  68. metadata +15 -190
  69. data/doc/Dir.html +0 -288
  70. data/doc/Rake/Task.html +0 -184
  71. data/doc/Sprout/ArchiveUnpacker.html +0 -1246
  72. data/doc/Sprout/Base/ClassMethods.html +0 -434
  73. data/doc/Sprout/Base.html +0 -126
  74. data/doc/Sprout/Concern.html +0 -353
  75. data/doc/Sprout/Daemon/ClassMethods.html +0 -244
  76. data/doc/Sprout/Daemon/InstanceMethods.html +0 -601
  77. data/doc/Sprout/Daemon.html +0 -166
  78. data/doc/Sprout/Errors/ArchiveUnpackerError.html +0 -125
  79. data/doc/Sprout/Errors/DestinationExistsError.html +0 -133
  80. data/doc/Sprout/Errors/DuplicateMemberError.html +0 -132
  81. data/doc/Sprout/Errors/ExecutableError.html +0 -125
  82. data/doc/Sprout/Errors/ExecutableRegistrationError.html +0 -132
  83. data/doc/Sprout/Errors/ExecutionError.html +0 -121
  84. data/doc/Sprout/Errors/GeneratorError.html +0 -125
  85. data/doc/Sprout/Errors/InvalidArgumentError.html +0 -132
  86. data/doc/Sprout/Errors/LoadError.html +0 -121
  87. data/doc/Sprout/Errors/MissingArgumentError.html +0 -132
  88. data/doc/Sprout/Errors/MissingExecutableError.html +0 -132
  89. data/doc/Sprout/Errors/MissingGeneratorError.html +0 -132
  90. data/doc/Sprout/Errors/MissingTemplateError.html +0 -132
  91. data/doc/Sprout/Errors/ProcessRunnerError.html +0 -121
  92. data/doc/Sprout/Errors/RemoteFileLoaderError.html +0 -110
  93. data/doc/Sprout/Errors/SproutError.html +0 -114
  94. data/doc/Sprout/Errors/UnknownArchiveType.html +0 -122
  95. data/doc/Sprout/Errors/UsageError.html +0 -121
  96. data/doc/Sprout/Errors/ValidationError.html +0 -121
  97. data/doc/Sprout/Errors/VersionRequirementNotMetError.html +0 -121
  98. data/doc/Sprout/Errors.html +0 -101
  99. data/doc/Sprout/Executable/Boolean.html +0 -483
  100. data/doc/Sprout/Executable/ClassMethods.html +0 -417
  101. data/doc/Sprout/Executable/CollectionParam.html +0 -483
  102. data/doc/Sprout/Executable/FileParam.html +0 -484
  103. data/doc/Sprout/Executable/Files.html +0 -292
  104. data/doc/Sprout/Executable/InstanceMethods.html +0 -2006
  105. data/doc/Sprout/Executable/Number.html +0 -141
  106. data/doc/Sprout/Executable/Param.html +0 -2818
  107. data/doc/Sprout/Executable/ParameterFactory.html +0 -232
  108. data/doc/Sprout/Executable/Path.html +0 -223
  109. data/doc/Sprout/Executable/Paths.html +0 -253
  110. data/doc/Sprout/Executable/StringParam.html +0 -213
  111. data/doc/Sprout/Executable/Strings.html +0 -167
  112. data/doc/Sprout/Executable/Url.html +0 -160
  113. data/doc/Sprout/Executable/Urls.html +0 -170
  114. data/doc/Sprout/Executable.html +0 -173
  115. data/doc/Sprout/FileTarget.html +0 -1109
  116. data/doc/Sprout/Generator/Base.html +0 -1626
  117. data/doc/Sprout/Generator/Command.html +0 -690
  118. data/doc/Sprout/Generator/DirectoryManifest.html +0 -476
  119. data/doc/Sprout/Generator/FileManifest.html +0 -572
  120. data/doc/Sprout/Generator/Manifest.html +0 -377
  121. data/doc/Sprout/Generator/TemplateManifest.html +0 -196
  122. data/doc/Sprout/Generator.html +0 -689
  123. data/doc/Sprout/GeneratorGenerator.html +0 -1018
  124. data/doc/Sprout/Library.html +0 -1141
  125. data/doc/Sprout/LibraryGenerator.html +0 -309
  126. data/doc/Sprout/Log.html +0 -496
  127. data/doc/Sprout/MXMLC.html +0 -6373
  128. data/doc/Sprout/Platform.html +0 -714
  129. data/doc/Sprout/ProcessRunner.html +0 -1352
  130. data/doc/Sprout/ProgressBar.html +0 -376
  131. data/doc/Sprout/ProgressBarImpl.html +0 -2119
  132. data/doc/Sprout/ProgressBarManager.html +0 -434
  133. data/doc/Sprout/ProgressBarOutputStream.html +0 -416
  134. data/doc/Sprout/RDocParser.html +0 -211
  135. data/doc/Sprout/RemoteFileLoader.html +0 -172
  136. data/doc/Sprout/RemoteFileTarget.html +0 -679
  137. data/doc/Sprout/ReversedProgressBar.html +0 -194
  138. data/doc/Sprout/RubyFeature/ClassMethods.html +0 -1065
  139. data/doc/Sprout/RubyFeature.html +0 -155
  140. data/doc/Sprout/RubyGenerator.html +0 -764
  141. data/doc/Sprout/Specification.html +0 -767
  142. data/doc/Sprout/System/BaseSystem.html +0 -1455
  143. data/doc/Sprout/System/JavaSystem.html +0 -122
  144. data/doc/Sprout/System/OSXSystem.html +0 -335
  145. data/doc/Sprout/System/ThreadMock.html +0 -193
  146. data/doc/Sprout/System/UnixSystem.html +0 -584
  147. data/doc/Sprout/System/VistaSystem.html +0 -251
  148. data/doc/Sprout/System/WinNixSystem.html +0 -325
  149. data/doc/Sprout/System/WinSystem.html +0 -571
  150. data/doc/Sprout/System.html +0 -191
  151. data/doc/Sprout/ToolGenerator.html +0 -931
  152. data/doc/Sprout/VERSION.html +0 -128
  153. data/doc/Sprout.html +0 -144
  154. data/doc/SproutTestCase.html +0 -1412
  155. data/doc/String.html +0 -286
  156. data/doc/_index.html +0 -1035
  157. data/doc/class_list.html +0 -36
  158. data/doc/css/common.css +0 -1
  159. data/doc/css/full_list.css +0 -53
  160. data/doc/css/style.css +0 -310
  161. data/doc/file.README.html +0 -96
  162. data/doc/file.archive_unpacker.html +0 -288
  163. data/doc/file.base.html +0 -208
  164. data/doc/file.base_system.html +0 -278
  165. data/doc/file.boolean.html +0 -135
  166. data/doc/file.collection_param.html +0 -139
  167. data/doc/file.command.html +0 -126
  168. data/doc/file.concern.html +0 -136
  169. data/doc/file.daemon.html +0 -309
  170. data/doc/file.dir.html +0 -76
  171. data/doc/file.directory_manifest.html +0 -122
  172. data/doc/file.errors.html +0 -147
  173. data/doc/file.executable.html +0 -638
  174. data/doc/file.file_manifest.html +0 -109
  175. data/doc/file.file_param.html +0 -120
  176. data/doc/file.file_target.html +0 -140
  177. data/doc/file.files.html +0 -85
  178. data/doc/file.generator.html +0 -296
  179. data/doc/file.generator_class.html +0 -72
  180. data/doc/file.generator_generator.html +0 -137
  181. data/doc/file.generator_test.html +0 -92
  182. data/doc/file.generator_test_helper.html +0 -67
  183. data/doc/file.java_system.html +0 -62
  184. data/doc/file.library.html +0 -291
  185. data/doc/file.library_generator.html +0 -74
  186. data/doc/file.log.html +0 -100
  187. data/doc/file.manifest.html +0 -67
  188. data/doc/file.mxmlc.html +0 -740
  189. data/doc/file.number.html +0 -67
  190. data/doc/file.osx_system.html +0 -79
  191. data/doc/file.param.html +0 -491
  192. data/doc/file.parameter_factory.html +0 -119
  193. data/doc/file.path.html +0 -81
  194. data/doc/file.paths.html +0 -80
  195. data/doc/file.platform.html +0 -124
  196. data/doc/file.process_runner.html +0 -224
  197. data/doc/file.progress_bar.html +0 -390
  198. data/doc/file.rdoc_parser.html +0 -145
  199. data/doc/file.remote_file_loader.html +0 -117
  200. data/doc/file.remote_file_target.html +0 -176
  201. data/doc/file.ruby_base.html +0 -64
  202. data/doc/file.ruby_feature.html +0 -244
  203. data/doc/file.ruby_generator.html +0 -118
  204. data/doc/file.ruby_input.html +0 -62
  205. data/doc/file.ruby_test_case.html +0 -78
  206. data/doc/file.ruby_test_helper.html +0 -61
  207. data/doc/file.specification.html +0 -248
  208. data/doc/file.sprout.html +0 -64
  209. data/doc/file.sprout_test_case.html +0 -280
  210. data/doc/file.string.html +0 -72
  211. data/doc/file.string_param.html +0 -76
  212. data/doc/file.strings.html +0 -71
  213. data/doc/file.system.html +0 -86
  214. data/doc/file.template_manifest.html +0 -67
  215. data/doc/file.tool.html +0 -92
  216. data/doc/file.tool_generator.html +0 -90
  217. data/doc/file.unix_system.html +0 -128
  218. data/doc/file.url.html +0 -71
  219. data/doc/file.urls.html +0 -70
  220. data/doc/file.version.html +0 -71
  221. data/doc/file.vista_system.html +0 -69
  222. data/doc/file.win_nix_system.html +0 -88
  223. data/doc/file.win_system.html +0 -129
  224. data/doc/file_list.html +0 -230
  225. data/doc/frames.html +0 -13
  226. data/doc/index.html +0 -96
  227. data/doc/js/app.js +0 -202
  228. data/doc/js/full_list.js +0 -149
  229. data/doc/js/jquery.js +0 -154
  230. data/doc/method_list.html +0 -3355
  231. data/doc/top-level-namespace.html +0 -192
  232. data/lib/sprout/base.rb +0 -121
  233. data/lib/sprout/log.rb +0 -46
  234. data/test/unit/sprout_test_helper.rb +0 -33
@@ -1,1065 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta name="Content-Type" content="text/html; charset=utf-8" />
6
- <title>Module: Sprout::RubyFeature::ClassMethods</title>
7
- <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
8
- <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
9
-
10
- <script type="text/javascript" charset="utf-8">
11
- relpath = '../..';
12
- if (relpath != '') relpath += '/';
13
- </script>
14
- <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
15
- <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
16
-
17
- </head>
18
- <body>
19
- <script type="text/javascript" charset="utf-8">
20
- if (window.top.frames.main) document.body.className = 'frames';
21
- </script>
22
-
23
- <div id="header">
24
- <div id="menu">
25
-
26
- <a href="../../_index.html">Index (C)</a> &raquo;
27
- <span class='title'><span class='object_link'><a href="../../Sprout.html" title="Sprout (module)">Sprout</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../RubyFeature.html" title="Sprout::RubyFeature (module)">RubyFeature</a></span></span>
28
- &raquo;
29
- <span class="title">ClassMethods</span>
30
-
31
-
32
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
33
- </div>
34
-
35
- <div id="search">
36
- <a id="class_list_link" href="#">Class List</a>
37
- <a id="method_list_link" href="#">Method List</a>
38
- <a id ="file_list_link" href="#">File List</a>
39
- </div>
40
-
41
- <div class="clear"></div>
42
- </div>
43
-
44
- <iframe id="search_frame"></iframe>
45
-
46
- <div id="content"><h1>Module: Sprout::RubyFeature::ClassMethods
47
-
48
-
49
-
50
- </h1>
51
-
52
- <dl class="box">
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
61
- <dt class="r1 last">Defined in:</dt>
62
- <dd class="r1 last">lib/sprout/ruby_feature.rb</dd>
63
-
64
- </dl>
65
- <div class="clear"></div>
66
-
67
-
68
-
69
-
70
-
71
- <h2>
72
- Instance Method Summary
73
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
74
- </h2>
75
-
76
- <ul class="summary">
77
-
78
- <li class="public ">
79
- <span class="summary_signature">
80
-
81
- <a href="#clear_entities%21-instance_method" title="#clear_entities! (instance method)">- (Object) <strong>clear_entities!</strong> </a>
82
-
83
-
84
-
85
- </span>
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
- <span class="summary_desc"><div class='inline'></div></span>
95
-
96
- </li>
97
-
98
-
99
- <li class="protected ">
100
- <span class="summary_signature">
101
-
102
- <a href="#entity_for-instance_method" title="#entity_for (instance method)">- (Object) <strong>entity_for</strong>(name_or_names, pkg_name, version_requirement) </a>
103
-
104
-
105
-
106
- </span>
107
-
108
-
109
- <span class="note title protected">protected</span>
110
-
111
-
112
-
113
-
114
-
115
- <span class="summary_desc"><div class='inline'></div></span>
116
-
117
- </li>
118
-
119
-
120
- <li class="public ">
121
- <span class="summary_signature">
122
-
123
- <a href="#load-instance_method" title="#load (instance method)">- (Object) <strong>load</strong>(name_or_names, pkg_name = nil, version_requirement = nil) </a>
124
-
125
-
126
-
127
- </span>
128
-
129
-
130
-
131
-
132
-
133
-
134
-
135
-
136
- <span class="summary_desc"><div class='inline'>
137
- <p>Load a feature by name.</p>
138
- </div></span>
139
-
140
- </li>
141
-
142
-
143
- <li class="public ">
144
- <span class="summary_signature">
145
-
146
- <a href="#register-instance_method" title="#register (instance method)">- (Object) <strong>register</strong>(entity) </a>
147
-
148
-
149
-
150
- </span>
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
- <span class="summary_desc"><div class='inline'>
160
- <p>Register a new feature for future lookups.</p>
161
- </div></span>
162
-
163
- </li>
164
-
165
-
166
- <li class="protected ">
167
- <span class="summary_signature">
168
-
169
- <a href="#registered_entities-instance_method" title="#registered_entities (instance method)">- (Object) <strong>registered_entities</strong> </a>
170
-
171
-
172
-
173
- </span>
174
-
175
-
176
- <span class="note title protected">protected</span>
177
-
178
-
179
-
180
-
181
-
182
- <span class="summary_desc"><div class='inline'>
183
- <p>An entity has the following parameters: name pkg_name pkg_version platform.</p>
184
- </div></span>
185
-
186
- </li>
187
-
188
-
189
- <li class="protected ">
190
- <span class="summary_signature">
191
-
192
- <a href="#require_ruby_package-instance_method" title="#require_ruby_package (instance method)">- (Object) <strong>require_ruby_package</strong>(name) </a>
193
-
194
-
195
-
196
- </span>
197
-
198
-
199
- <span class="note title protected">protected</span>
200
-
201
-
202
-
203
-
204
-
205
- <span class="summary_desc"><div class='inline'></div></span>
206
-
207
- </li>
208
-
209
-
210
- <li class="protected ">
211
- <span class="summary_signature">
212
-
213
- <a href="#resolve_file_target-instance_method" title="#resolve_file_target (instance method)">- (Object) <strong>resolve_file_target</strong>(entity) </a>
214
-
215
-
216
-
217
- </span>
218
-
219
-
220
- <span class="note title protected">protected</span>
221
-
222
-
223
-
224
-
225
-
226
- <span class="summary_desc"><div class='inline'></div></span>
227
-
228
- </li>
229
-
230
-
231
- <li class="protected ">
232
- <span class="summary_signature">
233
-
234
- <a href="#satisfies_environment%3F-instance_method" title="#satisfies_environment? (instance method)">- (Boolean) <strong>satisfies_environment?</strong>(entity, environment) </a>
235
-
236
-
237
-
238
- </span>
239
-
240
-
241
- <span class="note title protected">protected</span>
242
-
243
-
244
-
245
-
246
-
247
- <span class="summary_desc"><div class='inline'></div></span>
248
-
249
- </li>
250
-
251
-
252
- <li class="protected ">
253
- <span class="summary_signature">
254
-
255
- <a href="#satisfies_name%3F-instance_method" title="#satisfies_name? (instance method)">- (Boolean) <strong>satisfies_name?</strong>(entity, expected) </a>
256
-
257
-
258
-
259
- </span>
260
-
261
-
262
- <span class="note title protected">protected</span>
263
-
264
-
265
-
266
-
267
-
268
- <span class="summary_desc"><div class='inline'></div></span>
269
-
270
- </li>
271
-
272
-
273
- <li class="protected ">
274
- <span class="summary_signature">
275
-
276
- <a href="#satisfies_pkg_name%3F-instance_method" title="#satisfies_pkg_name? (instance method)">- (Boolean) <strong>satisfies_pkg_name?</strong>(entity, expected) </a>
277
-
278
-
279
-
280
- </span>
281
-
282
-
283
- <span class="note title protected">protected</span>
284
-
285
-
286
-
287
-
288
-
289
- <span class="summary_desc"><div class='inline'></div></span>
290
-
291
- </li>
292
-
293
-
294
- <li class="protected ">
295
- <span class="summary_signature">
296
-
297
- <a href="#satisfies_platform%3F-instance_method" title="#satisfies_platform? (instance method)">- (Boolean) <strong>satisfies_platform?</strong>(entity) </a>
298
-
299
-
300
-
301
- </span>
302
-
303
-
304
- <span class="note title protected">protected</span>
305
-
306
-
307
-
308
-
309
-
310
- <span class="summary_desc"><div class='inline'></div></span>
311
-
312
- </li>
313
-
314
-
315
- <li class="protected ">
316
- <span class="summary_signature">
317
-
318
- <a href="#satisfies_version%3F-instance_method" title="#satisfies_version? (instance method)">- (Boolean) <strong>satisfies_version?</strong>(entity, version_requirement = nil) </a>
319
-
320
-
321
-
322
- </span>
323
-
324
-
325
- <span class="note title protected">protected</span>
326
-
327
-
328
-
329
-
330
-
331
- <span class="summary_desc"><div class='inline'></div></span>
332
-
333
- </li>
334
-
335
-
336
- <li class="protected ">
337
- <span class="summary_signature">
338
-
339
- <a href="#update_registered_entities-instance_method" title="#update_registered_entities (instance method)">- (Object) <strong>update_registered_entities</strong> </a>
340
-
341
-
342
-
343
- </span>
344
-
345
-
346
- <span class="note title protected">protected</span>
347
-
348
-
349
-
350
-
351
-
352
- <span class="summary_desc"><div class='inline'>
353
- <p>Used by the Generator::Base to update inputs from empty class definitions
354
- to instances..</p>
355
- </div></span>
356
-
357
- </li>
358
-
359
-
360
- <li class="protected ">
361
- <span class="summary_signature">
362
-
363
- <a href="#validate_registration-instance_method" title="#validate_registration (instance method)">- (Object) <strong>validate_registration</strong>(entity) </a>
364
-
365
-
366
-
367
- </span>
368
-
369
-
370
- <span class="note title protected">protected</span>
371
-
372
-
373
-
374
-
375
-
376
- <span class="summary_desc"><div class='inline'></div></span>
377
-
378
- </li>
379
-
380
-
381
- </ul>
382
-
383
-
384
-
385
-
386
- <div id="instance_method_details" class="method_details_list">
387
- <h2>Instance Method Details</h2>
388
-
389
-
390
- <div class="method_details first">
391
- <p class="signature first" id="clear_entities!-instance_method">
392
-
393
- - (<tt>Object</tt>) <strong>clear_entities!</strong>
394
-
395
-
396
-
397
- </p><table class="source_code">
398
- <tr>
399
- <td>
400
- <pre class="lines">
401
-
402
-
403
- 84
404
- 85
405
- 86</pre>
406
- </td>
407
- <td>
408
- <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 84</span>
409
-
410
- <span class='kw'>def</span> <span class='id clear_entities!'>clear_entities!</span>
411
- <span class='ivar'>@registered_entities</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
412
- <span class='kw'>end</span></pre>
413
- </td>
414
- </tr>
415
- </table>
416
- </div>
417
-
418
- <div class="method_details ">
419
- <p class="signature " id="entity_for-instance_method">
420
-
421
- - (<tt>Object</tt>) <strong>entity_for</strong>(name_or_names, pkg_name, version_requirement) <span class="extras">(protected)</span>
422
-
423
-
424
-
425
- </p><table class="source_code">
426
- <tr>
427
- <td>
428
- <pre class="lines">
429
-
430
-
431
- 113
432
- 114
433
- 115
434
- 116
435
- 117
436
- 118
437
- 119
438
- 120
439
- 121
440
- 122
441
- 123
442
- 124
443
- 125
444
- 126
445
- 127</pre>
446
- </td>
447
- <td>
448
- <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 113</span>
449
-
450
- <span class='kw'>def</span> <span class='id entity_for'>entity_for</span> <span class='id name_or_names'>name_or_names</span><span class='comma'>,</span> <span class='id pkg_name'>pkg_name</span><span class='comma'>,</span> <span class='id version_requirement'>version_requirement</span>
451
- <span class='comment'># These commented blocks help immensely when debugging
452
- </span> <span class='comment'># loading and registration issues, please leave them here:
453
- </span> <span class='comment'>#puts &quot;+++++++++++++++++++++++++++&quot;
454
- </span> <span class='comment'>#puts &quot;&gt;&gt; entity_for #{name_or_names} pkg_name: #{pkg_name} version: #{version_requirement}&quot;
455
- </span> <span class='comment'>#registered_entities.each do |entity|
456
- </span> <span class='comment'>#puts &quot;&gt;&gt; entity: #{entity.name} platform: #{entity.platform} pkg_name: #{entity.pkg_name} version: #{entity.pkg_version}&quot;
457
- </span> <span class='comment'>#end
458
- </span> <span class='id registered_entities'>registered_entities</span><span class='period'>.</span><span class='id reverse'>reverse</span><span class='period'>.</span><span class='id select'>select</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id entity'>entity</span><span class='op'>|</span>
459
- <span class='id satisfies_name?'>satisfies_name?</span><span class='lparen'>(</span><span class='id entity'>entity</span><span class='comma'>,</span> <span class='id name_or_names'>name_or_names</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span>
460
- <span class='id satisfies_platform?'>satisfies_platform?</span><span class='lparen'>(</span><span class='id entity'>entity</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span>
461
- <span class='id satisfies_pkg_name?'>satisfies_pkg_name?</span><span class='lparen'>(</span><span class='id entity'>entity</span><span class='comma'>,</span> <span class='id pkg_name'>pkg_name</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span>
462
- <span class='id satisfies_version?'>satisfies_version?</span><span class='lparen'>(</span><span class='id entity'>entity</span><span class='comma'>,</span> <span class='id version_requirement'>version_requirement</span><span class='rparen'>)</span>
463
- <span class='kw'>end</span><span class='period'>.</span><span class='id first'>first</span>
464
- <span class='kw'>end</span></pre>
465
- </td>
466
- </tr>
467
- </table>
468
- </div>
469
-
470
- <div class="method_details ">
471
- <p class="signature " id="load-instance_method">
472
-
473
- - (<tt>Object</tt>) <strong>load</strong>(name_or_names, pkg_name = nil, version_requirement = nil)
474
-
475
-
476
-
477
- </p><div class="docstring">
478
- <div class="discussion">
479
-
480
- <p>Load a feature by name.</p>
481
-
482
-
483
- </div>
484
- </div>
485
- <div class="tags">
486
-
487
- </div><table class="source_code">
488
- <tr>
489
- <td>
490
- <pre class="lines">
491
-
492
-
493
- 56
494
- 57
495
- 58
496
- 59
497
- 60
498
- 61
499
- 62
500
- 63
501
- 64
502
- 65
503
- 66
504
- 67
505
- 68
506
- 69
507
- 70
508
- 71
509
- 72
510
- 73
511
- 74
512
- 75
513
- 76
514
- 77
515
- 78
516
- 79
517
- 80
518
- 81
519
- 82</pre>
520
- </td>
521
- <td>
522
- <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 56</span>
523
-
524
- <span class='kw'>def</span> <span class='id load'>load</span> <span class='id name_or_names'>name_or_names</span><span class='comma'>,</span> <span class='id pkg_name'>pkg_name</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id version_requirement'>version_requirement</span><span class='op'>=</span><span class='kw'>nil</span>
525
- <span class='id entity'>entity</span> <span class='op'>=</span> <span class='id entity_for'>entity_for</span> <span class='id name_or_names'>name_or_names</span><span class='comma'>,</span> <span class='id pkg_name'>pkg_name</span><span class='comma'>,</span> <span class='id version_requirement'>version_requirement</span>
526
- <span class='kw'>if</span><span class='lparen'>(</span><span class='id entity'>entity</span><span class='period'>.</span><span class='id nil?'>nil?</span><span class='rparen'>)</span>
527
- <span class='comment'># Try to require the pkg_name:
528
- </span> <span class='id require_ruby_package'>require_ruby_package</span> <span class='id pkg_name'>pkg_name</span> <span class='kw'>unless</span> <span class='id pkg_name'>pkg_name</span><span class='period'>.</span><span class='id nil?'>nil?</span>
529
- <span class='comment'># Update any entities that registered from our require:
530
- </span> <span class='id update_registered_entities'>update_registered_entities</span>
531
- <span class='comment'># search for the requested entity:
532
- </span> <span class='id entity'>entity</span> <span class='op'>=</span> <span class='id entity_for'>entity_for</span> <span class='id name_or_names'>name_or_names</span><span class='comma'>,</span> <span class='id pkg_name'>pkg_name</span><span class='comma'>,</span> <span class='id version_requirement'>version_requirement</span>
533
- <span class='kw'>end</span>
534
-
535
- <span class='kw'>if</span><span class='lparen'>(</span><span class='id entity'>entity</span><span class='period'>.</span><span class='id nil?'>nil?</span><span class='rparen'>)</span>
536
- <span class='id message'>message</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>The requested entity: (</span><span class='embexpr_beg'>#{</span><span class='id name_or_names'>name_or_names</span><span class='rbrace'>}</span><span class='tstring_content'>) with pkg_name: (</span><span class='embexpr_beg'>#{</span><span class='id pkg_name'>pkg_name</span><span class='rbrace'>}</span><span class='tstring_content'>) and version: </span><span class='tstring_end'>&quot;</span></span>
537
- <span class='id message'>message</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id version_requirement'>version_requirement</span><span class='rbrace'>}</span><span class='tstring_content'>) does not appear to be loaded.</span><span class='tstring_end'>&quot;</span></span>
538
- <span class='id message'>message</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span>
539
- <span class='id message'>message</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>We did find (</span><span class='embexpr_beg'>#{</span><span class='id registered_entities'>registered_entities</span><span class='period'>.</span><span class='id size'>size</span><span class='rbrace'>}</span><span class='tstring_content'>) registered entities in that package:\n\n</span><span class='tstring_end'>&quot;</span></span>
540
- <span class='id registered_entities'>registered_entities</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id other'>other</span><span class='op'>|</span>
541
- <span class='id message'>message</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>&gt;&gt; name: (</span><span class='embexpr_beg'>#{</span><span class='id other'>other</span><span class='period'>.</span><span class='id name'>name</span><span class='rbrace'>}</span><span class='tstring_content'>) pkg_name: (</span><span class='embexpr_beg'>#{</span><span class='id other'>other</span><span class='period'>.</span><span class='id pkg_name'>pkg_name</span><span class='rbrace'>}</span><span class='tstring_content'>) pkg_version: (</span><span class='embexpr_beg'>#{</span><span class='id other'>other</span><span class='period'>.</span><span class='id pkg_version'>pkg_version</span><span class='rbrace'>}</span><span class='tstring_content'>)\n</span><span class='tstring_end'>&quot;</span></span>
542
- <span class='kw'>end</span>
543
- <span class='id message'>message</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n\nYou may need to update your Gemfile and run 'bundle install' </span><span class='tstring_end'>&quot;</span></span>
544
- <span class='id message'>message</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>to update your local gems.\n\n</span><span class='tstring_end'>&quot;</span></span>
545
- <span class='id raise'>raise</span> <span class='const'>Sprout</span><span class='op'>::</span><span class='const'>Errors</span><span class='op'>::</span><span class='const'>LoadError</span><span class='period'>.</span><span class='id new'>new</span> <span class='id message'>message</span>
546
- <span class='kw'>end</span>
547
-
548
- <span class='id resolve_file_target'>resolve_file_target</span> <span class='id entity'>entity</span>
549
- <span class='id entity'>entity</span>
550
- <span class='kw'>end</span></pre>
551
- </td>
552
- </tr>
553
- </table>
554
- </div>
555
-
556
- <div class="method_details ">
557
- <p class="signature " id="register-instance_method">
558
-
559
- - (<tt>Object</tt>) <strong>register</strong>(entity)
560
-
561
-
562
-
563
- </p><div class="docstring">
564
- <div class="discussion">
565
-
566
- <p>Register a new feature for future lookups</p>
567
-
568
-
569
- </div>
570
- </div>
571
- <div class="tags">
572
-
573
- </div><table class="source_code">
574
- <tr>
575
- <td>
576
- <pre class="lines">
577
-
578
-
579
- 48
580
- 49
581
- 50
582
- 51
583
- 52</pre>
584
- </td>
585
- <td>
586
- <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 48</span>
587
-
588
- <span class='kw'>def</span> <span class='id register'>register</span> <span class='id entity'>entity</span>
589
- <span class='id validate_registration'>validate_registration</span> <span class='id entity'>entity</span>
590
- <span class='id registered_entities'>registered_entities</span><span class='period'>.</span><span class='id unshift'>unshift</span> <span class='id entity'>entity</span>
591
- <span class='id entity'>entity</span>
592
- <span class='kw'>end</span></pre>
593
- </td>
594
- </tr>
595
- </table>
596
- </div>
597
-
598
- <div class="method_details ">
599
- <p class="signature " id="registered_entities-instance_method">
600
-
601
- - (<tt>Object</tt>) <strong>registered_entities</strong> <span class="extras">(protected)</span>
602
-
603
-
604
-
605
- </p><div class="docstring">
606
- <div class="discussion">
607
-
608
- <p>An entity has the following parameters: name pkg_name pkg_version platform</p>
609
-
610
-
611
- </div>
612
- </div>
613
- <div class="tags">
614
-
615
- </div><table class="source_code">
616
- <tr>
617
- <td>
618
- <pre class="lines">
619
-
620
-
621
- 177
622
- 178
623
- 179</pre>
624
- </td>
625
- <td>
626
- <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 177</span>
627
-
628
- <span class='kw'>def</span> <span class='id registered_entities'>registered_entities</span>
629
- <span class='ivar'>@registered_entities</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
630
- <span class='kw'>end</span></pre>
631
- </td>
632
- </tr>
633
- </table>
634
- </div>
635
-
636
- <div class="method_details ">
637
- <p class="signature " id="require_ruby_package-instance_method">
638
-
639
- - (<tt>Object</tt>) <strong>require_ruby_package</strong>(name) <span class="extras">(protected)</span>
640
-
641
-
642
-
643
- </p><table class="source_code">
644
- <tr>
645
- <td>
646
- <pre class="lines">
647
-
648
-
649
- 162
650
- 163
651
- 164
652
- 165
653
- 166
654
- 167
655
- 168</pre>
656
- </td>
657
- <td>
658
- <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 162</span>
659
-
660
- <span class='kw'>def</span> <span class='id require_ruby_package'>require_ruby_package</span> <span class='id name'>name</span>
661
- <span class='kw'>begin</span>
662
- <span class='id require'>require</span> <span class='id name'>name</span><span class='period'>.</span><span class='id to_s'>to_s</span>
663
- <span class='kw'>rescue</span> <span class='const'>LoadError</span> <span class='op'>=&gt;</span> <span class='id e'>e</span>
664
- <span class='id raise'>raise</span> <span class='const'>Sprout</span><span class='op'>::</span><span class='const'>Errors</span><span class='op'>::</span><span class='const'>LoadError</span><span class='period'>.</span><span class='id new'>new</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Could not load the required file (</span><span class='embexpr_beg'>#{</span><span class='id name'>name</span><span class='rbrace'>}</span><span class='tstring_content'>) - Maybe you need to run 'gem install </span><span class='embexpr_beg'>#{</span><span class='id name'>name</span><span class='rbrace'>}</span><span class='tstring_content'>' or maybe 'bundle install'?</span><span class='tstring_end'>&quot;</span></span>
665
- <span class='kw'>end</span>
666
- <span class='kw'>end</span></pre>
667
- </td>
668
- </tr>
669
- </table>
670
- </div>
671
-
672
- <div class="method_details ">
673
- <p class="signature " id="resolve_file_target-instance_method">
674
-
675
- - (<tt>Object</tt>) <strong>resolve_file_target</strong>(entity) <span class="extras">(protected)</span>
676
-
677
-
678
-
679
- </p><table class="source_code">
680
- <tr>
681
- <td>
682
- <pre class="lines">
683
-
684
-
685
- 90
686
- 91
687
- 92
688
- 93
689
- 94
690
- 95
691
- 96
692
- 97
693
- 98
694
- 99</pre>
695
- </td>
696
- <td>
697
- <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 90</span>
698
-
699
- <span class='kw'>def</span> <span class='id resolve_file_target'>resolve_file_target</span> <span class='id entity'>entity</span>
700
- <span class='kw'>if</span><span class='lparen'>(</span><span class='id entity'>entity</span><span class='period'>.</span><span class='id respond_to?'>respond_to?</span> <span class='symbol'>:resolve</span><span class='rparen'>)</span>
701
- <span class='id entity'>entity</span><span class='period'>.</span><span class='id resolve'>resolve</span>
702
- <span class='kw'>elsif</span><span class='lparen'>(</span><span class='id entity'>entity</span><span class='period'>.</span><span class='id respond_to?'>respond_to?</span> <span class='symbol'>:file_target</span><span class='rparen'>)</span>
703
- <span class='id file_target'>file_target</span> <span class='op'>=</span> <span class='id entity'>entity</span><span class='period'>.</span><span class='id file_target'>file_target</span>
704
- <span class='kw'>if</span><span class='lparen'>(</span><span class='id file_target'>file_target</span><span class='period'>.</span><span class='id respond_to?'>respond_to?</span> <span class='symbol'>:resolve</span><span class='rparen'>)</span>
705
- <span class='id file_target'>file_target</span><span class='period'>.</span><span class='id resolve'>resolve</span>
706
- <span class='kw'>end</span>
707
- <span class='kw'>end</span>
708
- <span class='kw'>end</span></pre>
709
- </td>
710
- </tr>
711
- </table>
712
- </div>
713
-
714
- <div class="method_details ">
715
- <p class="signature " id="satisfies_environment?-instance_method">
716
-
717
- - (<tt>Boolean</tt>) <strong>satisfies_environment?</strong>(entity, environment) <span class="extras">(protected)</span>
718
-
719
-
720
-
721
- </p><div class="docstring">
722
- <div class="discussion">
723
-
724
-
725
- </div>
726
- </div>
727
- <div class="tags">
728
- <h3>Returns:</h3>
729
- <ul class="return">
730
-
731
- <li>
732
-
733
- <span class='type'>(<tt>Boolean</tt>)</span>
734
-
735
-
736
-
737
-
738
- </li>
739
-
740
- </ul>
741
-
742
- </div><table class="source_code">
743
- <tr>
744
- <td>
745
- <pre class="lines">
746
-
747
-
748
- 129
749
- 130
750
- 131
751
- 132</pre>
752
- </td>
753
- <td>
754
- <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 129</span>
755
-
756
- <span class='kw'>def</span> <span class='id satisfies_environment?'>satisfies_environment?</span> <span class='id entity'>entity</span><span class='comma'>,</span> <span class='id environment'>environment</span>
757
- <span class='comment'>#puts &quot;&gt;&gt; env: #{entity.environment} vs. #{environment}&quot;
758
- </span> <span class='id environment'>environment</span><span class='period'>.</span><span class='id nil?'>nil?</span> <span class='op'>||</span> <span class='op'>!</span><span class='id entity'>entity</span><span class='period'>.</span><span class='id respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:environment</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id entity'>entity</span><span class='period'>.</span><span class='id environment'>environment</span><span class='period'>.</span><span class='id to_s'>to_s</span> <span class='op'>==</span> <span class='id environment'>environment</span><span class='period'>.</span><span class='id to_s'>to_s</span>
759
- <span class='kw'>end</span></pre>
760
- </td>
761
- </tr>
762
- </table>
763
- </div>
764
-
765
- <div class="method_details ">
766
- <p class="signature " id="satisfies_name?-instance_method">
767
-
768
- - (<tt>Boolean</tt>) <strong>satisfies_name?</strong>(entity, expected) <span class="extras">(protected)</span>
769
-
770
-
771
-
772
- </p><div class="docstring">
773
- <div class="discussion">
774
-
775
-
776
- </div>
777
- </div>
778
- <div class="tags">
779
- <h3>Returns:</h3>
780
- <ul class="return">
781
-
782
- <li>
783
-
784
- <span class='type'>(<tt>Boolean</tt>)</span>
785
-
786
-
787
-
788
-
789
- </li>
790
-
791
- </ul>
792
-
793
- </div><table class="source_code">
794
- <tr>
795
- <td>
796
- <pre class="lines">
797
-
798
-
799
- 139
800
- 140
801
- 141
802
- 142
803
- 143
804
- 144
805
- 145
806
- 146</pre>
807
- </td>
808
- <td>
809
- <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 139</span>
810
-
811
- <span class='kw'>def</span> <span class='id satisfies_name?'>satisfies_name?</span> <span class='id entity'>entity</span><span class='comma'>,</span> <span class='id expected'>expected</span>
812
- <span class='comment'>#puts &quot;&gt;&gt; name: #{entity.name} vs. #{expected}&quot;
813
- </span> <span class='kw'>return</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id expected'>expected</span><span class='period'>.</span><span class='id nil?'>nil?</span> <span class='op'>||</span> <span class='op'>!</span><span class='id entity'>entity</span><span class='period'>.</span><span class='id respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:name</span><span class='rparen'>)</span>
814
- <span class='kw'>if</span> <span class='id expected'>expected</span><span class='period'>.</span><span class='id is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span>
815
- <span class='kw'>return</span> <span class='id expected'>expected</span><span class='period'>.</span><span class='id include?'>include?</span> <span class='id entity'>entity</span><span class='period'>.</span><span class='id name'>name</span>
816
- <span class='kw'>end</span>
817
- <span class='kw'>return</span> <span class='id expected'>expected</span><span class='period'>.</span><span class='id to_s'>to_s</span> <span class='op'>==</span> <span class='id entity'>entity</span><span class='period'>.</span><span class='id name'>name</span><span class='period'>.</span><span class='id to_s'>to_s</span>
818
- <span class='kw'>end</span></pre>
819
- </td>
820
- </tr>
821
- </table>
822
- </div>
823
-
824
- <div class="method_details ">
825
- <p class="signature " id="satisfies_pkg_name?-instance_method">
826
-
827
- - (<tt>Boolean</tt>) <strong>satisfies_pkg_name?</strong>(entity, expected) <span class="extras">(protected)</span>
828
-
829
-
830
-
831
- </p><div class="docstring">
832
- <div class="discussion">
833
-
834
-
835
- </div>
836
- </div>
837
- <div class="tags">
838
- <h3>Returns:</h3>
839
- <ul class="return">
840
-
841
- <li>
842
-
843
- <span class='type'>(<tt>Boolean</tt>)</span>
844
-
845
-
846
-
847
-
848
- </li>
849
-
850
- </ul>
851
-
852
- </div><table class="source_code">
853
- <tr>
854
- <td>
855
- <pre class="lines">
856
-
857
-
858
- 134
859
- 135
860
- 136
861
- 137</pre>
862
- </td>
863
- <td>
864
- <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 134</span>
865
-
866
- <span class='kw'>def</span> <span class='id satisfies_pkg_name?'>satisfies_pkg_name?</span> <span class='id entity'>entity</span><span class='comma'>,</span> <span class='id expected'>expected</span>
867
- <span class='comment'>#puts &quot;&gt;&gt; pkg_name: #{entity.pkg_name} vs. #{expected}&quot;
868
- </span> <span class='id expected'>expected</span><span class='period'>.</span><span class='id nil?'>nil?</span> <span class='op'>||</span> <span class='op'>!</span><span class='id entity'>entity</span><span class='period'>.</span><span class='id respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:pkg_name</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id entity'>entity</span><span class='period'>.</span><span class='id pkg_name'>pkg_name</span><span class='period'>.</span><span class='id to_s'>to_s</span> <span class='op'>==</span> <span class='id expected'>expected</span><span class='period'>.</span><span class='id to_s'>to_s</span>
869
- <span class='kw'>end</span></pre>
870
- </td>
871
- </tr>
872
- </table>
873
- </div>
874
-
875
- <div class="method_details ">
876
- <p class="signature " id="satisfies_platform?-instance_method">
877
-
878
- - (<tt>Boolean</tt>) <strong>satisfies_platform?</strong>(entity) <span class="extras">(protected)</span>
879
-
880
-
881
-
882
- </p><div class="docstring">
883
- <div class="discussion">
884
-
885
-
886
- </div>
887
- </div>
888
- <div class="tags">
889
- <h3>Returns:</h3>
890
- <ul class="return">
891
-
892
- <li>
893
-
894
- <span class='type'>(<tt>Boolean</tt>)</span>
895
-
896
-
897
-
898
-
899
- </li>
900
-
901
- </ul>
902
-
903
- </div><table class="source_code">
904
- <tr>
905
- <td>
906
- <pre class="lines">
907
-
908
-
909
- 148
910
- 149
911
- 150
912
- 151
913
- 152
914
- 153
915
- 154</pre>
916
- </td>
917
- <td>
918
- <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 148</span>
919
-
920
- <span class='kw'>def</span> <span class='id satisfies_platform?'>satisfies_platform?</span> <span class='id entity'>entity</span>
921
- <span class='comment'>#puts&quot;&gt;&gt; satisfies platform?&quot;
922
- </span> <span class='comment'># If not platform is defined, it's assumed to work on all platforms:
923
- </span> <span class='kw'>return</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id entity'>entity</span><span class='period'>.</span><span class='id respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:platform</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id entity'>entity</span><span class='period'>.</span><span class='id platform'>platform</span><span class='period'>.</span><span class='id nil?'>nil?</span>
924
- <span class='comment'>#puts &quot;&gt;&gt; platform: #{entity.platform}&quot;
925
- </span> <span class='const'>Sprout</span><span class='period'>.</span><span class='id current_system'>current_system</span><span class='period'>.</span><span class='id can_execute?'>can_execute?</span><span class='lparen'>(</span><span class='id entity'>entity</span><span class='period'>.</span><span class='id platform'>platform</span><span class='rparen'>)</span>
926
- <span class='kw'>end</span></pre>
927
- </td>
928
- </tr>
929
- </table>
930
- </div>
931
-
932
- <div class="method_details ">
933
- <p class="signature " id="satisfies_version?-instance_method">
934
-
935
- - (<tt>Boolean</tt>) <strong>satisfies_version?</strong>(entity, version_requirement = nil) <span class="extras">(protected)</span>
936
-
937
-
938
-
939
- </p><div class="docstring">
940
- <div class="discussion">
941
-
942
-
943
- </div>
944
- </div>
945
- <div class="tags">
946
- <h3>Returns:</h3>
947
- <ul class="return">
948
-
949
- <li>
950
-
951
- <span class='type'>(<tt>Boolean</tt>)</span>
952
-
953
-
954
-
955
-
956
- </li>
957
-
958
- </ul>
959
-
960
- </div><table class="source_code">
961
- <tr>
962
- <td>
963
- <pre class="lines">
964
-
965
-
966
- 156
967
- 157
968
- 158
969
- 159
970
- 160</pre>
971
- </td>
972
- <td>
973
- <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 156</span>
974
-
975
- <span class='kw'>def</span> <span class='id satisfies_version?'>satisfies_version?</span> <span class='id entity'>entity</span><span class='comma'>,</span> <span class='id version_requirement'>version_requirement</span><span class='op'>=</span><span class='kw'>nil</span>
976
- <span class='kw'>return</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id version_requirement'>version_requirement</span><span class='period'>.</span><span class='id nil?'>nil?</span>
977
- <span class='id req_version'>req_version</span> <span class='op'>=</span> <span class='const'>Gem</span><span class='op'>::</span><span class='const'>Requirement</span><span class='period'>.</span><span class='id create'>create</span> <span class='id version_requirement'>version_requirement</span>
978
- <span class='id req_version'>req_version</span><span class='period'>.</span><span class='id satisfied_by?'>satisfied_by?</span><span class='lparen'>(</span><span class='const'>Gem</span><span class='op'>::</span><span class='const'>Version</span><span class='period'>.</span><span class='id create'>create</span><span class='lparen'>(</span><span class='id entity'>entity</span><span class='period'>.</span><span class='id pkg_version'>pkg_version</span><span class='rparen'>)</span><span class='rparen'>)</span>
979
- <span class='kw'>end</span></pre>
980
- </td>
981
- </tr>
982
- </table>
983
- </div>
984
-
985
- <div class="method_details ">
986
- <p class="signature " id="update_registered_entities-instance_method">
987
-
988
- - (<tt>Object</tt>) <strong>update_registered_entities</strong> <span class="extras">(protected)</span>
989
-
990
-
991
-
992
- </p><div class="docstring">
993
- <div class="discussion">
994
-
995
- <p>Used by the Generator::Base to update inputs from empty class definitions
996
- to instances..</p>
997
-
998
-
999
- </div>
1000
- </div>
1001
- <div class="tags">
1002
-
1003
- </div><table class="source_code">
1004
- <tr>
1005
- <td>
1006
- <pre class="lines">
1007
-
1008
-
1009
- 110
1010
- 111</pre>
1011
- </td>
1012
- <td>
1013
- <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 110</span>
1014
-
1015
- <span class='kw'>def</span> <span class='id update_registered_entities'>update_registered_entities</span>
1016
- <span class='kw'>end</span></pre>
1017
- </td>
1018
- </tr>
1019
- </table>
1020
- </div>
1021
-
1022
- <div class="method_details ">
1023
- <p class="signature " id="validate_registration-instance_method">
1024
-
1025
- - (<tt>Object</tt>) <strong>validate_registration</strong>(entity) <span class="extras">(protected)</span>
1026
-
1027
-
1028
-
1029
- </p><table class="source_code">
1030
- <tr>
1031
- <td>
1032
- <pre class="lines">
1033
-
1034
-
1035
- 101
1036
- 102
1037
- 103
1038
- 104
1039
- 105</pre>
1040
- </td>
1041
- <td>
1042
- <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 101</span>
1043
-
1044
- <span class='kw'>def</span> <span class='id validate_registration'>validate_registration</span> <span class='id entity'>entity</span>
1045
- <span class='kw'>if</span><span class='lparen'>(</span><span class='op'>!</span><span class='id entity'>entity</span><span class='period'>.</span><span class='id respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:name</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id entity'>entity</span><span class='period'>.</span><span class='id name'>name</span><span class='period'>.</span><span class='id nil?'>nil?</span><span class='rparen'>)</span>
1046
- <span class='id raise'>raise</span> <span class='const'>Sprout</span><span class='op'>::</span><span class='const'>Errors</span><span class='op'>::</span><span class='const'>UsageError</span><span class='period'>.</span><span class='id new'>new</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Cannot register a RubyFeature without a 'name' getter</span><span class='tstring_end'>&quot;</span></span>
1047
- <span class='kw'>end</span>
1048
- <span class='kw'>end</span></pre>
1049
- </td>
1050
- </tr>
1051
- </table>
1052
- </div>
1053
-
1054
- </div>
1055
-
1056
- </div>
1057
-
1058
- <div id="footer">
1059
- Generated on Wed Dec 22 11:58:34 2010 by
1060
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1061
- 0.6.3 (ruby-1.9.2).
1062
- </div>
1063
-
1064
- </body>
1065
- </html>