github_api_v3 0.2.0 → 0.2.1
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/lib/github_api_v3/client/gists.rb +15 -0
- data/lib/github_api_v3/client/repos.rb +24 -0
- data/lib/github_api_v3/client/users.rb +29 -0
- data/lib/github_api_v3/version.rb +1 -1
- data/spec/cassettes/GitHub_Client_Gists/_create_gist/creates_a_gist.json +1 -0
- data/spec/cassettes/GitHub_Client_Gists/_create_gist_comment/creates_the_comment.json +1 -1
- data/spec/cassettes/GitHub_Client_Gists/_create_gist_comment/returns_comment_information_after_creation.json +1 -1
- data/spec/cassettes/GitHub_Client_Gists/_delete_gist/deletes_a_gist.json +1 -0
- data/spec/cassettes/GitHub_Client_Gists/_delete_gist_comment/deletes_the_comment.json +1 -1
- data/spec/cassettes/GitHub_Client_Gists/_delete_gist_comment/returns_true_or_false.json +1 -1
- data/spec/cassettes/GitHub_Client_Gists/_edit_gist/edits_a_gist.json +1 -0
- data/spec/cassettes/GitHub_Client_Gists/_edit_gist_comment/edits_the_comment.json +1 -1
- data/spec/cassettes/GitHub_Client_Gists/_edit_gist_comment/returns_comment_information_after_editing.json +1 -1
- data/spec/cassettes/GitHub_Client_Gists/_fork_gist/forks_a_gist.json +1 -1
- data/spec/cassettes/GitHub_Client_Gists/_fork_gist/returns_false_when_not_found.json +1 -1
- data/spec/cassettes/GitHub_Client_Gists/_gist/returns_a_404_when_not_found.json +1 -1
- data/spec/cassettes/GitHub_Client_Gists/_gist/returns_gist_information.json +1 -1
- data/spec/cassettes/GitHub_Client_Gists/_gist_comment/returns_a_404_when_not_found.json +1 -1
- data/spec/cassettes/GitHub_Client_Gists/_gist_comment/returns_a_comment.json +1 -1
- data/spec/cassettes/GitHub_Client_Gists/_gist_comments/returns_a_404_when_not_found.json +1 -1
- data/spec/cassettes/GitHub_Client_Gists/_gist_comments/returns_a_list_of_comments.json +1 -1
- data/spec/cassettes/GitHub_Client_Gists/_gist_starred_/returns_false_when_not_found.json +1 -1
- data/spec/cassettes/GitHub_Client_Gists/_gist_starred_/should_return_true_or_false.json +1 -1
- data/spec/cassettes/GitHub_Client_Gists/_gists/returns_an_array_of_gists.json +1 -1
- data/spec/cassettes/GitHub_Client_Gists/_gists/returns_an_array_of_gists_for_authenticated_user.json +1 -1
- data/spec/cassettes/GitHub_Client_Gists/_gists/returns_public_gists_for_unauthenticated_user.json +1 -1
- data/spec/cassettes/GitHub_Client_Gists/_star_gist/returns_false_when_not_found.json +1 -1
- data/spec/cassettes/GitHub_Client_Gists/_star_gist/stars_a_gist.json +1 -1
- data/spec/cassettes/GitHub_Client_Gists/_unstar_gist/returns_false_when_not_found.json +1 -1
- data/spec/cassettes/GitHub_Client_Gists/_unstar_gist/unstars_a_gist.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_add_remove_collaborator/adds_a_collaborator.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_add_remove_collaborator/removes_a_collaborator.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_all_repos/returns_an_array_of_repositories.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_branch/returns_a_404_if_repo_not_found.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_branch/returns_a_hash_of_branch_info.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_branches/returns_an_array_of_branches.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_collaborator_/returns_a_boolean.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_collaborators/returns_a_404_if_repo_not_found.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_collaborators/returns_a_list_of_collaborators.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_contributors/returns_a_404_if_repo_not_found.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_contributors/returns_an_array_of_contributors.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_create_repo/creates_the_repo.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_create_repo/returns_a_hash.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_create_repo/returns_unauthorized_when_not_authorized.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_delete_repo/deletes_a_repo.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_delete_repo/returns_false_if_not_authorized.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_delete_repo/returns_false_when_not_found.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_edit_repo/edits_the_repository.json +1 -0
- data/spec/cassettes/GitHub_Client_Repos/_edit_repo/returns_404_when_not_authorized.json +1 -0
- data/spec/cassettes/GitHub_Client_Repos/_edit_repo/returns_a_hash.json +1 -0
- data/spec/cassettes/GitHub_Client_Repos/_edit_repo/returns_unauthorized_when_not_authorized.json +1 -0
- data/spec/cassettes/GitHub_Client_Repos/_languages/returns_a_404_if_repo_not_found.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_languages/returns_a_hash_of_languages.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_org_repos/returns_a_404_if_repo_not_found.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_org_repos/returns_an_array_of_repos.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_repo/returns_a_repo_as_a_hash.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_repos/returns_an_array_of_repositories.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_repos/returns_an_array_of_repositories_for_authenticated_user.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_tags/returns_a_404_if_repo_not_found.json +1 -1
- data/spec/cassettes/GitHub_Client_Repos/_tags/returns_an_array_of_tags.json +1 -1
- data/spec/cassettes/GitHub_Client_Users/_create_key/returns_the_key_information.json +1 -0
- data/spec/cassettes/GitHub_Client_Users/_delete_key/returns_true_or_false.json +1 -0
- data/spec/cassettes/GitHub_Client_Users/_delete_key/should_delete_the_key.json +1 -0
- data/spec/cassettes/GitHub_Client_Users/_emails/returns_an_array_of_emails.json +1 -1
- data/spec/cassettes/GitHub_Client_Users/_events/returns_a_404_for_user_not_found.json +1 -1
- data/spec/cassettes/GitHub_Client_Users/_events/returns_an_array_of_events.json +1 -1
- data/spec/cassettes/GitHub_Client_Users/_follow/follows_a_user.json +1 -1
- data/spec/cassettes/GitHub_Client_Users/_followers/returns_authenticated_users_followers_as_an_array.json +1 -1
- data/spec/cassettes/GitHub_Client_Users/_followers/returns_unauthenticated_users_followers_as_an_array.json +1 -1
- data/spec/cassettes/GitHub_Client_Users/_following/returns_an_array_of_followees.json +1 -1
- data/spec/cassettes/GitHub_Client_Users/_following_/returns_true_or_false.json +1 -1
- data/spec/cassettes/GitHub_Client_Users/_follows_/returns_false_when_not_following.json +1 -1
- data/spec/cassettes/GitHub_Client_Users/_follows_/returns_true_when_following.json +1 -1
- data/spec/cassettes/GitHub_Client_Users/_key/returns_a_key.json +1 -0
- data/spec/cassettes/GitHub_Client_Users/_key/returns_unauthorized_when_not_authorized.json +1 -0
- data/spec/cassettes/GitHub_Client_Users/_unfollow/unfollows_a_user.json +1 -1
- data/spec/cassettes/GitHub_Client_Users/_update_key/returns_the_key_information.json +1 -0
- data/spec/cassettes/GitHub_Client_Users/_user/gets_the_correct_user_info.json +1 -1
- data/spec/cassettes/GitHub_Client_Users/_user/returns_a_404_if_user_not_found.json +1 -1
- data/spec/cassettes/GitHub_Client_Users/_user/returns_a_hash.json +1 -1
- data/spec/cassettes/GitHub_Client_Users/_users/returns_an_array.json +1 -1
- data/spec/cassettes/GitHub_Client_Users/_users/returns_an_array_of_hashes.json +1 -1
- data/spec/cassettes/GitHub_Client_Users/keys/returns_404_for_user_not_found.json +1 -1
- data/spec/cassettes/GitHub_Client_Users/keys/returns_an_array_of_keys.json +1 -1
- data/spec/cassettes/GitHub_Client_Users/keys/returns_an_array_of_keys_for_authenticated_user.json +1 -1
- data/spec/github_api_v3/client/gists_spec.rb +11 -3
- data/spec/github_api_v3/client/repos_spec.rb +17 -1
- data/spec/github_api_v3/client/users_spec.rb +36 -0
- data/spec/spec_helper.rb +10 -1
- metadata +27 -11
- data/spec/cassettes/GitHub_Client_Gists/_create_delete_gist/creates_a_gist.json +0 -1
- data/spec/cassettes/GitHub_Client_Gists/_create_delete_gist/deletes_a_gist.json +0 -1
- data/spec/cassettes/GitHub_Client_Repos/_delete_repo/returns_unauthorized_if_not_authorized.json +0 -1
- data/spec/cassettes/GitHub_Client_Repos/_languages/returns_an_array_of_languages.json +0 -1
- data/spec/cassettes/GitHub_Client_Repos/_org_repos/returns_a_404_if_not_found.json +0 -1
data/spec/cassettes/GitHub_Client_Users/keys/returns_an_array_of_keys_for_authenticated_user.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"http_interactions":[{"request":{"method":"get","uri":"https://api.github.com/user/keys?access_token
|
1
|
+
{"http_interactions":[{"request":{"method":"get","uri":"https://api.github.com/user/keys?access_token=<TEST_ACCESS_TOKEN>&login=<TEST_LOGIN>","body":{"encoding":"US-ASCII","base64_string":""},"headers":{}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["GitHub.com"],"Date":["Sun, 18 Aug 2013 14:29:32 GMT"],"Content-Type":["application/json; charset=utf-8"],"Status":["200 OK"],"X-Ratelimit-Limit":["5000"],"X-Ratelimit-Remaining":["4969"],"X-Ratelimit-Reset":["1376839325"],"Cache-Control":["private, max-age=60, s-maxage=60"],"Last-Modified":["Sun, 18 Aug 2013 14:29:27 GMT"],"Etag":["\"7c75ce9d9ff2c5f2a78eaac282960764\""],"X-Oauth-Scopes":["delete_repo, user, public_repo, repo, gist"],"X-Accepted-Oauth-Scopes":["user, user:email, user:follow, site_admin"],"Vary":["Accept, Authorization, Cookie","Accept-Encoding"],"X-Github-Media-Type":["github.beta; format=json"],"X-Content-Type-Options":["nosniff"],"Content-Length":["2496"],"Access-Control-Allow-Credentials":["true"],"Access-Control-Expose-Headers":["ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-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HMjNhc2pETGYzN3llcFFSTldOL1E5TnVvejBvLzJEdnM3SlRH\nbEk2bHNQQ3hiZ1YzUXJqRmxPR3BDSm1Ddk1HVzNIVTdCb1kyODZpLzJaV0s5\nQUhjNVYxTW9yOWRRcWQzQitXbVdjemJSWVZSa3k5S1lDQ29DdDkveTRvWjZH\nZllBeWFrR1NWNzRKWXhnU3BjSHI5QlAzIiwidXJsIjoiaHR0cHM6Ly9hcGku\nZ2l0aHViLmNvbS91c2VyL2tleXMvNTU0NzY0MCIsInRpdGxlIjoidGVzdC1r\nZXkiLCJ2ZXJpZmllZCI6dHJ1ZX1d\n"},"http_version":null},"recorded_at":"Sun, 18 Aug 2013 14:29:09 GMT"}],"recorded_with":"VCR 2.5.0"}
|
@@ -26,15 +26,23 @@ describe GitHub::Client::Gists do
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
gist_id = ""
|
30
|
+
describe '.create_gist', :vcr do
|
32
31
|
it 'creates a gist' do
|
33
32
|
gist = test_client.create_gist(files: {"file1.txt" => { content: "File contents" }}, description: "Gist description", public: "false")
|
34
33
|
gist.should be_instance_of Hash
|
35
34
|
gist_id = gist.id
|
36
35
|
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe '.edit_gist', :vcr do
|
39
|
+
it 'edits a gist' do
|
40
|
+
gist = test_client.edit_gist(gist_id, description: "Edited gist description")
|
41
|
+
gist.description.should == "Edited gist description"
|
42
|
+
end
|
43
|
+
end
|
37
44
|
|
45
|
+
describe '.delete_gist', :vcr do
|
38
46
|
it 'deletes a gist' do
|
39
47
|
test_client.delete_gist(gist_id).should be_true
|
40
48
|
end
|
@@ -34,7 +34,23 @@ describe GitHub::Client::Repos do
|
|
34
34
|
end
|
35
35
|
|
36
36
|
it 'returns unauthorized when not authorized' do
|
37
|
-
expect { GitHub.create_repo('
|
37
|
+
expect { GitHub.create_repo('098f6bcd4621d373cade4e832627b4f6') }.to raise_error GitHub::Unauthorized
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe '.edit_repo', :vcr do
|
42
|
+
it 'returns a hash' do
|
43
|
+
repo = test_client.edit_repo(test_client.login, '098f6bcd4621d373cade4e832627b4f6', description: 'An awesome repo!')
|
44
|
+
repo.should be_instance_of Hash
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'edits the repository' do
|
48
|
+
repo = GitHub.repo(test_client.login, '098f6bcd4621d373cade4e832627b4f6')
|
49
|
+
repo.description.should == 'An awesome repo!'
|
50
|
+
end
|
51
|
+
|
52
|
+
it 'returns 404 when not authorized' do
|
53
|
+
expect { GitHub.edit_repo(test_client.login, '098f6bcd4621d373cade4e832627b4f6') }.to raise_error GitHub::NotFound
|
38
54
|
end
|
39
55
|
end
|
40
56
|
|
@@ -93,6 +93,42 @@ describe GitHub::Client::Users do
|
|
93
93
|
end
|
94
94
|
end
|
95
95
|
|
96
|
+
describe '.key', :vcr do
|
97
|
+
it 'returns a key' do
|
98
|
+
test_client.key(5427887).should be_instance_of Hash
|
99
|
+
end
|
100
|
+
|
101
|
+
it 'returns unauthorized when not authorized' do
|
102
|
+
expect { GitHub.key(5427887) }.to raise_error GitHub::Unauthorized
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
key_id = ""
|
107
|
+
describe '.create_key', :vcr do
|
108
|
+
it 'returns the key information' do
|
109
|
+
key = test_client.create_key('test-key','ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtABGJv4nOGmDZMUzlE1IJhI0d9rIivLv74ah5gpnQJls27WxjgntCr3JZQXX5msMmq1DFdnKmdBucksFf62xgCU0blBW0cFz40tlsfxrMUTxlt1ywaPdj4MD3PXMQsv8asE/gcRcAVCsVn1eOCLuPig4U90/iMr7anjVrwNhYF9RI5j5QxZt5G1e420zJNG23asjDLf37yepQRNWN/Q9Nuoz0o/2Dvs7JTGlI6lsPCxbgV3QrjFlOGpCJmCvMGW3HU7BoY286i/2ZWK9AHc5V1Mor9dQqd3B+WmWczbRYVRky9KYCCoCt9/y4oZ6GfYAyakGSV74JYxgSpcHr9BP3')
|
110
|
+
key_id = key.id
|
111
|
+
key.should be_instance_of Hash
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
describe '.update_key', :vcr do
|
116
|
+
it 'returns the key information' do
|
117
|
+
key = test_client.update_key(key_id, 'test-key2', 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtABGJv4nOGmDZMUzlE1IJhI0d9rIivLv74ah5gpnQJls27WxjgntCr3JZQXX5msMmq1DFdnKmdBucksFf62xgCU0blBW0cFz40tlsfxrMUTxlt1ywaPdj4MD3PXMQsv8asE/gcRcAVCsVn1eOCLuPig4U90/iMr7anjVrwNhYF9RI5j5QxZt5G1e420zJNG23asjDLf37yepQRNWN/Q9Nuoz0o/2Dvs7JTGlI6lsPCxbgV3QrjFlOGpCJmCvMGW3HU7BoY286i/2ZWK9AHc5V1Mor9dQqd3B+WmWczbRYVRky9KYCCoCt9/y4oZ6GfYAyakGSV74JYxgSpcHr9BP4')
|
118
|
+
key.should be_instance_of Hash
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
describe '.delete_key', :vcr do
|
123
|
+
it 'returns true or false' do
|
124
|
+
[true,false].should include test_client.delete_key(key_id)
|
125
|
+
end
|
126
|
+
|
127
|
+
it 'should delete the key' do
|
128
|
+
expect { test_client.key(key_id) }.to raise_error GitHub::NotFound
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
96
132
|
describe '.events', :vcr do
|
97
133
|
it 'returns an array of events' do
|
98
134
|
GitHub.events('caseyscarborough').should be_instance_of Array
|
data/spec/spec_helper.rb
CHANGED
@@ -12,6 +12,16 @@ RSpec.configure do |config|
|
|
12
12
|
end
|
13
13
|
|
14
14
|
VCR.configure do |c|
|
15
|
+
c.configure_rspec_metadata!
|
16
|
+
c.filter_sensitive_data("<TEST_ACCESS_TOKEN>") do
|
17
|
+
CONFIG['test_access_token']
|
18
|
+
end
|
19
|
+
c.filter_sensitive_data("<TEST_LOGIN>") do
|
20
|
+
CONFIG['test_login']
|
21
|
+
end
|
22
|
+
c.filter_sensitive_data("<TEST_PASSWORD>") do
|
23
|
+
CONFIG['test_password']
|
24
|
+
end
|
15
25
|
c.cassette_library_dir = 'spec/cassettes'
|
16
26
|
c.default_cassette_options = {
|
17
27
|
:serialize_with => :json,
|
@@ -19,7 +29,6 @@ VCR.configure do |c|
|
|
19
29
|
:decode_compressed_response => true
|
20
30
|
}
|
21
31
|
c.hook_into :webmock
|
22
|
-
c.configure_rspec_metadata!
|
23
32
|
end
|
24
33
|
|
25
34
|
def test_login
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github_api_v3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Casey Scarborough
|
@@ -118,12 +118,13 @@ files:
|
|
118
118
|
- lib/github_api_v3/default.rb
|
119
119
|
- lib/github_api_v3/error.rb
|
120
120
|
- lib/github_api_v3/version.rb
|
121
|
-
- spec/cassettes/GitHub_Client_Gists/
|
122
|
-
- spec/cassettes/GitHub_Client_Gists/_create_delete_gist/deletes_a_gist.json
|
121
|
+
- spec/cassettes/GitHub_Client_Gists/_create_gist/creates_a_gist.json
|
123
122
|
- spec/cassettes/GitHub_Client_Gists/_create_gist_comment/creates_the_comment.json
|
124
123
|
- spec/cassettes/GitHub_Client_Gists/_create_gist_comment/returns_comment_information_after_creation.json
|
124
|
+
- spec/cassettes/GitHub_Client_Gists/_delete_gist/deletes_a_gist.json
|
125
125
|
- spec/cassettes/GitHub_Client_Gists/_delete_gist_comment/deletes_the_comment.json
|
126
126
|
- spec/cassettes/GitHub_Client_Gists/_delete_gist_comment/returns_true_or_false.json
|
127
|
+
- spec/cassettes/GitHub_Client_Gists/_edit_gist/edits_a_gist.json
|
127
128
|
- spec/cassettes/GitHub_Client_Gists/_edit_gist_comment/edits_the_comment.json
|
128
129
|
- spec/cassettes/GitHub_Client_Gists/_edit_gist_comment/returns_comment_information_after_editing.json
|
129
130
|
- spec/cassettes/GitHub_Client_Gists/_fork_gist/forks_a_gist.json
|
@@ -164,11 +165,12 @@ files:
|
|
164
165
|
- spec/cassettes/GitHub_Client_Repos/_delete_repo/deletes_a_repo.json
|
165
166
|
- spec/cassettes/GitHub_Client_Repos/_delete_repo/returns_false_if_not_authorized.json
|
166
167
|
- spec/cassettes/GitHub_Client_Repos/_delete_repo/returns_false_when_not_found.json
|
167
|
-
- spec/cassettes/GitHub_Client_Repos/
|
168
|
+
- spec/cassettes/GitHub_Client_Repos/_edit_repo/edits_the_repository.json
|
169
|
+
- spec/cassettes/GitHub_Client_Repos/_edit_repo/returns_404_when_not_authorized.json
|
170
|
+
- spec/cassettes/GitHub_Client_Repos/_edit_repo/returns_a_hash.json
|
171
|
+
- spec/cassettes/GitHub_Client_Repos/_edit_repo/returns_unauthorized_when_not_authorized.json
|
168
172
|
- spec/cassettes/GitHub_Client_Repos/_languages/returns_a_404_if_repo_not_found.json
|
169
173
|
- spec/cassettes/GitHub_Client_Repos/_languages/returns_a_hash_of_languages.json
|
170
|
-
- spec/cassettes/GitHub_Client_Repos/_languages/returns_an_array_of_languages.json
|
171
|
-
- spec/cassettes/GitHub_Client_Repos/_org_repos/returns_a_404_if_not_found.json
|
172
174
|
- spec/cassettes/GitHub_Client_Repos/_org_repos/returns_a_404_if_repo_not_found.json
|
173
175
|
- spec/cassettes/GitHub_Client_Repos/_org_repos/returns_an_array_of_repos.json
|
174
176
|
- spec/cassettes/GitHub_Client_Repos/_repo/returns_a_repo_as_a_hash.json
|
@@ -176,6 +178,9 @@ files:
|
|
176
178
|
- spec/cassettes/GitHub_Client_Repos/_repos/returns_an_array_of_repositories_for_authenticated_user.json
|
177
179
|
- spec/cassettes/GitHub_Client_Repos/_tags/returns_a_404_if_repo_not_found.json
|
178
180
|
- spec/cassettes/GitHub_Client_Repos/_tags/returns_an_array_of_tags.json
|
181
|
+
- spec/cassettes/GitHub_Client_Users/_create_key/returns_the_key_information.json
|
182
|
+
- spec/cassettes/GitHub_Client_Users/_delete_key/returns_true_or_false.json
|
183
|
+
- spec/cassettes/GitHub_Client_Users/_delete_key/should_delete_the_key.json
|
179
184
|
- spec/cassettes/GitHub_Client_Users/_emails/returns_an_array_of_emails.json
|
180
185
|
- spec/cassettes/GitHub_Client_Users/_events/returns_a_404_for_user_not_found.json
|
181
186
|
- spec/cassettes/GitHub_Client_Users/_events/returns_an_array_of_events.json
|
@@ -186,7 +191,10 @@ files:
|
|
186
191
|
- spec/cassettes/GitHub_Client_Users/_following_/returns_true_or_false.json
|
187
192
|
- spec/cassettes/GitHub_Client_Users/_follows_/returns_false_when_not_following.json
|
188
193
|
- spec/cassettes/GitHub_Client_Users/_follows_/returns_true_when_following.json
|
194
|
+
- spec/cassettes/GitHub_Client_Users/_key/returns_a_key.json
|
195
|
+
- spec/cassettes/GitHub_Client_Users/_key/returns_unauthorized_when_not_authorized.json
|
189
196
|
- spec/cassettes/GitHub_Client_Users/_unfollow/unfollows_a_user.json
|
197
|
+
- spec/cassettes/GitHub_Client_Users/_update_key/returns_the_key_information.json
|
190
198
|
- spec/cassettes/GitHub_Client_Users/_user/gets_the_correct_user_info.json
|
191
199
|
- spec/cassettes/GitHub_Client_Users/_user/returns_a_404_if_user_not_found.json
|
192
200
|
- spec/cassettes/GitHub_Client_Users/_user/returns_a_hash.json
|
@@ -228,12 +236,13 @@ signing_key:
|
|
228
236
|
specification_version: 4
|
229
237
|
summary: This gem is a wrapper that allows simple interaction with GitHub's API v3.
|
230
238
|
test_files:
|
231
|
-
- spec/cassettes/GitHub_Client_Gists/
|
232
|
-
- spec/cassettes/GitHub_Client_Gists/_create_delete_gist/deletes_a_gist.json
|
239
|
+
- spec/cassettes/GitHub_Client_Gists/_create_gist/creates_a_gist.json
|
233
240
|
- spec/cassettes/GitHub_Client_Gists/_create_gist_comment/creates_the_comment.json
|
234
241
|
- spec/cassettes/GitHub_Client_Gists/_create_gist_comment/returns_comment_information_after_creation.json
|
242
|
+
- spec/cassettes/GitHub_Client_Gists/_delete_gist/deletes_a_gist.json
|
235
243
|
- spec/cassettes/GitHub_Client_Gists/_delete_gist_comment/deletes_the_comment.json
|
236
244
|
- spec/cassettes/GitHub_Client_Gists/_delete_gist_comment/returns_true_or_false.json
|
245
|
+
- spec/cassettes/GitHub_Client_Gists/_edit_gist/edits_a_gist.json
|
237
246
|
- spec/cassettes/GitHub_Client_Gists/_edit_gist_comment/edits_the_comment.json
|
238
247
|
- spec/cassettes/GitHub_Client_Gists/_edit_gist_comment/returns_comment_information_after_editing.json
|
239
248
|
- spec/cassettes/GitHub_Client_Gists/_fork_gist/forks_a_gist.json
|
@@ -274,11 +283,12 @@ test_files:
|
|
274
283
|
- spec/cassettes/GitHub_Client_Repos/_delete_repo/deletes_a_repo.json
|
275
284
|
- spec/cassettes/GitHub_Client_Repos/_delete_repo/returns_false_if_not_authorized.json
|
276
285
|
- spec/cassettes/GitHub_Client_Repos/_delete_repo/returns_false_when_not_found.json
|
277
|
-
- spec/cassettes/GitHub_Client_Repos/
|
286
|
+
- spec/cassettes/GitHub_Client_Repos/_edit_repo/edits_the_repository.json
|
287
|
+
- spec/cassettes/GitHub_Client_Repos/_edit_repo/returns_404_when_not_authorized.json
|
288
|
+
- spec/cassettes/GitHub_Client_Repos/_edit_repo/returns_a_hash.json
|
289
|
+
- spec/cassettes/GitHub_Client_Repos/_edit_repo/returns_unauthorized_when_not_authorized.json
|
278
290
|
- spec/cassettes/GitHub_Client_Repos/_languages/returns_a_404_if_repo_not_found.json
|
279
291
|
- spec/cassettes/GitHub_Client_Repos/_languages/returns_a_hash_of_languages.json
|
280
|
-
- spec/cassettes/GitHub_Client_Repos/_languages/returns_an_array_of_languages.json
|
281
|
-
- spec/cassettes/GitHub_Client_Repos/_org_repos/returns_a_404_if_not_found.json
|
282
292
|
- spec/cassettes/GitHub_Client_Repos/_org_repos/returns_a_404_if_repo_not_found.json
|
283
293
|
- spec/cassettes/GitHub_Client_Repos/_org_repos/returns_an_array_of_repos.json
|
284
294
|
- spec/cassettes/GitHub_Client_Repos/_repo/returns_a_repo_as_a_hash.json
|
@@ -286,6 +296,9 @@ test_files:
|
|
286
296
|
- spec/cassettes/GitHub_Client_Repos/_repos/returns_an_array_of_repositories_for_authenticated_user.json
|
287
297
|
- spec/cassettes/GitHub_Client_Repos/_tags/returns_a_404_if_repo_not_found.json
|
288
298
|
- spec/cassettes/GitHub_Client_Repos/_tags/returns_an_array_of_tags.json
|
299
|
+
- spec/cassettes/GitHub_Client_Users/_create_key/returns_the_key_information.json
|
300
|
+
- spec/cassettes/GitHub_Client_Users/_delete_key/returns_true_or_false.json
|
301
|
+
- spec/cassettes/GitHub_Client_Users/_delete_key/should_delete_the_key.json
|
289
302
|
- spec/cassettes/GitHub_Client_Users/_emails/returns_an_array_of_emails.json
|
290
303
|
- spec/cassettes/GitHub_Client_Users/_events/returns_a_404_for_user_not_found.json
|
291
304
|
- spec/cassettes/GitHub_Client_Users/_events/returns_an_array_of_events.json
|
@@ -296,7 +309,10 @@ test_files:
|
|
296
309
|
- spec/cassettes/GitHub_Client_Users/_following_/returns_true_or_false.json
|
297
310
|
- spec/cassettes/GitHub_Client_Users/_follows_/returns_false_when_not_following.json
|
298
311
|
- spec/cassettes/GitHub_Client_Users/_follows_/returns_true_when_following.json
|
312
|
+
- spec/cassettes/GitHub_Client_Users/_key/returns_a_key.json
|
313
|
+
- spec/cassettes/GitHub_Client_Users/_key/returns_unauthorized_when_not_authorized.json
|
299
314
|
- spec/cassettes/GitHub_Client_Users/_unfollow/unfollows_a_user.json
|
315
|
+
- spec/cassettes/GitHub_Client_Users/_update_key/returns_the_key_information.json
|
300
316
|
- spec/cassettes/GitHub_Client_Users/_user/gets_the_correct_user_info.json
|
301
317
|
- spec/cassettes/GitHub_Client_Users/_user/returns_a_404_if_user_not_found.json
|
302
318
|
- spec/cassettes/GitHub_Client_Users/_user/returns_a_hash.json
|
@@ -1 +0,0 @@
|
|
1
|
-
{"http_interactions":[{"request":{"method":"post","uri":"https://api.github.com/gists?access_token=5d67e609aafc9f6d3abac823796afbfe85d6d7b7&login=caseyscarborough","body":{"encoding":"UTF-8","base64_string":"eyJwdWJsaWMiOiJmYWxzZSIsImZpbGVzIjp7ImZpbGUxLnR4dCI6eyJjb250\nZW50IjoiRmlsZSBjb250ZW50cyJ9fSwiZGVzY3JpcHRpb24iOiJHaXN0IGRl\nc2NyaXB0aW9uIn0=\n"},"headers":{}},"response":{"status":{"code":201,"message":"Created"},"headers":{"Server":["GitHub.com"],"Date":["Sun, 18 Aug 2013 12:02:17 GMT"],"Content-Type":["application/json; charset=utf-8"],"Status":["201 Created"],"X-Ratelimit-Limit":["5000"],"X-Ratelimit-Remaining":["4999"],"X-Ratelimit-Reset":["1376830937"],"X-Oauth-Scopes":["delete_repo, user, public_repo, repo, gist"],"X-Accepted-Oauth-Scopes":["gist"],"Location":["https://api.github.com/gists/5cfb5c1b92cc0f66f22e"],"X-Github-Media-Type":["github.beta; format=json"],"X-Content-Type-Options":["nosniff"],"Content-Length":["3286"],"Access-Control-Allow-Credentials":["true"],"Access-Control-Expose-Headers":["ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes"],"Access-Control-Allow-Origin":["*"],"Etag":["\"03e9ceb1102523960ef2165f6b62cb6b\""],"Cache-Control":["max-age=0, private, must-revalidate"]},"body":{"encoding":"UTF-8","base64_string":"eyJ1cmwiOiJodHRwczovL2FwaS5naXRodWIuY29tL2dpc3RzLzVjZmI1YzFi\nOTJjYzBmNjZmMjJlIiwiZm9ya3NfdXJsIjoiaHR0cHM6Ly9hcGkuZ2l0aHVi\nLmNvbS9naXN0cy81Y2ZiNWMxYjkyY2MwZjY2ZjIyZS9mb3JrcyIsImNvbW1p\ndHNfdXJ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Y2ZiNWMxYjkyY2MwZjY2ZjIy\nZS9hMTRhNDhhMjk1MzQ5NzlkY2QyZWQzOGMzNzk4NjFjNTJiMWNkNTdhIn1d\nfQ==\n"},"http_version":null},"recorded_at":"Sun, 18 Aug 2013 12:01:54 GMT"}],"recorded_with":"VCR 2.5.0"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"http_interactions":[{"request":{"method":"delete","uri":"https://api.github.com/gists/5cfb5c1b92cc0f66f22e?access_token=5d67e609aafc9f6d3abac823796afbfe85d6d7b7&login=caseyscarborough","body":{"encoding":"US-ASCII","base64_string":""},"headers":{}},"response":{"status":{"code":204,"message":"No Content"},"headers":{"Server":["GitHub.com"],"Date":["Sun, 18 Aug 2013 12:02:17 GMT"],"Status":["204 No Content"],"X-Ratelimit-Limit":["5000"],"X-Ratelimit-Remaining":["4998"],"X-Ratelimit-Reset":["1376830937"],"X-Oauth-Scopes":["delete_repo, user, public_repo, repo, gist"],"X-Accepted-Oauth-Scopes":["gist"],"X-Github-Media-Type":["github.beta; format=json"],"X-Content-Type-Options":["nosniff"],"Access-Control-Allow-Credentials":["true"],"Access-Control-Expose-Headers":["ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes"],"Access-Control-Allow-Origin":["*"],"Vary":["Accept-Encoding"]},"body":{"encoding":"UTF-8","base64_string":""},"http_version":null},"recorded_at":"Sun, 18 Aug 2013 12:01:54 GMT"}],"recorded_with":"VCR 2.5.0"}
|
data/spec/cassettes/GitHub_Client_Repos/_delete_repo/returns_unauthorized_if_not_authorized.json
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"http_interactions":[{"request":{"method":"delete","uri":"https://api.github.com/repos/caseyscarborough/github?","body":{"encoding":"US-ASCII","base64_string":""},"headers":{}},"response":{"status":{"code":404,"message":"Not Found"},"headers":{"Server":["GitHub.com"],"Date":["Sun, 18 Aug 2013 12:10:29 GMT"],"Content-Type":["application/json; charset=utf-8"],"Status":["404 Not Found"],"X-Ratelimit-Limit":["60"],"X-Ratelimit-Remaining":["57"],"X-Ratelimit-Reset":["1376830939"],"X-Github-Media-Type":["github.beta; format=json"],"X-Content-Type-Options":["nosniff"],"Content-Length":["23"],"Access-Control-Allow-Credentials":["true"],"Access-Control-Expose-Headers":["ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes"],"Access-Control-Allow-Origin":["*"]},"body":{"encoding":"UTF-8","base64_string":"eyJtZXNzYWdlIjoiTm90IEZvdW5kIn0=\n"},"http_version":null},"recorded_at":"Sun, 18 Aug 2013 12:10:06 GMT"}],"recorded_with":"VCR 2.5.0"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"http_interactions":[{"request":{"method":"get","uri":"https://api.github.com/repos/rails/rails/languages?","body":{"encoding":"US-ASCII","base64_string":""},"headers":{}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["GitHub.com"],"Date":["Sun, 18 Aug 2013 00:24:40 GMT"],"Content-Type":["application/json; charset=utf-8"],"Status":["200 OK"],"X-Ratelimit-Limit":["60"],"X-Ratelimit-Remaining":["53"],"X-Ratelimit-Reset":["1376789071"],"Cache-Control":["public, max-age=60, s-maxage=60"],"Last-Modified":["Sat, 17 Aug 2013 23:24:05 GMT"],"Etag":["\"fc7fc94ae2a7775febd7fdd12c6fe459\""],"Vary":["Accept","Accept-Encoding"],"X-Github-Media-Type":["github.beta; format=json"],"X-Content-Type-Options":["nosniff"],"Content-Length":["66"],"Access-Control-Allow-Credentials":["true"],"Access-Control-Expose-Headers":["ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes"],"Access-Control-Allow-Origin":["*"]},"body":{"encoding":"UTF-8","base64_string":"eyJSdWJ5Ijo4MDczNzkyLCJDU1MiOjEyNzUyOCwiSmF2YVNjcmlwdCI6Nzc2\nMywiQ29mZmVlU2NyaXB0Ijo2MzN9\n"},"http_version":null},"recorded_at":"Sun, 18 Aug 2013 00:24:18 GMT"}],"recorded_with":"VCR 2.5.0"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"http_interactions":[{"request":{"method":"get","uri":"https://api.github.com/orgs/7ce4519eb32aa18d0917b0d407b53064/repos?","body":{"encoding":"US-ASCII","base64_string":""},"headers":{}},"response":{"status":{"code":404,"message":"Not Found"},"headers":{"Server":["GitHub.com"],"Date":["Sun, 18 Aug 2013 12:08:19 GMT"],"Content-Type":["application/json; charset=utf-8"],"Status":["404 Not Found"],"X-Ratelimit-Limit":["60"],"X-Ratelimit-Remaining":["58"],"X-Ratelimit-Reset":["1376830939"],"X-Github-Media-Type":["github.beta; format=json"],"X-Content-Type-Options":["nosniff"],"Content-Length":["23"],"Access-Control-Allow-Credentials":["true"],"Access-Control-Expose-Headers":["ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes"],"Access-Control-Allow-Origin":["*"]},"body":{"encoding":"UTF-8","base64_string":"eyJtZXNzYWdlIjoiTm90IEZvdW5kIn0=\n"},"http_version":null},"recorded_at":"Sun, 18 Aug 2013 12:07:56 GMT"}],"recorded_with":"VCR 2.5.0"}
|