git_hub 0.2.0 → 0.2.7
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 +30 -29
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/features/{zemax.feature → git_hub.feature} +0 -0
- data/features/step_definitions/{zemax_steps.rb → git_hub_steps.rb} +0 -0
- data/features/support/env.rb +1 -1
- data/git_hub.gemspec +10 -4
- data/lib/git_hub/base.rb +37 -23
- data/lib/git_hub/commit.rb +20 -17
- data/lib/git_hub/repo.rb +51 -31
- data/lib/git_hub.rb +1 -10
- data/rdoc/classes/GitHub/Api.html +49 -15
- data/rdoc/classes/GitHub/Base.html +147 -47
- data/rdoc/classes/GitHub/Commit.html +390 -0
- data/rdoc/classes/GitHub/Repo.html +266 -111
- data/rdoc/classes/GitHub.html +34 -60
- data/rdoc/created.rid +1 -1
- data/rdoc/files/README_rdoc.html +43 -18
- data/rdoc/files/lib/git_hub/api_rb.html +2 -2
- data/rdoc/files/lib/git_hub/base_rb.html +2 -2
- data/rdoc/files/lib/git_hub/commit_rb.html +91 -0
- data/rdoc/files/lib/git_hub/repo_rb.html +2 -2
- data/rdoc/files/lib/git_hub_rb.html +2 -2
- data/rdoc/fr_class_index.html +4 -2
- data/rdoc/fr_file_index.html +4 -2
- data/rdoc/fr_method_index.html +42 -24
- data/rdoc/index.html +2 -2
- data/spec/git_hub/commit_spec.rb +6 -6
- data/spec/git_hub/repo_spec.rb +12 -7
- data/spec/git_hub/user_spec.rb +15 -0
- data/spec/spec_helper.rb +6 -2
- data/spec/stubs/commits/show/joe007/fine_repo/3a70f86293b719f193f778a8710b1f83f2f7bf38.res +47 -0
- data/spec/stubs/commits/show/joe007/fine_repo/f7f5dddaa37deacc83f1f56876e2b135389d03ab.res +38 -0
- metadata +10 -4
data/spec/git_hub/commit_spec.rb
CHANGED
@@ -14,26 +14,26 @@ module GitHubTest
|
|
14
14
|
commits.should be_an Array
|
15
15
|
commits.should_not be_empty
|
16
16
|
commits.should have(5).commits
|
17
|
-
commits.each {|commit| commit.should be_a GitHub::Commit}
|
18
|
-
|
17
|
+
commits.each {|commit| commit.should be_a GitHub::Commit}
|
18
|
+
should_be_commit_5e61 commits.first
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
it 'finds all commits for a specific
|
22
|
+
it 'finds all commits for a specific path' do
|
23
23
|
expect(:get, "#{github_yaml}/commits/list/joe007/fine_repo/master/README") do
|
24
|
-
commits = GitHub::Commit.find(:user=>'joe007', :repo=>'fine_repo', :path=>
|
24
|
+
commits = GitHub::Commit.find(:user=>'joe007', :repo=>'fine_repo', :path=>'README')
|
25
25
|
commits.should be_an Array
|
26
26
|
commits.should_not be_empty
|
27
27
|
commits.should have(1).commit
|
28
28
|
commits.each {|commit| commit.should be_a GitHub::Commit}
|
29
|
-
|
29
|
+
should_be_commit_543b commits.first
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
33
|
it 'finds commits with a specific id(sha)' do
|
34
34
|
expect(:get, "#{github_yaml}/commits/show/joe007/fine_repo/5e61f0687c40ca48214d09dc7ae2d0d0d8fbfeb8") do
|
35
35
|
commit = GitHub::Commit.find :user=> 'joe007', :repo=>'fine_repo', :sha=> '5e61f0687c40ca48214d09dc7ae2d0d0d8fbfeb8'
|
36
|
-
|
36
|
+
should_be_commit_5e61 commit
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
data/spec/git_hub/repo_spec.rb
CHANGED
@@ -65,7 +65,7 @@ module GitHubTest
|
|
65
65
|
repo.owner.should == 'joe007'
|
66
66
|
repo.username.should == 'joe007'
|
67
67
|
end
|
68
|
-
end
|
68
|
+
end
|
69
69
|
|
70
70
|
it 'returns repos with "search" attributes unset' do
|
71
71
|
expect(:get, "#{github_yaml}/repos/show/joe007") do
|
@@ -204,23 +204,28 @@ module GitHubTest
|
|
204
204
|
@repo = GitHub::Repo.find(:user=>'joe007', :repo=>'fine_repo')
|
205
205
|
end
|
206
206
|
|
207
|
-
it 'retrieves repo tags' do
|
207
|
+
it 'retrieves repo tags as a Hash with tag name keys and Commit values' do
|
208
|
+
expect(:get, "#{github_yaml}/commits/show/joe007/fine_repo/3a70f86293b719f193f778a8710b1f83f2f7bf38")
|
209
|
+
expect(:get, "#{github_yaml}/commits/show/joe007/fine_repo/f7f5dddaa37deacc83f1f56876e2b135389d03ab")
|
210
|
+
expect(:get, "#{github_yaml}/commits/show/joe007/fine_repo/5e61f0687c40ca48214d09dc7ae2d0d0d8fbfeb8")
|
208
211
|
expect(:get, "#{github_yaml}/repos/show/joe007/fine_repo/tags") do
|
209
212
|
tags = @repo.tags
|
210
213
|
tags.should be_kind_of Hash
|
211
214
|
tags.should have(3).tags
|
215
|
+
tags.each {|tag, commit| commit.should be_a GitHub::Commit}
|
212
216
|
tags.should have_key 'v0.1.2'
|
213
|
-
tags['v0.1.2']
|
217
|
+
should_be_commit_5e61 tags['v0.1.2']
|
214
218
|
end
|
215
219
|
end
|
216
220
|
|
217
|
-
it 'retrieves repo branches' do
|
221
|
+
it 'retrieves repo branches as a Hash with branch name keys and Commit values' do
|
218
222
|
expect(:get, "#{github_yaml}/repos/show/joe007/fine_repo/branches") do
|
219
223
|
branches = @repo.branches
|
220
224
|
branches.should be_kind_of Hash
|
221
225
|
branches.should have(1).branches
|
226
|
+
branches.each {|tag, commit| commit.should be_a GitHub::Commit}
|
222
227
|
branches.should have_key 'master'
|
223
|
-
branches['master']
|
228
|
+
should_be_commit_5e61 branches['master']
|
224
229
|
end
|
225
230
|
end
|
226
231
|
|
@@ -230,14 +235,14 @@ module GitHubTest
|
|
230
235
|
commits.should be_kind_of Array
|
231
236
|
commits.should have(5).commits
|
232
237
|
commits.each {|commit| commit.should be_a GitHub::Commit}
|
233
|
-
|
238
|
+
should_be_commit_5e61 commits.first
|
234
239
|
end
|
235
240
|
end
|
236
241
|
|
237
242
|
it 'retrieves commits with a specific id' do
|
238
243
|
expect(:get, "#{github_yaml}/commits/show/joe007/fine_repo/5e61f0687c40ca48214d09dc7ae2d0d0d8fbfeb8") do
|
239
244
|
commit = @repo.commits :sha=> '5e61f0687c40ca48214d09dc7ae2d0d0d8fbfeb8'
|
240
|
-
|
245
|
+
should_be_commit_5e61 commit
|
241
246
|
end
|
242
247
|
end
|
243
248
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require File.expand_path(
|
2
|
+
File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
3
|
+
|
4
|
+
module GitHubTest
|
5
|
+
describe GitHub::User do
|
6
|
+
after(:each) do
|
7
|
+
api.auth.clear
|
8
|
+
end
|
9
|
+
|
10
|
+
context '.find as /show/:user/:repo' do
|
11
|
+
it 'finds repo of a (valid) github user' do
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -186,7 +186,7 @@ module GitHubTest
|
|
186
186
|
end
|
187
187
|
|
188
188
|
# specific expectations used in more than one spec file
|
189
|
-
def
|
189
|
+
def should_be_commit_5e61 commit
|
190
190
|
arvicco = { 'name'=> 'arvicco', 'email'=> 'arvitallian@gmail.com'}
|
191
191
|
commit.should be_a GitHub::Commit
|
192
192
|
commit.sha.should == '5e61f0687c40ca48214d09dc7ae2d0d0d8fbfeb8'
|
@@ -197,9 +197,11 @@ module GitHubTest
|
|
197
197
|
commit.tree.should == '917a288e375020ac4c0f4413dc6f23d6f06fc51b'
|
198
198
|
commit.author.should == arvicco
|
199
199
|
commit.committer.should == arvicco
|
200
|
+
commit.user.should == 'joe007'
|
201
|
+
commit.repo.should == 'fine_repo'
|
200
202
|
end
|
201
203
|
|
202
|
-
def
|
204
|
+
def should_be_commit_543b commit
|
203
205
|
arvicco = { 'name'=> 'arvicco', 'email'=> 'arvitallian@gmail.com'}
|
204
206
|
commit.should be_a GitHub::Commit
|
205
207
|
commit.parents.should == []
|
@@ -211,6 +213,8 @@ module GitHubTest
|
|
211
213
|
commit.tree.should == '543b9bebdc6bd5c4b22136034a95dd097a57d3dd'
|
212
214
|
commit.author.should == arvicco
|
213
215
|
commit.committer.should == arvicco
|
216
|
+
commit.user.should == 'joe007'
|
217
|
+
commit.repo.should == 'fine_repo'
|
214
218
|
end
|
215
219
|
|
216
220
|
|
@@ -0,0 +1,47 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/0.7.61
|
3
|
+
Date: Tue, 12 Jan 2010 06:50:30 GMT
|
4
|
+
Content-Type: application/x-yaml; charset=utf-8
|
5
|
+
Connection: keep-alive
|
6
|
+
Status: 200 OK
|
7
|
+
ETag: "239b7ad72518022f70350a943aa57232"
|
8
|
+
X-Runtime: 42ms
|
9
|
+
Content-Length: 954
|
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
|
+
@@ -16,7 +16,10 @@ Gem::Specification.new do |s|
|
20
|
+
"README"
|
21
|
+
]
|
22
|
+
s.files = [
|
23
|
+
- "README"
|
24
|
+
+ "README",
|
25
|
+
+ "Rakefile",
|
26
|
+
+ "VERSION",
|
27
|
+
+ "git_hub.gemspec"
|
28
|
+
]
|
29
|
+
s.homepage = %q{http://github.com/arvicco/git_hub}
|
30
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
31
|
+
filename: git_hub.gemspec
|
32
|
+
removed: []
|
33
|
+
|
34
|
+
parents:
|
35
|
+
- id: 42dfd3d4fcb5ba67dbefffe628676d5cc0ac104d
|
36
|
+
author:
|
37
|
+
name: arvicco
|
38
|
+
email: arvitallian@gmail.com
|
39
|
+
url: http://github.com/joe007/fine_repo/commit/3a70f86293b719f193f778a8710b1f83f2f7bf38
|
40
|
+
id: 3a70f86293b719f193f778a8710b1f83f2f7bf38
|
41
|
+
committed_date: "2010-01-08T02:46:53-08:00"
|
42
|
+
authored_date: "2010-01-08T02:46:53-08:00"
|
43
|
+
message: Regenerated gemspec for version 0.1.0
|
44
|
+
tree: fbb6f57a3ff4f2575937ca11eb82e3e507f8ef40
|
45
|
+
committer:
|
46
|
+
name: arvicco
|
47
|
+
email: arvitallian@gmail.com
|
@@ -0,0 +1,38 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/0.7.61
|
3
|
+
Date: Tue, 12 Jan 2010 06:51:00 GMT
|
4
|
+
Content-Type: application/x-yaml; charset=utf-8
|
5
|
+
Connection: keep-alive
|
6
|
+
Status: 200 OK
|
7
|
+
ETag: "4d1115e73820db09e2e502803a6dc623"
|
8
|
+
X-Runtime: 262ms
|
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.0
|
21
|
+
+0.1.1
|
22
|
+
filename: VERSION
|
23
|
+
removed: []
|
24
|
+
|
25
|
+
parents:
|
26
|
+
- id: 3a70f86293b719f193f778a8710b1f83f2f7bf38
|
27
|
+
author:
|
28
|
+
name: arvicco
|
29
|
+
email: arvitallian@gmail.com
|
30
|
+
url: http://github.com/joe007/fine_repo/commit/f7f5dddaa37deacc83f1f56876e2b135389d03ab
|
31
|
+
id: f7f5dddaa37deacc83f1f56876e2b135389d03ab
|
32
|
+
committed_date: "2010-01-08T02:48:39-08:00"
|
33
|
+
authored_date: "2010-01-08T02:48:39-08:00"
|
34
|
+
message: Version bump to 0.1.1
|
35
|
+
tree: 887d2a08b6bfcc173a98f4c46aafd8188b35a20b
|
36
|
+
committer:
|
37
|
+
name: arvicco
|
38
|
+
email: arvitallian@gmail.com
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git_hub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- arvicco
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-01-
|
12
|
+
date: 2010-01-12 00:00:00 +03:00
|
13
13
|
default_executable: git_hub
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -47,9 +47,9 @@ files:
|
|
47
47
|
- Rakefile
|
48
48
|
- VERSION
|
49
49
|
- bin/git_hub
|
50
|
-
- features/
|
50
|
+
- features/git_hub.feature
|
51
|
+
- features/step_definitions/git_hub_steps.rb
|
51
52
|
- features/support/env.rb
|
52
|
-
- features/zemax.feature
|
53
53
|
- git_hub.gemspec
|
54
54
|
- lib/git_hub.rb
|
55
55
|
- lib/git_hub/api.rb
|
@@ -59,11 +59,13 @@ files:
|
|
59
59
|
- rdoc/classes/GitHub.html
|
60
60
|
- rdoc/classes/GitHub/Api.html
|
61
61
|
- rdoc/classes/GitHub/Base.html
|
62
|
+
- rdoc/classes/GitHub/Commit.html
|
62
63
|
- rdoc/classes/GitHub/Repo.html
|
63
64
|
- rdoc/created.rid
|
64
65
|
- rdoc/files/README_rdoc.html
|
65
66
|
- rdoc/files/lib/git_hub/api_rb.html
|
66
67
|
- rdoc/files/lib/git_hub/base_rb.html
|
68
|
+
- rdoc/files/lib/git_hub/commit_rb.html
|
67
69
|
- rdoc/files/lib/git_hub/repo_rb.html
|
68
70
|
- rdoc/files/lib/git_hub_rb.html
|
69
71
|
- rdoc/fr_class_index.html
|
@@ -75,12 +77,15 @@ files:
|
|
75
77
|
- spec/git_hub/base_spec.rb
|
76
78
|
- spec/git_hub/commit_spec.rb
|
77
79
|
- spec/git_hub/repo_spec.rb
|
80
|
+
- spec/git_hub/user_spec.rb
|
78
81
|
- spec/spec.opts
|
79
82
|
- spec/spec_helper.rb
|
80
83
|
- spec/stubs/api_route_error.res
|
81
84
|
- spec/stubs/commits/list/joe007/fine_repo/master.res
|
82
85
|
- spec/stubs/commits/list/joe007/fine_repo/master/README.res
|
86
|
+
- spec/stubs/commits/show/joe007/fine_repo/3a70f86293b719f193f778a8710b1f83f2f7bf38.res
|
83
87
|
- spec/stubs/commits/show/joe007/fine_repo/5e61f0687c40ca48214d09dc7ae2d0d0d8fbfeb8.res
|
88
|
+
- spec/stubs/commits/show/joe007/fine_repo/f7f5dddaa37deacc83f1f56876e2b135389d03ab.res
|
84
89
|
- spec/stubs/repos/create.1.res
|
85
90
|
- spec/stubs/repos/create.2.res
|
86
91
|
- spec/stubs/repos/create.3.res
|
@@ -127,4 +132,5 @@ test_files:
|
|
127
132
|
- spec/git_hub/base_spec.rb
|
128
133
|
- spec/git_hub/commit_spec.rb
|
129
134
|
- spec/git_hub/repo_spec.rb
|
135
|
+
- spec/git_hub/user_spec.rb
|
130
136
|
- spec/spec_helper.rb
|