octokit 1.2.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +1 -0
- data/lib/octokit/client.rb +2 -0
- data/lib/octokit/client/authorizations.rb +101 -0
- data/lib/octokit/request.rb +12 -0
- data/lib/octokit/version.rb +1 -1
- data/spec/fixtures/v3/authorization.json +16 -0
- data/spec/fixtures/v3/authorizations.json +66 -0
- data/spec/helper.rb +1 -1
- data/spec/octokit/client/authorizations_spec.rb +59 -0
- data/spec/octokit/client/gists_spec.rb +1 -1
- data/spec/octokit/client_spec.rb +19 -0
- metadata +34 -87
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
* [1.3.0 - May 17, 2012](https://github.com/pengwynn/octokit/compare/v1.2.1...v1.3.0)
|
3
4
|
* [1.2.0 - May 17, 2012](https://github.com/pengwynn/octokit/compare/v1.1.1...v1.2.0)
|
4
5
|
* [1.1.1 - May 15, 2012](https://github.com/pengwynn/octokit/compare/v1.1.0...v1.1.1)
|
5
6
|
* [1.1.0 - May 13, 2012](https://github.com/pengwynn/octokit/compare/v1.0.7...v1.1.0)
|
data/lib/octokit/client.rb
CHANGED
@@ -20,6 +20,7 @@ require 'octokit/client/repositories'
|
|
20
20
|
require 'octokit/client/timelines'
|
21
21
|
require 'octokit/client/users'
|
22
22
|
require 'octokit/client/events'
|
23
|
+
require 'octokit/client/authorizations'
|
23
24
|
|
24
25
|
module Octokit
|
25
26
|
class Client
|
@@ -52,5 +53,6 @@ module Octokit
|
|
52
53
|
include Octokit::Client::Timelines
|
53
54
|
include Octokit::Client::Users
|
54
55
|
include Octokit::Client::Events
|
56
|
+
include Octokit::Client::Authorizations
|
55
57
|
end
|
56
58
|
end
|
@@ -0,0 +1,101 @@
|
|
1
|
+
module Octokit
|
2
|
+
class Client
|
3
|
+
module Authorizations
|
4
|
+
|
5
|
+
# List a users authorizations
|
6
|
+
#
|
7
|
+
# API for users to manage their own tokens.
|
8
|
+
# You can only access your own tokens, and only through
|
9
|
+
# Basic Authentication.
|
10
|
+
#
|
11
|
+
# @return [Array] A list of authorizations for the authenticated user
|
12
|
+
# @see http://developer.github.com/v3/oauth/#list-your-authorizations
|
13
|
+
# @example List authorizations for user ctshryock
|
14
|
+
# client = Octokit::Client.new(:login => 'ctshryock', :password => 'secret')
|
15
|
+
# client.authorizations
|
16
|
+
def authorizations
|
17
|
+
get('/authorizations')
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
# Get a single authorization for the authenticated user.
|
22
|
+
#
|
23
|
+
# You can only access your own tokens, and only through
|
24
|
+
# Basic Authentication.
|
25
|
+
#
|
26
|
+
# @return [Authorization] A single authorization for the authenticated user
|
27
|
+
# @see http://developer.github.com/v3/oauth/#get-a-single-authorization
|
28
|
+
# @example Show authorization for user ctshryock's Travis auth
|
29
|
+
# client = Octokit::Client.new(:login => 'ctshryock', :password => 'secret')
|
30
|
+
# client.authorization(999999)
|
31
|
+
def authorization(number)
|
32
|
+
get("/authorizations/#{number}")
|
33
|
+
end
|
34
|
+
|
35
|
+
# Create an authorization for the authenticated user.
|
36
|
+
#
|
37
|
+
# You can create your own tokens, and only through
|
38
|
+
# Basic Authentication.
|
39
|
+
#
|
40
|
+
# @param options [Hash] A customizable set of options.
|
41
|
+
# @option options [Array] :scopes A list of scopes that this authorization is in.
|
42
|
+
# See http://developer.github.com/v3/oauth/#scopes for available scopes
|
43
|
+
# @option options [String] :note A note to remind you what the OAuth token is for.
|
44
|
+
# @option options [String] :note_url A URL to remind you what app the OAuth token is for.
|
45
|
+
#
|
46
|
+
# @return [Authorization] A single authorization for the authenticated user
|
47
|
+
# @see http://developer.github.com/v3/oauth/#create-a-new-authorization
|
48
|
+
# @example Create a new authorization for user ctshryock's project Zoidberg
|
49
|
+
# client = Octokit::Client.new(:login => 'ctshryock', :password => 'secret')
|
50
|
+
# client.create_authorization({:scopes => ["public_repo","gist"], :note => "Why not Zoidberg?", :note_url=> "https://en.wikipedia.org/wiki/Zoidberg"})
|
51
|
+
def create_authorization(options={})
|
52
|
+
# Techincally we can omit scopes as GitHub has a default, however the
|
53
|
+
# API will reject us if we send a POST request with an empty body.
|
54
|
+
options = {:scopes => ""}.merge(options)
|
55
|
+
post('/authorizations', options)
|
56
|
+
end
|
57
|
+
|
58
|
+
# Update an authorization for the authenticated user.
|
59
|
+
#
|
60
|
+
# You can update your own tokens, but only through
|
61
|
+
# Basic Authentication.
|
62
|
+
#
|
63
|
+
# @param options [Hash] A customizable set of options.
|
64
|
+
# @option options [Array] :scopes Replace the authorization scopes with these.
|
65
|
+
# @option options [Array] :add_scopes A list of scopes to add to this authorization.
|
66
|
+
# @option options [Array] :remove_scopes A list of scopes to remove from this authorization.
|
67
|
+
# @option options [String] :note A note to remind you what the OAuth token is for.
|
68
|
+
# @option options [String] :note_url A URL to remind you what app the OAuth token is for.
|
69
|
+
#
|
70
|
+
# @return [Authorization] A single (updated) authorization for the authenticated user
|
71
|
+
# @see http://developer.github.com/v3/oauth/#update-a-new-authorization
|
72
|
+
# @see http://developer.github.com/v3/oauth/#scopes for available scopes
|
73
|
+
# @example Update the authorization for user ctshryock's project Zoidberg
|
74
|
+
# client = Octokit::Client.new(:login => 'ctshryock', :password => 'secret')
|
75
|
+
# client.create_authorization({:add_scopes => ["gist", "repo"], :note => "Why not Zoidberg possibly?"})
|
76
|
+
def update_authorization(number, options={})
|
77
|
+
# Techincally we can omit scopes as GitHub has a default, however the
|
78
|
+
# API will reject us if we send a POST request with an empty body.
|
79
|
+
options = {:scopes => ""}.merge(options)
|
80
|
+
patch("/authorizations/#{number}", options)
|
81
|
+
end
|
82
|
+
|
83
|
+
# Delete an authorization for the authenticated user.
|
84
|
+
#
|
85
|
+
# You can delete your own tokens, and only through
|
86
|
+
# Basic Authentication.
|
87
|
+
#
|
88
|
+
# @param number [Number] An existing Authorization ID
|
89
|
+
#
|
90
|
+
# @return [Status] A raw status response
|
91
|
+
# @see http://developer.github.com/v3/oauth/#delete-an-authorization
|
92
|
+
# @example Delete an authorization
|
93
|
+
# client = Octokit::Client.new(:login => 'ctshryock', :password => 'secret')
|
94
|
+
# client.delete_authorization(999999)
|
95
|
+
def delete_authorization(number)
|
96
|
+
delete("/authorizations/#{number}", {}, 3, true, true)
|
97
|
+
end
|
98
|
+
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
data/lib/octokit/request.rb
CHANGED
@@ -22,6 +22,18 @@ module Octokit
|
|
22
22
|
request(:put, path, options, version, authenticate, raw, force_urlencoded)
|
23
23
|
end
|
24
24
|
|
25
|
+
def ratelimit
|
26
|
+
headers = get("/rate_limit",{}, api_version, true, true).headers
|
27
|
+
return headers["X-RateLimit-Limit"].to_i
|
28
|
+
end
|
29
|
+
alias rate_limit ratelimit
|
30
|
+
|
31
|
+
def ratelimit_remaining
|
32
|
+
headers = get("/rate_limit",{}, api_version, true, true).headers
|
33
|
+
return headers["X-RateLimit-Remaining"].to_i
|
34
|
+
end
|
35
|
+
alias rate_limit_remaining ratelimit_remaining
|
36
|
+
|
25
37
|
private
|
26
38
|
|
27
39
|
def request(method, path, options, version, authenticate, raw, force_urlencoded)
|
data/lib/octokit/version.rb
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"created_at": "2012-02-08T01:47:27Z",
|
3
|
+
"note_url": null,
|
4
|
+
"scopes": [
|
5
|
+
"public_repo"
|
6
|
+
],
|
7
|
+
"url": "https://api.github.com/authorizations/999999",
|
8
|
+
"updated_at": "2012-03-08T14:26:36Z",
|
9
|
+
"app": {
|
10
|
+
"url": "http://travis-ci.org",
|
11
|
+
"name": "Travis"
|
12
|
+
},
|
13
|
+
"token": "eCx/G1S8O2YuoNp72qrCRPur+k4tUr20hiEs9UjfvS9aHs2x",
|
14
|
+
"note": null,
|
15
|
+
"id": 999999
|
16
|
+
}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"created_at": "2011-08-23T15:56:09Z",
|
4
|
+
"scopes": [
|
5
|
+
"user"
|
6
|
+
],
|
7
|
+
"url": "https://api.github.com/authorizations/999999",
|
8
|
+
"updated_at": "2011-12-14T13:15:47Z",
|
9
|
+
"app": {
|
10
|
+
"url": "http://calendaraboutnothing.com",
|
11
|
+
"name": "Calendar About Nothing"
|
12
|
+
},
|
13
|
+
"note_url": null,
|
14
|
+
"token": "eCx/G1S8O2YuoNp72qrCRPur+k4tUr20hiEs9UjfvS9aHs2x",
|
15
|
+
"note": null,
|
16
|
+
"id": 999999
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"created_at": "2011-09-16T03:17:07Z",
|
20
|
+
"scopes": [
|
21
|
+
"repo"
|
22
|
+
],
|
23
|
+
"url": "https://api.github.com/authorizations/999999",
|
24
|
+
"updated_at": "2011-09-16T21:08:16Z",
|
25
|
+
"app": {
|
26
|
+
"url": "http://forrst.com",
|
27
|
+
"name": "Forrst"
|
28
|
+
},
|
29
|
+
"note_url": null,
|
30
|
+
"token": "eCx/G1S8O2YuoNp72qrCRPur+k4tUr20hiEs9UjfvS9aHs2x",
|
31
|
+
"note": null,
|
32
|
+
"id": 999999
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"created_at": "2011-09-16T13:26:32Z",
|
36
|
+
"scopes": [
|
37
|
+
|
38
|
+
],
|
39
|
+
"url": "https://api.github.com/authorizations/999999",
|
40
|
+
"updated_at": "2012-03-13T12:40:36Z",
|
41
|
+
"app": {
|
42
|
+
"url": "http://coderwall.com",
|
43
|
+
"name": "coderwall.com"
|
44
|
+
},
|
45
|
+
"note_url": null,
|
46
|
+
"token": "eCx/G1S8O2YuoNp72qrCRPur+k4tUr20hiEs9UjfvS9aHs2x",
|
47
|
+
"note": null,
|
48
|
+
"id": 999999
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"created_at": "2012-02-08T01:47:27Z",
|
52
|
+
"scopes": [
|
53
|
+
"public_repo"
|
54
|
+
],
|
55
|
+
"url": "https://api.github.com/authorizations/999999",
|
56
|
+
"updated_at": "2012-03-08T14:26:36Z",
|
57
|
+
"app": {
|
58
|
+
"url": "http://travis-ci.org",
|
59
|
+
"name": "Travis"
|
60
|
+
},
|
61
|
+
"note_url": null,
|
62
|
+
"token": "eCx/G1S8O2YuoNp72qrCRPur+k4tUr20hiEs9UjfvS9aHs2x",
|
63
|
+
"note": null,
|
64
|
+
"id": 999999
|
65
|
+
}
|
66
|
+
]
|
data/spec/helper.rb
CHANGED
@@ -60,7 +60,7 @@ def github_url(url)
|
|
60
60
|
if url =~ /^http/
|
61
61
|
url
|
62
62
|
elsif @client && @client.authenticated?
|
63
|
-
"https
|
63
|
+
"https://#{@client.login}:#{@client.password}@api.github.com#{url}"
|
64
64
|
elsif @client && @client.oauthed?
|
65
65
|
"https://api.github.com#{url}?access_token=#{@client.oauth_token}"
|
66
66
|
else
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require 'helper'
|
3
|
+
|
4
|
+
describe Octokit::Client::Authorizations do
|
5
|
+
|
6
|
+
before do
|
7
|
+
@client = Octokit::Client.new(:login => 'ctshryock', :password => 'secret')
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
it "should list existing authorizations" do
|
12
|
+
stub_get("/authorizations").
|
13
|
+
to_return(:body => fixture("v3/authorizations.json"))
|
14
|
+
authorizations = @client.authorizations
|
15
|
+
authorizations.first.app.name.should == "Calendar About Nothing"
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should return a single authorization" do
|
19
|
+
stub_get("/authorizations/999999").
|
20
|
+
to_return(:body => fixture("v3/authorization.json"))
|
21
|
+
authorization = @client.authorization(999999)
|
22
|
+
authorization.app.name.should == "Travis"
|
23
|
+
end
|
24
|
+
|
25
|
+
it "should create a new default authorization" do
|
26
|
+
stub_post('/authorizations').
|
27
|
+
with(:body => {"scopes" => ""},
|
28
|
+
:headers => {'Content-Type'=>'application/json'}).
|
29
|
+
to_return(:body => fixture("v3/authorization.json"))
|
30
|
+
authorization = @client.create_authorization
|
31
|
+
authorization.app.name.should == "Travis"
|
32
|
+
end
|
33
|
+
|
34
|
+
it "should create a new authorization with options" do
|
35
|
+
stub_post('/authorizations').
|
36
|
+
with(:body => {"scopes" => ["public_repo"],"note" => "admin script", "note_url" => "https://github.com/pengwynn/octokit"},
|
37
|
+
:headers => {'Content-Type'=>'application/json'}).
|
38
|
+
to_return(:body => fixture("v3/authorization.json"))
|
39
|
+
authorization = @client.create_authorization({:scopes => ["public_repo"], :note => "admin script", :note_url => "https://github.com/pengwynn/octokit"})
|
40
|
+
authorization.scopes.should include("public_repo")
|
41
|
+
end
|
42
|
+
|
43
|
+
it "should update and existing authorization" do
|
44
|
+
stub_patch('/authorizations/999999').
|
45
|
+
with(:body => {"scopes"=>"", "add_scopes" => ["public_repo", "gist"]},
|
46
|
+
:headers => {'Content-Type'=>'application/json'}).
|
47
|
+
to_return(:body => fixture("v3/authorization.json"))
|
48
|
+
authorization = @client.update_authorization(999999, {:add_scopes => ['public_repo', 'gist']})
|
49
|
+
authorization.scopes.should include("public_repo")
|
50
|
+
end
|
51
|
+
|
52
|
+
it "should delete an existing authorization" do
|
53
|
+
stub_delete('/authorizations/999999').
|
54
|
+
to_return(:status => 204)
|
55
|
+
authorization = @client.delete_authorization(999999)
|
56
|
+
authorization.status.should == 204
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
@@ -72,7 +72,7 @@ describe Octokit::Client::Gists do
|
|
72
72
|
it "should edit an existing gist" do
|
73
73
|
gist_content = JSON.parse(fixture("v3/gist.json").read)
|
74
74
|
gist_id = gist_content['id']
|
75
|
-
updated_gist = gist_content.merge(
|
75
|
+
updated_gist = gist_content.merge('description' => 'updated')
|
76
76
|
|
77
77
|
stub_patch("/gists/#{gist_id}").
|
78
78
|
to_return(:body => updated_gist)
|
data/spec/octokit/client_spec.rb
CHANGED
@@ -43,4 +43,23 @@ describe Octokit::Client do
|
|
43
43
|
|
44
44
|
end
|
45
45
|
|
46
|
+
describe "ratelimit" do
|
47
|
+
|
48
|
+
before(:each) do
|
49
|
+
stub_request(:get, "https://api.github.com/rate_limit").
|
50
|
+
to_return(:status => 200, :body => '', :headers =>
|
51
|
+
{ 'X-RateLimit-Limit' => 5000, 'X-RateLimit-Remaining' => 5000})
|
52
|
+
@client = Octokit::Client.new()
|
53
|
+
end
|
54
|
+
|
55
|
+
it "should get the ratelimit-limit from the header" do
|
56
|
+
@client.ratelimit.should == 5000
|
57
|
+
end
|
58
|
+
|
59
|
+
it "should get the ratelimit-remaining using header" do
|
60
|
+
@client.ratelimit_remaining.should == 5000
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
64
|
+
|
46
65
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octokit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,11 +11,11 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-05-
|
14
|
+
date: 2012-05-25 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: addressable
|
18
|
-
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirement: &70239311442360 !ruby/object:Gem::Requirement
|
19
19
|
none: false
|
20
20
|
requirements:
|
21
21
|
- - ~>
|
@@ -23,15 +23,10 @@ dependencies:
|
|
23
23
|
version: '2.2'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
|
-
version_requirements:
|
27
|
-
none: false
|
28
|
-
requirements:
|
29
|
-
- - ~>
|
30
|
-
- !ruby/object:Gem::Version
|
31
|
-
version: '2.2'
|
26
|
+
version_requirements: *70239311442360
|
32
27
|
- !ruby/object:Gem::Dependency
|
33
28
|
name: faraday
|
34
|
-
requirement: !ruby/object:Gem::Requirement
|
29
|
+
requirement: &70239311441620 !ruby/object:Gem::Requirement
|
35
30
|
none: false
|
36
31
|
requirements:
|
37
32
|
- - ~>
|
@@ -39,15 +34,10 @@ dependencies:
|
|
39
34
|
version: '0.8'
|
40
35
|
type: :runtime
|
41
36
|
prerelease: false
|
42
|
-
version_requirements:
|
43
|
-
none: false
|
44
|
-
requirements:
|
45
|
-
- - ~>
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0.8'
|
37
|
+
version_requirements: *70239311441620
|
48
38
|
- !ruby/object:Gem::Dependency
|
49
39
|
name: faraday_middleware
|
50
|
-
requirement: !ruby/object:Gem::Requirement
|
40
|
+
requirement: &70239311440380 !ruby/object:Gem::Requirement
|
51
41
|
none: false
|
52
42
|
requirements:
|
53
43
|
- - ~>
|
@@ -55,15 +45,10 @@ dependencies:
|
|
55
45
|
version: '0.8'
|
56
46
|
type: :runtime
|
57
47
|
prerelease: false
|
58
|
-
version_requirements:
|
59
|
-
none: false
|
60
|
-
requirements:
|
61
|
-
- - ~>
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version: '0.8'
|
48
|
+
version_requirements: *70239311440380
|
64
49
|
- !ruby/object:Gem::Dependency
|
65
50
|
name: hashie
|
66
|
-
requirement: !ruby/object:Gem::Requirement
|
51
|
+
requirement: &70239311438260 !ruby/object:Gem::Requirement
|
67
52
|
none: false
|
68
53
|
requirements:
|
69
54
|
- - ~>
|
@@ -71,15 +56,10 @@ dependencies:
|
|
71
56
|
version: '1.2'
|
72
57
|
type: :runtime
|
73
58
|
prerelease: false
|
74
|
-
version_requirements:
|
75
|
-
none: false
|
76
|
-
requirements:
|
77
|
-
- - ~>
|
78
|
-
- !ruby/object:Gem::Version
|
79
|
-
version: '1.2'
|
59
|
+
version_requirements: *70239311438260
|
80
60
|
- !ruby/object:Gem::Dependency
|
81
61
|
name: multi_json
|
82
|
-
requirement: !ruby/object:Gem::Requirement
|
62
|
+
requirement: &70239311436780 !ruby/object:Gem::Requirement
|
83
63
|
none: false
|
84
64
|
requirements:
|
85
65
|
- - ~>
|
@@ -87,15 +67,10 @@ dependencies:
|
|
87
67
|
version: '1.3'
|
88
68
|
type: :runtime
|
89
69
|
prerelease: false
|
90
|
-
version_requirements:
|
91
|
-
none: false
|
92
|
-
requirements:
|
93
|
-
- - ~>
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
version: '1.3'
|
70
|
+
version_requirements: *70239311436780
|
96
71
|
- !ruby/object:Gem::Dependency
|
97
72
|
name: json
|
98
|
-
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirement: &70239311433780 !ruby/object:Gem::Requirement
|
99
74
|
none: false
|
100
75
|
requirements:
|
101
76
|
- - ! '>='
|
@@ -103,15 +78,10 @@ dependencies:
|
|
103
78
|
version: '0'
|
104
79
|
type: :development
|
105
80
|
prerelease: false
|
106
|
-
version_requirements:
|
107
|
-
none: false
|
108
|
-
requirements:
|
109
|
-
- - ! '>='
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
version: '0'
|
81
|
+
version_requirements: *70239311433780
|
112
82
|
- !ruby/object:Gem::Dependency
|
113
83
|
name: maruku
|
114
|
-
requirement: !ruby/object:Gem::Requirement
|
84
|
+
requirement: &70239311411840 !ruby/object:Gem::Requirement
|
115
85
|
none: false
|
116
86
|
requirements:
|
117
87
|
- - ! '>='
|
@@ -119,15 +89,10 @@ dependencies:
|
|
119
89
|
version: '0'
|
120
90
|
type: :development
|
121
91
|
prerelease: false
|
122
|
-
version_requirements:
|
123
|
-
none: false
|
124
|
-
requirements:
|
125
|
-
- - ! '>='
|
126
|
-
- !ruby/object:Gem::Version
|
127
|
-
version: '0'
|
92
|
+
version_requirements: *70239311411840
|
128
93
|
- !ruby/object:Gem::Dependency
|
129
94
|
name: rake
|
130
|
-
requirement: !ruby/object:Gem::Requirement
|
95
|
+
requirement: &70239311410940 !ruby/object:Gem::Requirement
|
131
96
|
none: false
|
132
97
|
requirements:
|
133
98
|
- - ! '>='
|
@@ -135,15 +100,10 @@ dependencies:
|
|
135
100
|
version: '0'
|
136
101
|
type: :development
|
137
102
|
prerelease: false
|
138
|
-
version_requirements:
|
139
|
-
none: false
|
140
|
-
requirements:
|
141
|
-
- - ! '>='
|
142
|
-
- !ruby/object:Gem::Version
|
143
|
-
version: '0'
|
103
|
+
version_requirements: *70239311410940
|
144
104
|
- !ruby/object:Gem::Dependency
|
145
105
|
name: rspec
|
146
|
-
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirement: &70239311407980 !ruby/object:Gem::Requirement
|
147
107
|
none: false
|
148
108
|
requirements:
|
149
109
|
- - ! '>='
|
@@ -151,15 +111,10 @@ dependencies:
|
|
151
111
|
version: '0'
|
152
112
|
type: :development
|
153
113
|
prerelease: false
|
154
|
-
version_requirements:
|
155
|
-
none: false
|
156
|
-
requirements:
|
157
|
-
- - ! '>='
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '0'
|
114
|
+
version_requirements: *70239311407980
|
160
115
|
- !ruby/object:Gem::Dependency
|
161
116
|
name: simplecov
|
162
|
-
requirement: !ruby/object:Gem::Requirement
|
117
|
+
requirement: &70239311406460 !ruby/object:Gem::Requirement
|
163
118
|
none: false
|
164
119
|
requirements:
|
165
120
|
- - ! '>='
|
@@ -167,15 +122,10 @@ dependencies:
|
|
167
122
|
version: '0'
|
168
123
|
type: :development
|
169
124
|
prerelease: false
|
170
|
-
version_requirements:
|
171
|
-
none: false
|
172
|
-
requirements:
|
173
|
-
- - ! '>='
|
174
|
-
- !ruby/object:Gem::Version
|
175
|
-
version: '0'
|
125
|
+
version_requirements: *70239311406460
|
176
126
|
- !ruby/object:Gem::Dependency
|
177
127
|
name: webmock
|
178
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirement: &70239311405000 !ruby/object:Gem::Requirement
|
179
129
|
none: false
|
180
130
|
requirements:
|
181
131
|
- - ! '>='
|
@@ -183,15 +133,10 @@ dependencies:
|
|
183
133
|
version: '0'
|
184
134
|
type: :development
|
185
135
|
prerelease: false
|
186
|
-
version_requirements:
|
187
|
-
none: false
|
188
|
-
requirements:
|
189
|
-
- - ! '>='
|
190
|
-
- !ruby/object:Gem::Version
|
191
|
-
version: '0'
|
136
|
+
version_requirements: *70239311405000
|
192
137
|
- !ruby/object:Gem::Dependency
|
193
138
|
name: yard
|
194
|
-
requirement: !ruby/object:Gem::Requirement
|
139
|
+
requirement: &70239311403620 !ruby/object:Gem::Requirement
|
195
140
|
none: false
|
196
141
|
requirements:
|
197
142
|
- - ! '>='
|
@@ -199,12 +144,7 @@ dependencies:
|
|
199
144
|
version: '0'
|
200
145
|
type: :development
|
201
146
|
prerelease: false
|
202
|
-
version_requirements:
|
203
|
-
none: false
|
204
|
-
requirements:
|
205
|
-
- - ! '>='
|
206
|
-
- !ruby/object:Gem::Version
|
207
|
-
version: '0'
|
147
|
+
version_requirements: *70239311403620
|
208
148
|
description: Simple wrapper for the GitHub v3 API
|
209
149
|
email:
|
210
150
|
- wynn.netherland@gmail.com
|
@@ -228,6 +168,7 @@ files:
|
|
228
168
|
- lib/octokit.rb
|
229
169
|
- lib/octokit/authentication.rb
|
230
170
|
- lib/octokit/client.rb
|
171
|
+
- lib/octokit/client/authorizations.rb
|
231
172
|
- lib/octokit/client/commits.rb
|
232
173
|
- lib/octokit/client/downloads.rb
|
233
174
|
- lib/octokit/client/events.rb
|
@@ -264,6 +205,8 @@ files:
|
|
264
205
|
- spec/fixtures/v2/tree_metadata.json
|
265
206
|
- spec/fixtures/v2/user.json
|
266
207
|
- spec/fixtures/v2/users.json
|
208
|
+
- spec/fixtures/v3/authorization.json
|
209
|
+
- spec/fixtures/v3/authorizations.json
|
267
210
|
- spec/fixtures/v3/blob.json
|
268
211
|
- spec/fixtures/v3/branches.json
|
269
212
|
- spec/fixtures/v3/collaborators.json
|
@@ -324,6 +267,7 @@ files:
|
|
324
267
|
- spec/fixtures/v3/watched.json
|
325
268
|
- spec/fixtures/v3/watchers.json
|
326
269
|
- spec/helper.rb
|
270
|
+
- spec/octokit/client/authorizations_spec.rb
|
327
271
|
- spec/octokit/client/commits_spec.rb
|
328
272
|
- spec/octokit/client/downloads_spec.rb
|
329
273
|
- spec/octokit/client/events_spec.rb
|
@@ -365,7 +309,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
365
309
|
version: 1.3.6
|
366
310
|
requirements: []
|
367
311
|
rubyforge_project:
|
368
|
-
rubygems_version: 1.8.
|
312
|
+
rubygems_version: 1.8.10
|
369
313
|
signing_key:
|
370
314
|
specification_version: 3
|
371
315
|
summary: Simple wrapper for the GitHub v3 API
|
@@ -382,6 +326,8 @@ test_files:
|
|
382
326
|
- spec/fixtures/v2/tree_metadata.json
|
383
327
|
- spec/fixtures/v2/user.json
|
384
328
|
- spec/fixtures/v2/users.json
|
329
|
+
- spec/fixtures/v3/authorization.json
|
330
|
+
- spec/fixtures/v3/authorizations.json
|
385
331
|
- spec/fixtures/v3/blob.json
|
386
332
|
- spec/fixtures/v3/branches.json
|
387
333
|
- spec/fixtures/v3/collaborators.json
|
@@ -442,6 +388,7 @@ test_files:
|
|
442
388
|
- spec/fixtures/v3/watched.json
|
443
389
|
- spec/fixtures/v3/watchers.json
|
444
390
|
- spec/helper.rb
|
391
|
+
- spec/octokit/client/authorizations_spec.rb
|
445
392
|
- spec/octokit/client/commits_spec.rb
|
446
393
|
- spec/octokit/client/downloads_spec.rb
|
447
394
|
- spec/octokit/client/events_spec.rb
|