contributions 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. data/.rdoc_options +16 -0
  2. data/Rakefile +19 -0
  3. data/html/Contributions.html +139 -0
  4. data/html/Contributions/Contributions.html +747 -0
  5. data/html/Contributions/Git.html +405 -0
  6. data/html/Contributions/GithubAPI.html +430 -0
  7. data/html/Contributions/RepositoryList.html +389 -0
  8. data/html/Contributions/StringUtils.html +514 -0
  9. data/html/created.rid +9 -0
  10. data/html/images/add.png +0 -0
  11. data/html/images/brick.png +0 -0
  12. data/html/images/brick_link.png +0 -0
  13. data/html/images/bug.png +0 -0
  14. data/html/images/bullet_black.png +0 -0
  15. data/html/images/bullet_toggle_minus.png +0 -0
  16. data/html/images/bullet_toggle_plus.png +0 -0
  17. data/html/images/date.png +0 -0
  18. data/html/images/delete.png +0 -0
  19. data/html/images/find.png +0 -0
  20. data/html/images/loadingAnimation.gif +0 -0
  21. data/html/images/macFFBgHack.png +0 -0
  22. data/html/images/package.png +0 -0
  23. data/html/images/page_green.png +0 -0
  24. data/html/images/page_white_text.png +0 -0
  25. data/html/images/page_white_width.png +0 -0
  26. data/html/images/plugin.png +0 -0
  27. data/html/images/ruby.png +0 -0
  28. data/html/images/tag_blue.png +0 -0
  29. data/html/images/tag_green.png +0 -0
  30. data/html/images/transparent.png +0 -0
  31. data/html/images/wrench.png +0 -0
  32. data/html/images/wrench_orange.png +0 -0
  33. data/html/images/zoom.png +0 -0
  34. data/html/index.html +79 -0
  35. data/html/js/darkfish.js +153 -0
  36. data/html/js/jquery.js +18 -0
  37. data/html/js/navigation.js +142 -0
  38. data/html/js/search.js +94 -0
  39. data/html/js/search_index.js +1 -0
  40. data/html/js/searcher.js +228 -0
  41. data/html/rdoc.css +543 -0
  42. data/html/table_of_contents.html +163 -0
  43. data/lib/contributions/version.rb +1 -1
  44. metadata +49 -8
data/.rdoc_options ADDED
@@ -0,0 +1,16 @@
1
+ --- !ruby/object:RDoc::Options
2
+ encoding: UTF-8
3
+ static_path: []
4
+ rdoc_include:
5
+ - .
6
+ charset: UTF-8
7
+ exclude:
8
+ hyperlink_all: false
9
+ line_numbers: false
10
+ main_page:
11
+ markup: tomdoc
12
+ show_hash: false
13
+ tab_width: 8
14
+ title:
15
+ visibility: :protected
16
+ webcvs:
data/Rakefile CHANGED
@@ -13,4 +13,23 @@ task :test do
13
13
  end
14
14
  end
15
15
 
16
+ require 'rdoc/task'
17
+ RDoc::Task.new do |rdoc|
18
+ rdoc.main = "README.md"
19
+
20
+ rdoc.rdoc_files.include("README.md","lib/**/*.rb")
21
+ end
22
+
23
+ require 'tmpdir'
24
+ require 'fileutils'
25
+ desc "Move documentation into gh-pages"
26
+ task :document do
27
+ Dir.mktmpdir('documentarian') do |dir|
28
+ FileUtils.cp_r('html', dir)
29
+ system "git checkout gh-pages"
30
+ FileUtils.cp_r(dir + '/html', 'html')
31
+ system "git commit -am 'update documentation'"
32
+ end
33
+ end
34
+
16
35
  task :default => :test
