github_api_v3 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/github_api_v3/client.rb +4 -0
  4. data/lib/github_api_v3/client/issues.rb +151 -0
  5. data/lib/github_api_v3/client/orgs.rb +2 -2
  6. data/lib/github_api_v3/client/pull_requests.rb +1 -1
  7. data/lib/github_api_v3/client/stats.rb +74 -0
  8. data/lib/github_api_v3/version.rb +1 -1
  9. data/spec/cassettes/GitHub_Client_Issues/_create_issue/creates_the_issue.json +1 -0
  10. data/spec/cassettes/GitHub_Client_Issues/_create_issue/returns_the_correct_information.json +1 -0
  11. data/spec/cassettes/GitHub_Client_Issues/_create_issue/returns_the_issue_information.json +1 -0
  12. data/spec/cassettes/GitHub_Client_Issues/_edit_issue/returns_the_issue_information.json +1 -0
  13. data/spec/cassettes/GitHub_Client_Issues/_edit_issue/updates_the_issue.json +1 -0
  14. data/spec/cassettes/GitHub_Client_Issues/_issue/returns_the_correct_information.json +1 -0
  15. data/spec/cassettes/GitHub_Client_Issues/_issue/returns_the_issue_information.json +1 -0
  16. data/spec/cassettes/GitHub_Client_Issues/_issues/returns_an_array_of_issues.json +1 -0
  17. data/spec/cassettes/GitHub_Client_Issues/_issues/returns_the_correct_information.json +1 -0
  18. data/spec/cassettes/GitHub_Client_Issues/_org_issues/returns_an_array_of_issues.json +1 -0
  19. data/spec/cassettes/GitHub_Client_Issues/_org_issues/returns_the_correct_information.json +1 -0
  20. data/spec/cassettes/GitHub_Client_Issues/_repo_issues/returns_an_array_of_issues.json +1 -0
  21. data/spec/cassettes/GitHub_Client_Issues/_repo_issues/returns_the_correct_information.json +1 -0
  22. data/spec/cassettes/GitHub_Client_Issues/_user_issues/returns_an_array_of_issues.json +1 -0
  23. data/spec/cassettes/GitHub_Client_Issues/_user_issues/returns_the_correct_information.json +1 -0
  24. data/spec/cassettes/GitHub_Client_Stats/_code_frequency/returns_an_array_of_additions_and_deletions.json +1 -0
  25. data/spec/cassettes/GitHub_Client_Stats/_commit_activity/returns_an_array_of_commit_info.json +1 -0
  26. data/spec/cassettes/GitHub_Client_Stats/_contributors_list/returns_a_list_of_contributors.json +1 -0
  27. data/spec/cassettes/GitHub_Client_Stats/_participation/returns_a_hash_of_information.json +1 -0
  28. data/spec/cassettes/GitHub_Client_Stats/_punch_card/returns_an_array_of_data.json +1 -0
  29. data/spec/github_api_v3/client/issues_spec.rb +96 -0
  30. data/spec/github_api_v3/client/stats_spec.rb +43 -0
  31. metadata +48 -2
@@ -0,0 +1,43 @@
1
+ require 'spec_helper'
2
+
3
+ describe GitHub::Client::Stats do
4
+
5
+ describe '.contributors_list', :vcr do
6
+ it 'returns a list of contributors' do
7
+ list = GitHub.contributors_list('ruby','ruby')
8
+ list.should be_instance_of Array
9
+ list.length.should == 31
10
+ end
11
+ end
12
+
13
+ describe '.commit_activity', :vcr do
14
+ it 'returns an array of commit info' do
15
+ data = GitHub.commit_activity('caseyscarborough','github')
16
+ data.should be_instance_of Array
17
+ data.length.should == 52
18
+ end
19
+ end
20
+
21
+ describe '.code_frequency', :vcr do
22
+ it 'returns an array of additions and deletions' do
23
+ data = GitHub.code_frequency('caseyscarborough','github')
24
+ data.should be_instance_of Array
25
+ end
26
+ end
27
+
28
+ describe '.participation', :vcr do
29
+ it 'returns a hash of information' do
30
+ data = GitHub.participation('caseyscarborough','github')
31
+ data.should be_instance_of Hash
32
+ data.owner.should be_instance_of Array
33
+ end
34
+ end
35
+
36
+ describe '.punch_card', :vcr do
37
+ it 'returns an array of data' do
38
+ data = GitHub.punch_card('caseyscarborough','github')
39
+ data.should be_instance_of Array
40
+ end
41
+ end
42
+
43
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github_api_v3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Casey Scarborough
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-20 00:00:00.000000000 Z
11
+ date: 2013-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -114,10 +114,12 @@ files:
114
114
  - lib/github_api_v3/client/feeds.rb
115
115
  - lib/github_api_v3/client/gists.rb
