git_hub 0.2.0 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +30 -29
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/features/{zemax.feature → git_hub.feature} +0 -0
- data/features/step_definitions/{zemax_steps.rb → git_hub_steps.rb} +0 -0
- data/features/support/env.rb +1 -1
- data/git_hub.gemspec +10 -4
- data/lib/git_hub/base.rb +37 -23
- data/lib/git_hub/commit.rb +20 -17
- data/lib/git_hub/repo.rb +51 -31
- data/lib/git_hub.rb +1 -10
- data/rdoc/classes/GitHub/Api.html +49 -15
- data/rdoc/classes/GitHub/Base.html +147 -47
- data/rdoc/classes/GitHub/Commit.html +390 -0
- data/rdoc/classes/GitHub/Repo.html +266 -111
- data/rdoc/classes/GitHub.html +34 -60
- data/rdoc/created.rid +1 -1
- data/rdoc/files/README_rdoc.html +43 -18
- data/rdoc/files/lib/git_hub/api_rb.html +2 -2
- data/rdoc/files/lib/git_hub/base_rb.html +2 -2
- data/rdoc/files/lib/git_hub/commit_rb.html +91 -0
- data/rdoc/files/lib/git_hub/repo_rb.html +2 -2
- data/rdoc/files/lib/git_hub_rb.html +2 -2
- data/rdoc/fr_class_index.html +4 -2
- data/rdoc/fr_file_index.html +4 -2
- data/rdoc/fr_method_index.html +42 -24
- data/rdoc/index.html +2 -2
- data/spec/git_hub/commit_spec.rb +6 -6
- data/spec/git_hub/repo_spec.rb +12 -7
- data/spec/git_hub/user_spec.rb +15 -0
- data/spec/spec_helper.rb +6 -2
- data/spec/stubs/commits/show/joe007/fine_repo/3a70f86293b719f193f778a8710b1f83f2f7bf38.res +47 -0
- data/spec/stubs/commits/show/joe007/fine_repo/f7f5dddaa37deacc83f1f56876e2b135389d03ab.res +38 -0
- metadata +10 -4
@@ -2,7 +2,7 @@
|
|
2
2
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
3
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
4
|
<head>
|
5
|
-
<title>Class: GitHub::Repo [
|
5
|
+
<title>Class: GitHub::Repo [git_hub 0.2.7
|
6
6
|
]</title>
|
7
7
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
8
8
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
@@ -96,27 +96,35 @@
|
|
96
96
|
|
97
97
|
<div class="name-list">
|
98
98
|
|
99
|
-
<a href="#
|
99
|
+
<a href="#M000036">add_collaborator</a>
|
100
100
|
|
101
|
-
<a href="#
|
101
|
+
<a href="#M000033">add_service</a>
|
102
102
|
|
103
|
-
<a href="#
|
103
|
+
<a href="#M000028">branches</a>
|
104
104
|
|
105
|
-
<a href="#
|
105
|
+
<a href="#M000026">clone_url</a>
|
106
106
|
|
107
|
-
<a href="#
|
107
|
+
<a href="#M000035">collaborators</a>
|
108
108
|
|
109
|
-
<a href="#
|
109
|
+
<a href="#M000029">commits</a>
|
110
110
|
|
111
|
-
<a href="#
|
111
|
+
<a href="#M000031">create</a>
|
112
112
|
|
113
|
-
<a href="#
|
113
|
+
<a href="#M000032">delete</a>
|
114
114
|
|
115
|
-
<a href="#
|
115
|
+
<a href="#M000030">find</a>
|
116
116
|
|
117
|
-
<a href="#
|
117
|
+
<a href="#M000024">fork?</a>
|
118
118
|
|
119
|
-
<a href="#
|
119
|
+
<a href="#M000023">new</a>
|
120
|
+
|
121
|
+
<a href="#M000025">private?</a>
|
122
|
+
|
123
|
+
<a href="#M000037">remove_collaborator</a>
|
124
|
+
|
125
|
+
<a href="#M000034">remove_service</a>
|
126
|
+
|
127
|
+
<a href="#M000027">tags</a>
|
120
128
|
|
121
129
|
</div>
|
122
130
|
</div>
|
@@ -163,17 +171,29 @@
|
|
163
171
|
</tr>
|
164
172
|
|
165
173
|
<tr class="top-aligned-row context-row">
|
166
|
-
<td class="context-item-name">
|
174
|
+
<td class="context-item-name">user=</td>
|
167
175
|
<td>-></td>
|
168
176
|
<td class="context-item-value">username=</td>
|
169
177
|
</tr>
|
170
178
|
|
171
179
|
<tr class="top-aligned-row context-row">
|
172
|
-
<td class="context-item-name">
|
180
|
+
<td class="context-item-name">user</td>
|
173
181
|
<td>-></td>
|
174
182
|
<td class="context-item-value">username</td>
|
175
183
|
</tr>
|
176
184
|
|
185
|
+
<tr class="top-aligned-row context-row">
|
186
|
+
<td class="context-item-name">user=</td>
|
187
|
+
<td>-></td>
|
188
|
+
<td class="context-item-value">owner=</td>
|
189
|
+
</tr>
|
190
|
+
|
191
|
+
<tr class="top-aligned-row context-row">
|
192
|
+
<td class="context-item-name">user</td>
|
193
|
+
<td>-></td>
|
194
|
+
<td class="context-item-value">owner</td>
|
195
|
+
</tr>
|
196
|
+
|
177
197
|
<tr class="top-aligned-row context-row">
|
178
198
|
<td class="context-item-name">find</td>
|
179
199
|
<td>-></td>
|
@@ -271,7 +291,7 @@
|
|
271
291
|
</tr>
|
272
292
|
|
273
293
|
<tr class="top-aligned-row context-row">
|
274
|
-
<td class="context-item-name">
|
294
|
+
<td class="context-item-name">private</td>
|
275
295
|
|
276
296
|
<td class="context-item-value"> [RW] </td>
|
277
297
|
|
@@ -279,7 +299,7 @@
|
|
279
299
|
</tr>
|
280
300
|
|
281
301
|
<tr class="top-aligned-row context-row">
|
282
|
-
<td class="context-item-name">
|
302
|
+
<td class="context-item-name">pushed</td>
|
283
303
|
|
284
304
|
<td class="context-item-value"> [RW] </td>
|
285
305
|
|
@@ -287,7 +307,7 @@
|
|
287
307
|
</tr>
|
288
308
|
|
289
309
|
<tr class="top-aligned-row context-row">
|
290
|
-
<td class="context-item-name">
|
310
|
+
<td class="context-item-name">score</td>
|
291
311
|
|
292
312
|
<td class="context-item-value"> [RW] </td>
|
293
313
|
|
@@ -295,7 +315,7 @@
|
|
295
315
|
</tr>
|
296
316
|
|
297
317
|
<tr class="top-aligned-row context-row">
|
298
|
-
<td class="context-item-name">
|
318
|
+
<td class="context-item-name">size</td>
|
299
319
|
|
300
320
|
<td class="context-item-value"> [RW] </td>
|
301
321
|
|
@@ -303,7 +323,7 @@
|
|
303
323
|
</tr>
|
304
324
|
|
305
325
|
<tr class="top-aligned-row context-row">
|
306
|
-
<td class="context-item-name">
|
326
|
+
<td class="context-item-name">type</td>
|
307
327
|
|
308
328
|
<td class="context-item-value"> [RW] </td>
|
309
329
|
|
@@ -311,7 +331,7 @@
|
|
311
331
|
</tr>
|
312
332
|
|
313
333
|
<tr class="top-aligned-row context-row">
|
314
|
-
<td class="context-item-name">
|
334
|
+
<td class="context-item-name">url</td>
|
315
335
|
|
316
336
|
<td class="context-item-value"> [RW] </td>
|
317
337
|
|
@@ -319,7 +339,7 @@
|
|
319
339
|
</tr>
|
320
340
|
|
321
341
|
<tr class="top-aligned-row context-row">
|
322
|
-
<td class="context-item-name">
|
342
|
+
<td class="context-item-name">user</td>
|
323
343
|
|
324
344
|
<td class="context-item-value"> [RW] </td>
|
325
345
|
|
@@ -346,12 +366,12 @@
|
|
346
366
|
<h3 class="section-bar">Public Class methods</h3>
|
347
367
|
|
348
368
|
|
349
|
-
<div id="method-
|
350
|
-
<a name="
|
369
|
+
<div id="method-M000031" class="method-detail">
|
370
|
+
<a name="M000031"></a>
|
351
371
|
|
352
372
|
<div class="method-heading">
|
353
373
|
|
354
|
-
<a href="#
|
374
|
+
<a href="#M000031" class="method-signature">
|
355
375
|
|
356
376
|
<span class="method-name">create</span><span class="method-args">(opts)</span>
|
357
377
|
|
@@ -363,21 +383,18 @@
|
|
363
383
|
|
364
384
|
<p>
|
365
385
|
Create new github repo, accepts Hash with :repo, :description, :homepage,
|
366
|
-
:public/:private
|
386
|
+
:public/:private
|
367
387
|
</p>
|
368
388
|
|
369
389
|
<p><a class="source-toggle" href="#"
|
370
|
-
onclick="toggleCode('
|
371
|
-
<div class="method-source-code" id="
|
390
|
+
onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
|
391
|
+
<div class="method-source-code" id="M000031-source">
|
372
392
|
<pre>
|
373
|
-
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line
|
393
|
+
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line 100</span>
|
374
394
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create</span>(<span class="ruby-identifier">opts</span>)
|
375
|
-
<span class="ruby-identifier">repo</span
|
376
|
-
<span class="ruby-identifier">
|
377
|
-
<span class="ruby-identifier">
|
378
|
-
<span class="ruby-identifier">public</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:public</span>] <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:private</span>] <span class="ruby-comment cmt"># default to true</span>
|
379
|
-
<span class="ruby-identifier">ensure_auth</span> <span class="ruby-identifier">opts</span>
|
380
|
-
<span class="ruby-identifier">convert_to_repo</span> <span class="ruby-identifier">post</span>(<span class="ruby-value str">"/create"</span>, <span class="ruby-value str">'name'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">repo</span>, <span class="ruby-value str">'description'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">description</span>,
|
395
|
+
<span class="ruby-identifier">repo</span>, <span class="ruby-identifier">desc</span>, <span class="ruby-identifier">homepage</span>, <span class="ruby-identifier">public</span> = <span class="ruby-identifier">extract</span> <span class="ruby-identifier">opts</span>, <span class="ruby-identifier">:repo</span>, <span class="ruby-identifier">:desc</span>, <span class="ruby-identifier">:homepage</span>, <span class="ruby-identifier">:public</span>
|
396
|
+
<span class="ruby-identifier">api</span>.<span class="ruby-identifier">ensure_auth</span> <span class="ruby-identifier">opts</span>
|
397
|
+
<span class="ruby-identifier">instantiate</span> <span class="ruby-identifier">post</span>(<span class="ruby-value str">"/create"</span>, <span class="ruby-value str">'name'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">repo</span>, <span class="ruby-value str">'description'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">desc</span>,
|
381
398
|
<span class="ruby-value str">'homepage'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">homepage</span>, <span class="ruby-value str">'public'</span> =<span class="ruby-operator">></span> (<span class="ruby-identifier">public</span> <span class="ruby-value">? </span><span class="ruby-value">1</span> <span class="ruby-operator">:</span> <span class="ruby-value">0</span>))
|
382
399
|
<span class="ruby-keyword kw">end</span>
|
383
400
|
</pre>
|
@@ -387,12 +404,12 @@ Create new github repo, accepts Hash with :repo, :description, :homepage,
|
|
387
404
|
</div>
|
388
405
|
|
389
406
|
|
390
|
-
<div id="method-
|
391
|
-
<a name="
|
407
|
+
<div id="method-M000030" class="method-detail">
|
408
|
+
<a name="M000030"></a>
|
392
409
|
|
393
410
|
<div class="method-heading">
|
394
411
|
|
395
|
-
<a href="#
|
412
|
+
<a href="#M000030" class="method-signature">
|
396
413
|
|
397
414
|
<span class="method-name">find</span><span class="method-args">(opts)</span>
|
398
415
|
|
@@ -403,7 +420,7 @@ Create new github repo, accepts Hash with :repo, :description, :homepage,
|
|
403
420
|
<div class="method-description">
|
404
421
|
|
405
422
|
<p>
|
406
|
-
Find repo(s) of a (valid) github user
|
423
|
+
Find repo(s) of a (valid) github user, accepts Hash with keys:
|
407
424
|
</p>
|
408
425
|
<table>
|
409
426
|
<tr><td valign="top">:owner/:user/:username:</td><td>Github user name
|
@@ -418,20 +435,22 @@ Find repo(s) of a (valid) github user. Accepts Hash with keys:
|
|
418
435
|
</table>
|
419
436
|
|
420
437
|
<p><a class="source-toggle" href="#"
|
421
|
-
onclick="toggleCode('
|
422
|
-
<div class="method-source-code" id="
|
438
|
+
onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
|
439
|
+
<div class="method-source-code" id="M000030-source">
|
423
440
|
<pre>
|
424
|
-
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line
|
441
|
+
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line 82</span>
|
425
442
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find</span>(<span class="ruby-identifier">opts</span>)
|
426
|
-
<span class="ruby-
|
427
|
-
|
428
|
-
<span class="ruby-
|
443
|
+
<span class="ruby-identifier">user</span>, <span class="ruby-identifier">repo</span>, <span class="ruby-identifier">query</span> = <span class="ruby-identifier">extract</span> <span class="ruby-identifier">opts</span>, <span class="ruby-identifier">:user</span>, <span class="ruby-identifier">:repo</span>, <span class="ruby-identifier">:query</span>
|
444
|
+
<span class="ruby-identifier">path</span> = <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">query</span>
|
445
|
+
<span class="ruby-node">"/search/#{query.map(&:to_s).join('+')}"</span>
|
446
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">user</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">repo</span>
|
447
|
+
<span class="ruby-node">"/show/#{user}/#{repo}"</span>
|
448
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">user</span>
|
449
|
+
<span class="ruby-node">"/show/#{user}"</span>
|
429
450
|
<span class="ruby-keyword kw">else</span>
|
430
|
-
<span class="ruby-identifier">
|
431
|
-
<span class="ruby-identifier">repo</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:repo</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:repository</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:name</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:project</span>]
|
432
|
-
<span class="ruby-identifier">path</span> = <span class="ruby-identifier">repo</span> <span class="ruby-value">? </span><span class="ruby-node">"/show/#{owner}/#{repo}"</span> <span class="ruby-operator">:</span> <span class="ruby-node">"/show/#{owner}"</span>
|
451
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"Unable to find #{self.class}(s) for #{opts}"</span>
|
433
452
|
<span class="ruby-keyword kw">end</span>
|
434
|
-
<span class="ruby-identifier">
|
453
|
+
<span class="ruby-identifier">instantiate</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">path</span>)
|
435
454
|
<span class="ruby-keyword kw">end</span>
|
436
455
|
</pre>
|
437
456
|
</div>
|
@@ -440,12 +459,12 @@ Find repo(s) of a (valid) github user. Accepts Hash with keys:
|
|
440
459
|
</div>
|
441
460
|
|
442
461
|
|
443
|
-
<div id="method-
|
444
|
-
<a name="
|
462
|
+
<div id="method-M000023" class="method-detail">
|
463
|
+
<a name="M000023"></a>
|
445
464
|
|
446
465
|
<div class="method-heading">
|
447
466
|
|
448
|
-
<a href="#
|
467
|
+
<a href="#M000023" class="method-signature">
|
449
468
|
|
450
469
|
<span class="method-name">new</span><span class="method-args">(options)</span>
|
451
470
|
|
@@ -456,14 +475,14 @@ Find repo(s) of a (valid) github user. Accepts Hash with keys:
|
|
456
475
|
<div class="method-description">
|
457
476
|
|
458
477
|
<p><a class="source-toggle" href="#"
|
459
|
-
onclick="toggleCode('
|
460
|
-
<div class="method-source-code" id="
|
478
|
+
onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
|
479
|
+
<div class="method-source-code" id="M000023-source">
|
461
480
|
<pre>
|
462
481
|
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line 33</span>
|
463
482
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">options</span>
|
464
483
|
<span class="ruby-keyword kw">super</span>
|
465
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-node">"Unable to initialize #{self.class} without name"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@name</span>
|
466
|
-
<span class="ruby-ivar">@url</span> <span class="ruby-operator">||=</span> <span class="ruby-node">"http://github.com/#{@
|
484
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"Unable to initialize #{self.class} without user and name"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@user</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@name</span>
|
485
|
+
<span class="ruby-ivar">@url</span> <span class="ruby-operator">||=</span> <span class="ruby-node">"http://github.com/#{@user}/#{@name}"</span>
|
467
486
|
<span class="ruby-ivar">@type</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">"repo"</span>
|
468
487
|
<span class="ruby-keyword kw">end</span>
|
469
488
|
</pre>
|
@@ -476,12 +495,12 @@ Find repo(s) of a (valid) github user. Accepts Hash with keys:
|
|
476
495
|
<h3 class="section-bar">Public Instance methods</h3>
|
477
496
|
|
478
497
|
|
479
|
-
<div id="method-
|
480
|
-
<a name="
|
498
|
+
<div id="method-M000036" class="method-detail">
|
499
|
+
<a name="M000036"></a>
|
481
500
|
|
482
501
|
<div class="method-heading">
|
483
502
|
|
484
|
-
<a href="#
|
503
|
+
<a href="#M000036" class="method-signature">
|
485
504
|
|
486
505
|
<span class="method-name">add_collaborator</span><span class="method-args">()</span>
|
487
506
|
|
@@ -492,10 +511,10 @@ Find repo(s) of a (valid) github user. Accepts Hash with keys:
|
|
492
511
|
<div class="method-description">
|
493
512
|
|
494
513
|
<p><a class="source-toggle" href="#"
|
495
|
-
onclick="toggleCode('
|
496
|
-
<div class="method-source-code" id="
|
514
|
+
onclick="toggleCode('M000036-source');return false;">[Source]</a></p>
|
515
|
+
<div class="method-source-code" id="M000036-source">
|
497
516
|
<pre>
|
498
|
-
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line
|
517
|
+
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line 129</span>
|
499
518
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_collaborator</span>
|
500
519
|
<span class="ruby-keyword kw">end</span>
|
501
520
|
</pre>
|
@@ -505,12 +524,12 @@ Find repo(s) of a (valid) github user. Accepts Hash with keys:
|
|
505
524
|
</div>
|
506
525
|
|
507
526
|
|
508
|
-
<div id="method-
|
509
|
-
<a name="
|
527
|
+
<div id="method-M000033" class="method-detail">
|
528
|
+
<a name="M000033"></a>
|
510
529
|
|
511
530
|
<div class="method-heading">
|
512
531
|
|
513
|
-
<a href="#
|
532
|
+
<a href="#M000033" class="method-signature">
|
514
533
|
|
515
534
|
<span class="method-name">add_service</span><span class="method-args">()</span>
|
516
535
|
|
@@ -521,10 +540,10 @@ Find repo(s) of a (valid) github user. Accepts Hash with keys:
|
|
521
540
|
<div class="method-description">
|
522
541
|
|
523
542
|
<p><a class="source-toggle" href="#"
|
524
|
-
onclick="toggleCode('
|
525
|
-
<div class="method-source-code" id="
|
543
|
+
onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
|
544
|
+
<div class="method-source-code" id="M000033-source">
|
526
545
|
<pre>
|
527
|
-
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line
|
546
|
+
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line 119</span>
|
528
547
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_service</span>
|
529
548
|
<span class="ruby-keyword kw">end</span>
|
530
549
|
</pre>
|
@@ -534,12 +553,42 @@ Find repo(s) of a (valid) github user. Accepts Hash with keys:
|
|
534
553
|
</div>
|
535
554
|
|
536
555
|
|
537
|
-
<div id="method-
|
538
|
-
<a name="
|
556
|
+
<div id="method-M000028" class="method-detail">
|
557
|
+
<a name="M000028"></a>
|
539
558
|
|
540
559
|
<div class="method-heading">
|
541
560
|
|
542
|
-
<a href="#
|
561
|
+
<a href="#M000028" class="method-signature">
|
562
|
+
|
563
|
+
<span class="method-name">branches</span><span class="method-args">()</span>
|
564
|
+
|
565
|
+
</a>
|
566
|
+
|
567
|
+
</div>
|
568
|
+
|
569
|
+
<div class="method-description">
|
570
|
+
|
571
|
+
<p><a class="source-toggle" href="#"
|
572
|
+
onclick="toggleCode('M000028-source');return false;">[Source]</a></p>
|
573
|
+
<div class="method-source-code" id="M000028-source">
|
574
|
+
<pre>
|
575
|
+
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line 64</span>
|
576
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">branches</span>
|
577
|
+
<span class="ruby-identifier">hash_of_commits</span>(<span class="ruby-identifier">:branches</span>)
|
578
|
+
<span class="ruby-keyword kw">end</span>
|
579
|
+
</pre>
|
580
|
+
</div>
|
581
|
+
|
582
|
+
</div>
|
583
|
+
</div>
|
584
|
+
|
585
|
+
|
586
|
+
<div id="method-M000026" class="method-detail">
|
587
|
+
<a name="M000026"></a>
|
588
|
+
|
589
|
+
<div class="method-heading">
|
590
|
+
|
591
|
+
<a href="#M000026" class="method-signature">
|
543
592
|
|
544
593
|
<span class="method-name">clone_url</span><span class="method-args">()</span>
|
545
594
|
|
@@ -550,13 +599,13 @@ Find repo(s) of a (valid) github user. Accepts Hash with keys:
|
|
550
599
|
<div class="method-description">
|
551
600
|
|
552
601
|
<p><a class="source-toggle" href="#"
|
553
|
-
onclick="toggleCode('
|
554
|
-
<div class="method-source-code" id="
|
602
|
+
onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
|
603
|
+
<div class="method-source-code" id="M000026-source">
|
555
604
|
<pre>
|
556
|
-
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line
|
605
|
+
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line 55</span>
|
557
606
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clone_url</span>
|
558
|
-
<span class="ruby-identifier">url</span> = <span class="ruby-identifier">private?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">api</span>.<span class="ruby-identifier">auth</span>[<span class="ruby-value str">'login'</span>] <span class="ruby-operator">==</span> <span class="ruby-
|
559
|
-
<span class="ruby-identifier">url</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"#{
|
607
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-identifier">private?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">api</span>.<span class="ruby-identifier">auth</span>[<span class="ruby-value str">'login'</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">user</span> <span class="ruby-value">? </span><span class="ruby-value str">"git@github.com:"</span> <span class="ruby-operator">:</span> <span class="ruby-value str">"git://github.com/"</span>
|
608
|
+
<span class="ruby-identifier">url</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"#{@user}/#{@name}.git"</span>
|
560
609
|
<span class="ruby-keyword kw">end</span>
|
561
610
|
</pre>
|
562
611
|
</div>
|
@@ -565,14 +614,44 @@ Find repo(s) of a (valid) github user. Accepts Hash with keys:
|
|
565
614
|
</div>
|
566
615
|
|
567
616
|
|
568
|
-
<div id="method-
|
569
|
-
<a name="
|
617
|
+
<div id="method-M000035" class="method-detail">
|
618
|
+
<a name="M000035"></a>
|
570
619
|
|
571
620
|
<div class="method-heading">
|
572
621
|
|
573
|
-
<a href="#
|
622
|
+
<a href="#M000035" class="method-signature">
|
574
623
|
|
575
|
-
<span class="method-name">
|
624
|
+
<span class="method-name">collaborators</span><span class="method-args">()</span>
|
625
|
+
|
626
|
+
</a>
|
627
|
+
|
628
|
+
</div>
|
629
|
+
|
630
|
+
<div class="method-description">
|
631
|
+
|
632
|
+
<p><a class="source-toggle" href="#"
|
633
|
+
onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
|
634
|
+
<div class="method-source-code" id="M000035-source">
|
635
|
+
<pre>
|
636
|
+
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line 125</span>
|
637
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">collaborators</span>
|
638
|
+
<span class="ruby-value str">'repos/show/:user/:repo/collaborators'</span>
|
639
|
+
<span class="ruby-keyword kw">end</span>
|
640
|
+
</pre>
|
641
|
+
</div>
|
642
|
+
|
643
|
+
</div>
|
644
|
+
</div>
|
645
|
+
|
646
|
+
|
647
|
+
<div id="method-M000029" class="method-detail">
|
648
|
+
<a name="M000029"></a>
|
649
|
+
|
650
|
+
<div class="method-heading">
|
651
|
+
|
652
|
+
<a href="#M000029" class="method-signature">
|
653
|
+
|
654
|
+
<span class="method-name">commits</span><span class="method-args">(opts = {})</span>
|
576
655
|
|
577
656
|
</a>
|
578
657
|
|
@@ -581,18 +660,64 @@ Find repo(s) of a (valid) github user. Accepts Hash with keys:
|
|
581
660
|
<div class="method-description">
|
582
661
|
|
583
662
|
<p>
|
584
|
-
|
663
|
+
Returns commits for this repo, accepts options:
|
585
664
|
</p>
|
665
|
+
<table>
|
666
|
+
<tr><td valign="top">:branch:</td><td>Only commits for specific branch - default ‘master’
|
667
|
+
|
668
|
+
</td></tr>
|
669
|
+
<tr><td valign="top">:path:</td><td>Only commits for specific path
|
670
|
+
|
671
|
+
</td></tr>
|
672
|
+
<tr><td valign="top">:sha/:id:</td><td>Only one commit with specific id (sha)
|
673
|
+
|
674
|
+
</td></tr>
|
675
|
+
</table>
|
586
676
|
|
587
677
|
<p><a class="source-toggle" href="#"
|
588
|
-
onclick="toggleCode('
|
589
|
-
<div class="method-source-code" id="
|
678
|
+
onclick="toggleCode('M000029-source');return false;">[Source]</a></p>
|
679
|
+
<div class="method-source-code" id="M000029-source">
|
590
680
|
<pre>
|
591
|
-
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line
|
592
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
681
|
+
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line 72</span>
|
682
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">commits</span> <span class="ruby-identifier">opts</span> = {}
|
683
|
+
<span class="ruby-constant">Commit</span>.<span class="ruby-identifier">find</span> <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">:user</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@user</span>, <span class="ruby-identifier">:repo</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@name</span>)
|
684
|
+
<span class="ruby-keyword kw">end</span>
|
685
|
+
</pre>
|
686
|
+
</div>
|
687
|
+
|
688
|
+
</div>
|
689
|
+
</div>
|
690
|
+
|
691
|
+
|
692
|
+
<div id="method-M000032" class="method-detail">
|
693
|
+
<a name="M000032"></a>
|
694
|
+
|
695
|
+
<div class="method-heading">
|
696
|
+
|
697
|
+
<a href="#M000032" class="method-signature">
|
698
|
+
|
699
|
+
<span class="method-name">delete</span><span class="method-args">(opts = {})</span>
|
700
|
+
|
701
|
+
</a>
|
702
|
+
|
703
|
+
</div>
|
704
|
+
|
705
|
+
<div class="method-description">
|
706
|
+
|
707
|
+
<p>
|
708
|
+
Delete github repo, accepts optional Hash with authentication
|
709
|
+
</p>
|
710
|
+
|
711
|
+
<p><a class="source-toggle" href="#"
|
712
|
+
onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
|
713
|
+
<div class="method-source-code" id="M000032-source">
|
714
|
+
<pre>
|
715
|
+
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line 109</span>
|
716
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">opts</span> = {})
|
717
|
+
<span class="ruby-identifier">api</span>.<span class="ruby-identifier">ensure_auth</span> <span class="ruby-identifier">opts</span>
|
593
718
|
<span class="ruby-identifier">result</span> = <span class="ruby-identifier">post</span>(<span class="ruby-node">"/delete/#{@name}"</span>)
|
594
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">result</span>[<span class="ruby-value str">'delete_token'</span>]
|
595
|
-
<span class="ruby-identifier">post</span>(<span class="ruby-node">"/delete/#{@name}"</span>, <span class="ruby-value str">'delete_token'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">
|
719
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">token</span> = <span class="ruby-identifier">result</span>[<span class="ruby-value str">'delete_token'</span>]
|
720
|
+
<span class="ruby-identifier">post</span>(<span class="ruby-node">"/delete/#{@name}"</span>, <span class="ruby-value str">'delete_token'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">token</span>)
|
596
721
|
<span class="ruby-keyword kw">else</span>
|
597
722
|
<span class="ruby-identifier">result</span>
|
598
723
|
<span class="ruby-keyword kw">end</span>
|
@@ -604,12 +729,12 @@ Delete github repo
|
|
604
729
|
</div>
|
605
730
|
|
606
731
|
|
607
|
-
<div id="method-
|
608
|
-
<a name="
|
732
|
+
<div id="method-M000024" class="method-detail">
|
733
|
+
<a name="M000024"></a>
|
609
734
|
|
610
735
|
<div class="method-heading">
|
611
736
|
|
612
|
-
<a href="#
|
737
|
+
<a href="#M000024" class="method-signature">
|
613
738
|
|
614
739
|
<span class="method-name">fork?</span><span class="method-args">()</span>
|
615
740
|
|
@@ -620,12 +745,12 @@ Delete github repo
|
|
620
745
|
<div class="method-description">
|
621
746
|
|
622
747
|
<p><a class="source-toggle" href="#"
|
623
|
-
onclick="toggleCode('
|
624
|
-
<div class="method-source-code" id="
|
748
|
+
onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
|
749
|
+
<div class="method-source-code" id="M000024-source">
|
625
750
|
<pre>
|
626
|
-
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line
|
751
|
+
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line 47</span>
|
627
752
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fork?</span>;
|
628
|
-
<span class="ruby-operator">!</span><span class="ruby-operator">!</span><span class="ruby-
|
753
|
+
<span class="ruby-operator">!</span><span class="ruby-operator">!</span><span class="ruby-identifier">fork</span>
|
629
754
|
<span class="ruby-keyword kw">end</span>
|
630
755
|
</pre>
|
631
756
|
</div>
|
@@ -634,12 +759,12 @@ Delete github repo
|
|
634
759
|
</div>
|
635
760
|
|
636
761
|
|
637
|
-
<div id="method-
|
638
|
-
<a name="
|
762
|
+
<div id="method-M000025" class="method-detail">
|
763
|
+
<a name="M000025"></a>
|
639
764
|
|
640
765
|
<div class="method-heading">
|
641
766
|
|
642
|
-
<a href="#
|
767
|
+
<a href="#M000025" class="method-signature">
|
643
768
|
|
644
769
|
<span class="method-name">private?</span><span class="method-args">()</span>
|
645
770
|
|
@@ -650,10 +775,10 @@ Delete github repo
|
|
650
775
|
<div class="method-description">
|
651
776
|
|
652
777
|
<p><a class="source-toggle" href="#"
|
653
|
-
onclick="toggleCode('
|
654
|
-
<div class="method-source-code" id="
|
778
|
+
onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
|
779
|
+
<div class="method-source-code" id="M000025-source">
|
655
780
|
<pre>
|
656
|
-
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line
|
781
|
+
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line 51</span>
|
657
782
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">private?</span>;
|
658
783
|
<span class="ruby-operator">!</span><span class="ruby-operator">!</span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">private</span>
|
659
784
|
<span class="ruby-keyword kw">end</span>
|
@@ -664,12 +789,12 @@ Delete github repo
|
|
664
789
|
</div>
|
665
790
|
|
666
791
|
|
667
|
-
<div id="method-
|
668
|
-
<a name="
|
792
|
+
<div id="method-M000037" class="method-detail">
|
793
|
+
<a name="M000037"></a>
|
669
794
|
|
670
795
|
<div class="method-heading">
|
671
796
|
|
672
|
-
<a href="#
|
797
|
+
<a href="#M000037" class="method-signature">
|
673
798
|
|
674
799
|
<span class="method-name">remove_collaborator</span><span class="method-args">()</span>
|
675
800
|
|
@@ -680,10 +805,10 @@ Delete github repo
|
|
680
805
|
<div class="method-description">
|
681
806
|
|
682
807
|
<p><a class="source-toggle" href="#"
|
683
|
-
onclick="toggleCode('
|
684
|
-
<div class="method-source-code" id="
|
808
|
+
onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
|
809
|
+
<div class="method-source-code" id="M000037-source">
|
685
810
|
<pre>
|
686
|
-
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line
|
811
|
+
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line 132</span>
|
687
812
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_collaborator</span>
|
688
813
|
<span class="ruby-keyword kw">end</span>
|
689
814
|
</pre>
|
@@ -693,12 +818,12 @@ Delete github repo
|
|
693
818
|
</div>
|
694
819
|
|
695
820
|
|
696
|
-
<div id="method-
|
697
|
-
<a name="
|
821
|
+
<div id="method-M000034" class="method-detail">
|
822
|
+
<a name="M000034"></a>
|
698
823
|
|
699
824
|
<div class="method-heading">
|
700
825
|
|
701
|
-
<a href="#
|
826
|
+
<a href="#M000034" class="method-signature">
|
702
827
|
|
703
828
|
<span class="method-name">remove_service</span><span class="method-args">()</span>
|
704
829
|
|
@@ -709,10 +834,10 @@ Delete github repo
|
|
709
834
|
<div class="method-description">
|
710
835
|
|
711
836
|
<p><a class="source-toggle" href="#"
|
712
|
-
onclick="toggleCode('
|
713
|
-
<div class="method-source-code" id="
|
837
|
+
onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
|
838
|
+
<div class="method-source-code" id="M000034-source">
|
714
839
|
<pre>
|
715
|
-
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line
|
840
|
+
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line 122</span>
|
716
841
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_service</span>
|
717
842
|
<span class="ruby-keyword kw">end</span>
|
718
843
|
</pre>
|
@@ -722,6 +847,36 @@ Delete github repo
|
|
722
847
|
</div>
|
723
848
|
|
724
849
|
|
850
|
+
<div id="method-M000027" class="method-detail">
|
851
|
+
<a name="M000027"></a>
|
852
|
+
|
853
|
+
<div class="method-heading">
|
854
|
+
|
855
|
+
<a href="#M000027" class="method-signature">
|
856
|
+
|
857
|
+
<span class="method-name">tags</span><span class="method-args">()</span>
|
858
|
+
|
859
|
+
</a>
|
860
|
+
|
861
|
+
</div>
|
862
|
+
|
863
|
+
<div class="method-description">
|
864
|
+
|
865
|
+
<p><a class="source-toggle" href="#"
|
866
|
+
onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
|
867
|
+
<div class="method-source-code" id="M000027-source">
|
868
|
+
<pre>
|
869
|
+
<span class="ruby-comment cmt"># File lib/git_hub/repo.rb, line 60</span>
|
870
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tags</span>
|
871
|
+
<span class="ruby-identifier">hash_of_commits</span>(<span class="ruby-identifier">:tags</span>)
|
872
|
+
<span class="ruby-keyword kw">end</span>
|
873
|
+
</pre>
|
874
|
+
</div>
|
875
|
+
|
876
|
+
</div>
|
877
|
+
</div>
|
878
|
+
|
879
|
+
|
725
880
|
|
726
881
|
</div>
|
727
882
|
|