fuselage 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.DS_Store +0 -0
- data/.gitignore +4 -0
- data/Gemfile +4 -0
- data/README.markdown +65 -0
- data/Rakefile +15 -0
- data/examples/authenticated.rb +21 -0
- data/examples/simple.rb +6 -0
- data/fuselage.gemspec +25 -0
- data/lib/.DS_Store +0 -0
- data/lib/fuselage/api.rb +100 -0
- data/lib/fuselage/base.rb +27 -0
- data/lib/fuselage/blob.rb +31 -0
- data/lib/fuselage/commit.rb +49 -0
- data/lib/fuselage/error.rb +28 -0
- data/lib/fuselage/reference.rb +50 -0
- data/lib/fuselage/repository.rb +111 -0
- data/lib/fuselage/tag.rb +44 -0
- data/lib/fuselage/tree.rb +41 -0
- data/lib/fuselage/user.rb +80 -0
- data/lib/fuselage/version.rb +3 -0
- data/lib/fuselage.rb +31 -0
- data/test/base_test.rb +17 -0
- data/test/blob_test.rb +29 -0
- data/test/commits_test.rb +30 -0
- data/test/references_test.rb +38 -0
- data/test/repository_test.rb +103 -0
- data/test/stubs/blobs/tester/new +16 -0
- data/test/stubs/blobs/tester/old +18 -0
- data/test/stubs/commits/tester/new +36 -0
- data/test/stubs/commits/tester/old +58 -0
- data/test/stubs/refs/tester/all +58 -0
- data/test/stubs/refs/tester/master +20 -0
- data/test/stubs/refs/tester/new +20 -0
- data/test/stubs/repos/coreycollins/tester/branches +27 -0
- data/test/stubs/repos/coreycollins/tester/commits +71 -0
- data/test/stubs/repos/coreycollins/tester/main +41 -0
- data/test/stubs/repos/coreycollins/tester/tags +40 -0
- data/test/stubs/repos/show/coreycollins +39 -0
- data/test/stubs/repos/show/coreycollins-private +39 -0
- data/test/stubs/repos/show/gitpilot +39 -0
- data/test/stubs/repos/show/gitpilot-private +120 -0
- data/test/stubs/tags/tester/new +27 -0
- data/test/stubs/tags/tester/old +27 -0
- data/test/stubs/trees/tester/new +26 -0
- data/test/stubs/trees/tester/old +25 -0
- data/test/stubs/users/coreycollins +34 -0
- data/test/stubs/users/coreycollins-private +34 -0
- data/test/stubs/users/emails +0 -0
- data/test/stubs/users/followers +25 -0
- data/test/stubs/users/following +25 -0
- data/test/stubs/users/repositories +40 -0
- data/test/test_helper.rb +103 -0
- data/test/user_test.rb +60 -0
- metadata +139 -0
@@ -0,0 +1,80 @@
|
|
1
|
+
module Fuselage
|
2
|
+
class User < Base
|
3
|
+
|
4
|
+
attr_accessor :company, :name, :following_count, :gravatar_id,
|
5
|
+
:blog, :public_repo_count, :public_gist_count,
|
6
|
+
:id, :login, :followers_count, :created_at,
|
7
|
+
:email, :location, :disk_usage, :private_repo_count,
|
8
|
+
:private_gist_count, :collaborators, :plan,
|
9
|
+
:owned_private_repo_count, :total_private_repo_count
|
10
|
+
|
11
|
+
|
12
|
+
def self.get_access_token(client_id, client_secret, code)
|
13
|
+
responce = Api.api.post('https://github.com/login/oauth/access_token', {:client_id => client_id, :client_secret => client_secret, :code => code})
|
14
|
+
if responce.body != 'error=bad_verification_code'
|
15
|
+
access_token = responce.body.match(/\Aaccess_token=(\S+)&/)[1] rescue nil
|
16
|
+
return access_token
|
17
|
+
end
|
18
|
+
raise RegisterError
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.current
|
22
|
+
raise AuthenticationRequired unless Api.authenticated
|
23
|
+
User.new(get('/user'))
|
24
|
+
end
|
25
|
+
|
26
|
+
# Finds a single user identified by the given username
|
27
|
+
#
|
28
|
+
# Example:
|
29
|
+
#
|
30
|
+
# user = User.find("fcoury")
|
31
|
+
# puts user.login # should return 'fcoury'
|
32
|
+
def self.find(username)
|
33
|
+
User.new(get("/user/#{username}"))
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
class << self
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
def following
|
42
|
+
raise AuthenticationRequired unless Api.authenticated
|
43
|
+
following = []
|
44
|
+
User.get('/user/following').each { |u| following << User.new(u) }
|
45
|
+
following
|
46
|
+
end
|
47
|
+
|
48
|
+
def followers
|
49
|
+
raise AuthenticationRequired unless Api.authenticated
|
50
|
+
followers = []
|
51
|
+
User.get('/user/followers').each { |u| followers << User.new(u) }
|
52
|
+
followers
|
53
|
+
end
|
54
|
+
|
55
|
+
# Return repositories for user.
|
56
|
+
#
|
57
|
+
# Options -
|
58
|
+
# :organization,
|
59
|
+
# :type -> <:all, :public, :private, :member>
|
60
|
+
#
|
61
|
+
def repositories(options = {})
|
62
|
+
options = {:type => :all}.merge(options)
|
63
|
+
raise AuthenticationRequired unless Api.authenticated
|
64
|
+
repos = []
|
65
|
+
if options[:organization].nil?
|
66
|
+
User.get('/user/repos', {:type => options[:type].to_s}).each { |r| repos << Repository.new(r) }
|
67
|
+
else
|
68
|
+
User.get("/orgs/#{options[:organization]}/repos", {:type => options[:type].to_s}).each { |r| repos << Repository.new(r) }
|
69
|
+
end
|
70
|
+
repos
|
71
|
+
end
|
72
|
+
|
73
|
+
# If a user object is passed into a method, we can use this.
|
74
|
+
# It'll also work if we pass in just the login.
|
75
|
+
def to_s
|
76
|
+
login
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
80
|
+
end
|
data/lib/fuselage.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'open-uri'
|
3
|
+
require 'httparty'
|
4
|
+
require 'pp'
|
5
|
+
require 'json'
|
6
|
+
|
7
|
+
# Core extension stuff
|
8
|
+
#Dir[File.join(File.dirname(__FILE__), "ext/*.rb")].each { |f| require f }
|
9
|
+
|
10
|
+
# Octopi stuff
|
11
|
+
# By sorting them we ensure that api and base are loaded first on all sane operating systems
|
12
|
+
Dir[File.join(File.dirname(__FILE__), "fuselage/*.rb")].sort.each { |f| require f }
|
13
|
+
|
14
|
+
# Include this into your app so you can access the child classes easier.
|
15
|
+
# This is the root of all things Octopi.
|
16
|
+
module Fuselage
|
17
|
+
|
18
|
+
def authenticated(token, &block)
|
19
|
+
begin
|
20
|
+
Api.api = AuthApi.instance
|
21
|
+
Api.api.token = token
|
22
|
+
Api.authenticated = true
|
23
|
+
yield
|
24
|
+
ensure
|
25
|
+
# Reset authenticated so if we were to do an anonymous call it would Just Work(tm)
|
26
|
+
Api.authenticated = false
|
27
|
+
Api.api = AnonymousApi.instance
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
data/test/base_test.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), 'test_helper')
|
2
|
+
|
3
|
+
class BaseTest < Test::Unit::TestCase
|
4
|
+
include Fuselage
|
5
|
+
|
6
|
+
class TestModel < Fuselage::Base
|
7
|
+
attr_accessor :some_attribute
|
8
|
+
end
|
9
|
+
|
10
|
+
def setup
|
11
|
+
fake_everything
|
12
|
+
end
|
13
|
+
|
14
|
+
should "should have attribute method when created" do
|
15
|
+
assert_respond_to TestModel.new, 'some_attribute'
|
16
|
+
end
|
17
|
+
end
|
data/test/blob_test.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), 'test_helper')
|
2
|
+
|
3
|
+
class BlobTest < Test::Unit::TestCase
|
4
|
+
include Fuselage
|
5
|
+
|
6
|
+
def setup
|
7
|
+
fake_everything
|
8
|
+
end
|
9
|
+
|
10
|
+
context "authenticated" do
|
11
|
+
|
12
|
+
should "be able to find a blob" do
|
13
|
+
auth do
|
14
|
+
blob = Blob.find('tester','6c5b0e754460477ed049e5b1b0785e667eadaeb9')
|
15
|
+
assert_not_nil blob
|
16
|
+
assert_equal '6c5b0e754460477ed049e5b1b0785e667eadaeb9', blob.sha
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
should "be able to create a blob" do
|
21
|
+
auth do
|
22
|
+
blob = Blob.create('tester', 'Some test content')
|
23
|
+
assert_not_nil blob
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), 'test_helper')
|
2
|
+
|
3
|
+
class CommitTest < Test::Unit::TestCase
|
4
|
+
include Fuselage
|
5
|
+
|
6
|
+
def setup
|
7
|
+
fake_everything
|
8
|
+
end
|
9
|
+
|
10
|
+
context "authenticated" do
|
11
|
+
|
12
|
+
should "be able to find a commit" do
|
13
|
+
auth do
|
14
|
+
commit = Commit.find('tester','6c5b0e754460477ed049e5b1b0785e667eadaeb9')
|
15
|
+
assert_not_nil commit
|
16
|
+
assert_equal '6c5b0e754460477ed049e5b1b0785e667eadaeb9', commit.sha
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
should "be able to create a commit" do
|
21
|
+
auth do
|
22
|
+
commit = Commit.create('tester', 'test commit', '5f2d10379330f0f76caa31d87e4bca4cefcdc3fd', ['6c5b0e754460477ed049e5b1b0785e667eadaeb9'])
|
23
|
+
assert_not_nil commit
|
24
|
+
assert_equal 'test commit', commit.message
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), 'test_helper')
|
2
|
+
|
3
|
+
class ReferenceTest < Test::Unit::TestCase
|
4
|
+
include Fuselage
|
5
|
+
|
6
|
+
def setup
|
7
|
+
fake_everything
|
8
|
+
end
|
9
|
+
|
10
|
+
context "authenticated" do
|
11
|
+
|
12
|
+
should "be able to find a reference" do
|
13
|
+
auth do
|
14
|
+
ref = Reference.find('tester','heads/master')
|
15
|
+
assert_not_nil ref
|
16
|
+
assert_equal 'refs/heads/master', ref.ref
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
should "be able to find all references" do
|
21
|
+
auth do
|
22
|
+
refs = Reference.find_all('tester')
|
23
|
+
assert_not_nil refs
|
24
|
+
assert_equal true, refs.map{ |r| r.to_s }.include?('refs/heads/master')
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
should "be able to create a reference" do
|
29
|
+
auth do
|
30
|
+
ref = Reference.create('tester', 'refs/heads/test', '6c5b0e754460477ed049e5b1b0785e667eadaeb9')
|
31
|
+
assert_not_nil ref
|
32
|
+
assert_equal 'refs/heads/test', ref.ref
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
@@ -0,0 +1,103 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), 'test_helper')
|
2
|
+
|
3
|
+
class RepositoryTest < Test::Unit::TestCase
|
4
|
+
include Fuselage
|
5
|
+
|
6
|
+
def setup
|
7
|
+
fake_everything
|
8
|
+
end
|
9
|
+
|
10
|
+
should "be able to find a repo for a user" do
|
11
|
+
repo = Repository.find("tester", :user => 'coreycollins')
|
12
|
+
assert_not_nil repo
|
13
|
+
assert_equal 'tester', repo.name
|
14
|
+
end
|
15
|
+
|
16
|
+
should "be able to find all repos for a user" do
|
17
|
+
repos = Repository.find_all(:user => "coreycollins")
|
18
|
+
assert_not_nil repos
|
19
|
+
assert_equal true, repos.map{ |r| r.to_s }.include?('tester')
|
20
|
+
end
|
21
|
+
|
22
|
+
should "be able to find a repo for a organization" do
|
23
|
+
repos = Repository.find_by_organization("gitpilot")
|
24
|
+
assert_not_nil repos
|
25
|
+
assert_equal true, repos.map{ |r| r.to_s }.include?('octopi')
|
26
|
+
end
|
27
|
+
|
28
|
+
should "not be able to find a repo for a user that doesn't exist" do
|
29
|
+
exception = assert_raise NotFound do
|
30
|
+
Repository.find_all(:user => "i-am-most-probably-a-user-that-does-not-exist")
|
31
|
+
end
|
32
|
+
assert_equal "The Repository could not be found or created. It could be private.", exception.message
|
33
|
+
end
|
34
|
+
|
35
|
+
context "authenticated" do
|
36
|
+
|
37
|
+
should "be able to find a repo" do
|
38
|
+
auth do
|
39
|
+
repo = Repository.find("tester")
|
40
|
+
assert_not_nil repo
|
41
|
+
assert_equal 'tester', repo.name
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
should "return current authenticated users repositpries" do
|
46
|
+
auth do
|
47
|
+
repos = User.current.repositories
|
48
|
+
assert_not_nil repos
|
49
|
+
assert_equal true, repos.map{ |r| r.to_s }.include?('tester')
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
should "return current authenticated users repositpries within an organization" do
|
54
|
+
auth do
|
55
|
+
repos = User.current.repositories(:organization => 'gitpilot')
|
56
|
+
assert_not_nil repos
|
57
|
+
assert_equal true, repos.map{ |r| r.to_s }.include?('gitpilot_test')
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
should "return current authenticated users repositpries within an organization that are private" do
|
62
|
+
auth do
|
63
|
+
repos = User.current.repositories(:organization => 'gitpilot', :type => :private)
|
64
|
+
assert_not_nil repos
|
65
|
+
assert_equal true, repos.map{ |r| r.to_s }.include?('gitpilot_test')
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
should "create a public repo for current authenticated user" do
|
70
|
+
auth do
|
71
|
+
repo = Repository.create('tester', :public => true)
|
72
|
+
assert_not_nil repo
|
73
|
+
assert_equal 'tester', repo.name
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
should "return repos tags" do
|
78
|
+
auth do
|
79
|
+
tags = Repository.find('tester').tags
|
80
|
+
assert_not_nil tags
|
81
|
+
assert_equal true, tags.map{ |t| t.to_s }.include?('0.1')
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
should "return repos branches" do
|
86
|
+
auth do
|
87
|
+
branches = Repository.find('tester').branches
|
88
|
+
assert_not_nil branches
|
89
|
+
assert_equal true, branches.map{ |b| b.to_s }.include?('ref/heads/new')
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
should "return repos commits for current user" do
|
94
|
+
auth do
|
95
|
+
commits = Repository.find('tester').commits
|
96
|
+
assert_not_nil commits
|
97
|
+
assert_equal true, commits.map{ |c| c.sha }.include?('b6e7a02bb2d39d42843e753dc9af162d6de24882')
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
end
|
102
|
+
|
103
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
HTTP/1.1 201 Created
|
2
|
+
Server: nginx/1.0.4
|
3
|
+
Date: Mon, 18 Jul 2011 17:05:31 GMT
|
4
|
+
Content-Type: application/json
|
5
|
+
Connection: keep-alive
|
6
|
+
Status: 201 Created
|
7
|
+
X-RateLimit-Limit: 5000
|
8
|
+
Location: https://api.github.com/repos/coreycollins/tester/git/blobs/cb8d6bb5e54b1c7159698442057416473a3b5385
|
9
|
+
X-RateLimit-Remaining: 4999
|
10
|
+
Content-Length: 168
|
11
|
+
|
12
|
+
{
|
13
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/blobs/cb8d6bb5e54b1c7159698442057416473a3b5385",
|
14
|
+
"sha": "cb8d6bb5e54b1c7159698442057416473a3b5385"
|
15
|
+
}
|
16
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/1.0.4
|
3
|
+
Date: Mon, 18 Jul 2011 17:06:33 GMT
|
4
|
+
Content-Type: application/json
|
5
|
+
Connection: keep-alive
|
6
|
+
Status: 200 OK
|
7
|
+
X-RateLimit-Limit: 5000
|
8
|
+
X-RateLimit-Remaining: 4998
|
9
|
+
Content-Length: 236
|
10
|
+
|
11
|
+
{
|
12
|
+
"encoding": "base64",
|
13
|
+
"content": "bmV3IGJsb2I=\n",
|
14
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/blobs/cb8d6bb5e54b1c7159698442057416473a3b5385",
|
15
|
+
"size": 8,
|
16
|
+
"sha": "cb8d6bb5e54b1c7159698442057416473a3b5385"
|
17
|
+
}
|
18
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
HTTP/1.1 201 Created
|
2
|
+
Server: nginx/1.0.4
|
3
|
+
Date: Sat, 16 Jul 2011 19:02:18 GMT
|
4
|
+
Content-Type: application/json
|
5
|
+
Connection: keep-alive
|
6
|
+
Status: 201 Created
|
7
|
+
X-RateLimit-Limit: 5000
|
8
|
+
Location: https://api.github.com/repos/coreycollins/tester/git/commits/b39e901ca87cb74d2486503941bc5530c5543729
|
9
|
+
X-RateLimit-Remaining: 4998
|
10
|
+
Content-Length: 756
|
11
|
+
|
12
|
+
{
|
13
|
+
"tree": {
|
14
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/trees/5f2d10379330f0f76caa",
|
15
|
+
"sha": "5f2d10379330f0f76caa"
|
16
|
+
},
|
17
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/commits/b39e901ca87cb74d2486503941bc5530c5543729",
|
18
|
+
"committer": {
|
19
|
+
"date": "2011-07-16T12:02:18-07:00",
|
20
|
+
"name": "coreycollins",
|
21
|
+
"email": "corey@gitpilot.com"
|
22
|
+
},
|
23
|
+
"message": "test commit",
|
24
|
+
"author": {
|
25
|
+
"date": "2011-07-16T12:02:18-07:00",
|
26
|
+
"name": "coreycollins",
|
27
|
+
"email": "corey@gitpilot.com"
|
28
|
+
},
|
29
|
+
"sha": "b39e901ca87cb74d2486503941bc5530c5543729",
|
30
|
+
"parents": [
|
31
|
+
{
|
32
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/commits/6c5b0e754460477ed049",
|
33
|
+
"sha": "6c5b0e754460477ed049"
|
34
|
+
}
|
35
|
+
]
|
36
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/1.0.4
|
3
|
+
Date: Fri, 15 Jul 2011 14:15:22 GMT
|
4
|
+
Content-Type: application/json
|
5
|
+
Connection: keep-alive
|
6
|
+
Status: 200 OK
|
7
|
+
X-RateLimit-Limit: 5000
|
8
|
+
X-RateLimit-Remaining: 4999
|
9
|
+
Content-Length: 1555
|
10
|
+
|
11
|
+
{
|
12
|
+
"author": null,
|
13
|
+
"sha": "6c5b0e754460477ed049e5b1b0785e667eadaeb9",
|
14
|
+
"files": [
|
15
|
+
{
|
16
|
+
"sha": "6c5b0e754460477ed049e5b1b0785e667eadaeb9",
|
17
|
+
"blob_url": "https://github.com/coreycollins/tester/blob/6c5b0e754460477ed049e5b1b0785e667eadaeb9/version.rb",
|
18
|
+
"deletions": 0,
|
19
|
+
"additions": 0,
|
20
|
+
"changes": 0,
|
21
|
+
"filename": "version.rb",
|
22
|
+
"raw_url": "https://github.com/coreycollins/tester/raw/6c5b0e754460477ed049e5b1b0785e667eadaeb9/version.rb",
|
23
|
+
"status": "added"
|
24
|
+
}
|
25
|
+
],
|
26
|
+
"committer": null,
|
27
|
+
"url": "https://api.github.com/repos/coreycollins/tester/commits/6c5b0e754460477ed049e5b1b0785e667eadaeb9",
|
28
|
+
"commit": {
|
29
|
+
"author": {
|
30
|
+
"date": "2011-07-14T12:41:51-07:00",
|
31
|
+
"name": "Corey Collins",
|
32
|
+
"email": "corey@corey-ubuntu.(none)"
|
33
|
+
},
|
34
|
+
"message": "new tag",
|
35
|
+
"tree": {
|
36
|
+
"sha": "5f2d10379330f0f76caa31d87e4bca4cefcdc3fd",
|
37
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/trees/5f2d10379330f0f76caa31d87e4bca4cefcdc3fd"
|
38
|
+
},
|
39
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/commits/6c5b0e754460477ed049e5b1b0785e667eadaeb9",
|
40
|
+
"committer": {
|
41
|
+
"date": "2011-07-14T12:41:51-07:00",
|
42
|
+
"name": "Corey Collins",
|
43
|
+
"email": "corey@corey-ubuntu.(none)"
|
44
|
+
}
|
45
|
+
},
|
46
|
+
"parents": [
|
47
|
+
{
|
48
|
+
"sha": "b6e7a02bb2d39d42843e753dc9af162d6de24882",
|
49
|
+
"url": "https://api.github.com/repos/coreycollins/tester/commits/b6e7a02bb2d39d42843e753dc9af162d6de24882"
|
50
|
+
}
|
51
|
+
],
|
52
|
+
"stats": {
|
53
|
+
"deletions": 0,
|
54
|
+
"total": 0,
|
55
|
+
"additions": 0
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
@@ -0,0 +1,58 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/1.0.4
|
3
|
+
Date: Fri, 15 Jul 2011 15:50:58 GMT
|
4
|
+
Content-Type: application/json
|
5
|
+
Connection: keep-alive
|
6
|
+
Status: 200 OK
|
7
|
+
X-RateLimit-Limit: 5000
|
8
|
+
X-RateLimit-Remaining: 4996
|
9
|
+
Content-Length: 1699
|
10
|
+
|
11
|
+
[
|
12
|
+
{
|
13
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/refs/heads/master",
|
14
|
+
"object": {
|
15
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/commits/6c5b0e754460477ed049e5b1b0785e667eadaeb9",
|
16
|
+
"type": "commit",
|
17
|
+
"sha": "6c5b0e754460477ed049e5b1b0785e667eadaeb9"
|
18
|
+
},
|
19
|
+
"ref": "refs/heads/master"
|
20
|
+
},
|
21
|
+
{
|
22
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/refs/heads/new",
|
23
|
+
"object": {
|
24
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/commits/6c5b0e754460477ed049e5b1b0785e667eadaeb9",
|
25
|
+
"type": "commit",
|
26
|
+
"sha": "6c5b0e754460477ed049e5b1b0785e667eadaeb9"
|
27
|
+
},
|
28
|
+
"ref": "refs/heads/new"
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/refs/tags/0.0.1",
|
32
|
+
"object": {
|
33
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/commits/6c5b0e754460477ed049e5b1b0785e667eadaeb9",
|
34
|
+
"type": "commit",
|
35
|
+
"sha": "6c5b0e754460477ed049e5b1b0785e667eadaeb9"
|
36
|
+
},
|
37
|
+
"ref": "refs/tags/0.0.1"
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/refs/tags/0.0.2",
|
41
|
+
"object": {
|
42
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/tags/6e4c52868101f8762bcc632684688cb865396a8b",
|
43
|
+
"type": "tag",
|
44
|
+
"sha": "6e4c52868101f8762bcc632684688cb865396a8b"
|
45
|
+
},
|
46
|
+
"ref": "refs/tags/0.0.2"
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/refs/tags/0.1",
|
50
|
+
"object": {
|
51
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/tags/483ad4234cdcbf0d373a28bf32a579e9caff93a3",
|
52
|
+
"type": "tag",
|
53
|
+
"sha": "483ad4234cdcbf0d373a28bf32a579e9caff93a3"
|
54
|
+
},
|
55
|
+
"ref": "refs/tags/0.1"
|
56
|
+
}
|
57
|
+
]
|
58
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/1.0.4
|
3
|
+
Date: Fri, 15 Jul 2011 15:45:32 GMT
|
4
|
+
Content-Type: application/json
|
5
|
+
Connection: keep-alive
|
6
|
+
Status: 200 OK
|
7
|
+
X-RateLimit-Limit: 5000
|
8
|
+
X-RateLimit-Remaining: 4998
|
9
|
+
Content-Length: 327
|
10
|
+
|
11
|
+
{
|
12
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/refs/heads/master",
|
13
|
+
"object": {
|
14
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/commits/6c5b0e754460477ed049e5b1b0785e667eadaeb9",
|
15
|
+
"type": "commit",
|
16
|
+
"sha": "6c5b0e754460477ed049e5b1b0785e667eadaeb9"
|
17
|
+
},
|
18
|
+
"ref": "refs/heads/master"
|
19
|
+
}
|
20
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
HTTP/1.1 201 Created
|
2
|
+
Server: nginx/1.0.4
|
3
|
+
Date: Sat, 16 Jul 2011 19:20:59 GMT
|
4
|
+
Content-Type: application/json
|
5
|
+
Connection: keep-alive
|
6
|
+
Status: 201 Created
|
7
|
+
X-RateLimit-Limit: 5000
|
8
|
+
Location: https://api.github.com/repos/coreycollins/tester/git/refs/heads/test
|
9
|
+
X-RateLimit-Remaining: 4995
|
10
|
+
Content-Length: 323
|
11
|
+
|
12
|
+
{
|
13
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/refs/heads/test",
|
14
|
+
"object": {
|
15
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/commits/6c5b0e754460477ed049e5b1b0785e667eadaeb9",
|
16
|
+
"type": "commit",
|
17
|
+
"sha": "6c5b0e754460477ed049e5b1b0785e667eadaeb9"
|
18
|
+
},
|
19
|
+
"ref": "refs/heads/test"
|
20
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/1.0.4
|
3
|
+
Date: Thu, 14 Jul 2011 19:56:40 GMT
|
4
|
+
Content-Type: application/json
|
5
|
+
Connection: keep-alive
|
6
|
+
Status: 200 OK
|
7
|
+
X-RateLimit-Limit: 5000
|
8
|
+
X-RateLimit-Remaining: 4990
|
9
|
+
Content-Length: 446
|
10
|
+
|
11
|
+
[
|
12
|
+
{
|
13
|
+
"commit": {
|
14
|
+
"url": "https://api.github.com/repos/coreycollins/tester/commits/6c5b0e754460477ed049e5b1b0785e667eadaeb9",
|
15
|
+
"sha": "6c5b0e754460477ed049e5b1b0785e667eadaeb9"
|
16
|
+
},
|
17
|
+
"name": "new"
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"commit": {
|
21
|
+
"url": "https://api.github.com/repos/coreycollins/tester/commits/6c5b0e754460477ed049e5b1b0785e667eadaeb9",
|
22
|
+
"sha": "6c5b0e754460477ed049e5b1b0785e667eadaeb9"
|
23
|
+
},
|
24
|
+
"name": "master"
|
25
|
+
}
|
26
|
+
]
|
27
|
+
|
@@ -0,0 +1,71 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/1.0.4
|
3
|
+
Date: Thu, 14 Jul 2011 20:29:21 GMT
|
4
|
+
Content-Type: application/json
|
5
|
+
Connection: keep-alive
|
6
|
+
Status: 200 OK
|
7
|
+
X-RateLimit-Limit: 5000
|
8
|
+
X-RateLimit-Remaining: 4999
|
9
|
+
Link: <https://api.github.com/repos/coreycollins/tester/commits?access_token=036232258609d6188a559c34b874415e58e05a8a&page=0>; rel="last"
|
10
|
+
Content-Length: 2026
|
11
|
+
|
12
|
+
[
|
13
|
+
{
|
14
|
+
"parents": [
|
15
|
+
{
|
16
|
+
"url": "https://api.github.com/repos/coreycollins/tester/commits/b6e7a02bb2d39d42843e753dc9af162d6de24882",
|
17
|
+
"sha": "b6e7a02bb2d39d42843e753dc9af162d6de24882"
|
18
|
+
}
|
19
|
+
],
|
20
|
+
"url": "https://api.github.com/repos/coreycollins/tester/commits/6c5b0e754460477ed049e5b1b0785e667eadaeb9",
|
21
|
+
"sha": "6c5b0e754460477ed049e5b1b0785e667eadaeb9",
|
22
|
+
"author": null,
|
23
|
+
"commit": {
|
24
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/commits/6c5b0e754460477ed049e5b1b0785e667eadaeb9",
|
25
|
+
"tree": {
|
26
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/trees/5f2d10379330f0f76caa31d87e4bca4cefcdc3fd",
|
27
|
+
"sha": "5f2d10379330f0f76caa31d87e4bca4cefcdc3fd"
|
28
|
+
},
|
29
|
+
"message": "new tag",
|
30
|
+
"author": {
|
31
|
+
"date": "2011-07-14T12:41:51-07:00",
|
32
|
+
"name": "Corey Collins",
|
33
|
+
"email": "corey@corey-ubuntu.(none)"
|
34
|
+
},
|
35
|
+
"committer": {
|
36
|
+
"date": "2011-07-14T12:41:51-07:00",
|
37
|
+
"name": "Corey Collins",
|
38
|
+
"email": "corey@corey-ubuntu.(none)"
|
39
|
+
}
|
40
|
+
},
|
41
|
+
"committer": null
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"parents": [
|
45
|
+
|
46
|
+
],
|
47
|
+
"url": "https://api.github.com/repos/coreycollins/tester/commits/b6e7a02bb2d39d42843e753dc9af162d6de24882",
|
48
|
+
"sha": "b6e7a02bb2d39d42843e753dc9af162d6de24882",
|
49
|
+
"author": null,
|
50
|
+
"commit": {
|
51
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/commits/b6e7a02bb2d39d42843e753dc9af162d6de24882",
|
52
|
+
"tree": {
|
53
|
+
"url": "https://api.github.com/repos/coreycollins/tester/git/trees/053d3630aa7fb42e9a176d75c3dd5c54a5983eb8",
|
54
|
+
"sha": "053d3630aa7fb42e9a176d75c3dd5c54a5983eb8"
|
55
|
+
},
|
56
|
+
"message": "init commit",
|
57
|
+
"author": {
|
58
|
+
"date": "2011-07-14T12:41:03-07:00",
|
59
|
+
"name": "Corey Collins",
|
60
|
+
"email": "corey@corey-ubuntu.(none)"
|
61
|
+
},
|
62
|
+
"committer": {
|
63
|
+
"date": "2011-07-14T12:41:03-07:00",
|
64
|
+
"name": "Corey Collins",
|
65
|
+
"email": "corey@corey-ubuntu.(none)"
|
66
|
+
}
|
67
|
+
},
|
68
|
+
"committer": null
|
69
|
+
}
|
70
|
+
]
|
71
|
+
|