116
116
  - lib/github_api_v3/client/gitignore.rb
117
+ - lib/github_api_v3/client/issues.rb
117
118
  - lib/github_api_v3/client/markdown.rb
118
119
  - lib/github_api_v3/client/orgs.rb
119
120
  - lib/github_api_v3/client/pull_requests.rb
120
121
  - lib/github_api_v3/client/repos.rb
122
+ - lib/github_api_v3/client/stats.rb
121
123
  - lib/github_api_v3/client/users.rb
122
124
  - lib/github_api_v3/default.rb
123
125
  - lib/github_api_v3/error.rb
@@ -161,6 +163,21 @@ files:
161
163
  - spec/cassettes/GitHub_Client_Gitignore/_gitignore/returns_a_hash.json
162
164
  - spec/cassettes/GitHub_Client_Gitignore/_gitignore/returns_the_correct_template.json
163
165
  - spec/cassettes/GitHub_Client_Gitignore/_gitignore_list/returns_an_array_of_templates.json
166
+ - spec/cassettes/GitHub_Client_Issues/_create_issue/creates_the_issue.json
167
+ - spec/cassettes/GitHub_Client_Issues/_create_issue/returns_the_correct_information.json
168
+ - spec/cassettes/GitHub_Client_Issues/_create_issue/returns_the_issue_information.json
169
+ - spec/cassettes/GitHub_Client_Issues/_edit_issue/returns_the_issue_information.json
170
+ - spec/cassettes/GitHub_Client_Issues/_edit_issue/updates_the_issue.json
171
+ - spec/cassettes/GitHub_Client_Issues/_issue/returns_the_correct_information.json
172
+ - spec/cassettes/GitHub_Client_Issues/_issue/returns_the_issue_information.json
173
+ - spec/cassettes/GitHub_Client_Issues/_issues/returns_an_array_of_issues.json
174
+ - spec/cassettes/GitHub_Client_Issues/_issues/returns_the_correct_information.json
175
+ - spec/cassettes/GitHub_Client_Issues/_org_issues/returns_an_array_of_issues.json
176
+ - spec/cassettes/GitHub_Client_Issues/_org_issues/returns_the_correct_information.json
177
+ - spec/cassettes/GitHub_Client_Issues/_repo_issues/returns_an_array_of_issues.json
178
+ - spec/cassettes/GitHub_Client_Issues/_repo_issues/returns_the_correct_information.json
179
+ - spec/cassettes/GitHub_Client_Issues/_user_issues/returns_an_array_of_issues.json
180
+ - spec/cassettes/GitHub_Client_Issues/_user_issues/returns_the_correct_information.json
164
181
  - spec/cassettes/GitHub_Client_Markdown/_markdown/returns_rendered_markdown.json
165
182
  - spec/cassettes/GitHub_Client_Orgs/_add_team_member/adds_a_team_member.json
166
183
  - spec/cassettes/GitHub_Client_Orgs/_add_team_repo/adds_a_team_repo.json
@@ -235,6 +252,11 @@ files:
235
252
  - spec/cassettes/GitHub_Client_Repos/_unstar/unstars_a_repository.json
236
253
  - spec/cassettes/GitHub_Client_Repos/_unsubscribe/unsubscribes_to_a_repository.json
237
254
  - spec/cassettes/GitHub_Client_Repos/_watchers/returns_a_list_of_watchers.json
255
+ - spec/cassettes/GitHub_Client_Stats/_code_frequency/returns_an_array_of_additions_and_deletions.json
256
+ - spec/cassettes/GitHub_Client_Stats/_commit_activity/returns_an_array_of_commit_info.json
257
+ - spec/cassettes/GitHub_Client_Stats/_contributors_list/returns_a_list_of_contributors.json
258
+ - spec/cassettes/GitHub_Client_Stats/_participation/returns_a_hash_of_information.json
259
+ - spec/cassettes/GitHub_Client_Stats/_punch_card/returns_an_array_of_data.json
238
260
  - spec/cassettes/GitHub_Client_Users/_create_key/returns_the_key_information.json
239
261
  - spec/cassettes/GitHub_Client_Users/_delete_key/returns_true_or_false.json
240
262
  - spec/cassettes/GitHub_Client_Users/_delete_key/should_delete_the_key.json
@@ -273,10 +295,12 @@ files:
273
295
  - spec/github_api_v3/client/feeds_spec.rb
274
296
  - spec/github_api_v3/client/gists_spec.rb
275
297
  - spec/github_api_v3/client/gitignore_spec.rb
298
+ - spec/github_api_v3/client/issues_spec.rb
276
299
  - spec/github_api_v3/client/markdown_spec.rb
277
300
  - spec/github_api_v3/client/orgs_spec.rb
278
301
  - spec/github_api_v3/client/pull_requests_spec.rb