@@ -0,0 +1,139 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>module Contributions - RDoc Documentation</title>
8
+
9
+ <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "./";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
21
+
22
+
23
+ <body id="top" class="module">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="./index.html">Home</a>
28
+ <a href="./table_of_contents.html#classes">Classes</a>
29
+ <a href="./table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="file-metadata">
47
+ <nav id="file-list-section" class="section">
48
+ <h3 class="section-header">Defined In</h3>
49
+ <ul>
50
+ <li>lib/contributions/contributions.rb
51
+ <li>lib/contributions/git.rb
52
+ <li>lib/contributions/github_api.rb
53
+ <li>lib/contributions/repository_list.rb
54
+ <li>lib/contributions/string_utils.rb
55
+ <li>lib/contributions/version.rb
56
+ <li>lib/contributions.rb
57
+ </ul>
58
+ </nav>
59
+
60
+
61
+ </div>
62
+
63
+ <div id="class-metadata">
64
+
65
+
66
+
67
+
68
+ </div>
69
+
70
+ <div id="project-metadata">
71
+
72
+ <nav id="classindex-section" class="section project-section">
73
+ <h3 class="section-header">Class and Module Index</h3>
74
+
75
+ <ul class="link-list">
76
+
77
+ <li><a href="./Contributions.html">Contributions</a>
78
+
79
+ <li><a href="./Contributions/Contributions.html">Contributions::Contributions</a>
80
+
81
+ <li><a href="./Contributions/Git.html">Contributions::Git</a>
82
+
83
+ <li><a href="./Contributions/GithubAPI.html">Contributions::GithubAPI</a>
84
+
85
+ <li><a href="./Contributions/RepositoryList.html">Contributions::RepositoryList</a>
86
+
87
+ <li><a href="./Contributions/StringUtils.html">Contributions::StringUtils</a>
88
+
89
+ </ul>
90
+ </nav>
91
+
92
+ </div>
93
+ </nav>
94
+
95
+ <div id="documentation">
96
+ <h1 class="module">module Contributions</h1>
97
+
98
+ <div id="description" class="description">
99
+
100
+ </div><!-- description -->
101
+
102
+
103
+
104
+
105
+ <section id="5Buntitled-5D" class="documentation-section">
106
+
107
+
108
+
109
+
110
+
111
+ <!-- Constants -->
112
+ <section id="constants-list" class="section">
113
+ <h3 class="section-header">Constants</h3>
114
+ <dl>
115
+
116
+ <dt id="VERSION">VERSION
117
+
118
+ <dd class="description">
119
+
120
+
121
+ </dl>
122
+ </section>
123
+
124
+
125
+
126
+
127
+ <!-- Methods -->
128
+
129
+ </section><!-- 5Buntitled-5D -->
130
+
131
+ </div><!-- documentation -->
132
+
133
+
134
+ <footer id="validator-badges">
135
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
136
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
137
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
138
+ </footer>
139
+
@@ -0,0 +1,747 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>class Contributions::Contributions - RDoc Documentation</title>
8
+
9
+ <link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "../";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
21
+
22
+
23
+ <body id="top" class="class">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="../index.html">Home</a>
28
+ <a href="../table_of_contents.html#classes">Classes</a>
29
+ <a href="../table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="file-metadata">
47
+ <nav id="file-list-section" class="section">
48
+ <h3 class="section-header">Defined In</h3>
49
+ <ul>
50
+ <li>lib/contributions/contributions.rb
51
+ </ul>
52
+ </nav>
53
+
54
+
55
+ </div>
56
+
57
+ <div id="class-metadata">
58
+ <nav id="sections-section" class="section">
59
+ <h3 class="section-header">Sections</h3>
60
+ <ul class="link-list">
61
+
62
+ <li><a href="#5Buntitled-5D"></a></li>
63
+
64
+ <li><a href="#Public">Public</a></li>
65
+
66
+ <li><a href="#Internal">Internal</a></li>
67
+
68
+ </ul>
69
+ </nav>
70
+
71
+ <nav id="parent-class-section" class="section">
72
+ <h3 class="section-header">Parent</h3>
73
+
74
+ <p class="link">Object
75
+
76
+ </nav>
77
+
78
+
79
+ <!-- Method Quickref -->
80
+ <nav id="method-list-section" class="section">
81
+ <h3 class="section-header">Methods</h3>
82
+
83
+ <ul class="link-list">
84
+
85
+ <li><a href="#method-c-new">::new</a>
86
+
87
+ <li><a href="#method-i-add">#add</a>
88
+
89
+ <li><a href="#method-i-contributions">#contributions</a>
90
+
91
+ <li><a href="#method-i-contributions-3D">#contributions=</a>
92
+
93
+ <li><a href="#method-i-contributions_as_hash">#contributions_as_hash</a>
94
+
95
+ <li><a href="#method-i-get_contributions">#get_contributions</a>
96
+
97
+ <li><a href="#method-i-load_contributions">#load_contributions</a>
98
+
99
+ <li><a href="#method-i-only">#only</a>
100
+
101
+ <li><a href="#method-i-project_names">#project_names</a>
102
+
103
+ <li><a href="#method-i-remove">#remove</a>
104
+
105
+ <li><a href="#method-i-repositories">#repositories</a>
106
+
107
+ <li><a href="#method-i-repositories-3D">#repositories=</a>
108
+
109
+ <li><a href="#method-i-setup_repositories">#setup_repositories</a>
110
+
111
+ <li><a href="#method-i-update">#update</a>
112
+
113
+ </ul>
114
+ </nav>
115
+
116
+ </div>
117
+
118
+ <div id="project-metadata">
119
+
120
+ <nav id="classindex-section" class="section project-section">
121
+ <h3 class="section-header">Class and Module Index</h3>
122
+
123
+ <ul class="link-list">
124
+
125
+ <li><a href="../Contributions.html">Contributions</a>
126
+
127
+ <li><a href="../Contributions/Contributions.html">Contributions::Contributions</a>
128
+
129
+ <li><a href="../Contributions/Git.html">Contributions::Git</a>
130
+
131
+ <li><a href="../Contributions/GithubAPI.html">Contributions::GithubAPI</a>
132
+
133
+ <li><a href="../Contributions/RepositoryList.html">Contributions::RepositoryList</a>
134
+
135
+ <li><a href="../Contributions/StringUtils.html">Contributions::StringUtils</a>
136
+
137
+ </ul>
138
+ </nav>
139
+
140
+ </div>
141
+ </nav>
142
+
143
+ <div id="documentation">
144
+ <h1 class="class">class Contributions::Contributions</h1>
145
+
146
+ <div id="description" class="description">
147
+
148
+ </div><!-- description -->
149
+
150
+
151
+
152
+
153
+ <section id="5Buntitled-5D" class="documentation-section">
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+ <!-- Methods -->
163
+
164
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
165
+ <h3 class="section-header">Public Class Methods</h3>
166
+
167
+
168
+ <div id="method-c-new" class="method-detail ">
169
+
170
+ <div class="method-heading">
171
+ <span class="method-name">new</span><span
172
+ class="method-args">(opts={})</span>
173
+ <span class="method-click-advice">click to toggle source</span>
174
+ </div>
175
+
176
+
177
+ <div class="method-description">
178
+
179
+ <dl class="rdoc-list note-list"><dt>opts
180
+ <dd>
181
+ <p>a Hash with, at the very least, a username. Optional arguments include
182
+ :remove (to ignore some repository), :add (to add), and :only (to focus).</p>
183
+ </dd></dl>
184
+
185
+
186
+
187
+ <div class="method-source-code" id="new-source">
188
+ <pre><span class="ruby-comment"># File lib/contributions/contributions.rb, line 9</span>
189
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">opts</span>={})
190
+ <span class="ruby-ivar">@username</span> = <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:username</span>)
191
+ <span class="ruby-identifier">setup_repositories</span>(<span class="ruby-identifier">opts</span>)
192
+ <span class="ruby-keyword">end</span></pre>
193
+ </div><!-- new-source -->
194
+
195
+ </div>
196
+
197
+
198
+
199
+
200
+ </div><!-- new-method -->
201
+
202
+
203
+ </section><!-- public-class-method-details -->
204
+
205
+ </section><!-- 5Buntitled-5D -->
206
+
207
+
208
+
209
+ <section id="Public" class="documentation-section">
210
+
211
+ <div class="documentation-section-title">
212
+ <h2 class="section-header">
213
+ Public
214
+ </h2>
215
+ <span class="section-click-top">
216
+ <a href="#top">&uarr; top</a>
217
+ </span>
218
+ </div>
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+ <!-- Methods -->
228
+
229
+ <section id="public-instance-Public-method-details" class="method-section section">
230
+ <h3 class="section-header">Public Instance Methods</h3>
231
+
232
+
233
+ <div id="method-i-add" class="method-detail ">
234
+
235
+ <div class="method-heading">
236
+ <span class="method-name">add</span><span
237
+ class="method-args">(repos)</span>
238
+ <span class="method-click-advice">click to toggle source</span>
239
+ </div>
240
+
241
+
242
+ <div class="method-description">
243
+
244
+ <p>Add a repository (or array of repositories).</p>
245
+ <dl class="rdoc-list note-list"><dt>repos
246
+ <dd>
247
+ <p>a ‘username/repository’ String or Array of such strings.</p>
248
+ </dd></dl>
249
+
250
+ <p>Returns the updated array of repositories.</p>
251
+
252
+
253
+
254
+ <div class="method-source-code" id="add-source">
255
+ <pre><span class="ruby-comment"># File lib/contributions/contributions.rb, line 19</span>
256
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">repos</span>)
257
+ <span class="ruby-ivar">@repositories</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">repos</span>)
258
+
259
+ <span class="ruby-identifier">repositories</span>
260
+ <span class="ruby-keyword">end</span></pre>
261
+ </div><!-- add-source -->
262
+
263
+ </div>
264
+
265
+
266
+
267
+
268
+ </div><!-- add-method -->
269
+
270
+
271
+ <div id="method-i-contributions_as_hash" class="method-detail ">
272
+
273
+ <div class="method-heading">
274
+ <span class="method-name">contributions_as_hash</span><span
275
+ class="method-args">()</span>
276
+ <span class="method-click-advice">click to toggle source</span>
277
+ </div>
278
+
279
+
280
+ <div class="method-description">
281
+
282
+ <p>Return a user’s OSS contributions as a hash. If the hash hasn’t already
283
+ been determined, the contributions are all looked up and stashed in an
284
+ ivar: @contributions. If @contributions already exists, it is returned
285
+ without the costly lookup being performed.</p>
286
+
287
+ <p>Returns a Hash.</p>
288
+
289
+
290
+
291
+ <div class="method-source-code" id="contributions_as_hash-source">
292
+ <pre><span class="ruby-comment"># File lib/contributions/contributions.rb, line 32</span>
293
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">contributions_as_hash</span>
294
+ <span class="ruby-identifier">load_contributions</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@contributions</span>
295
+ <span class="ruby-ivar">@contributions</span>
296
+ <span class="ruby-keyword">end</span></pre>
297
+ </div><!-- contributions_as_hash-source -->
298
+
299
+ </div>
300
+
301
+
302
+
303
+
304
+ </div><!-- contributions_as_hash-method -->
305
+
306
+
307
+ <div id="method-i-load_contributions" class="method-detail ">
308
+
309
+ <div class="method-heading">
310
+ <span class="method-name">load_contributions</span><span
311
+ class="method-args">()</span>
312
+ <span class="method-click-advice">click to toggle source</span>
313
+ </div>
314
+
315
+
316
+ <div class="method-description">
317
+
318
+ <p>Determine a user’s contributions and load the @contributions ivar.</p>
319
+
320
+ <p>Returns a Hash.</p>
321
+
322
+
323
+
324
+ <div class="method-source-code" id="load_contributions-source">
325
+ <pre><span class="ruby-comment"># File lib/contributions/contributions.rb, line 41</span>
326
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">load_contributions</span>
327
+ <span class="ruby-ivar">@contributions</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
328
+ <span class="ruby-identifier">repositories</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
329
+ <span class="ruby-identifier">conts</span> = <span class="ruby-identifier">get_contributions</span>(<span class="ruby-identifier">f</span>)
330
+ <span class="ruby-ivar">@contributions</span>[<span class="ruby-identifier">f</span>] = <span class="ruby-identifier">conts</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">conts</span>.<span class="ruby-identifier">empty?</span>
331
+ <span class="ruby-keyword">end</span>
332
+
333
+ <span class="ruby-ivar">@contributions</span>
334
+ <span class="ruby-keyword">end</span></pre>
335
+ </div><!-- load_contributions-source -->
336
+
337
+ </div>
338
+
339
+
340
+
341
+
342
+ </div><!-- load_contributions-method -->
343
+
344
+
345
+ <div id="method-i-only" class="method-detail ">
346
+
347
+ <div class="method-heading">
348
+ <span class="method-name">only</span><span
349
+ class="method-args">(repos)</span>
350
+ <span class="method-click-advice">click to toggle source</span>
351
+ </div>
352
+
353
+
354
+ <div class="method-description">
355
+
356
+ <p>Replace the user’s forked repositories with the specified repositories.</p>
357
+ <dl class="rdoc-list note-list"><dt>repos
358
+ <dd>
359
+ <p>a ‘username/repository_name’ string, or an array of such strings.</p>
360
+ </dd></dl>
361
+
362
+ <p>Returns the updated array of repositories.</p>
363
+
364
+
365
+
366
+ <div class="method-source-code" id="only-source">
367
+ <pre><span class="ruby-comment"># File lib/contributions/contributions.rb, line 58</span>
368
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">only</span>(<span class="ruby-identifier">repos</span>)
369
+ <span class="ruby-ivar">@repositories</span>.<span class="ruby-identifier">only</span> <span class="ruby-identifier">repos</span>
370
+
371
+ <span class="ruby-identifier">repositories</span>
372
+ <span class="ruby-keyword">end</span></pre>
373
+ </div><!-- only-source -->
374
+
375
+ </div>
376
+
377
+
378
+
379
+
380
+ </div><!-- only-method -->
381
+
382
+
383
+ <div id="method-i-project_names" class="method-detail ">
384
+
385
+ <div class="method-heading">
386
+ <span class="method-name">project_names</span><span
387
+ class="method-args">()</span>
388
+ <span class="method-click-advice">click to toggle source</span>
389
+ </div>
390
+
391
+
392
+ <div class="method-description">
393
+
394
+ <p>Provide the names for all the forked projects.</p>
395
+
396
+ <p>Example:</p>
397
+
398
+ <pre class="ruby"><span class="ruby-identifier">user</span>.<span class="ruby-identifier">repositories</span>
399
+ <span class="ruby-comment"># =&gt; ['r/r', 's/s']</span>
400
+ <span class="ruby-identifier">user</span>.<span class="ruby-identifier">project_names</span>
401
+ <span class="ruby-comment"># =&gt; ['r', 's']</span>
402
+ </pre>
403
+
404
+ <p>Returns an Array.</p>
405
+
406
+
407
+
408
+ <div class="method-source-code" id="project_names-source">
409
+ <pre><span class="ruby-comment"># File lib/contributions/contributions.rb, line 74</span>
410
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">project_names</span>
411
+ <span class="ruby-identifier">repositories</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp">%r[^\/]*$/</span>)[<span class="ruby-value">0</span>] }
412
+ <span class="ruby-keyword">end</span></pre>
413
+ </div><!-- project_names-source -->
414
+
415
+ </div>
416
+
417
+
418
+
419
+
420
+ </div><!-- project_names-method -->
421
+
422
+
423
+ <div id="method-i-remove" class="method-detail ">
424
+
425
+ <div class="method-heading">
426
+ <span class="method-name">remove</span><span
427
+ class="method-args">(repos)</span>
428
+ <span class="method-click-advice">click to toggle source</span>
429
+ </div>
430
+
431
+
432
+ <div class="method-description">
433
+
434
+ <p>Remove a repository (or array of repositories).</p>
435
+ <dl class="rdoc-list note-list"><dt>repos
436
+ <dd>
437
+ <p>a ‘username/repository’ String or Array of such strings.</p>
438
+ </dd></dl>
439
+
440
+ <p>Returns the updated array of repositories.</p>
441
+
442
+
443
+
444
+ <div class="method-source-code" id="remove-source">
445
+ <pre><span class="ruby-comment"># File lib/contributions/contributions.rb, line 83</span>
446
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">remove</span>(<span class="ruby-identifier">repos</span>)
447
+ <span class="ruby-ivar">@repositories</span>.<span class="ruby-identifier">remove</span>(<span class="ruby-identifier">repos</span>)
448
+
449
+ <span class="ruby-identifier">repositories</span>
450
+ <span class="ruby-keyword">end</span></pre>
451
+ </div><!-- remove-source -->
452
+
453
+ </div>
454
+
455
+
456
+
457
+
458
+ </div><!-- remove-method -->
459
+
460
+
461
+ <div id="method-i-repositories" class="method-detail ">
462
+
463
+ <div class="method-heading">
464
+ <span class="method-name">repositories</span><span
465
+ class="method-args">()</span>
466
+ <span class="method-click-advice">click to toggle source</span>
467
+ </div>
468
+
469
+
470
+ <div class="method-description">
471
+
472
+ <p>Accessor method for the @repositories ivar.</p>
473
+
474
+ <p>Returns an Array of ‘username/repository_name’ strings.</p>
475
+
476
+
477
+
478
+ <div class="method-source-code" id="repositories-source">
479
+ <pre><span class="ruby-comment"># File lib/contributions/contributions.rb, line 101</span>
480
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">repositories</span>
481
+ <span class="ruby-ivar">@repositories</span>.<span class="ruby-identifier">list</span>
482
+ <span class="ruby-keyword">end</span></pre>
483
+ </div><!-- repositories-source -->
484
+
485
+ </div>
486
+
487
+
488
+
489
+
490
+ </div><!-- repositories-method -->
491
+
492
+
493
+ <div id="method-i-repositories-3D" class="method-detail ">
494
+
495
+ <div class="method-heading">
496
+ <span class="method-name">repositories=</span><span
497
+ class="method-args">(array)</span>
498
+ <span class="method-click-advice">click to toggle source</span>
499
+ </div>
500
+
501
+
502
+ <div class="method-description">
503
+
504
+ <p>Accessor method for the @repositories ivar.</p>
505
+ <dl class="rdoc-list note-list"><dt>array
506
+ <dd>
507
+ <p>an array of ‘username/repository_name’ strings.</p>
508
+ </dd></dl>
509
+
510
+ <p>Returns nothing.</p>
511
+
512
+
513
+
514
+ <div class="method-source-code" id="repositories-3D-source">
515
+ <pre><span class="ruby-comment"># File lib/contributions/contributions.rb, line 94</span>
516
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">repositories=</span>(<span class="ruby-identifier">array</span>)
517
+ <span class="ruby-ivar">@repositories</span> = <span class="ruby-constant">RepositoryList</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">array</span>)
518
+ <span class="ruby-keyword">end</span></pre>
519
+ </div><!-- repositories-3D-source -->
520
+
521
+ </div>
522
+
523
+
524
+
525
+
526
+ </div><!-- repositories-3D-method -->
527
+
528
+
529
+ </section><!-- public-instance-method-details -->
530
+
531
+ </section><!-- Public -->
532
+
533
+
534
+
535
+ <section id="Internal" class="documentation-section">
536
+
537
+ <div class="documentation-section-title">
538
+ <h2 class="section-header">
539
+ Internal
540
+ </h2>
541
+ <span class="section-click-top">
542
+ <a href="#top">&uarr; top</a>
543
+ </span>
544
+ </div>
545
+
546
+
547
+
548
+
549
+
550
+
551
+
552
+
553
+ <!-- Methods -->
554
+
555
+ <section id="public-instance-Internal-method-details" class="method-section section">
556
+ <h3 class="section-header">Public Instance Methods</h3>
557
+
558
+
559
+ <div id="method-i-contributions" class="method-detail ">
560
+
561
+ <div class="method-heading">
562
+ <span class="method-name">contributions</span><span
563
+ class="method-args">()</span>
564
+ <span class="method-click-advice">click to toggle source</span>
565
+ </div>
566
+
567
+
568
+ <div class="method-description">
569
+
570
+ <p>attr_reader for @contributions. This method really only exists for
571
+ testing.</p>
572
+
573
+ <p>Returns a Hash.</p>
574
+
575
+
576
+
577
+ <div class="method-source-code" id="contributions-source">
578
+ <pre><span class="ruby-comment"># File lib/contributions/contributions.rb, line 119</span>
579
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">contributions</span>
580
+ <span class="ruby-ivar">@contributions</span>
581
+ <span class="ruby-keyword">end</span></pre>
582
+ </div><!-- contributions-source -->
583
+
584
+ </div>
585
+
586
+
587
+
588
+
589
+ </div><!-- contributions-method -->
590
+
591
+
592
+ <div id="method-i-contributions-3D" class="method-detail ">
593
+
594
+ <div class="method-heading">
595
+ <span class="method-name">contributions=</span><span
596
+ class="method-args">(hash)</span>
597
+ <span class="method-click-advice">click to toggle source</span>
598
+ </div>
599
+
600
+
601
+ <div class="method-description">
602
+
603
+ <p>attr_accessor for @contributions. This method really only exists for
604
+ testing.</p>
605
+ <dl class="rdoc-list note-list"><dt>hash
606
+ <dd>
607
+ <p>a hash.</p>
608
+ </dd></dl>
609
+
610
+ <p>Returns a Hash.</p>
611
+
612
+
613
+
614
+ <div class="method-source-code" id="contributions-3D-source">
615
+ <pre><span class="ruby-comment"># File lib/contributions/contributions.rb, line 111</span>
616
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">contributions=</span>(<span class="ruby-identifier">hash</span>)
617
+ <span class="ruby-ivar">@contributions</span> = <span class="ruby-identifier">hash</span>
618
+ <span class="ruby-keyword">end</span></pre>
619
+ </div><!-- contributions-3D-source -->
620
+
621
+ </div>
622
+
623
+
624
+
625
+
626
+ </div><!-- contributions-3D-method -->
627
+
628
+
629
+ <div id="method-i-get_contributions" class="method-detail ">
630
+
631
+ <div class="method-heading">
632
+ <span class="method-name">get_contributions</span><span
633
+ class="method-args">(repository)</span>
634
+ <span class="method-click-advice">click to toggle source</span>
635
+ </div>
636
+
637
+
638
+ <div class="method-description">
639
+
640
+ <p>Get the user’s contributions to the repository.</p>
641
+
642
+ <p>Returns a Hash.</p>
643
+
644
+
645
+
646
+ <div class="method-source-code" id="get_contributions-source">
647
+ <pre><span class="ruby-comment"># File lib/contributions/contributions.rb, line 137</span>
648
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_contributions</span>(<span class="ruby-identifier">repository</span>)
649
+ <span class="ruby-constant">Git</span>.<span class="ruby-identifier">contributions</span> <span class="ruby-constant">GithubAPI</span>.<span class="ruby-identifier">name</span>(<span class="ruby-ivar">@username</span>), <span class="ruby-identifier">repository</span>
650
+ <span class="ruby-keyword">end</span></pre>
651
+ </div><!-- get_contributions-source -->
652
+
653
+ </div>
654
+
655
+
656
+
657
+
658
+ </div><!-- get_contributions-method -->
659
+
660
+
661
+ <div id="method-i-setup_repositories" class="method-detail ">
662
+
663
+ <div class="method-heading">
664
+ <span class="method-name">setup_repositories</span><span
665
+ class="method-args">(opts)</span>
666
+ <span class="method-click-advice">click to toggle source</span>
667
+ </div>
668
+
669
+
670
+ <div class="method-description">
671
+
672
+ <p>Generate an array of forked repositories for the user. This array is set as
673
+ the @repositories variable.</p>
674
+ <dl class="rdoc-list note-list"><dt>opts
675
+ <dd>
676
+ <p>an array with, possible, keys for :only, :remove, and :add.</p>
677
+ </dd></dl>
678
+
679
+ <p>Returns an Array of repositories.</p>
680
+
681
+
682
+
683
+ <div class="method-source-code" id="setup_repositories-source">
684
+ <pre><span class="ruby-comment"># File lib/contributions/contributions.rb, line 129</span>
685
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">setup_repositories</span>(<span class="ruby-identifier">opts</span>)
686
+ <span class="ruby-ivar">@repositories</span> = <span class="ruby-constant">RepositoryList</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">GithubAPI</span>.<span class="ruby-identifier">forks</span>(<span class="ruby-ivar">@username</span>))
687
+ <span class="ruby-identifier">update</span>(<span class="ruby-identifier">opts</span>)
688
+ <span class="ruby-keyword">end</span></pre>
689
+ </div><!-- setup_repositories-source -->
690
+
691
+ </div>
692
+
693
+
694
+
695
+
696
+ </div><!-- setup_repositories-method -->
697
+
698
+
699
+ <div id="method-i-update" class="method-detail ">
700
+
701
+ <div class="method-heading">
702
+ <span class="method-name">update</span><span
703
+ class="method-args">(opts)</span>
704
+ <span class="method-click-advice">click to toggle source</span>
705
+ </div>
706
+
707
+
708
+ <div class="method-description">
709
+
710
+ <p>Combine the user’s explicit preferences with an array of forks.</p>
711
+
712
+ <p>Returns an Array.</p>
713
+
714
+
715
+
716
+ <div class="method-source-code" id="update-source">
717
+ <pre><span class="ruby-comment"># File lib/contributions/contributions.rb, line 145</span>
718
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">update</span>(<span class="ruby-identifier">opts</span>)
719
+ <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">each_pair</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
720
+ <span class="ruby-ivar">@repositories</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span>, <span class="ruby-identifier">v</span>)
721
+ <span class="ruby-keyword">end</span>
722
+
723
+ <span class="ruby-identifier">repositories</span>
724
+ <span class="ruby-keyword">end</span></pre>
725
+ </div><!-- update-source -->
726
+
727
+ </div>
728
+
729
+
730
+
731
+
732
+ </div><!-- update-method -->
733
+
734
+
735
+ </section><!-- public-instance-method-details -->
736
+
737
+ </section><!-- Internal -->
738
+
739
+ </div><!-- documentation -->
740
+
741
+
742
+ <footer id="validator-badges">
743
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
744
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
745
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
746
+ </footer>
747
+