git_hub 0.1.0 → 0.2.0
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.
- data/README.rdoc +16 -2
- data/VERSION +1 -1
- data/bin/git_hub +1 -2
- data/git_hub.gemspec +30 -3
- data/lib/git_hub/api.rb +6 -0
- data/lib/git_hub/base.rb +52 -10
- data/lib/git_hub/commit.rb +45 -0
- data/lib/git_hub/repo.rb +47 -51
- data/rdoc/classes/GitHub/Api.html +300 -0
- data/rdoc/classes/GitHub/Base.html +423 -0
- data/rdoc/classes/GitHub/Repo.html +738 -0
- data/rdoc/classes/GitHub.html +310 -0
- data/rdoc/created.rid +1 -0
- data/rdoc/files/README_rdoc.html +171 -0
- data/rdoc/files/lib/git_hub/api_rb.html +103 -0
- data/rdoc/files/lib/git_hub/base_rb.html +101 -0
- data/rdoc/files/lib/git_hub/repo_rb.html +91 -0
- data/rdoc/files/lib/git_hub_rb.html +91 -0
- data/rdoc/fr_class_index.html +33 -0
- data/rdoc/fr_file_index.html +35 -0
- data/rdoc/fr_method_index.html +81 -0
- data/rdoc/index.html +23 -0
- data/rdoc/rdoc-style.css +299 -0
- data/spec/git_hub/base_spec.rb +2 -2
- data/spec/git_hub/commit_spec.rb +53 -0
- data/spec/git_hub/repo_spec.rb +123 -85
- data/spec/spec_helper.rb +35 -8
- data/spec/stubs/api_route_error.res +14 -0
- data/spec/stubs/commits/list/joe007/fine_repo/master/README.res +28 -0
- data/spec/stubs/commits/list/joe007/fine_repo/master.res +84 -0
- data/spec/stubs/commits/show/joe007/fine_repo/5e61f0687c40ca48214d09dc7ae2d0d0d8fbfeb8.res +38 -0
- data/spec/stubs/repos/create.1.res +22 -0
- data/spec/stubs/repos/{create.res → create.2.res} +0 -0
- data/spec/stubs/repos/create.3.res +100 -0
- data/spec/stubs/repos/create.4.res +14 -0
- data/spec/stubs/repos/show/joe007/fine_repo/branches.res +15 -0
- data/spec/stubs/repos/show/joe007/fine_repo/tags.res +17 -0
- metadata +30 -3
@@ -0,0 +1,53 @@
|
|
1
|
+
require File.expand_path(
|
2
|
+
File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
3
|
+
|
4
|
+
module GitHubTest
|
5
|
+
describe GitHub::Commit do
|
6
|
+
after(:each) do
|
7
|
+
api.auth.clear
|
8
|
+
end
|
9
|
+
|
10
|
+
context '.find' do
|
11
|
+
it 'finds all commits for a (valid) github user repo' do
|
12
|
+
expect(:get, "#{github_yaml}/commits/list/joe007/fine_repo/master") do
|
13
|
+
commits = GitHub::Commit.find(:user=>'joe007', :repo=>'fine_repo')
|
14
|
+
commits.should be_an Array
|
15
|
+
commits.should_not be_empty
|
16
|
+
commits.should have(5).commits
|
17
|
+
commits.each {|commit| commit.should be_a GitHub::Commit}
|
18
|
+
should_be_5e61 commits.first
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'finds all commits for a specific id path' do
|
23
|
+
expect(:get, "#{github_yaml}/commits/list/joe007/fine_repo/master/README") do
|
24
|
+
commits = GitHub::Commit.find(:user=>'joe007', :repo=>'fine_repo', :path=> 'README')
|
25
|
+
commits.should be_an Array
|
26
|
+
commits.should_not be_empty
|
27
|
+
commits.should have(1).commit
|
28
|
+
commits.each {|commit| commit.should be_a GitHub::Commit}
|
29
|
+
should_be_543b commits.first
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'finds commits with a specific id(sha)' do
|
34
|
+
expect(:get, "#{github_yaml}/commits/show/joe007/fine_repo/5e61f0687c40ca48214d09dc7ae2d0d0d8fbfeb8") do
|
35
|
+
commit = GitHub::Commit.find :user=> 'joe007', :repo=>'fine_repo', :sha=> '5e61f0687c40ca48214d09dc7ae2d0d0d8fbfeb8'
|
36
|
+
should_be_5e61 commit
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'retrieves additional attributes for a commit specified by id(sha)' do
|
41
|
+
expect(:get, "#{github_yaml}/commits/show/joe007/fine_repo/5e61f0687c40ca48214d09dc7ae2d0d0d8fbfeb8") do
|
42
|
+
commit = GitHub::Commit.find :user=> 'joe007', :repo=>'fine_repo', :sha=> '5e61f0687c40ca48214d09dc7ae2d0d0d8fbfeb8'
|
43
|
+
commit.added.should == []
|
44
|
+
commit.modified.should == [{"diff"=>"@@ -1 +1 @@\n-0.1.1\n+0.1.2", "filename"=>"VERSION"}]
|
45
|
+
commit.removed.should == []
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end # describe GitHub::Commit
|
50
|
+
|
51
|
+
end # module GithubTest
|
52
|
+
|
53
|
+
# EOF
|
data/spec/git_hub/repo_spec.rb
CHANGED
@@ -7,20 +7,50 @@ module GitHubTest
|
|
7
7
|
api.auth.clear
|
8
8
|
end
|
9
9
|
|
10
|
-
context '
|
10
|
+
context '.find as /show/:user/:repo' do
|
11
|
+
it 'finds repo of a (valid) github user' do
|
12
|
+
expect(:get, "#{github_yaml}/repos/show/joe007/fine_repo") do
|
13
|
+
repo = GitHub::Repo.find(:user=>'joe007', :repo=>'fine_repo')
|
14
|
+
repo.should be_a GitHub::Repo
|
15
|
+
repo.name.should == 'fine_repo'
|
16
|
+
repo.url.should == 'http://github.com/joe007/fine_repo'
|
17
|
+
repo.clone_url.should == 'git://github.com/joe007/fine_repo.git'
|
18
|
+
repo.description.should == 'Fine repo by joe'
|
19
|
+
repo.homepage.should == ''
|
20
|
+
repo.watchers.should == 1
|
21
|
+
repo.followers.should == 1
|
22
|
+
repo.open_issues.should == 0
|
23
|
+
repo.forks.should == 0
|
24
|
+
repo.should_not be_fork
|
25
|
+
repo.should_not be_private
|
26
|
+
repo.owner.should == 'joe007'
|
27
|
+
repo.username.should == 'joe007'
|
28
|
+
end
|
29
|
+
end
|
30
|
+
it 'fails returning error object instead of non-existing repo' do
|
31
|
+
expect(:get, "#{github_yaml}/repos/show/joe007/err_repo") do
|
32
|
+
res = GitHub::Repo.find(:user=>'joe007', :repo=>'err_repo')
|
33
|
+
res.should have_key 'error' # res = {"error"=>[{"error"=>"repository not found"}]}
|
34
|
+
res['error'].should be_kind_of Array
|
35
|
+
res['error'].first.should have_key 'error'
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
context '.find as /show/:user)' do
|
11
41
|
it 'returns an array of repos for a valid github user' do
|
12
42
|
expect(:get, "#{github_yaml}/repos/show/joe007") do
|
13
|
-
repos =
|
43
|
+
repos = GitHub::Repo.find(:user=>'joe007')
|
14
44
|
repos.should_not be_empty
|
15
45
|
repos.should be_an Array
|
16
46
|
repos.should have(3).repos
|
17
|
-
repos.each {|repo| repo.should be_a
|
47
|
+
repos.each {|repo| repo.should be_a GitHub::Repo}
|
18
48
|
end
|
19
49
|
end
|
20
50
|
|
21
51
|
it 'returns repos with "show" attributes set' do
|
22
52
|
expect(:get, "#{github_yaml}/repos/show/joe007") do
|
23
|
-
repo =
|
53
|
+
repo = GitHub::Repo.find(:user=>'joe007').first
|
24
54
|
repo.name.should == 'fine_repo'
|
25
55
|
repo.url.should == 'http://github.com/joe007/fine_repo'
|
26
56
|
repo.clone_url.should == 'git://github.com/joe007/fine_repo.git'
|
@@ -39,32 +69,32 @@ module GitHubTest
|
|
39
69
|
|
40
70
|
it 'returns repos with "search" attributes unset' do
|
41
71
|
expect(:get, "#{github_yaml}/repos/show/joe007") do
|
42
|
-
repo =
|
72
|
+
repo = GitHub::Repo.find(:user=>'joe007').first
|
43
73
|
repo.id.should == nil
|
44
74
|
repo.language.should == nil
|
45
75
|
repo.size.should == nil
|
46
76
|
repo.created.should == nil
|
47
77
|
repo.pushed.should == nil
|
48
78
|
repo.score.should == nil
|
49
|
-
repo.type.should == 'repo'
|
79
|
+
repo.type.should == 'repo'
|
50
80
|
end
|
51
81
|
end
|
52
82
|
end
|
53
83
|
|
54
|
-
context '
|
84
|
+
context '.find as /search' do
|
55
85
|
it 'searches github repos with specific search terms' do
|
56
86
|
expect(:get, "#{github_yaml}/repos/search/joe+repo") do
|
57
|
-
repos =
|
87
|
+
repos = GitHub::Repo.find(:query=>['joe', 'repo'])
|
58
88
|
repos.should_not be_empty
|
59
89
|
repos.should be_an Array
|
60
90
|
repos.should have(3).repos
|
61
|
-
repos.each {|repo| repo.should be_a
|
91
|
+
repos.each {|repo| repo.should be_a GitHub::Repo}
|
62
92
|
end
|
63
93
|
end
|
64
94
|
|
65
95
|
it 'returns repos with "search" attributes set' do
|
66
96
|
expect(:get, "#{github_yaml}/repos/search/joe+repo") do
|
67
|
-
repo =
|
97
|
+
repo = GitHub::Repo.find(:query=>['joe', 'repo']).first
|
68
98
|
repo.name.should == 'fine_repo'
|
69
99
|
repo.description.should == 'Fine repo by joe'
|
70
100
|
repo.watchers.should == 3
|
@@ -86,7 +116,7 @@ module GitHubTest
|
|
86
116
|
|
87
117
|
it 'returns repos with "show" attributes unset' do
|
88
118
|
expect(:get, "#{github_yaml}/repos/search/joe+repo") do
|
89
|
-
repo =
|
119
|
+
repo = GitHub::Repo.find(:query=>['joe', 'repo']).first
|
90
120
|
repo.url.should == 'http://github.com/joe007/fine_repo'
|
91
121
|
repo.homepage.should == nil
|
92
122
|
repo.open_issues.should == nil
|
@@ -95,46 +125,36 @@ module GitHubTest
|
|
95
125
|
end
|
96
126
|
end
|
97
127
|
|
98
|
-
context '
|
99
|
-
it '
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
it 'returns error object instead of non-existing repo' do
|
120
|
-
expect(:get, "#{github_yaml}/repos/show/joe007/err_repo") do
|
121
|
-
res = described_class.find(:user=>'joe007', :repo=>'err_repo')
|
122
|
-
res.should have_key 'error' # res = {"error"=>[{"error"=>"repository not found"}]}
|
123
|
-
res['error'].should be_kind_of Array
|
124
|
-
res['error'].first.should have_key 'error'
|
125
|
-
end
|
128
|
+
context '.create' do
|
129
|
+
it 'creates new repo for authenticated github user' do
|
130
|
+
api.auth = joe_auth
|
131
|
+
keys = {:name => 'new_repo', :public => 1}.merge joe_auth
|
132
|
+
expects(:post, "#{github_yaml}/repos/create", :expected_keys=>keys, :body=>body_from_file('/repos/create.1'))
|
133
|
+
repo = GitHub::Repo.create(:repo=>'new_repo')
|
134
|
+
repo.should be_a GitHub::Repo
|
135
|
+
repo.name.should == 'new_repo'
|
136
|
+
repo.url.should == 'http://github.com/joe007/new_repo'
|
137
|
+
repo.clone_url.should == 'git@github.com:joe007/new_repo.git'
|
138
|
+
repo.description.should == nil
|
139
|
+
repo.homepage.should == nil
|
140
|
+
repo.watchers.should == 1
|
141
|
+
repo.followers.should == 1
|
142
|
+
repo.open_issues.should == 0
|
143
|
+
repo.forks.should == 0
|
144
|
+
repo.should_not be_fork
|
145
|
+
repo.should_not be_private
|
146
|
+
repo.owner.should == 'joe007'
|
147
|
+
repo.username.should == 'joe007'
|
126
148
|
end
|
127
|
-
end
|
128
149
|
|
129
|
-
|
130
|
-
it 'creates new repo for authenticated github user' do
|
150
|
+
it 'creates new repo with extended attributes' do
|
131
151
|
api.auth = joe_auth
|
132
152
|
keys = {:name => 'new_repo', :description => 'New repo',
|
133
153
|
:homepage => 'http://joe.org/new_repo', :public => 1}.merge joe_auth
|
134
|
-
expects(:post, "#{github_yaml}/repos/create", :expected_keys=>keys, :body=>body_from_file('/repos/create'))
|
135
|
-
repo =
|
154
|
+
expects(:post, "#{github_yaml}/repos/create", :expected_keys=>keys, :body=>body_from_file('/repos/create.2'))
|
155
|
+
repo = GitHub::Repo.create(:name=>'new_repo', :description => 'New repo',
|
136
156
|
:homepage => 'http://joe.org/new_repo', :private => false)
|
137
|
-
repo.should be_a
|
157
|
+
repo.should be_a GitHub::Repo
|
138
158
|
repo.name.should == 'new_repo'
|
139
159
|
repo.url.should == 'http://github.com/joe007/new_repo'
|
140
160
|
repo.clone_url.should == 'git@github.com:joe007/new_repo.git'
|
@@ -149,13 +169,25 @@ module GitHubTest
|
|
149
169
|
repo.owner.should == 'joe007'
|
150
170
|
repo.username.should == 'joe007'
|
151
171
|
end
|
172
|
+
|
173
|
+
it 'fails if repo with the same name already exists' do
|
174
|
+
api.auth = joe_auth
|
175
|
+
keys = {:name => 'fine_repo', :public => 1}.merge joe_auth
|
176
|
+
expects(:post, "#{github_yaml}/repos/create", :expected_keys=>keys, :body=>body_from_file('/repos/create.4'))
|
177
|
+
res = GitHub::Repo.create(:name=>'fine_repo')
|
178
|
+
res.should have_key 'error' # res = {"error"=>[{"error"=>"repository not found"}]}
|
179
|
+
res['error'].should be_kind_of Array
|
180
|
+
res['error'].first.should have_key 'error'
|
181
|
+
res['error'].first['error'].should == 'repository creation failed'
|
182
|
+
end
|
183
|
+
|
152
184
|
end
|
153
185
|
|
154
186
|
context '#delete' do
|
155
187
|
it 'deletes new repo for authenticated github user' do
|
156
188
|
api.auth = joe_auth
|
157
189
|
expect(:get, "#{github_yaml}/repos/show/joe007/new_repo")
|
158
|
-
repo =
|
190
|
+
repo = GitHub::Repo.find(:repo=>'new_repo')
|
159
191
|
post1 = { :expected_keys => joe_auth,
|
160
192
|
:body => body_from_file('/repos/delete/new_repo.1') }
|
161
193
|
post2 = { :expected_keys => {:delete_token => :any}.merge(joe_auth),
|
@@ -166,11 +198,55 @@ module GitHubTest
|
|
166
198
|
end
|
167
199
|
end
|
168
200
|
|
201
|
+
context '#branches, tags, commits' do
|
202
|
+
before(:each) do
|
203
|
+
expect(:get, "#{github_yaml}/repos/show/joe007/fine_repo")
|
204
|
+
@repo = GitHub::Repo.find(:user=>'joe007', :repo=>'fine_repo')
|
205
|
+
end
|
206
|
+
|
207
|
+
it 'retrieves repo tags' do
|
208
|
+
expect(:get, "#{github_yaml}/repos/show/joe007/fine_repo/tags") do
|
209
|
+
tags = @repo.tags
|
210
|
+
tags.should be_kind_of Hash
|
211
|
+
tags.should have(3).tags
|
212
|
+
tags.should have_key 'v0.1.2'
|
213
|
+
tags['v0.1.2'].should == '5e61f0687c40ca48214d09dc7ae2d0d0d8fbfeb8'
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
it 'retrieves repo branches' do
|
218
|
+
expect(:get, "#{github_yaml}/repos/show/joe007/fine_repo/branches") do
|
219
|
+
branches = @repo.branches
|
220
|
+
branches.should be_kind_of Hash
|
221
|
+
branches.should have(1).branches
|
222
|
+
branches.should have_key 'master'
|
223
|
+
branches['master'].should == '5e61f0687c40ca48214d09dc7ae2d0d0d8fbfeb8'
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
it 'retrieves commits for a repo branch (master by default)' do
|
228
|
+
expect(:get, "#{github_yaml}/commits/list/joe007/fine_repo/master") do
|
229
|
+
commits = @repo.commits
|
230
|
+
commits.should be_kind_of Array
|
231
|
+
commits.should have(5).commits
|
232
|
+
commits.each {|commit| commit.should be_a GitHub::Commit}
|
233
|
+
should_be_5e61 commits.first
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
it 'retrieves commits with a specific id' do
|
238
|
+
expect(:get, "#{github_yaml}/commits/show/joe007/fine_repo/5e61f0687c40ca48214d09dc7ae2d0d0d8fbfeb8") do
|
239
|
+
commit = @repo.commits :sha=> '5e61f0687c40ca48214d09dc7ae2d0d0d8fbfeb8'
|
240
|
+
should_be_5e61 commit
|
241
|
+
end
|
242
|
+
end
|
243
|
+
end
|
244
|
+
|
169
245
|
it 'tests' do
|
170
246
|
pending
|
171
247
|
api.auth = joe_auth
|
172
248
|
expect(:get, "#{github_yaml}/repos/showp/joe007/new_repo")
|
173
|
-
repos =
|
249
|
+
repos = GitHub::Repo.show('arvicco')
|
174
250
|
p repos
|
175
251
|
p repos.map(&:url)
|
176
252
|
repos.should be_an Array
|
@@ -182,55 +258,17 @@ module GitHubTest
|
|
182
258
|
end
|
183
259
|
|
184
260
|
# context 'manipulating repos' do
|
185
|
-
# before (:each) do
|
186
|
-
# @gh = described_class.new('joerepo')
|
187
|
-
# @name = "test#{Time.now.to_i}"
|
188
|
-
# end
|
189
|
-
# after (:each) do
|
190
|
-
# @gh.delete_repo @name
|
191
|
-
# end
|
192
|
-
#
|
193
|
-
# it 'creates new repo of a valid github user' do
|
194
|
-
# @gh.create_repo @name
|
195
|
-
# repos = @gh.repos
|
196
|
-
# repos.should_not be_empty
|
197
|
-
# repos.last[:name].should == @name
|
198
|
-
# end
|
199
|
-
#
|
200
261
|
# it 'creates SINGLE new repo' do
|
201
262
|
# # Problem: sticky cache
|
202
263
|
# r = @gh.repos
|
203
|
-
# p r
|
204
264
|
# n = r.size
|
205
265
|
#
|
206
266
|
# @gh.create_repo @name
|
207
267
|
# sleep 2
|
208
268
|
# rr = @gh.repos
|
209
|
-
# p rr
|
210
269
|
# rr.size.should == n+1
|
211
270
|
# end
|
212
271
|
#
|
213
|
-
# it 'creates and deletes repo of a valid github user' do
|
214
|
-
# #creating
|
215
|
-
# @gh.create_repo @name
|
216
|
-
# repos = @gh.repos
|
217
|
-
# repos.should_not be_empty
|
218
|
-
# repos.last[:name].should == @name
|
219
|
-
#
|
220
|
-
# #deleting
|
221
|
-
# @gh.delete_repo @name
|
222
|
-
# sleep 2
|
223
|
-
# repos = @gh.repos
|
224
|
-
# repos.last[:name].should_not == @name
|
225
|
-
# repos.find {|r|r[:name] == @name}.should == nil
|
226
|
-
# #false.should be_true
|
227
|
-
# end
|
228
|
-
#
|
229
|
-
# it 'returns nil if deleting non-existing repo' do
|
230
|
-
# result = @gh.delete_repo @name
|
231
|
-
# result.should == nil
|
232
|
-
# end
|
233
|
-
#
|
234
272
|
# it 'does not change repos size if deleting non-existing repo' do
|
235
273
|
# n = @gh.repos.size
|
236
274
|
#
|
data/spec/spec_helper.rb
CHANGED
@@ -16,7 +16,7 @@ module SpecMacros
|
|
16
16
|
# reads description line from source file and drops external brackets (like *spec*{}, *use*{})
|
17
17
|
def description_from(file, line)
|
18
18
|
File.open(file) do |f|
|
19
|
-
f.lines.to_a[line-1].gsub( Regexp.new('(spec.*?{)|(use.*?{)|}'), '' ).
|
19
|
+
f.lines.to_a[line-1].gsub( Regexp.new('(spec.*?{)|(use.*?{)|}'), '' ).strip
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
@@ -37,11 +37,6 @@ module GitHubTest
|
|
37
37
|
lambda {yield}.should_not raise_error
|
38
38
|
end
|
39
39
|
|
40
|
-
# Returns empty block (for use in spec descriptions)
|
41
|
-
def any_block
|
42
|
-
lambda {|*args| args}
|
43
|
-
end
|
44
|
-
|
45
40
|
# Extract response from file
|
46
41
|
def response_from_file(path)
|
47
42
|
filename = File.join(File.dirname(__FILE__), 'stubs', path + '.res')
|
@@ -57,8 +52,11 @@ module GitHubTest
|
|
57
52
|
end
|
58
53
|
|
59
54
|
def curl_string(path, filename)
|
60
|
-
|
61
|
-
|
55
|
+
if api.authenticated?
|
56
|
+
"curl -i -d \"login=#{api.auth['login']}&token=#{api.auth['token']}\" #{github_yaml}#{path} > #{filename}"
|
57
|
+
else
|
58
|
+
"curl -i #{github_yaml}#{path} > #{filename}"
|
59
|
+
end
|
62
60
|
end
|
63
61
|
|
64
62
|
# Stubs github server, with options:
|
@@ -187,4 +185,33 @@ module GitHubTest
|
|
187
185
|
GitHub::Api.instance
|
188
186
|
end
|
189
187
|
|
188
|
+
# specific expectations used in more than one spec file
|
189
|
+
def should_be_5e61 commit
|
190
|
+
arvicco = { 'name'=> 'arvicco', 'email'=> 'arvitallian@gmail.com'}
|
191
|
+
commit.should be_a GitHub::Commit
|
192
|
+
commit.sha.should == '5e61f0687c40ca48214d09dc7ae2d0d0d8fbfeb8'
|
193
|
+
commit.url.should == 'http://github.com/joe007/fine_repo/commit/5e61f0687c40ca48214d09dc7ae2d0d0d8fbfeb8'
|
194
|
+
commit.committed_date.should == "2010-01-08T02:49:26-08:00"
|
195
|
+
commit.authored_date.should == "2010-01-08T02:49:26-08:00"
|
196
|
+
commit.message.should == 'Version bump to 0.1.2'
|
197
|
+
commit.tree.should == '917a288e375020ac4c0f4413dc6f23d6f06fc51b'
|
198
|
+
commit.author.should == arvicco
|
199
|
+
commit.committer.should == arvicco
|
200
|
+
end
|
201
|
+
|
202
|
+
def should_be_543b commit
|
203
|
+
arvicco = { 'name'=> 'arvicco', 'email'=> 'arvitallian@gmail.com'}
|
204
|
+
commit.should be_a GitHub::Commit
|
205
|
+
commit.parents.should == []
|
206
|
+
commit.sha.should == '4f223bdbbfe6acade73f4b81d089f0705b07d75d'
|
207
|
+
commit.url.should == 'http://github.com/joe007/fine_repo/commit/4f223bdbbfe6acade73f4b81d089f0705b07d75d'
|
208
|
+
commit.committed_date.should == "2010-01-08T01:20:55-08:00"
|
209
|
+
commit.authored_date.should == "2010-01-08T01:20:55-08:00"
|
210
|
+
commit.message.should == 'First commit'
|
211
|
+
commit.tree.should == '543b9bebdc6bd5c4b22136034a95dd097a57d3dd'
|
212
|
+
commit.author.should == arvicco
|
213
|
+
commit.committer.should == arvicco
|
214
|
+
end
|
215
|
+
|
216
|
+
|
190
217
|
end # module GithubTest
|
@@ -0,0 +1,14 @@
|
|
1
|
+
HTTP/1.1 403 Forbidden
|
2
|
+
Server: nginx/0.7.61
|
3
|
+
Date: Sat, 09 Jan 2010 16:22:43 GMT
|
4
|
+
Content-Type: application/x-yaml; charset=utf-8
|
5
|
+
Connection: keep-alive
|
6
|
+
Status: 403 Forbidden
|
7
|
+
X-Runtime: 3ms
|
8
|
+
Content-Length: 47
|
9
|
+
Set-Cookie: _github_ses=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--884981fc5aa85daf318eeff084d98e2cff92578f; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
|
10
|
+
Cache-Control: no-cache
|
11
|
+
|
12
|
+
---
|
13
|
+
error:
|
14
|
+
- error: api route not recognized
|
@@ -0,0 +1,28 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/0.7.61
|
3
|
+
Date: Mon, 11 Jan 2010 09:03:16 GMT
|
4
|
+
Content-Type: application/x-yaml; charset=utf-8
|
5
|
+
Connection: keep-alive
|
6
|
+
Status: 200 OK
|
7
|
+
ETag: "3f463f93d59770ef0a1ddb8a5f28445d"
|
8
|
+
X-Runtime: 43ms
|
9
|
+
Content-Length: 458
|
10
|
+
Set-Cookie: _github_ses=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--884981fc5aa85daf318eeff084d98e2cff92578f; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
|
11
|
+
Cache-Control: private, max-age=0, must-revalidate
|
12
|
+
|
13
|
+
---
|
14
|
+
commits:
|
15
|
+
- parents: []
|
16
|
+
|
17
|
+
author:
|
18
|
+
name: arvicco
|
19
|
+
email: arvitallian@gmail.com
|
20
|
+
url: http://github.com/joe007/fine_repo/commit/4f223bdbbfe6acade73f4b81d089f0705b07d75d
|
21
|
+
id: 4f223bdbbfe6acade73f4b81d089f0705b07d75d
|
22
|
+
committed_date: "2010-01-08T01:20:55-08:00"
|
23
|
+
authored_date: "2010-01-08T01:20:55-08:00"
|
24
|
+
message: First commit
|
25
|
+
tree: 543b9bebdc6bd5c4b22136034a95dd097a57d3dd
|
26
|
+
committer:
|
27
|
+
name: arvicco
|
28
|
+
email: arvitallian@gmail.com
|
@@ -0,0 +1,84 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/0.7.61
|
3
|
+
Date: Sat, 09 Jan 2010 16:24:32 GMT
|
4
|
+
Content-Type: application/x-yaml; charset=utf-8
|
5
|
+
Connection: keep-alive
|
6
|
+
Status: 200 OK
|
7
|
+
ETag: "94ff6cdf88e08496e980636bd4cd9e4c"
|
8
|
+
X-Runtime: 24ms
|
9
|
+
Content-Length: 2453
|
10
|
+
Set-Cookie: _github_ses=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--884981fc5aa85daf318eeff084d98e2cff92578f; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
|
11
|
+
Cache-Control: private, max-age=0, must-revalidate
|
12
|
+
|
13
|
+
---
|
14
|
+
commits:
|
15
|
+
- parents:
|
16
|
+
- id: f7f5dddaa37deacc83f1f56876e2b135389d03ab
|
17
|
+
author:
|
18
|
+
name: arvicco
|
19
|
+
email: arvitallian@gmail.com
|
20
|
+
url: http://github.com/joe007/fine_repo/commit/5e61f0687c40ca48214d09dc7ae2d0d0d8fbfeb8
|
21
|
+
id: 5e61f0687c40ca48214d09dc7ae2d0d0d8fbfeb8
|
22
|
+
committed_date: "2010-01-08T02:49:26-08:00"
|
23
|
+
authored_date: "2010-01-08T02:49:26-08:00"
|
24
|
+
message: Version bump to 0.1.2
|
25
|
+
tree: 917a288e375020ac4c0f4413dc6f23d6f06fc51b
|
26
|
+
committer:
|
27
|
+
name: arvicco
|
28
|
+
email: arvitallian@gmail.com
|
29
|
+
- parents:
|
30
|
+
- id: 3a70f86293b719f193f778a8710b1f83f2f7bf38
|
31
|
+
author:
|
32
|
+
name: arvicco
|
33
|
+
email: arvitallian@gmail.com
|
34
|
+
url: http://github.com/joe007/fine_repo/commit/f7f5dddaa37deacc83f1f56876e2b135389d03ab
|
35
|
+
id: f7f5dddaa37deacc83f1f56876e2b135389d03ab
|
36
|
+
committed_date: "2010-01-08T02:48:39-08:00"
|
37
|
+
authored_date: "2010-01-08T02:48:39-08:00"
|
38
|
+
message: Version bump to 0.1.1
|
39
|
+
tree: 887d2a08b6bfcc173a98f4c46aafd8188b35a20b
|
40
|
+
committer:
|
41
|
+
name: arvicco
|
42
|
+
email: arvitallian@gmail.com
|
43
|
+
- parents:
|
44
|
+
- id: 42dfd3d4fcb5ba67dbefffe628676d5cc0ac104d
|
45
|
+
author:
|
46
|
+
name: arvicco
|
47
|
+
email: arvitallian@gmail.com
|
48
|
+
url: http://github.com/joe007/fine_repo/commit/3a70f86293b719f193f778a8710b1f83f2f7bf38
|
49
|
+
id: 3a70f86293b719f193f778a8710b1f83f2f7bf38
|
50
|
+
committed_date: "2010-01-08T02:46:53-08:00"
|
51
|
+
authored_date: "2010-01-08T02:46:53-08:00"
|
52
|
+
message: Regenerated gemspec for version 0.1.0
|
53
|
+
tree: fbb6f57a3ff4f2575937ca11eb82e3e507f8ef40
|
54
|
+
committer:
|
55
|
+
name: arvicco
|
56
|
+
email: arvitallian@gmail.com
|
57
|
+
- parents:
|
58
|
+
- id: 4f223bdbbfe6acade73f4b81d089f0705b07d75d
|
59
|
+
author:
|
60
|
+
name: arvicco
|
61
|
+
email: arvitallian@gmail.com
|
62
|
+
url: http://github.com/joe007/fine_repo/commit/42dfd3d4fcb5ba67dbefffe628676d5cc0ac104d
|
63
|
+
id: 42dfd3d4fcb5ba67dbefffe628676d5cc0ac104d
|
64
|
+
committed_date: "2010-01-08T02:46:43-08:00"
|
65
|
+
authored_date: "2010-01-08T02:46:43-08:00"
|
66
|
+
message: Jewelify
|
67
|
+
tree: 9dd7a5a8f0374a4c2678878ea8141de2c7cec80d
|
68
|
+
committer:
|
69
|
+
name: arvicco
|
70
|
+
email: arvitallian@gmail.com
|
71
|
+
- parents: []
|
72
|
+
|
73
|
+
author:
|
74
|
+
name: arvicco
|
75
|
+
email: arvitallian@gmail.com
|
76
|
+
url: http://github.com/joe007/fine_repo/commit/4f223bdbbfe6acade73f4b81d089f0705b07d75d
|
77
|
+
id: 4f223bdbbfe6acade73f4b81d089f0705b07d75d
|
78
|
+
committed_date: "2010-01-08T01:20:55-08:00"
|
79
|
+
authored_date: "2010-01-08T01:20:55-08:00"
|
80
|
+
message: First commit
|
81
|
+
tree: 543b9bebdc6bd5c4b22136034a95dd097a57d3dd
|
82
|
+
committer:
|
83
|
+
name: arvicco
|
84
|
+
email: arvitallian@gmail.com
|
@@ -0,0 +1,38 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/0.7.61
|
3
|
+
Date: Sat, 09 Jan 2010 16:46:54 GMT
|
4
|
+
Content-Type: application/x-yaml; charset=utf-8
|
5
|
+
Connection: keep-alive
|
6
|
+
Status: 200 OK
|
7
|
+
ETag: "73049b236814d48e9413dc94d7c4530c"
|
8
|
+
X-Runtime: 41ms
|
9
|
+
Content-Length: 632
|
10
|
+
Set-Cookie: _github_ses=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--884981fc5aa85daf318eeff084d98e2cff92578f; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
|
11
|
+
Cache-Control: private, max-age=0, must-revalidate
|
12
|
+
|
13
|
+
---
|
14
|
+
commit:
|
15
|
+
added: []
|
16
|
+
|
17
|
+
modified:
|
18
|
+
- diff: |-
|
19
|
+
@@ -1 +1 @@
|
20
|
+
-0.1.1
|
21
|
+
+0.1.2
|
22
|
+
filename: VERSION
|
23
|
+
removed: []
|
24
|
+
|
25
|
+
parents:
|
26
|
+
- id: f7f5dddaa37deacc83f1f56876e2b135389d03ab
|
27
|
+
author:
|
28
|
+
name: arvicco
|
29
|
+
email: arvitallian@gmail.com
|
30
|
+
url: http://github.com/joe007/fine_repo/commit/5e61f0687c40ca48214d09dc7ae2d0d0d8fbfeb8
|
31
|
+
id: 5e61f0687c40ca48214d09dc7ae2d0d0d8fbfeb8
|
32
|
+
committed_date: "2010-01-08T02:49:26-08:00"
|
33
|
+
authored_date: "2010-01-08T02:49:26-08:00"
|
34
|
+
message: Version bump to 0.1.2
|
35
|
+
tree: 917a288e375020ac4c0f4413dc6f23d6f06fc51b
|
36
|
+
committer:
|
37
|
+
name: arvicco
|
38
|
+
email: arvitallian@gmail.com
|
@@ -0,0 +1,22 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/0.7.61
|
3
|
+
Date: Fri, 08 Jan 2010 08:54:53 GMT
|
4
|
+
Content-Type: application/x-yaml; charset=utf-8
|
5
|
+
Connection: keep-alive
|
6
|
+
Status: 200 OK
|
7
|
+
ETag: "1a42167007cda558e52510a2d3087762"
|
8
|
+
X-Runtime: 104ms
|
9
|
+
Content-Length: 173
|
10
|
+
Set-Cookie: _github_ses=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--884981fc5aa85daf318eeff084d98e2cff92578f; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
|
11
|
+
Cache-Control: private, max-age=0, must-revalidate
|
12
|
+
|
13
|
+
---
|
14
|
+
repository:
|
15
|
+
:watchers: 1
|
16
|
+
:forks: 0
|
17
|
+
:url: http://github.com/joe007/new_repo
|
18
|
+
:fork: false
|
19
|
+
:private: false
|
20
|
+
:name: new_repo
|
21
|
+
:owner: joe007
|
22
|
+
:open_issues: 0
|
File without changes
|