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
@@ -4,24 +4,24 @@
|
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
|
-
Class: Ray::GitHub
|
7
|
+
Class: Ray::Search::GitHub
|
8
8
|
|
9
9
|
— Documentation by YARD 0.7.3
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
13
|
-
<link rel="stylesheet" href="
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
14
|
|
15
|
-
<link rel="stylesheet" href="
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
|
-
relpath = '
|
18
|
+
relpath = '../..';
|
19
19
|
if (relpath != '') relpath += '/';
|
20
20
|
</script>
|
21
21
|
|
22
|
-
<script type="text/javascript" charset="utf-8" src="
|
22
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
23
23
|
|
24
|
-
<script type="text/javascript" charset="utf-8" src="
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
25
25
|
|
26
26
|
|
27
27
|
</head>
|
@@ -33,8 +33,8 @@
|
|
33
33
|
<div id="header">
|
34
34
|
<div id="menu">
|
35
35
|
|
36
|
-
<a href="
|
37
|
-
<span class='title'><span class='object_link'><a href="
|
36
|
+
<a href="../../_index.html">Index (G)</a> »
|
37
|
+
<span class='title'><span class='object_link'><a href="../../Ray.html" title="Ray (module)">Ray</a></span></span> » <span class='title'><span class='object_link'><a href="../Search.html" title="Ray::Search (class)">Search</a></span></span>
|
38
38
|
»
|
39
39
|
<span class="title">GitHub</span>
|
40
40
|
|
@@ -56,7 +56,7 @@
|
|
56
56
|
|
57
57
|
<iframe id="search_frame"></iframe>
|
58
58
|
|
59
|
-
<div id="content"><h1>Class: Ray::GitHub
|
59
|
+
<div id="content"><h1>Class: Ray::Search::GitHub
|
60
60
|
|
61
61
|
|
62
62
|
|
@@ -66,12 +66,14 @@
|
|
66
66
|
|
67
67
|
<dt class="r1">Inherits:</dt>
|
68
68
|
<dd class="r1">
|
69
|
-
<span class="inheritName">
|
69
|
+
<span class="inheritName"><span class='object_link'><a href="../Search.html" title="Ray::Search (class)">Ray::Search</a></span></span>
|
70
70
|
|
71
71
|
<ul class="fullTree">
|
72
72
|
<li>Object</li>
|
73
73
|
|
74
|
-
<li class="next">Ray::
|
74
|
+
<li class="next"><span class='object_link'><a href="../Search.html" title="Ray::Search (class)">Ray::Search</a></span></li>
|
75
|
+
|
76
|
+
<li class="next">Ray::Search::GitHub</li>
|
75
77
|
|
76
78
|
</ul>
|
77
79
|
<a href="#" class="inheritanceTree">show all</a>
|
@@ -83,21 +85,27 @@
|
|
83
85
|
|
84
86
|
|
85
87
|
|
86
|
-
<dt class="r2">Includes:</dt>
|
87
|
-
<dd class="r2"><span class='object_link'><a href="../Search.html" title="Search (module)">Search</a></span></dd>
|
88
|
-
|
89
|
-
|
90
88
|
|
91
89
|
|
92
90
|
|
93
|
-
<dt class="
|
94
|
-
<dd class="
|
91
|
+
<dt class="r2 last">Defined in:</dt>
|
92
|
+
<dd class="r2 last">lib/ray/search.rb</dd>
|
95
93
|
|
96
94
|
</dl>
|
97
95
|
<div class="clear"></div>
|
98
96
|
|
97
|
+
<h2>Overview</h2><div class="docstring">
|
98
|
+
<div class="discussion">
|
99
|
+
<p>Search GitHub for extension information</p>
|
99
100
|
|
100
101
|
|
102
|
+
</div>
|
103
|
+
</div>
|
104
|
+
<div class="tags">
|
105
|
+
|
106
|
+
|
107
|
+
</div>
|
108
|
+
|
101
109
|
|
102
110
|
|
103
111
|
|
@@ -187,6 +195,11 @@
|
|
187
195
|
|
188
196
|
|
189
197
|
|
198
|
+
|
199
|
+
|
200
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="../Search.html" title="Ray::Search (class)">Ray::Search</a></span></h3>
|
201
|
+
<p class="inherited"><span class='object_link'><a href="../Search.html#query-instance_method" title="Ray::Search#query (method)">query</a></span>, <span class='object_link'><a href="../Search.html#results-instance_method" title="Ray::Search#results (method)">results</a></span>, <span class='object_link'><a href="../Search.html#uri-instance_method" title="Ray::Search#uri (method)">uri</a></span></p>
|
202
|
+
|
190
203
|
|
191
204
|
|
192
205
|
<h2>
|
@@ -199,7 +212,7 @@
|
|
199
212
|
<li class="public ">
|
200
213
|
<span class="summary_signature">
|
201
214
|
|
202
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">- (GitHub) <strong>initialize</strong>(query) </a>
|
215
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (GitHub) <strong>initialize</strong>(query = nil) </a>
|
203
216
|
|
204
217
|
|
205
218
|
|
@@ -223,7 +236,7 @@
|
|
223
236
|
<li class="public ">
|
224
237
|
<span class="summary_signature">
|
225
238
|
|
226
|
-
<a href="#normalize-instance_method" title="#normalize (instance method)">- (
|
239
|
+
<a href="#normalize-instance_method" title="#normalize (instance method)">- (Hash) <strong>normalize</strong>(response) </a>
|
227
240
|
|
228
241
|
|
229
242
|
|
@@ -236,7 +249,7 @@
|
|
236
249
|
|
237
250
|
|
238
251
|
|
239
|
-
<span class="summary_desc"><div class='inline'>
|
252
|
+
<span class="summary_desc"><div class='inline'><p>Normalize GitHub JSON response.</p>
|
240
253
|
</div></span>
|
241
254
|
|
242
255
|
</li>
|
@@ -245,7 +258,7 @@
|
|
245
258
|
<li class="public ">
|
246
259
|
<span class="summary_signature">
|
247
260
|
|
248
|
-
<a href="#real_name-instance_method" title="#real_name (instance method)">- (
|
261
|
+
<a href="#real_name-instance_method" title="#real_name (instance method)">- (String) <strong>real_name</strong>(owner) </a>
|
249
262
|
|
250
263
|
|
251
264
|
|
@@ -258,7 +271,7 @@
|
|
258
271
|
|
259
272
|
|
260
273
|
|
261
|
-
<span class="summary_desc"><div class='inline'>
|
274
|
+
<span class="summary_desc"><div class='inline'><p>Use GitHub API v3 to look up the owner’s real name.</p>
|
262
275
|
</div></span>
|
263
276
|
|
264
277
|
</li>
|
@@ -275,15 +288,15 @@
|
|
275
288
|
|
276
289
|
|
277
290
|
|
278
|
-
<h3 class="inherited">Methods
|
279
|
-
<p class="inherited"><span class='object_link'><a href="../Search.html#cache-instance_method" title="Search#cache (method)">#cache</a></span>, <span class='object_link'><a href="../Search.html#
|
291
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Search.html" title="Ray::Search (class)">Ray::Search</a></span></h3>
|
292
|
+
<p class="inherited"><span class='object_link'><a href="../Search.html#cache-instance_method" title="Ray::Search#cache (method)">#cache</a></span>, <span class='object_link'><a href="../Search.html#multiple_choice-instance_method" title="Ray::Search#multiple_choice (method)">#multiple_choice</a></span>, <span class='object_link'><a href="../Search.html#output-instance_method" title="Ray::Search#output (method)">#output</a></span>, <span class='object_link'><a href="../Search.html#search-instance_method" title="Ray::Search#search (method)">#search</a></span></p>
|
280
293
|
<div id="constructor_details" class="method_details_list">
|
281
294
|
<h2>Constructor Details</h2>
|
282
295
|
|
283
296
|
<div class="method_details first">
|
284
297
|
<p class="signature first" id="initialize-instance_method">
|
285
298
|
|
286
|
-
- (<tt><span class='object_link'><a href="" title="Ray::GitHub (class)">GitHub</a></span></tt>) <strong>initialize</strong>(query)
|
299
|
+
- (<tt><span class='object_link'><a href="" title="Ray::Search::GitHub (class)">GitHub</a></span></tt>) <strong>initialize</strong>(query = nil)
|
287
300
|
|
288
301
|
|
289
302
|
|
@@ -303,19 +316,27 @@
|
|
303
316
|
<pre class="lines">
|
304
317
|
|
305
318
|
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
319
|
+
132
|
320
|
+
133
|
321
|
+
134
|
322
|
+
135
|
323
|
+
136
|
324
|
+
137
|
325
|
+
138
|
326
|
+
139
|
327
|
+
140</pre>
|
311
328
|
</td>
|
312
329
|
<td>
|
313
|
-
<pre class="code"><span class="info file"># File 'lib/ray/search
|
314
|
-
|
315
|
-
<span class='kw'>def</span> <span class='id initialize'>initialize</span> <span class='id query'>query</span>
|
316
|
-
<span class='
|
317
|
-
|
318
|
-
|
330
|
+
<pre class="code"><span class="info file"># File 'lib/ray/search.rb', line 132</span>
|
331
|
+
|
332
|
+
<span class='kw'>def</span> <span class='id initialize'>initialize</span> <span class='id query'>query</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
333
|
+
<span class='kw'>if</span> <span class='id query'>query</span>
|
334
|
+
<span class='ivar'>@query</span> <span class='op'>=</span> <span class='id query'>query</span>
|
335
|
+
<span class='ivar'>@uri</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>http://github.com/api/v2/json/repos/search/radiant+</span><span class='embexpr_beg'>#{</span><span class='id query'>query</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
336
|
+
<span class='ivar'>@results</span> <span class='op'>=</span> <span class='id search'>search</span>
|
337
|
+
<span class='kw'>else</span>
|
338
|
+
<span class='ivar'>@results</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>A search query is required. Try: ray help search</span><span class='tstring_end'>"</span></span>
|
339
|
+
<span class='kw'>end</span>
|
319
340
|
<span class='kw'>end</span></pre>
|
320
341
|
</td>
|
321
342
|
</tr>
|
@@ -353,12 +374,12 @@
|
|
353
374
|
<pre class="lines">
|
354
375
|
|
355
376
|
|
356
|
-
|
357
|
-
|
358
|
-
|
377
|
+
128
|
378
|
+
129
|
379
|
+
130</pre>
|
359
380
|
</td>
|
360
381
|
<td>
|
361
|
-
<pre class="code"><span class="info file"># File 'lib/ray/search
|
382
|
+
<pre class="code"><span class="info file"># File 'lib/ray/search.rb', line 128</span>
|
362
383
|
|
363
384
|
<span class='kw'>def</span> <span class='id query'>query</span>
|
364
385
|
<span class='ivar'>@query</span>
|
@@ -394,12 +415,12 @@
|
|
394
415
|
<pre class="lines">
|
395
416
|
|
396
417
|
|
397
|
-
|
398
|
-
|
399
|
-
|
418
|
+
128
|
419
|
+
129
|
420
|
+
130</pre>
|
400
421
|
</td>
|
401
422
|
<td>
|
402
|
-
<pre class="code"><span class="info file"># File 'lib/ray/search
|
423
|
+
<pre class="code"><span class="info file"># File 'lib/ray/search.rb', line 128</span>
|
403
424
|
|
404
425
|
<span class='kw'>def</span> <span class='id results'>results</span>
|
405
426
|
<span class='ivar'>@results</span>
|
@@ -435,12 +456,12 @@
|
|
435
456
|
<pre class="lines">
|
436
457
|
|
437
458
|
|
438
|
-
|
439
|
-
|
440
|
-
|
459
|
+
128
|
460
|
+
129
|
461
|
+
130</pre>
|
441
462
|
</td>
|
442
463
|
<td>
|
443
|
-
<pre class="code"><span class="info file"># File 'lib/ray/search
|
464
|
+
<pre class="code"><span class="info file"># File 'lib/ray/search.rb', line 128</span>
|
444
465
|
|
445
466
|
<span class='kw'>def</span> <span class='id uri'>uri</span>
|
446
467
|
<span class='ivar'>@uri</span>
|
@@ -460,46 +481,75 @@
|
|
460
481
|
<div class="method_details first">
|
461
482
|
<p class="signature first" id="normalize-instance_method">
|
462
483
|
|
463
|
-
- (<tt>
|
484
|
+
- (<tt>Hash</tt>) <strong>normalize</strong>(response)
|
464
485
|
|
465
486
|
|
466
487
|
|
467
|
-
</p><
|
488
|
+
</p><div class="docstring">
|
489
|
+
<div class="discussion">
|
490
|
+
<p>Normalize GitHub JSON response</p>
|
491
|
+
|
492
|
+
|
493
|
+
</div>
|
494
|
+
</div>
|
495
|
+
<div class="tags">
|
496
|
+
|
497
|
+
<h3>Returns:</h3>
|
498
|
+
<ul class="return">
|
499
|
+
|
500
|
+
<li>
|
501
|
+
|
502
|
+
|
503
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
504
|
+
|
505
|
+
|
506
|
+
|
507
|
+
—
|
508
|
+
<div class='inline'><p>search results in a normalized format</p>
|
509
|
+
</div>
|
510
|
+
|
511
|
+
</li>
|
512
|
+
|
513
|
+
</ul>
|
514
|
+
|
515
|
+
</div><table class="source_code">
|
468
516
|
<tr>
|
469
517
|
<td>
|
470
518
|
<pre class="lines">
|
471
519
|
|
472
520
|
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
521
|
+
144
|
522
|
+
145
|
523
|
+
146
|
524
|
+
147
|
525
|
+
148
|
526
|
+
149
|
527
|
+
150
|
528
|
+
151
|
529
|
+
152
|
530
|
+
153
|
531
|
+
154
|
532
|
+
155
|
533
|
+
156
|
534
|
+
157
|
535
|
+
158
|
536
|
+
159</pre>
|
488
537
|
</td>
|
489
538
|
<td>
|
490
|
-
<pre class="code"><span class="info file"># File 'lib/ray/search
|
539
|
+
<pre class="code"><span class="info file"># File 'lib/ray/search.rb', line 144</span>
|
491
540
|
|
492
541
|
<span class='kw'>def</span> <span class='id normalize'>normalize</span> <span class='id response'>response</span>
|
493
542
|
<span class='id response'>response</span> <span class='op'>=</span> <span class='const'>MultiJson</span><span class='period'>.</span><span class='id decode'>decode</span> <span class='id response'>response</span>
|
494
543
|
<span class='id results'>results</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
495
544
|
<span class='id response'>response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>repositories</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</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>
|
496
545
|
<span class='id results'>results</span><span class='lbracket'>[</span><span class='id extension'>extension</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>name</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id to_extension_name'>to_extension_name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
497
|
-
<span class='symbol'>:author</span>
|
498
|
-
<span class='symbol'>:description</span>
|
499
|
-
<span class='symbol'>:homepage</span>
|
500
|
-
<span class='symbol'>:name</span>
|
501
|
-
<span class='symbol'>:
|
502
|
-
<span class='symbol'>:
|
546
|
+
<span class='symbol'>:author</span> <span class='op'>=></span> <span class='id real_name'>real_name</span><span class='lparen'>(</span><span class='id extension'>extension</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>owner</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='comma'>,</span>
|
547
|
+
<span class='symbol'>:description</span> <span class='op'>=></span> <span class='id extension'>extension</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>description</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
|
548
|
+
<span class='symbol'>:homepage</span> <span class='op'>=></span> <span class='id extension'>extension</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>url</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
|
549
|
+
<span class='symbol'>:name</span> <span class='op'>=></span> <span class='id extension'>extension</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>name</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id to_extension_name'>to_extension_name</span><span class='comma'>,</span>
|
550
|
+
<span class='symbol'>:repository</span> <span class='op'>=></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='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>url</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'>.git</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
551
|
+
<span class='symbol'>:uri</span> <span class='op'>=></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='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>url</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'>/zipball/master</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
552
|
+
<span class='symbol'>:version</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>
|
503
553
|
<span class='rbrace'>}</span>
|
504
554
|
<span class='kw'>end</span>
|
505
555
|
<span class='kw'>return</span> <span class='id results'>results</span>
|
@@ -512,26 +562,62 @@
|
|
512
562
|
<div class="method_details ">
|
513
563
|
<p class="signature " id="real_name-instance_method">
|
514
564
|
|
515
|
-
- (<tt>
|
565
|
+
- (<tt><span class='object_link'><a href="../../String.html" title="String (class)">String</a></span></tt>) <strong>real_name</strong>(owner)
|
516
566
|
|
517
567
|
|
518
568
|
|
519
|
-
</p><
|
569
|
+
</p><div class="docstring">
|
570
|
+
<div class="discussion">
|
571
|
+
<p>Use GitHub API v3 to look up the owner’s real name</p>
|
572
|
+
|
573
|
+
|
574
|
+
</div>
|
575
|
+
</div>
|
576
|
+
<div class="tags">
|
577
|
+
|
578
|
+
<div class="examples">
|
579
|
+
<h3>Examples:</h3>
|
580
|
+
|
581
|
+
<h4><div class='inline'>
|
582
|
+
</div></h4>
|
583
|
+
<pre class="example code"><span class='id real_name'>real_name</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>saturnflyer</span><span class='tstring_end'>"</span></span> <span class='comment'># => "Jim Gay"</span></pre>
|
584
|
+
|
585
|
+
</div>
|
586
|
+
|
587
|
+
<h3>Returns:</h3>
|
588
|
+
<ul class="return">
|
589
|
+
|
590
|
+
<li>
|
591
|
+
|
592
|
+
|
593
|
+
<span class='type'>(<tt><span class='object_link'><a href="../../String.html" title="String (class)">String</a></span></tt>)</span>
|
594
|
+
|
595
|
+
|
596
|
+
|
597
|
+
—
|
598
|
+
<div class='inline'><p>the owner’s real name</p>
|
599
|
+
</div>
|
600
|
+
|
601
|
+
</li>
|
602
|
+
|
603
|
+
</ul>
|
604
|
+
|
605
|
+
</div><table class="source_code">
|
520
606
|
<tr>
|
521
607
|
<td>
|
522
608
|
<pre class="lines">
|
523
609
|
|
524
610
|
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
611
|
+
165
|
612
|
+
166
|
613
|
+
167
|
614
|
+
168</pre>
|
529
615
|
</td>
|
530
616
|
<td>
|
531
|
-
<pre class="code"><span class="info file"># File 'lib/ray/search
|
617
|
+
<pre class="code"><span class="info file"># File 'lib/ray/search.rb', line 165</span>
|
532
618
|
|
533
619
|
<span class='kw'>def</span> <span class='id real_name'>real_name</span> <span class='id owner'>owner</span>
|
534
|
-
<span class='id response'>response</span> <span class='op'>=</span> <span class='id open'>open</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='
|
620
|
+
<span class='id response'>response</span> <span class='op'>=</span> <span class='id open'>open</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>https://api.github.com/users/</span><span class='embexpr_beg'>#{</span><span class='id owner'>owner</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id read'>read</span>
|
535
621
|
<span class='const'>MultiJson</span><span class='period'>.</span><span class='id decode'>decode</span><span class='lparen'>(</span><span class='id response'>response</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>name</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
536
622
|
<span class='kw'>end</span></pre>
|
537
623
|
</td>
|
@@ -544,7 +630,7 @@
|
|
544
630
|
</div>
|
545
631
|
|
546
632
|
<div id="footer">
|
547
|
-
Generated on
|
633
|
+
Generated on Tue Nov 15 19:16:23 2011 by
|
548
634
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
549
635
|
0.7.3 (ruby-1.9.3).
|
550
636
|
</div>
|