279
302
  - spec/github_api_v3/client/repos_spec.rb
303
+ - spec/github_api_v3/client/stats_spec.rb
280
304
  - spec/github_api_v3/client/users_spec.rb
281
305
  - spec/github_api_v3/client_spec.rb
282
306
  - spec/spec_helper.rb
@@ -344,6 +368,21 @@ test_files:
344
368
  - spec/cassettes/GitHub_Client_Gitignore/_gitignore/returns_a_hash.json
345
369
  - spec/cassettes/GitHub_Client_Gitignore/_gitignore/returns_the_correct_template.json
346
370
  - spec/cassettes/GitHub_Client_Gitignore/_gitignore_list/returns_an_array_of_templates.json
371
+ - spec/cassettes/GitHub_Client_Issues/_create_issue/creates_the_issue.json
372
+ - spec/cassettes/GitHub_Client_Issues/_create_issue/returns_the_correct_information.json
373
+ - spec/cassettes/GitHub_Client_Issues/_create_issue/returns_the_issue_information.json
374
+ - spec/cassettes/GitHub_Client_Issues/_edit_issue/returns_the_issue_information.json
375
+ - spec/cassettes/GitHub_Client_Issues/_edit_issue/updates_the_issue.json
376
+ - spec/cassettes/GitHub_Client_Issues/_issue/returns_the_correct_information.json
377
+ - spec/cassettes/GitHub_Client_Issues/_issue/returns_the_issue_information.json
378
+ - spec/cassettes/GitHub_Client_Issues/_issues/returns_an_array_of_issues.json
379
+ - spec/cassettes/GitHub_Client_Issues/_issues/returns_the_correct_information.json
380
+ - spec/cassettes/GitHub_Client_Issues/_org_issues/returns_an_array_of_issues.json
381
+ - spec/cassettes/GitHub_Client_Issues/_org_issues/returns_the_correct_information.json
382
+ - spec/cassettes/GitHub_Client_Issues/_repo_issues/returns_an_array_of_issues.json
383
+ - spec/cassettes/GitHub_Client_Issues/_repo_issues/returns_the_correct_information.json
384
+ - spec/cassettes/GitHub_Client_Issues/_user_issues/returns_an_array_of_issues.json
385
+ - spec/cassettes/GitHub_Client_Issues/_user_issues/returns_the_correct_information.json
347
386
  - spec/cassettes/GitHub_Client_Markdown/_markdown/returns_rendered_markdown.json
348
387
  - spec/cassettes/GitHub_Client_Orgs/_add_team_member/adds_a_team_member.json
349
388
  - spec/cassettes/GitHub_Client_Orgs/_add_team_repo/adds_a_team_repo.json
@@ -418,6 +457,11 @@ test_files:
418
457
  - spec/cassettes/GitHub_Client_Repos/_unstar/unstars_a_repository.json
419
458
  - spec/cassettes/GitHub_Client_Repos/_unsubscribe/unsubscribes_to_a_repository.json
420
459
  - spec/cassettes/GitHub_Client_Repos/_watchers/returns_a_list_of_watchers.json
460
+ - spec/cassettes/GitHub_Client_Stats/_code_frequency/returns_an_array_of_additions_and_deletions.json
461
+ - spec/cassettes/GitHub_Client_Stats/_commit_activity/returns_an_array_of_commit_info.json
462
+ - spec/cassettes/GitHub_Client_Stats/_contributors_list/returns_a_list_of_contributors.json
463
+ - spec/cassettes/GitHub_Client_Stats/_participation/returns_a_hash_of_information.json
464
+ - spec/cassettes/GitHub_Client_Stats/_punch_card/returns_an_array_of_data.json
421
465
  - spec/cassettes/GitHub_Client_Users/_create_key/returns_the_key_information.json
422
466
  - spec/cassettes/GitHub_Client_Users/_delete_key/returns_true_or_false.json
423
467
  - spec/cassettes/GitHub_Client_Users/_delete_key/should_delete_the_key.json
@@ -456,10 +500,12 @@ test_files:
456
500
  - spec/github_api_v3/client/feeds_spec.rb
457
501
  - spec/github_api_v3/client/gists_spec.rb
458
502
  - spec/github_api_v3/client/gitignore_spec.rb
503
+ - spec/github_api_v3/client/issues_spec.rb
459
504
  - spec/github_api_v3/client/markdown_spec.rb
460
505
  - spec/github_api_v3/client/orgs_spec.rb
461
506
  - spec/github_api_v3/client/pull_requests_spec.rb
462
507
  - spec/github_api_v3/client/repos_spec.rb
508
+ - spec/github_api_v3/client/stats_spec.rb
463
509
  - spec/github_api_v3/client/users_spec.rb
464
510
  - spec/github_api_v3/client_spec.rb
465
511
  - spec/spec_helper.rb