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
@@ -0,0 +1,390 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<title>Class: GitHub::Commit [git_hub 0.2.7
|
6
|
+
]</title>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
8
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
9
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
10
|
+
<script type="text/javascript">
|
11
|
+
// <![CDATA[
|
12
|
+
|
13
|
+
function popupCode( url ) {
|
14
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
15
|
+
}
|
16
|
+
|
17
|
+
function toggleCode( id ) {
|
18
|
+
if ( document.getElementById )
|
19
|
+
elem = document.getElementById( id );
|
20
|
+
else if ( document.all )
|
21
|
+
elem = eval( "document.all." + id );
|
22
|
+
else
|
23
|
+
return false;
|
24
|
+
|
25
|
+
elemStyle = elem.style;
|
26
|
+
|
27
|
+
if ( elemStyle.display != "block" ) {
|
28
|
+
elemStyle.display = "block"
|
29
|
+
} else {
|
30
|
+
elemStyle.display = "none"
|
31
|
+
}
|
32
|
+
|
33
|
+
return true;
|
34
|
+
}
|
35
|
+
|
36
|
+
// Make codeblocks hidden by default
|
37
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
|
38
|
+
|
39
|
+
// ]]>
|
40
|
+
</script>
|
41
|
+
|
42
|
+
</head>
|
43
|
+
<body>
|
44
|
+
|
45
|
+
|
46
|
+
<div id="classHeader">
|
47
|
+
<table class="header-table">
|
48
|
+
<tr class="top-aligned-row">
|
49
|
+
<td><strong>Class</strong></td>
|
50
|
+
<td class="class-name-in-header">GitHub::Commit</td>
|
51
|
+
</tr>
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>In:</strong></td>
|
54
|
+
<td>
|
55
|
+
|
56
|
+
|
57
|
+
<a href="../../files/lib/git_hub/commit_rb.html">
|
58
|
+
|
59
|
+
lib/git_hub/commit.rb
|
60
|
+
|
61
|
+
</a>
|
62
|
+
|
63
|
+
|
64
|
+
<br />
|
65
|
+
|
66
|
+
</td>
|
67
|
+
</tr>
|
68
|
+
|
69
|
+
|
70
|
+
<tr class="top-aligned-row">
|
71
|
+
<td><strong>Parent:</strong></td>
|
72
|
+
<td>
|
73
|
+
|
74
|
+
<a href="Base.html">
|
75
|
+
|
76
|
+
GitHub::Base
|
77
|
+
|
78
|
+
</a>
|
79
|
+
|
80
|
+
</td>
|
81
|
+
</tr>
|
82
|
+
|
83
|
+
</table>
|
84
|
+
</div>
|
85
|
+
<!-- banner header -->
|
86
|
+
|
87
|
+
<div id="bodyContent">
|
88
|
+
|
89
|
+
<div id="contextContent">
|
90
|
+
|
91
|
+
</div>
|
92
|
+
|
93
|
+
|
94
|
+
<div id="method-list">
|
95
|
+
<h3 class="section-bar">Methods</h3>
|
96
|
+
|
97
|
+
<div class="name-list">
|
98
|
+
|
99
|
+
<a href="#M000022">find</a>
|
100
|
+
|
101
|
+
<a href="#M000021">new</a>
|
102
|
+
|
103
|
+
</div>
|
104
|
+
</div>
|
105
|
+
|
106
|
+
</div>
|
107
|
+
|
108
|
+
<!-- if includes -->
|
109
|
+
|
110
|
+
<div id="section">
|
111
|
+
|
112
|
+
<div id="aliases-list">
|
113
|
+
<h3 class="section-bar">External Aliases</h3>
|
114
|
+
|
115
|
+
<div class="name-list">
|
116
|
+
<table summary="aliases">
|
117
|
+
|
118
|
+
<tr class="top-aligned-row context-row">
|
119
|
+
<td class="context-item-name">id</td>
|
120
|
+
<td>-></td>
|
121
|
+
<td class="context-item-value">name</td>
|
122
|
+
</tr>
|
123
|
+
|
124
|
+
<tr class="top-aligned-row context-row">
|
125
|
+
<td class="context-item-name">id=</td>
|
126
|
+
<td>-></td>
|
127
|
+
<td class="context-item-value">name=</td>
|
128
|
+
</tr>
|
129
|
+
|
130
|
+
<tr class="top-aligned-row context-row">
|
131
|
+
<td class="context-item-name">id</td>
|
132
|
+
<td>-></td>
|
133
|
+
<td class="context-item-value">sha</td>
|
134
|
+
</tr>
|
135
|
+
|
136
|
+
<tr class="top-aligned-row context-row">
|
137
|
+
<td class="context-item-name">id=</td>
|
138
|
+
<td>-></td>
|
139
|
+
<td class="context-item-value">sha=</td>
|
140
|
+
</tr>
|
141
|
+
|
142
|
+
<tr class="top-aligned-row context-row">
|
143
|
+
<td class="context-item-name">find</td>
|
144
|
+
<td>-></td>
|
145
|
+
<td class="context-item-value">show</td>
|
146
|
+
</tr>
|
147
|
+
|
148
|
+
</table>
|
149
|
+
</div>
|
150
|
+
</div>
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
<div id="attribute-list">
|
155
|
+
<h3 class="section-bar">Attributes</h3>
|
156
|
+
|
157
|
+
<div class="name-list">
|
158
|
+
<table>
|
159
|
+
|
160
|
+
<tr class="top-aligned-row context-row">
|
161
|
+
<td class="context-item-name">added</td>
|
162
|
+
|
163
|
+
<td class="context-item-value"> [RW] </td>
|
164
|
+
|
165
|
+
<td class="context-item-desc"></td>
|
166
|
+
</tr>
|
167
|
+
|
168
|
+
<tr class="top-aligned-row context-row">
|
169
|
+
<td class="context-item-name">author</td>
|
170
|
+
|
171
|
+
<td class="context-item-value"> [RW] </td>
|
172
|
+
|
173
|
+
<td class="context-item-desc"></td>
|
174
|
+
</tr>
|
175
|
+
|
176
|
+
<tr class="top-aligned-row context-row">
|
177
|
+
<td class="context-item-name">authored_date</td>
|
178
|
+
|
179
|
+
<td class="context-item-value"> [RW] </td>
|
180
|
+
|
181
|
+
<td class="context-item-desc"></td>
|
182
|
+
</tr>
|
183
|
+
|
184
|
+
<tr class="top-aligned-row context-row">
|
185
|
+
<td class="context-item-name">committed_date</td>
|
186
|
+
|
187
|
+
<td class="context-item-value"> [RW] </td>
|
188
|
+
|
189
|
+
<td class="context-item-desc"></td>
|
190
|
+
</tr>
|
191
|
+
|
192
|
+
<tr class="top-aligned-row context-row">
|
193
|
+
<td class="context-item-name">committer</td>
|
194
|
+
|
195
|
+
<td class="context-item-value"> [RW] </td>
|
196
|
+
|
197
|
+
<td class="context-item-desc"></td>
|
198
|
+
</tr>
|
199
|
+
|
200
|
+
<tr class="top-aligned-row context-row">
|
201
|
+
<td class="context-item-name">id</td>
|
202
|
+
|
203
|
+
<td class="context-item-value"> [RW] </td>
|
204
|
+
|
205
|
+
<td class="context-item-desc"></td>
|
206
|
+
</tr>
|
207
|
+
|
208
|
+
<tr class="top-aligned-row context-row">
|
209
|
+
<td class="context-item-name">message</td>
|
210
|
+
|
211
|
+
<td class="context-item-value"> [RW] </td>
|
212
|
+
|
213
|
+
<td class="context-item-desc"></td>
|
214
|
+
</tr>
|
215
|
+
|
216
|
+
<tr class="top-aligned-row context-row">
|
217
|
+
<td class="context-item-name">modified</td>
|
218
|
+
|
219
|
+
<td class="context-item-value"> [RW] </td>
|
220
|
+
|
221
|
+
<td class="context-item-desc"></td>
|
222
|
+
</tr>
|
223
|
+
|
224
|
+
<tr class="top-aligned-row context-row">
|
225
|
+
<td class="context-item-name">parents</td>
|
226
|
+
|
227
|
+
<td class="context-item-value"> [RW] </td>
|
228
|
+
|
229
|
+
<td class="context-item-desc"></td>
|
230
|
+
</tr>
|
231
|
+
|
232
|
+
<tr class="top-aligned-row context-row">
|
233
|
+
<td class="context-item-name">removed</td>
|
234
|
+
|
235
|
+
<td class="context-item-value"> [RW] </td>
|
236
|
+
|
237
|
+
<td class="context-item-desc"></td>
|
238
|
+
</tr>
|
239
|
+
|
240
|
+
<tr class="top-aligned-row context-row">
|
241
|
+
<td class="context-item-name">repo</td>
|
242
|
+
|
243
|
+
<td class="context-item-value"> [RW] </td>
|
244
|
+
|
245
|
+
<td class="context-item-desc"></td>
|
246
|
+
</tr>
|
247
|
+
|
248
|
+
<tr class="top-aligned-row context-row">
|
249
|
+
<td class="context-item-name">tree</td>
|
250
|
+
|
251
|
+
<td class="context-item-value"> [RW] </td>
|
252
|
+
|
253
|
+
<td class="context-item-desc"></td>
|
254
|
+
</tr>
|
255
|
+
|
256
|
+
<tr class="top-aligned-row context-row">
|
257
|
+
<td class="context-item-name">url</td>
|
258
|
+
|
259
|
+
<td class="context-item-value"> [RW] </td>
|
260
|
+
|
261
|
+
<td class="context-item-desc"></td>
|
262
|
+
</tr>
|
263
|
+
|
264
|
+
<tr class="top-aligned-row context-row">
|
265
|
+
<td class="context-item-name">user</td>
|
266
|
+
|
267
|
+
<td class="context-item-value"> [RW] </td>
|
268
|
+
|
269
|
+
<td class="context-item-desc"></td>
|
270
|
+
</tr>
|
271
|
+
|
272
|
+
</table>
|
273
|
+
</div>
|
274
|
+
</div>
|
275
|
+
|
276
|
+
|
277
|
+
<!-- if method_list -->
|
278
|
+
|
279
|
+
<div id="methods">
|
280
|
+
|
281
|
+
<h3 class="section-bar">Public Class methods</h3>
|
282
|
+
|
283
|
+
|
284
|
+
<div id="method-M000022" class="method-detail">
|
285
|
+
<a name="M000022"></a>
|
286
|
+
|
287
|
+
<div class="method-heading">
|
288
|
+
|
289
|
+
<a href="#M000022" class="method-signature">
|
290
|
+
|
291
|
+
<span class="method-name">find</span><span class="method-args">(opts)</span>
|
292
|
+
|
293
|
+
</a>
|
294
|
+
|
295
|
+
</div>
|
296
|
+
|
297
|
+
<div class="method-description">
|
298
|
+
|
299
|
+
<p>
|
300
|
+
Find commits, accepts Hash with keys:
|
301
|
+
</p>
|
302
|
+
<table>
|
303
|
+
<tr><td valign="top">:user/:owner/:username:</td><td>Github user name
|
304
|
+
|
305
|
+
</td></tr>
|
306
|
+
<tr><td valign="top">:repo/:repository/:project:</td><td><a href="Repo.html">Repo</a> name
|
307
|
+
|
308
|
+
</td></tr>
|
309
|
+
<tr><td valign="top">:branch:</td><td>Only commits for specific branch - default ‘master’
|
310
|
+
|
311
|
+
</td></tr>
|
312
|
+
<tr><td valign="top">:path:</td><td>Only commits for specific path
|
313
|
+
|
314
|
+
</td></tr>
|
315
|
+
<tr><td valign="top">:sha/:id:</td><td>Only one commit with specific id (sha)
|
316
|
+
|
317
|
+
</td></tr>
|
318
|
+
</table>
|
319
|
+
|
320
|
+
<p><a class="source-toggle" href="#"
|
321
|
+
onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
|
322
|
+
<div class="method-source-code" id="M000022-source">
|
323
|
+
<pre>
|
324
|
+
<span class="ruby-comment cmt"># File lib/git_hub/commit.rb, line 29</span>
|
325
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find</span>(<span class="ruby-identifier">opts</span>)
|
326
|
+
<span class="ruby-identifier">user</span>, <span class="ruby-identifier">repo</span>, <span class="ruby-identifier">branch</span>, <span class="ruby-identifier">sha</span>, <span class="ruby-identifier">path</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">:branch</span>, <span class="ruby-identifier">:sha</span>, <span class="ruby-identifier">:path</span>
|
327
|
+
<span class="ruby-identifier">repo_given</span> = <span class="ruby-identifier">branch</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">user</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">repo</span>
|
328
|
+
<span class="ruby-identifier">path</span> = <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">sha</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">repo_given</span>
|
329
|
+
<span class="ruby-node">"/show/#{user}/#{repo}/#{sha}"</span>
|
330
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">path</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">repo_given</span>
|
331
|
+
<span class="ruby-node">"/list/#{user}/#{repo}/#{branch}/#{path}"</span>
|
332
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">repo_given</span>
|
333
|
+
<span class="ruby-node">"/list/#{user}/#{repo}/#{branch}"</span>
|
334
|
+
<span class="ruby-keyword kw">else</span>
|
335
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"Unable to find #{self.class}(s) for #{opts}"</span>
|
336
|
+
<span class="ruby-keyword kw">end</span>
|
337
|
+
<span class="ruby-identifier">instantiate</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">path</span>), <span class="ruby-identifier">:user=</span><span class="ruby-operator">></span><span class="ruby-identifier">user</span>, <span class="ruby-identifier">:repo=</span><span class="ruby-operator">></span><span class="ruby-identifier">repo</span>
|
338
|
+
<span class="ruby-keyword kw">end</span>
|
339
|
+
</pre>
|
340
|
+
</div>
|
341
|
+
|
342
|
+
</div>
|
343
|
+
</div>
|
344
|
+
|
345
|
+
|
346
|
+
<div id="method-M000021" class="method-detail">
|
347
|
+
<a name="M000021"></a>
|
348
|
+
|
349
|
+
<div class="method-heading">
|
350
|
+
|
351
|
+
<a href="#M000021" class="method-signature">
|
352
|
+
|
353
|
+
<span class="method-name">new</span><span class="method-args">(opts)</span>
|
354
|
+
|
355
|
+
</a>
|
356
|
+
|
357
|
+
</div>
|
358
|
+
|
359
|
+
<div class="method-description">
|
360
|
+
|
361
|
+
<p><a class="source-toggle" href="#"
|
362
|
+
onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
|
363
|
+
<div class="method-source-code" id="M000021-source">
|
364
|
+
<pre>
|
365
|
+
<span class="ruby-comment cmt"># File lib/git_hub/commit.rb, line 12</span>
|
366
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">opts</span>
|
367
|
+
<span class="ruby-keyword kw">super</span>
|
368
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"Unable to initialize #{self.class} without id(sha)"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">sha</span>
|
369
|
+
<span class="ruby-keyword kw">end</span>
|
370
|
+
</pre>
|
371
|
+
</div>
|
372
|
+
|
373
|
+
</div>
|
374
|
+
</div>
|
375
|
+
|
376
|
+
|
377
|
+
|
378
|
+
</div>
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
</div>
|
384
|
+
|
385
|
+
<div id="validator-badges">
|
386
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
387
|
+
</div>
|
388
|
+
|
389
|
+
</body>
|
390
|
+
</html>
|