octokit 1.4.0 → 1.5.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/lib/octokit/client.rb +0 -4
- data/lib/octokit/client/commits.rb +61 -3
- data/lib/octokit/client/issues.rb +0 -1
- data/lib/octokit/client/objects.rb +65 -20
- data/lib/octokit/client/organizations.rb +1 -6
- data/lib/octokit/client/repositories.rb +0 -5
- data/lib/octokit/client/users.rb +1 -7
- data/lib/octokit/version.rb +1 -1
- data/spec/fixtures/{v2 → legacy}/issues.json +0 -0
- data/spec/fixtures/{v2 → legacy}/repositories.json +0 -0
- data/spec/fixtures/{v2 → legacy}/users.json +0 -0
- data/spec/fixtures/v3/blob_create.json +3 -0
- data/spec/fixtures/v3/commit_create.json +25 -0
- data/spec/fixtures/v3/tree_create.json +14 -0
- data/spec/octokit/client/commits_spec.rb +16 -0
- data/spec/octokit/client/issues_spec.rb +1 -1
- data/spec/octokit/client/objects_spec.rb +23 -41
- data/spec/octokit/client/organizations_spec.rb +5 -20
- data/spec/octokit/client/repositories_spec.rb +1 -12
- data/spec/octokit/client/users_spec.rb +1 -12
- metadata +38 -54
- data/lib/octokit/client/network.rb +0 -15
- data/lib/octokit/client/timelines.rb +0 -21
- data/spec/fixtures/timeline.json +0 -1408
- data/spec/fixtures/v2/blob_metadata.json +0 -2052
- data/spec/fixtures/v2/blobs.json +0 -260
- data/spec/fixtures/v2/network_data.json +0 -3551
- data/spec/fixtures/v2/network_meta.json +0 -2530
- data/spec/fixtures/v2/raw.txt +0 -7
- data/spec/fixtures/v2/tree_metadata.json +0 -2612
- data/spec/fixtures/v2/user.json +0 -19
- data/spec/octokit/client/network_spec.rb +0 -32
- data/spec/octokit/client/timelines_spec.rb +0 -42
data/spec/fixtures/v2/user.json
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"user": {
|
3
|
-
"blog": "http://twitter.com/sferik",
|
4
|
-
"company": "Code for America",
|
5
|
-
"created_at": "2008/05/14 13:36:12 -0700",
|
6
|
-
"email": "sferik@gmail.com",
|
7
|
-
"followers_count": 118,
|
8
|
-
"following_count": 74,
|
9
|
-
"gravatar_id": "1f74b13f1e5c6c69cb5d7fbaabb1e2cb",
|
10
|
-
"id": 10308,
|
11
|
-
"location": "California",
|
12
|
-
"login": "sferik",
|
13
|
-
"name": "Erik Michaels-Ober",
|
14
|
-
"permission": null,
|
15
|
-
"public_gist_count": 12,
|
16
|
-
"public_repo_count": 22,
|
17
|
-
"type": "User"
|
18
|
-
}
|
19
|
-
}
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
require 'helper'
|
3
|
-
|
4
|
-
describe Octokit::Client::Network do
|
5
|
-
|
6
|
-
before do
|
7
|
-
@client = Octokit::Client.new(:login => 'sferik')
|
8
|
-
end
|
9
|
-
|
10
|
-
describe ".network_meta" do
|
11
|
-
|
12
|
-
it "should return network meta" do
|
13
|
-
stub_get("https://github.com/sferik/rails_admin/network_meta").
|
14
|
-
to_return(:body => fixture("v2/network_meta.json"))
|
15
|
-
network_meta = @client.network_meta("sferik/rails_admin")
|
16
|
-
network_meta.blocks.first.name.should == "sferik"
|
17
|
-
end
|
18
|
-
|
19
|
-
end
|
20
|
-
|
21
|
-
describe ".network_data" do
|
22
|
-
|
23
|
-
it "should return network data" do
|
24
|
-
stub_get("https://github.com/sferik/rails_admin/network_data_chunk").
|
25
|
-
to_return(:body => fixture("v2/network_data.json"))
|
26
|
-
network_data = @client.network_data("sferik/rails_admin")
|
27
|
-
network_data.first.login.should == "rosenfeld"
|
28
|
-
end
|
29
|
-
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
require 'helper'
|
3
|
-
|
4
|
-
describe Octokit::Client::Timelines do
|
5
|
-
|
6
|
-
describe ".timeline" do
|
7
|
-
|
8
|
-
it "should return the public timeline" do
|
9
|
-
client = Octokit::Client.new
|
10
|
-
stub_get("https://github.com/timeline.json").
|
11
|
-
to_return(:body => fixture("timeline.json"))
|
12
|
-
events = client.timeline
|
13
|
-
events.first.repository.name.should == "homebrew"
|
14
|
-
end
|
15
|
-
|
16
|
-
end
|
17
|
-
|
18
|
-
describe ".user_timeline" do
|
19
|
-
|
20
|
-
it "should return a user timeline" do
|
21
|
-
client = Octokit::Client.new
|
22
|
-
stub_get("https://github.com/sferik.json").
|
23
|
-
to_return(:body => fixture("timeline.json"))
|
24
|
-
events = client.user_timeline("sferik")
|
25
|
-
events.first.repository.name.should == "homebrew"
|
26
|
-
end
|
27
|
-
|
28
|
-
context "when authenticated" do
|
29
|
-
|
30
|
-
it "should return a user timeline" do
|
31
|
-
client = Octokit::Client.new(:login => "sferik", :password => "sekret")
|
32
|
-
stub_get("https://github.com/sferik.private.json").
|
33
|
-
to_return(:body => fixture("timeline.json"))
|
34
|
-
events = client.user_timeline("sferik")
|
35
|
-
events.first.repository.name.should == "homebrew"
|
36
|
-
end
|
37
|
-
|
38
|
-
end
|
39
|
-
|
40
|
-
end
|
41
|
-
|
42
|
-
end
|