github_api_v3 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/github_api_v3/client.rb +4 -0
- data/lib/github_api_v3/client/issues.rb +151 -0
- data/lib/github_api_v3/client/orgs.rb +2 -2
- data/lib/github_api_v3/client/pull_requests.rb +1 -1
- data/lib/github_api_v3/client/stats.rb +74 -0
- data/lib/github_api_v3/version.rb +1 -1
- data/spec/cassettes/GitHub_Client_Issues/_create_issue/creates_the_issue.json +1 -0
- data/spec/cassettes/GitHub_Client_Issues/_create_issue/returns_the_correct_information.json +1 -0
- data/spec/cassettes/GitHub_Client_Issues/_create_issue/returns_the_issue_information.json +1 -0
- data/spec/cassettes/GitHub_Client_Issues/_edit_issue/returns_the_issue_information.json +1 -0
- data/spec/cassettes/GitHub_Client_Issues/_edit_issue/updates_the_issue.json +1 -0
- data/spec/cassettes/GitHub_Client_Issues/_issue/returns_the_correct_information.json +1 -0
- data/spec/cassettes/GitHub_Client_Issues/_issue/returns_the_issue_information.json +1 -0
- data/spec/cassettes/GitHub_Client_Issues/_issues/returns_an_array_of_issues.json +1 -0
- data/spec/cassettes/GitHub_Client_Issues/_issues/returns_the_correct_information.json +1 -0
- data/spec/cassettes/GitHub_Client_Issues/_org_issues/returns_an_array_of_issues.json +1 -0
- data/spec/cassettes/GitHub_Client_Issues/_org_issues/returns_the_correct_information.json +1 -0
- data/spec/cassettes/GitHub_Client_Issues/_repo_issues/returns_an_array_of_issues.json +1 -0
- data/spec/cassettes/GitHub_Client_Issues/_repo_issues/returns_the_correct_information.json +1 -0
- data/spec/cassettes/GitHub_Client_Issues/_user_issues/returns_an_array_of_issues.json +1 -0
- data/spec/cassettes/GitHub_Client_Issues/_user_issues/returns_the_correct_information.json +1 -0
- data/spec/cassettes/GitHub_Client_Stats/_code_frequency/returns_an_array_of_additions_and_deletions.json +1 -0
- data/spec/cassettes/GitHub_Client_Stats/_commit_activity/returns_an_array_of_commit_info.json +1 -0
- data/spec/cassettes/GitHub_Client_Stats/_contributors_list/returns_a_list_of_contributors.json +1 -0
- data/spec/cassettes/GitHub_Client_Stats/_participation/returns_a_hash_of_information.json +1 -0
- data/spec/cassettes/GitHub_Client_Stats/_punch_card/returns_an_array_of_data.json +1 -0
- data/spec/github_api_v3/client/issues_spec.rb +96 -0
- data/spec/github_api_v3/client/stats_spec.rb +43 -0
- 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.
|
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-
|
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
|