radiant-ray-extension 3.0.0.alpha → 3.0.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +1 -1
- data/Rakefile +2 -0
- data/doc/NilClass.html +178 -0
- data/doc/Ray/CLI.html +211 -197
- data/doc/Ray/Extension/Git.html +435 -0
- data/doc/Ray/Extension/RubyGem.html +858 -0
- data/doc/Ray/Extension/Zip.html +453 -0
- data/doc/Ray/Extension.html +755 -0
- data/doc/Ray/{Cache.html → Search/Cache.html} +108 -256
- data/doc/Ray/{GitHub.html → Search/GitHub.html} +167 -81
- data/doc/Ray/{RubyGems.html → Search/RubyGems.html} +118 -68
- data/doc/Ray/Search.html +822 -0
- data/doc/Ray.html +89 -34
- data/doc/String.html +99 -29
- data/doc/_index.html +1 -1
- data/doc/file.LICENSE.html +1 -1
- data/doc/file.README.html +2 -4
- data/doc/index.html +1 -1
- data/doc/top-level-namespace.html +3 -3
- data/lib/ray/cli.rb +146 -193
- data/lib/ray/constants.rb +7 -12
- data/lib/ray/extension.rb +203 -89
- data/lib/ray/search.rb +198 -43
- data/lib/ray/utility.rb +31 -0
- data/lib/ray.rb +2 -7
- data/spec/fixtures/cache_single.yml +2 -1
- data/spec/fixtures/cassettes/combined_search_empty.yml +71 -0
- data/spec/fixtures/cassettes/combined_search_multiple.yml +264 -0
- data/spec/fixtures/cassettes/combined_search_single.yml +108 -0
- data/spec/fixtures/cassettes/github_reorder_children_zip_file.yml +487 -0
- data/spec/fixtures/cassettes/github_sitemap_xml_zip_file.yml +553 -0
- data/spec/fixtures/cassettes/{github_v2_api_no_matches.yml → github_v2_search_empty.yml} +3 -3
- data/spec/fixtures/cassettes/github_v2_search_multiple.yml +225 -0
- data/spec/fixtures/cassettes/github_v2_search_single.yml +76 -0
- data/spec/fixtures/cassettes/{zip_file.yml → github_zip_file.yml} +3 -3
- data/spec/fixtures/cassettes/{rubygems_v1_api_gem_info.yml → rubygems_v1_gem_info.yml} +5 -5
- data/spec/fixtures/cassettes/{rubygems_v1_api_no_matches.yml → rubygems_v1_search_empty.yml} +3 -3
- data/spec/fixtures/cassettes/rubygems_v1_search_multiple.yml +40 -0
- data/spec/fixtures/cassettes/{rubygems_v1_api_search_reorder_children.yml → rubygems_v1_search_single.yml} +6 -6
- data/spec/fixtures/dummy.zip +0 -0
- data/spec/ray/extension_spec.rb +172 -0
- data/spec/ray/search_spec.rb +300 -0
- data/spec/spec_helper.rb +36 -9
- metadata +50 -85
- data/doc/Extension.html +0 -1189
- data/doc/Ray/Gem.html +0 -760
- data/doc/Ray/Git.html +0 -278
- data/doc/Ray/Zip.html +0 -300
- data/doc/Search.html +0 -433
- data/lib/ray/extension/gem.rb +0 -96
- data/lib/ray/extension/git.rb +0 -30
- data/lib/ray/extension/zip.rb +0 -44
- data/lib/ray/search/cache.rb +0 -61
- data/lib/ray/search/github.rb +0 -40
- data/lib/ray/search/rubygems.rb +0 -36
- data/lib/ray/string.rb +0 -18
- data/spec/fixtures/Gemfile +0 -4
- data/spec/fixtures/cassettes/github_v2_api_search_no_matches.yml +0 -38
- data/spec/fixtures/cassettes/github_v2_api_search_reorder_children.yml +0 -75
- data/spec/fixtures/cassettes/github_v2_api_search_single.yml +0 -74
- data/spec/fixtures/cassettes/github_v3_api_owner_name.yml +0 -75
- data/spec/fixtures/cassettes/rubygems_v1_api_search_no_matches.yml +0 -34
- data/spec/fixtures/cassettes/rubygems_v1_api_search_reorder.yml +0 -36
- data/spec/fixtures/cassettes/rubygems_v1_api_search_single.yml +0 -41
- data/spec/fixtures/dummy/README +0 -1
- data/spec/fixtures/dummy/Rakefile +0 -109
- data/spec/fixtures/dummy/config/initializers/radiant_config.rb +0 -3
- data/spec/fixtures/dummy/config/locales/en.yml +0 -3
- data/spec/fixtures/dummy/config/routes.rb +0 -5
- data/spec/fixtures/dummy/dummy_extension.rb +0 -21
- data/spec/fixtures/dummy/lib/radiant-dummy-extension.rb +0 -8
- data/spec/fixtures/dummy/lib/tasks/dummy_extension_tasks.rake +0 -47
- data/spec/fixtures/dummy/public/stylesheets/extensions/dummy/dummy.css +0 -0
- data/spec/fixtures/dummy/radiant-dummy-extension.gemspec +0 -29
- data/spec/ray/extension/gem_spec.rb +0 -214
- data/spec/ray/extension/git_spec.rb +0 -216
- data/spec/ray/extension/zip_spec.rb +0 -239
- data/spec/ray/search/cache_spec.rb +0 -74
- data/spec/ray/search/github_spec.rb +0 -137
- data/spec/ray/search/rubygems_spec.rb +0 -127
- data/spec/ray/string_spec.rb +0 -30
data/doc/Ray/CLI.html
CHANGED
@@ -100,9 +100,9 @@
|
|
100
100
|
|
101
101
|
<h2>Overview</h2><div class="docstring">
|
102
102
|
<div class="discussion">
|
103
|
-
<p>
|
104
|
-
|
105
|
-
|
103
|
+
<p>Ray’s command line interface.
|
104
|
+
See the <a href="http://johnmuhl.github.com/radiant-ray-extension/">User Manual</a>
|
105
|
+
for complete command line usage.</p>
|
106
106
|
|
107
107
|
|
108
108
|
</div>
|
@@ -132,28 +132,6 @@ refer to the <a href="http://goo.gl/5UtP8">User Manual</a> instead.</p>
|
|
132
132
|
<li class="public ">
|
133
133
|
<span class="summary_signature">
|
134
134
|
|
135
|
-
<a href="#cache-instance_method" title="#cache (instance method)">- (Object) <strong>cache</strong> </a>
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
</span>
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
<span class="summary_desc"><div class='inline'>
|
149
|
-
</div></span>
|
150
|
-
|
151
|
-
</li>
|
152
|
-
|
153
|
-
|
154
|
-
<li class="public ">
|
155
|
-
<span class="summary_signature">
|
156
|
-
|
157
135
|
<a href="#install-instance_method" title="#install (instance method)">- (Object) <strong>install</strong>(*extensions) </a>
|
158
136
|
|
159
137
|
|
@@ -167,7 +145,7 @@ refer to the <a href="http://goo.gl/5UtP8">User Manual</a> instead.</p>
|
|
167
145
|
|
168
146
|
|
169
147
|
|
170
|
-
<span class="summary_desc"><div class='inline'>
|
148
|
+
<span class="summary_desc"><div class='inline'><p>Install extensions.</p>
|
171
149
|
</div></span>
|
172
150
|
|
173
151
|
</li>
|
@@ -176,7 +154,7 @@ refer to the <a href="http://goo.gl/5UtP8">User Manual</a> instead.</p>
|
|
176
154
|
<li class="public ">
|
177
155
|
<span class="summary_signature">
|
178
156
|
|
179
|
-
<a href="#search-instance_method" title="#search (instance method)">- (Object) <strong>search</strong>(query) </a>
|
157
|
+
<a href="#search-instance_method" title="#search (instance method)">- (Object) <strong>search</strong>(query = nil) </a>
|
180
158
|
|
181
159
|
|
182
160
|
|
@@ -189,7 +167,7 @@ refer to the <a href="http://goo.gl/5UtP8">User Manual</a> instead.</p>
|
|
189
167
|
|
190
168
|
|
191
169
|
|
192
|
-
<span class="summary_desc"><div class='inline'>
|
170
|
+
<span class="summary_desc"><div class='inline'><p>Search for extensions.</p>
|
193
171
|
</div></span>
|
194
172
|
|
195
173
|
</li>
|
@@ -230,56 +208,70 @@ refer to the <a href="http://goo.gl/5UtP8">User Manual</a> instead.</p>
|
|
230
208
|
|
231
209
|
|
232
210
|
<div class="method_details first">
|
233
|
-
<p class="signature first" id="
|
211
|
+
<p class="signature first" id="install-instance_method">
|
234
212
|
|
235
|
-
- (<tt>Object</tt>) <strong>
|
213
|
+
- (<tt>Object</tt>) <strong>install</strong>(*extensions)
|
236
214
|
|
237
215
|
|
238
216
|
|
239
|
-
</p><
|
240
|
-
<
|
241
|
-
<
|
242
|
-
<pre class="lines">
|
217
|
+
</p><div class="docstring">
|
218
|
+
<div class="discussion">
|
219
|
+
<p>Install extensions</p>
|
243
220
|
|
244
221
|
|
245
|
-
|
246
|
-
192
|
247
|
-
193
|
248
|
-
194
|
249
|
-
195
|
250
|
-
196
|
251
|
-
197
|
252
|
-
198</pre>
|
253
|
-
</td>
|
254
|
-
<td>
|
255
|
-
<pre class="code"><span class="info file"># File 'lib/ray/cli.rb', line 191</span>
|
256
|
-
|
257
|
-
<span class='kw'>def</span> <span class='id cache'>cache</span>
|
258
|
-
<span class='kw'>if</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>clear</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
259
|
-
<span class='const'>Ray</span><span class='op'>::</span><span class='const'>Cache</span><span class='period'>.</span><span class='id clear'>clear</span>
|
260
|
-
<span class='kw'>else</span>
|
261
|
-
<span class='id require'>require</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>pp</span><span class='tstring_end'>"</span></span>
|
262
|
-
<span class='id say'>say</span> <span class='const'>File</span><span class='period'>.</span><span class='id read'>read</span> <span class='const'>Ray</span><span class='op'>::</span><span class='const'>CACHE</span>
|
263
|
-
<span class='kw'>end</span>
|
264
|
-
<span class='kw'>end</span></pre>
|
265
|
-
</td>
|
266
|
-
</tr>
|
267
|
-
</table>
|
222
|
+
</div>
|
268
223
|
</div>
|
269
|
-
|
270
|
-
<div class="method_details ">
|
271
|
-
<p class="signature " id="install-instance_method">
|
272
|
-
|
273
|
-
- (<tt>Object</tt>) <strong>install</strong>(*extensions)
|
224
|
+
<div class="tags">
|
274
225
|
|
226
|
+
<div class="examples">
|
227
|
+
<h3>Examples:</h3>
|
228
|
+
|
229
|
+
<h4><div class='inline'>
|
230
|
+
</div></h4>
|
231
|
+
<pre class="example code">ray install reorder-children
|
232
|
+
ray install reorder-children --git
|
233
|
+
ray install reorder-children --rubygem
|
234
|
+
ray install reorder-children --zip</pre>
|
235
|
+
|
236
|
+
</div>
|
275
237
|
|
276
|
-
|
277
|
-
</
|
238
|
+
|
239
|
+
</div><table class="source_code">
|
278
240
|
<tr>
|
279
241
|
<td>
|
280
242
|
<pre class="lines">
|
281
243
|
|
282
244
|
|
245
|
+
62
|
246
|
+
63
|
247
|
+
64
|
248
|
+
65
|
249
|
+
66
|
250
|
+
67
|
251
|
+
68
|
252
|
+
69
|
253
|
+
70
|
254
|
+
71
|
255
|
+
72
|
256
|
+
73
|
257
|
+
74
|
258
|
+
75
|
259
|
+
76
|
260
|
+
77
|
261
|
+
78
|
262
|
+
79
|
263
|
+
80
|
264
|
+
81
|
265
|
+
82
|
266
|
+
83
|
267
|
+
84
|
268
|
+
85
|
269
|
+
86
|
270
|
+
87
|
271
|
+
88
|
272
|
+
89
|
273
|
+
90
|
274
|
+
91
|
283
275
|
92
|
284
276
|
93
|
285
277
|
94
|
@@ -366,114 +358,126 @@ refer to the <a href="http://goo.gl/5UtP8">User Manual</a> instead.</p>
|
|
366
358
|
175
|
367
359
|
176
|
368
360
|
177
|
369
|
-
178
|
370
|
-
179
|
371
|
-
180
|
372
|
-
181
|
373
|
-
182
|
374
|
-
183
|
375
|
-
184
|
376
|
-
185
|
377
|
-
186
|
378
|
-
187</pre>
|
361
|
+
178</pre>
|
379
362
|
</td>
|
380
363
|
<td>
|
381
|
-
<pre class="code"><span class="info file"># File 'lib/ray/cli.rb', line
|
364
|
+
<pre class="code"><span class="info file"># File 'lib/ray/cli.rb', line 62</span>
|
382
365
|
|
383
366
|
<span class='kw'>def</span> <span class='id install'>install</span> <span class='op'>*</span><span class='id extensions'>extensions</span>
|
384
|
-
<span class='kw'>if</span> <span class='id extensions'>extensions</span><span class='period'>.</span><span class='id empty?'>empty?</span>
|
385
|
-
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>You didn't list any extensions to install</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:red</span>
|
386
|
-
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Try: ray help install</span><span class='tstring_end'>"</span></span>
|
387
|
-
<span class='id exit'>exit</span> <span class='int'>1</span>
|
388
|
-
<span class='kw'>end</span>
|
389
|
-
|
390
367
|
<span class='kw'>case</span>
|
391
|
-
<span class='kw'>when</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
</span>
|
398
|
-
|
399
|
-
|
400
|
-
</span>
|
401
|
-
<span class='
|
402
|
-
|
403
|
-
</span>
|
404
|
-
|
405
|
-
</span>
|
406
|
-
<span class='
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
</span>
|
411
|
-
<span class='id
|
412
|
-
|
368
|
+
<span class='kw'>when</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>zip</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
369
|
+
<span class='kw'>if</span> <span class='id extensions'>extensions</span><span class='period'>.</span><span class='id size'>size</span> <span class='op'>></span> <span class='int'>1</span> <span class='op'>&&</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>zip</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>zip</span><span class='tstring_end'>"</span></span>
|
370
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>You can only list one extension at a time</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:red</span>
|
371
|
+
<span class='id exit'>exit</span> <span class='int'>1</span>
|
372
|
+
<span class='kw'>end</span>
|
373
|
+
<span class='kw'>if</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>zip</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>zip</span><span class='tstring_end'>"</span></span>
|
374
|
+
<span class='id extensions'>extensions</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id extension'>extension</span><span class='op'>|</span>
|
375
|
+
<span class='id search'>search</span> <span class='op'>=</span> <span class='const'>Ray</span><span class='op'>::</span><span class='const'>Search</span><span class='period'>.</span><span class='id new'>new</span> <span class='id extension'>extension</span><span class='period'>.</span><span class='id to_extension_name'>to_extension_name</span>
|
376
|
+
<span class='id search'>search</span><span class='period'>.</span><span class='id cache'>cache</span>
|
377
|
+
<span class='kw'>if</span> <span class='id search'>search</span><span class='period'>.</span><span class='id results'>results</span><span class='period'>.</span><span class='id size'>size</span> <span class='op'>==</span> <span class='int'>1</span>
|
378
|
+
<span class='id extension'>extension</span> <span class='op'>=</span> <span class='id search'>search</span><span class='period'>.</span><span class='id results'>results</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id last'>last</span>
|
379
|
+
<span class='kw'>else</span>
|
380
|
+
<span class='id extension'>extension</span> <span class='op'>=</span> <span class='id search'>search</span><span class='period'>.</span><span class='id multiple_choice'>multiple_choice</span>
|
381
|
+
<span class='kw'>end</span>
|
382
|
+
<span class='id zip'>zip</span> <span class='op'>=</span> <span class='const'>Ray</span><span class='op'>::</span><span class='const'>Extension</span><span class='op'>::</span><span class='const'>Zip</span><span class='period'>.</span><span class='id new'>new</span> <span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:uri</span><span class='rbracket'>]</span>
|
383
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'> => Downloading...</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:yellow</span>
|
384
|
+
<span class='id zip'>zip</span><span class='period'>.</span><span class='id download'>download</span>
|
385
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'> => Extracting...</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:yellow</span>
|
386
|
+
<span class='id zip'>zip</span><span class='period'>.</span><span class='id extract'>extract</span>
|
387
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'> => Running tasks...</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:yellow</span>
|
388
|
+
<span class='id zip'>zip</span><span class='period'>.</span><span class='id install'>install</span>
|
389
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'> => Installation complete.</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:green</span>
|
413
390
|
<span class='kw'>end</span>
|
414
|
-
<span class='kw'>else</span>
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id
|
420
|
-
<span class='id
|
421
|
-
<span class='
|
422
|
-
|
423
|
-
</span>
|
424
|
-
<span class='id extension'>extension</span><span class='period'>.</span><span class='id bundle'>bundle</span> <span class='comment'># we don't use install here
|
425
|
-
</span> <span class='id extension'>extension</span><span class='period'>.</span><span class='id copy_tasks'>copy_tasks</span> <span class='comment'># because add_gem only works
|
426
|
-
</span> <span class='id extension'>extension</span><span class='period'>.</span><span class='id run_tasks'>run_tasks</span> <span class='comment'># with released gem extensions
|
427
|
-
</span> <span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id extension'>extension</span><span class='period'>.</span><span class='id name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> => Installation complete!</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:green</span>
|
391
|
+
<span class='kw'>else</span>
|
392
|
+
<span class='id name'>name</span> <span class='op'>=</span> <span class='id extensions'>extensions</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id to_extension_name'>to_extension_name</span>
|
393
|
+
<span class='id zip'>zip</span> <span class='op'>=</span> <span class='const'>Ray</span><span class='op'>::</span><span class='const'>Extension</span><span class='op'>::</span><span class='const'>Zip</span><span class='period'>.</span><span class='id new'>new</span> <span class='id name'>name</span><span class='comma'>,</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>zip</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
394
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> => Downloading...</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:yellow</span>
|
395
|
+
<span class='id zip'>zip</span><span class='period'>.</span><span class='id download'>download</span>
|
396
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> => Extracting...</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:yellow</span>
|
397
|
+
<span class='id zip'>zip</span><span class='period'>.</span><span class='id extract'>extract</span>
|
398
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> => Running tasks...</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:yellow</span>
|
399
|
+
<span class='id zip'>zip</span><span class='period'>.</span><span class='id install'>install</span>
|
400
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> => Installation complete.</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:green</span>
|
428
401
|
<span class='kw'>end</span>
|
429
402
|
<span class='kw'>when</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>git</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
403
|
+
<span class='kw'>if</span> <span class='id extensions'>extensions</span><span class='period'>.</span><span class='id size'>size</span> <span class='op'>></span> <span class='int'>1</span> <span class='op'>&&</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>git</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>git</span><span class='tstring_end'>"</span></span>
|
404
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>You can only list one extension at a time</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:red</span>
|
405
|
+
<span class='id exit'>exit</span> <span class='int'>1</span>
|
406
|
+
<span class='kw'>end</span>
|
430
407
|
<span class='kw'>if</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>git</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>git</span><span class='tstring_end'>"</span></span>
|
431
408
|
<span class='id extensions'>extensions</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id extension'>extension</span><span class='op'>|</span>
|
432
|
-
<span class='id search'>search</span> <span class='op'>=</span> <span class='const'>Ray</span><span class='op'>::</span><span class='const'>
|
433
|
-
|
434
|
-
|
435
|
-
</span>
|
436
|
-
<span class='kw'>
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
</span>
|
441
|
-
<span class='id
|
442
|
-
|
409
|
+
<span class='id search'>search</span> <span class='op'>=</span> <span class='const'>Ray</span><span class='op'>::</span><span class='const'>Search</span><span class='op'>::</span><span class='const'>GitHub</span><span class='period'>.</span><span class='id new'>new</span> <span class='id extension'>extension</span><span class='period'>.</span><span class='id to_extension_name'>to_extension_name</span>
|
410
|
+
<span class='id search'>search</span><span class='period'>.</span><span class='id cache'>cache</span>
|
411
|
+
<span class='kw'>if</span> <span class='id search'>search</span><span class='period'>.</span><span class='id results'>results</span><span class='period'>.</span><span class='id size'>size</span> <span class='op'>==</span> <span class='int'>1</span>
|
412
|
+
<span class='id extension'>extension</span> <span class='op'>=</span> <span class='id search'>search</span><span class='period'>.</span><span class='id results'>results</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id last'>last</span>
|
413
|
+
<span class='kw'>else</span>
|
414
|
+
<span class='id extension'>extension</span> <span class='op'>=</span> <span class='id search'>search</span><span class='period'>.</span><span class='id multiple_choice'>multiple_choice</span>
|
415
|
+
<span class='kw'>end</span>
|
416
|
+
<span class='id git'>git</span> <span class='op'>=</span> <span class='const'>Ray</span><span class='op'>::</span><span class='const'>Extension</span><span class='op'>::</span><span class='const'>Git</span><span class='period'>.</span><span class='id new'>new</span> <span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:repository</span><span class='rbracket'>]</span>
|
417
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'> => Cloning...</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:yellow</span>
|
418
|
+
<span class='id git'>git</span><span class='period'>.</span><span class='id clone'>clone</span>
|
419
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'> => Running tasks...</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:yellow</span>
|
420
|
+
<span class='id git'>git</span><span class='period'>.</span><span class='id install'>install</span>
|
421
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'> => Installation complete.</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:green</span>
|
443
422
|
<span class='kw'>end</span>
|
444
423
|
<span class='kw'>else</span>
|
445
|
-
<span class='id
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
<span class='id
|
450
|
-
|
424
|
+
<span class='id name'>name</span> <span class='op'>=</span> <span class='id extensions'>extensions</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id to_extension_name'>to_extension_name</span>
|
425
|
+
<span class='id git'>git</span> <span class='op'>=</span> <span class='const'>Ray</span><span class='op'>::</span><span class='const'>Extension</span><span class='op'>::</span><span class='const'>Git</span><span class='period'>.</span><span class='id new'>new</span> <span class='id name'>name</span><span class='comma'>,</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>git</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
426
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> => Cloning...</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:yellow</span>
|
427
|
+
<span class='id git'>git</span><span class='period'>.</span><span class='id clone'>clone</span>
|
428
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> => Running tasks...</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:yellow</span>
|
429
|
+
<span class='id git'>git</span><span class='period'>.</span><span class='id install'>install</span>
|
430
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> => Installation complete.</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:green</span>
|
451
431
|
<span class='kw'>end</span>
|
452
|
-
<span class='kw'>when</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>
|
453
|
-
<span class='kw'>if</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>
|
432
|
+
<span class='kw'>when</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>rubygem</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
433
|
+
<span class='kw'>if</span> <span class='id extensions'>extensions</span><span class='period'>.</span><span class='id size'>size</span> <span class='op'>></span> <span class='int'>1</span> <span class='op'>&&</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>rubygem</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>rubygem</span><span class='tstring_end'>"</span></span>
|
434
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>You can only list one extension at a time</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:red</span>
|
435
|
+
<span class='id exit'>exit</span> <span class='int'>1</span>
|
436
|
+
<span class='kw'>end</span>
|
437
|
+
<span class='kw'>if</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>rubygem</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>rubygem</span><span class='tstring_end'>"</span></span>
|
454
438
|
<span class='id extensions'>extensions</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id extension'>extension</span><span class='op'>|</span>
|
455
|
-
<span class='id search'>search</span> <span class='op'>=</span> <span class='const'>Ray</span><span class='op'>::</span><span class='const'>
|
456
|
-
|
457
|
-
|
458
|
-
</span>
|
459
|
-
<span class='kw'>
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
</span>
|
464
|
-
<span class='id
|
465
|
-
|
439
|
+
<span class='id search'>search</span> <span class='op'>=</span> <span class='const'>Ray</span><span class='op'>::</span><span class='const'>Search</span><span class='op'>::</span><span class='const'>RubyGems</span><span class='period'>.</span><span class='id new'>new</span> <span class='id extension'>extension</span><span class='period'>.</span><span class='id to_extension_name'>to_extension_name</span>
|
440
|
+
<span class='id search'>search</span><span class='period'>.</span><span class='id cache'>cache</span>
|
441
|
+
<span class='kw'>if</span> <span class='id search'>search</span><span class='period'>.</span><span class='id results'>results</span><span class='period'>.</span><span class='id size'>size</span> <span class='op'>==</span> <span class='int'>1</span>
|
442
|
+
<span class='id extension'>extension</span> <span class='op'>=</span> <span class='id search'>search</span><span class='period'>.</span><span class='id results'>results</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id last'>last</span>
|
443
|
+
<span class='kw'>else</span>
|
444
|
+
<span class='id extension'>extension</span> <span class='op'>=</span> <span class='id search'>search</span><span class='period'>.</span><span class='id multiple_choice'>multiple_choice</span>
|
445
|
+
<span class='kw'>end</span>
|
446
|
+
<span class='id rubygem'>rubygem</span> <span class='op'>=</span> <span class='const'>Ray</span><span class='op'>::</span><span class='const'>Extension</span><span class='op'>::</span><span class='const'>RubyGem</span><span class='period'>.</span><span class='id new'>new</span> <span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:repository</span><span class='rbracket'>]</span>
|
447
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'> => Bundling...</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:yellow</span>
|
448
|
+
<span class='id rubygem'>rubygem</span><span class='period'>.</span><span class='id bundle'>bundle</span>
|
449
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'> => Running tasks...</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:yellow</span>
|
450
|
+
<span class='id rubygem'>rubygem</span><span class='period'>.</span><span class='id install'>install</span>
|
451
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'> => Installation complete.</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:green</span>
|
466
452
|
<span class='kw'>end</span>
|
467
453
|
<span class='kw'>else</span>
|
468
|
-
<span class='
|
469
|
-
</span>
|
470
|
-
</span> <span class='symbol'>:uri</span> <span class='op'>=></span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>zip</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='comment'># uri should be a zip archive
|
471
|
-
</span> <span class='rbrace'>}</span><span class='rparen'>)</span>
|
472
|
-
<span class='id extension'>extension</span><span class='period'>.</span><span class='id install'>install</span> <span class='comment'># install the extension
|
473
|
-
</span> <span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id extension'>extension</span><span class='period'>.</span><span class='id name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> => Installation complete!</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:green</span>
|
474
|
-
<span class='kw'>end</span>
|
454
|
+
<span class='comment'># not sure what to do here
|
455
|
+
</span> <span class='kw'>end</span>
|
475
456
|
<span class='kw'>else</span>
|
476
|
-
<span class='id
|
457
|
+
<span class='id extensions'>extensions</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id extension'>extension</span><span class='op'>|</span>
|
458
|
+
<span class='id search'>search</span> <span class='op'>=</span> <span class='const'>Ray</span><span class='op'>::</span><span class='const'>Search</span><span class='period'>.</span><span class='id new'>new</span> <span class='id extension'>extension</span><span class='period'>.</span><span class='id to_extension_name'>to_extension_name</span>
|
459
|
+
<span class='id search'>search</span><span class='period'>.</span><span class='id cache'>cache</span>
|
460
|
+
<span class='kw'>if</span> <span class='id search'>search</span><span class='period'>.</span><span class='id results'>results</span><span class='period'>.</span><span class='id size'>size</span> <span class='op'>==</span> <span class='int'>1</span>
|
461
|
+
<span class='id extension'>extension</span> <span class='op'>=</span> <span class='id search'>search</span><span class='period'>.</span><span class='id results'>results</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id last'>last</span>
|
462
|
+
<span class='kw'>else</span>
|
463
|
+
<span class='id extension'>extension</span> <span class='op'>=</span> <span class='id search'>search</span><span class='period'>.</span><span class='id multiple_choice'>multiple_choice</span>
|
464
|
+
<span class='kw'>end</span>
|
465
|
+
<span class='kw'>if</span> <span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:version</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>latest</span><span class='tstring_end'>"</span></span>
|
466
|
+
<span class='id git'>git</span> <span class='op'>=</span> <span class='const'>Ray</span><span class='op'>::</span><span class='const'>Extension</span><span class='op'>::</span><span class='const'>Git</span><span class='period'>.</span><span class='id new'>new</span> <span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:repository</span><span class='rbracket'>]</span>
|
467
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> => Cloning...</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:yellow</span>
|
468
|
+
<span class='id git'>git</span><span class='period'>.</span><span class='id clone'>clone</span>
|
469
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> => Running tasks...</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:yellow</span>
|
470
|
+
<span class='id git'>git</span><span class='period'>.</span><span class='id install'>install</span>
|
471
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> => Installation complete.</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:green</span>
|
472
|
+
<span class='kw'>else</span>
|
473
|
+
<span class='id rubygem'>rubygem</span> <span class='op'>=</span> <span class='const'>Ray</span><span class='op'>::</span><span class='const'>Extension</span><span class='op'>::</span><span class='const'>RubyGem</span><span class='period'>.</span><span class='id new'>new</span> <span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:repository</span><span class='rbracket'>]</span>
|
474
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'> => Bundling...</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:yellow</span>
|
475
|
+
<span class='id rubygem'>rubygem</span><span class='period'>.</span><span class='id bundle'>bundle</span>
|
476
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'> => Running tasks...</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:yellow</span>
|
477
|
+
<span class='id rubygem'>rubygem</span><span class='period'>.</span><span class='id install'>install</span>
|
478
|
+
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id extension'>extension</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'> => Installation complete.</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:green</span>
|
479
|
+
<span class='kw'>end</span>
|
480
|
+
<span class='kw'>end</span>
|
477
481
|
<span class='kw'>end</span>
|
478
482
|
<span class='kw'>end</span></pre>
|
479
483
|
</td>
|
@@ -484,55 +488,67 @@ refer to the <a href="http://goo.gl/5UtP8">User Manual</a> instead.</p>
|
|
484
488
|
<div class="method_details ">
|
485
489
|
<p class="signature " id="search-instance_method">
|
486
490
|
|
487
|
-
- (<tt>Object</tt>) <strong>search</strong>(query)
|
491
|
+
- (<tt>Object</tt>) <strong>search</strong>(query = nil)
|
488
492
|
|
489
493
|
|
490
494
|
|
491
|
-
</p><
|
495
|
+
</p><div class="docstring">
|
496
|
+
<div class="discussion">
|
497
|
+
<p>Search for extensions</p>
|
498
|
+
|
499
|
+
|
500
|
+
</div>
|
501
|
+
</div>
|
502
|
+
<div class="tags">
|
503
|
+
|
504
|
+
<div class="examples">
|
505
|
+
<h3>Examples:</h3>
|
506
|
+
|
507
|
+
<h4><div class='inline'>
|
508
|
+
</div></h4>
|
509
|
+
<pre class="example code"><span class='id ray'>ray</span> <span class='id search'>search</span> <span class='id blog'>blog</span>
|
510
|
+
<span class='id ray'>ray</span> <span class='id search'>search</span> <span class='id blog'>blog</span> <span class='op'>-</span><span class='op'>-</span><span class='id live'>live</span>
|
511
|
+
<span class='id ray'>ray</span> <span class='id search'>search</span> <span class='id blog'>blog</span> <span class='op'>-</span><span class='op'>-</span><span class='id github'>github</span>
|
512
|
+
<span class='id ray'>ray</span> <span class='id search'>search</span> <span class='id blog'>blog</span> <span class='op'>-</span><span class='op'>-</span><span class='id rubygems'>rubygems</span></pre>
|
513
|
+
|
514
|
+
</div>
|
515
|
+
|
516
|
+
|
517
|
+
</div><table class="source_code">
|
492
518
|
<tr>
|
493
519
|
<td>
|
494
520
|
<pre class="lines">
|
495
521
|
|
496
522
|
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
70
|
512
|
-
71
|
513
|
-
72
|
514
|
-
73
|
515
|
-
74</pre>
|
523
|
+
34
|
524
|
+
35
|
525
|
+
36
|
526
|
+
37
|
527
|
+
38
|
528
|
+
39
|
529
|
+
40
|
530
|
+
41
|
531
|
+
42
|
532
|
+
43
|
533
|
+
44
|
534
|
+
45
|
535
|
+
46
|
536
|
+
47</pre>
|
516
537
|
</td>
|
517
538
|
<td>
|
518
|
-
<pre class="code"><span class="info file"># File 'lib/ray/cli.rb', line
|
539
|
+
<pre class="code"><span class="info file"># File 'lib/ray/cli.rb', line 34</span>
|
519
540
|
|
520
|
-
<span class='kw'>def</span> <span class='id search'>search</span> <span class='id query'>query</span>
|
541
|
+
<span class='kw'>def</span> <span class='id search'>search</span> <span class='id query'>query</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
521
542
|
<span class='id search'>search</span> <span class='op'>=</span> <span class='kw'>case</span>
|
522
|
-
<span class='kw'>when</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>github</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
523
|
-
<span class='const'>Ray</span><span class='op'>::</span><span class='const'>GitHub</span><span class='period'>.</span><span class='id new'>new</span> <span class='id query'>query</span>
|
524
543
|
<span class='kw'>when</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>rubygems</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
525
|
-
<span class='const'>Ray</span><span class='op'>::</span><span class='const'>RubyGems</span><span class='period'>.</span><span class='id new'>new</span> <span class='id query'>query</span>
|
544
|
+
<span class='const'>Ray</span><span class='op'>::</span><span class='const'>Search</span><span class='op'>::</span><span class='const'>RubyGems</span><span class='period'>.</span><span class='id new'>new</span> <span class='id query'>query</span>
|
545
|
+
<span class='kw'>when</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>github</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
546
|
+
<span class='const'>Ray</span><span class='op'>::</span><span class='const'>Search</span><span class='op'>::</span><span class='const'>GitHub</span><span class='period'>.</span><span class='id new'>new</span> <span class='id query'>query</span>
|
526
547
|
<span class='kw'>when</span> <span class='id options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>live</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
527
|
-
<span class='const'>Ray</span><span class='op'>::</span><span class='const'>
|
528
|
-
<span class='kw'>
|
529
|
-
<span class='
|
530
|
-
<span class='const'>Ray</span><span class='op'>::</span><span class='const'>GitHub</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='id query'>query</span><span class='rparen'>)</span><span class='period'>.</span><span class='id merge'>merge</span> <span class='const'>Ray</span><span class='op'>::</span><span class='const'>RubyGems</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='id query'>query</span><span class='rparen'>)</span>
|
531
|
-
<span class='kw'>else</span>
|
532
|
-
<span class='const'>Ray</span><span class='op'>::</span><span class='const'>Cache</span><span class='period'>.</span><span class='id new'>new</span> <span class='id query'>query</span>
|
533
|
-
<span class='kw'>end</span>
|
548
|
+
<span class='const'>Ray</span><span class='op'>::</span><span class='const'>Search</span><span class='period'>.</span><span class='id new'>new</span> <span class='id query'>query</span><span class='comma'>,</span> <span class='symbol'>:live</span>
|
549
|
+
<span class='kw'>when</span> <span class='id options'>options</span><span class='period'>.</span><span class='id empty?'>empty?</span>
|
550
|
+
<span class='const'>Ray</span><span class='op'>::</span><span class='const'>Search</span><span class='period'>.</span><span class='id new'>new</span> <span class='id query'>query</span>
|
534
551
|
<span class='kw'>end</span>
|
535
|
-
|
536
552
|
<span class='id search'>search</span><span class='period'>.</span><span class='id cache'>cache</span>
|
537
553
|
<span class='id say'>say</span> <span class='id search'>search</span><span class='period'>.</span><span class='id output'>output</span>
|
538
554
|
<span class='kw'>end</span></pre>
|
@@ -554,17 +570,15 @@ refer to the <a href="http://goo.gl/5UtP8">User Manual</a> instead.</p>
|
|
554
570
|
<pre class="lines">
|
555
571
|
|
556
572
|
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
32</pre>
|
573
|
+
17
|
574
|
+
18
|
575
|
+
19</pre>
|
561
576
|
</td>
|
562
577
|
<td>
|
563
|
-
<pre class="code"><span class="info file"># File 'lib/ray/cli.rb', line
|
578
|
+
<pre class="code"><span class="info file"># File 'lib/ray/cli.rb', line 17</span>
|
564
579
|
|
565
580
|
<span class='kw'>def</span> <span class='id version'>version</span>
|
566
|
-
<span class='id say'>say</span> <span class='
|
567
|
-
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Version: </span><span class='embexpr_beg'>#{</span><span class='const'>Ray</span><span class='op'>::</span><span class='const'>VERSION</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
581
|
+
<span class='id say'>say</span> <span class='const'>Ray</span><span class='op'>::</span><span class='const'>VERSION</span>
|
568
582
|
<span class='kw'>end</span></pre>
|
569
583
|
</td>
|
570
584
|
</tr>
|
@@ -576,7 +590,7 @@ refer to the <a href="http://goo.gl/5UtP8">User Manual</a> instead.</p>
|
|
576
590
|
</div>
|
577
591
|
|
578
592
|
<div id="footer">
|
579
|
-
Generated on
|
593
|
+
Generated on Tue Nov 15 19:16:22 2011 by
|
580
594
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
581
595
|
0.7.3 (ruby-1.9.3).
|
582
596
|
</div>
|